Subject: Re: ath driver and wep
To: David Young <firstname.lastname@example.org>
From: Sam Leffler <email@example.com>
Date: 10/02/2005 14:46:36
David Young wrote:
> On Sun, Oct 02, 2005 at 11:22:52AM -0700, Sam Leffler wrote:
>>All ath key caches have more entries than the 4 used for the global (aka
>>wep) key table. It's rare that only the first 4 entries are used; even
>>in sta mode you use other entries. This means that if you want to
>>handle the most general case you must be prepared to restore all the
>>data which may require mucking with the net80211 data structures (or get
>>help from the net80211 layer to minimize layer violations).
> Do you think this would work, modulo the devilish details?
> 1 Link a driver's ieee80211_keys together---put the list head in
> ic->ic_crypto, say. Modify net80211's set/delete-key methods
> to maintain the ieee80211_keys list.
Not needed; keys are either in the global table or unicast keys stored
> 2 Modify the drivers' set/delete-key methods to do nothing if
> the power is off.
Not sure why this is needed. Drivers should already honor IFF_RUNNING
or similar if touching their hardware does the wrong thing.
> 3 In the drivers' xxx_newstate() methods, write keys to the
> hardware on a INIT->* transition, using the set-key method.
This is what Greg's patch did modulo ignoring some keys he didn't know
about. OTOH I'm not sure if this belongs in the driver or the net80211
layer where it could be shared by all drivers. It may be worthwhile
adding a net80211 routine to consolidate re-loading keys; it'd just walk
the node table looking for unicast keys and load the global key table.