ath9k: fix reliability issues with TKIP MIC verification
[openwrt/svn-archive/archive.git] / package / madwifi / patches / 422-confchange_reset.patch
1 --- a/net80211/ieee80211_wireless.c
2 +++ b/net80211/ieee80211_wireless.c
3 @@ -70,7 +70,8 @@
4 (((_dev)->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP))
5 #define IS_UP_AUTO(_vap) \
6 (IS_UP((_vap)->iv_dev) && \
7 - (_vap)->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO)
8 + (((_vap)->iv_opmode == IEEE80211_M_HOSTAP) || \
9 + (_vap)->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO))
10 #define RESCAN 1
11
12 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
13 @@ -283,7 +284,7 @@ ieee80211_ioctl_siwencode(struct net_dev
14 vap->iv_flags &= ~IEEE80211_F_DROPUNENC;
15 }
16 }
17 - if ((error == 0) && IS_UP(vap->iv_dev)) {
18 + if ((error == 0) && IS_UP_AUTO(vap) && wepchange) {
19 /*
20 * Device is up and running; we must kick it to
21 * effect the change. If we're enabling/disabling
22 @@ -291,8 +292,7 @@ ieee80211_ioctl_siwencode(struct net_dev
23 * so the 802.11 state machine is reset. Otherwise
24 * the key state should have been updated above.
25 */
26 - if (wepchange && IS_UP_AUTO(vap))
27 - ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
28 + ieee80211_new_state(vap, IEEE80211_S_SCAN, 0);
29 }
30 #ifdef ATH_SUPERG_XR
31 /* set the same params on the xr vap device if exists */