Re: [Madwifi-devel] Atheros hardware key cache and multicast keys
Status: Beta
Brought to you by:
otaku
From: Benoit P. <ben...@fr...> - 2008-03-30 20:48:38
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Benoit PAPILLAULT a écrit : | Reading ath5k source code and current madwifi, I think I found something | interesting. Your previous mail from referring to some multicast feature | that needs to be enabled. Indeed, sc_mcastkey is inside a #if 0 section. | ~From my reading, the ath_hal_getmcastkeysearch() function just check if | the feature is enabled or not. There should be a corresponding | ath_hal_setmcastkeysearch() probably since there is also a | ath_hal_hastmcastkeysearch(). | | Maybe if you try this that would work? If have successfully enabled it. This means that ath_hal_getmcastkeysearch() now returns 1! | | Moreover, I'd like to understand a bit further how the hardware is | working. From ath5k, there is only one MAC address (if any...) in the | hardware. From madwifi, it seems that up to 4 keys are created : RX/TX | and MIC stuff (don't know what it is). | | So maybe we just need to know what proper combination of RX/TX keys we | need to setup? Further reading shows that TX key is selected when filling the TX descriptor by ath_hal_setuptxdesc (see ath_tx_start). I've been playing with the RX side using WEP and the following keycache: [ 0] keytype 0 [WEP40] mac 00:00:00:00:00:00 key:78563412-00000090-00000000-00000000-00000000 [ 1] keytype 0 [WEP40] mac 00:00:00:00:00:00 key:78563412-00000090-00000000-00000000-00000000 [ 2] keytype 0 [WEP40] mac 00:00:00:00:00:00 key:78563412-00000090-00000000-00000000-00000000 [ 3] keytype 0 [WEP40] mac 06:0b:6b:37:a5:34 key:78563412-00000090-00000000-00000000-00000000 [ 4] keytype 0 [WEP40] mac 00:00:00:00:00:00 key:78563412-00000090-00000000-00000000-00000000 [100] keytype 0 [WEP40] mac 06:0b:6b:56:6c:a5 key:78563412-00000090-00000000-00000000-00000000 [101] keytype 0 [WEP40] mac 86:0b:6b:56:6c:a5 key:78563412-00000090-00000000-00000000-00000000 [102] keytype 0 [WEP40] mac 06:0b:6b:37:a5:34 key:78563412-00000090-00000000-00000000-00000000 [103] keytype 0 [WEP40] mac 86:0b:6b:37:a5:34 key:78563412-00000090-00000000-00000000-00000000 The [] is the keycache index. When receiving unicast from 06:0b:6b:56:6c:a5, the keycache index 100 is selected and reported in rs_keyix. However, when receiving broadcast packets (the sending node use WEP Key ID = 3), the keycache index 3 is still used and rs_keyix = 255 is reported. I was expecting that keycache index 101 be used :-( My fear is that nor current madwifi, nor the FreeBSD drived are using this sc_mcastkey feature, so inline comments in code applies to source code that has probably never be tested! Regards, Benoit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH7/ygOR6EySwP7oIRAjOrAJ46cD7W/aqR7R4M4saLJrWBFnRz+wCglfhg wrRZz2tldtfT0MU3Y5SpKTw= =o2N5 -----END PGP SIGNATURE----- |