acxsm: Move WEP code into softmac
Subsystems (2)
Hi,
This patch moves the WEP handling code to use the softmac layer and
implements acx_e_ieee80211_set_security(), based on the rt2x00 project's one.
I do have a couple of questions though:
1) adev->wep_restricted = 0 is the same as an open auth system, and adev->wep_restricted = 1 is the same as having a shared key auth system, right?
2) What is the purpose of the index field in key_struct_t? I've assumed it is the same as adev->wep_current_index, but I'm not sure this is correct.
cmn
Signature · 3 lines
Carlos Martín http://www.cmartin.tk "Erdbeben? Sicherlich etwas, das mit Erdberen zu tun hat." -- me, paraphrased
acx_struct.h +0 -33
@@ -603,31 +603,6 @@ typedef struct fw_ver {#define FW_ID_SIZE 20 - -/*--- WEP stuff --------------------------------------------------------------*/ -#define DOT11_MAX_DEFAULT_WEP_KEYS 4 - -/* non-firmware struct, no packing necessary */ -typedef struct wep_key { -size_t size;/* most often used member first */ -u8 index; -u8 key[29 ]; -u16 strange_filler; -}wep_key_t ;/* size = 264 bytes (33*8) */ -/* FIXME: We don't have size 264! Or is there 2 bytes beyond the key -* (strange_filler)? */ - -/* non-firmware struct, no packing necessary */ -typedef struct key_struct { -u8 addr[ETH_ALEN ];/* 0x00 */ -u16 filler1;/* 0x06 */ -u32 filler2;/* 0x08 */ -u32 index;/* 0x0c */ -u16 len;/* 0x10 */ -u8 key[29 ];/* 0x12; is this long enough??? */ -}key_struct_t ;/* size = 276. FIXME: where is the remaining space?? */ - -/*--- Client (peer) info -----------------------------------------------------*/ /* adev->sta_list[] is used for: ** accumulating and processing of scan results
@@ -1286,14 +1261,6 @@ struct acx_device {u8 rate_supported_len;u8 rate_supported[13 ]; -/*** Encryption settings (WEP) ***/ -u32 auth_alg;/* used in transmit_authen1 */ -u8 wep_enabled; -u8 wep_restricted; -u8 wep_current_index; -wep_key_t wep_keys[DOT11_MAX_DEFAULT_WEP_KEYS ];/* the default WEP keys */ -key_struct_t wep_key_struct[10 ]; -/*** Unknown ***/ u8 dtim_interval;
common.c +86 -22
183 lines not on this page · raw message
ioctl.c +22 -24
99 lines not on this page · raw message
pci.c +4 -0
@@ -1641,6 +1641,10 @@ acxpci_e_probe(struct pci_dev *pdev, con adev->softmac =ieee80211_priv (ndev); adev->softmac->set_channel = acx_e_ieee80211_set_chan; + adev->ieee->sec.encrypt =0 ; + adev->ieee->sec.enabled =0 ; + adev->ieee->sec.auth_mode =WLAN_AUTH_OPEN ; +#ifdef NONESSENTIAL_FEATURES acx_show_card_eeprom_id (adev);#endif /* NONESSENTIAL_FEATURES */
usb.c +4 -0
@@ -677,6 +677,10 @@ acxusb_e_probe(struct usb_interface *int adev->softmac =ieee80211_priv (ndev); adev->softmac->set_channel = acx_e_ieee80211_set_chan; + adev->ieee->sec.enabled =0 ; + adev->ieee->sec.encrypt =0 ; + adev->ieee->sec.auth_mode =WLAN_AUTH_OPEN ; +/* Check that this is really the hardware we know about. ** If not sure, at least notify the user that he ** may be in trouble...
Denis Vlasenko
AppliedQuoted 4 lines · Carlos Martín
Hi,
This patch moves the WEP handling code to use the softmac layer and
implementsacx_e_ieee80211_set_security(), based on the rt2x00 project's one.
Applied, thanks!
Quoted 8 lines
I do have a couple of questions though:
1)
adev->wep_restricted= 0 is the same as an open auth system, andadev->wep_restricted= 1 is the same as having a shared key auth system, right?2) What is the purpose of the index field in
key_struct_t? I've assumed it is the same asadev->wep_current_index, but I'm not sure this is correct.
To be honest, I did not pay much attention to inner WEP workings... --
vda
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
Quoted 2 lines · Denis Vlasenko
To be honest, I did not pay much attention to inner WEP workings...
That's alright then, it can always be fixed later.
cmn
Signature · 10 lines
Carlos Martín http://www.cmartin.tk "Erdbeben? Sicherlich etwas, das mit Erdberen zu tun hat." -- me, paraphrased ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642