Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Feb 2016 17:42:21 +0200
From:      "Andriy Voskoboinyk" <s3erios@gmail.com>
To:        "Hans Petter Selasky" <hps@selasky.org>, "Adrian Chadd" <adrian.chadd@gmail.com>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r295607 - head/sys/dev/usb/wlan
Message-ID:  <op.yctxwv1eiew4ia@localhost>
In-Reply-To: <56C09FB4.4000201@selasky.org>
References:  <201602140716.u1E7Gaot040504@repo.freebsd.org> <CAJ-Vmo=9cCtdY5_a_mQVm5h5an7F=H75uw7LYu9uK3UEA5n0Vg@mail.gmail.com> <56C09FB4.4000201@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Sun, 14 Feb 2016 17:39:32 +0200 =D0=B1=D1=83=D0=BB=D0=BE =D0=BD=D0=B0=D0=
=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=BE Hans Petter Selasky  =

<hps@selasky.org>:

This does not related to pairwise keys management:

static void
rum_group_key_set_cb(struct rum_softc *sc, union sec_param *data,
     uint8_t rvp_id)
{
...
	/* Set cipher mode. */
           if (rum_modbits(sc, rvp_id < 2 ? RT2573_SEC_CSR1 :  =

RT2573_SEC_CSR5,
                 mode << (rvp_id % 2 + k->wk_keyix) * RT2573_SKEY_MAX,
                 RT2573_MODE_MASK << (rvp_id % 2 + k->wk_keyix) *  =

RT2573_SKEY_MAX) !=3D 0)
                   goto print_err;
...
}

For group keys, k->wk_keyix is assigned in another way:

static int
rum_key_alloc(struct ieee80211vap *vap, struct ieee80211_key *k,
     ieee80211_keyix *keyix, ieee80211_keyix *rxkeyix)
{
...
	*keyix =3D k - vap->iv_nw_keys;
     }
...
}

> On 02/14/16 16:23, Adrian Chadd wrote:
>> uhm, why'd you not just file a separate pr for this?
>>
>> 8 keys limits how many stations it can support in hostap mode :( I'd
>> rather the bitmap management code gets fixed.
>>
>
> Hi,
>
>  From what I can see 8 keys is the maximum due to the following shift:=

>
>          /* Set cipher mode. */
>          if (rum_modbits(sc, rvp_id < 2 ? RT2573_SEC_CSR1 :  =

> RT2573_SEC_CSR5,
>                mode << (rvp_id % 2 + k->wk_keyix) * RT2573_SKEY_MAX,
>                RT2573_MODE_MASK << (rvp_id % 2 + k->wk_keyix) *  =

> RT2573_SKEY_MAX)
>              !=3D 0)
>                  goto print_err;
>
>
> It is only about bitmanagement, but about where to actually write thos=
e  =

> bits. Feel free to fix it.
>
> --HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.yctxwv1eiew4ia>