summaryrefslogtreecommitdiffstats
path: root/sys/dev/wi/if_wivar.h
diff options
context:
space:
mode:
authoravatar <avatar@FreeBSD.org>2005-10-02 04:29:08 +0000
committeravatar <avatar@FreeBSD.org>2005-10-02 04:29:08 +0000
commit21345d1652e54640c8a244f7f75717f7078e5a01 (patch)
tree8cee6fb67928c9283242338c92e994b82976bae2 /sys/dev/wi/if_wivar.h
parent4aac14991941450642bcd39207147b5502a195d1 (diff)
downloadFreeBSD-src-21345d1652e54640c8a244f7f75717f7078e5a01.zip
FreeBSD-src-21345d1652e54640c8a244f7f75717f7078e5a01.tar.gz
Fixing WEP bustage in hostap mode since 5.2-RELEASE.
- WEP TX fix: The original code called software crypto, ieee80211_crypto_encap(), which never worked since IEEE80211_KEY_SWCRYPT was never flagged due to ieee80211_crypto_newkey() assumes that wi always supports hardware based crypto regardless of operational mode(by virtue of IEEE80211_C_WEP). This fix works around that issue by adding wi_key_alloc() to force the use of s/w crypto. Also if anyone ever decides to cleanup ioctl handling where key changes wouldn't cause a call to wi_init() every time, we'll need wi_key_alloc() to DTRT. In addition to that, this fix also adds code to wi_write_wep() to force existing keys to be switched between h/w and s/w crypto such that an operation mode change(sta <-> hostap) will flag IEEE80211_KEY_SWCRYPT properly. - WEP RX fix: Clear IEEE80211_F_DROPUNENC even in hostap mode. Quote from Sam: "This is really gross but I don't see an easy way around it. By doing it we lose the ability to independently drop unencode frames (and support mixed wep/!wep use). We should really be setting the EXCLUDE_UNENCRYPTED flag written in wi_write_wep based on IEEE80211_F_DROPUNENC but with our clearing it we can't depend on it being set properly." Reported by: Holm Tiffe <holm at freibergnet dot de> Submitted by: sam MFC after: 3 days
Diffstat (limited to 'sys/dev/wi/if_wivar.h')
-rw-r--r--sys/dev/wi/if_wivar.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/wi/if_wivar.h b/sys/dev/wi/if_wivar.h
index be90399..a00dd33 100644
--- a/sys/dev/wi/if_wivar.h
+++ b/sys/dev/wi/if_wivar.h
@@ -66,6 +66,9 @@ struct wi_softc {
struct ieee80211com sc_ic;
int (*sc_newstate)(struct ieee80211com *,
enum ieee80211_state, int);
+ int (*sc_key_alloc)(struct ieee80211com *,
+ const struct ieee80211_key *,
+ ieee80211_keyix *, ieee80211_keyix *);
device_t sc_dev;
#if __FreeBSD_version >= 500000
struct mtx sc_mtx;
@@ -121,6 +124,7 @@ struct wi_softc {
u_int16_t sc_roaming_mode;
u_int16_t sc_microwave_oven;
u_int16_t sc_authtype;
+ u_int16_t sc_encryption;
int sc_nodelen;
char sc_nodename[IEEE80211_NWID_LEN];
OpenPOWER on IntegriCloud