diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-05-07 11:32:47 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-05-07 11:32:47 +0000 |
commit | 28dbc959ca75f6ca3c3f6a6c9295a5924dad469b (patch) | |
tree | 5064e19b85fb38d74e5975696c01e223259f6a32 /package/madwifi/patches/422-confchange_reset.patch | |
parent | b4574b5b03437da68522be96dcc28634d9f0f42a (diff) | |
download | mtk-20170518-28dbc959ca75f6ca3c3f6a6c9295a5924dad469b.zip mtk-20170518-28dbc959ca75f6ca3c3f6a6c9295a5924dad469b.tar.gz mtk-20170518-28dbc959ca75f6ca3c3f6a6c9295a5924dad469b.tar.bz2 |
madwifi: fix run-time changing of iwpriv settings (thx, brainslayer)
SVN-Revision: 15664
Diffstat (limited to 'package/madwifi/patches/422-confchange_reset.patch')
-rw-r--r-- | package/madwifi/patches/422-confchange_reset.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/package/madwifi/patches/422-confchange_reset.patch b/package/madwifi/patches/422-confchange_reset.patch new file mode 100644 index 0000000..33040ae --- /dev/null +++ b/package/madwifi/patches/422-confchange_reset.patch @@ -0,0 +1,31 @@ +--- a/net80211/ieee80211_wireless.c ++++ b/net80211/ieee80211_wireless.c +@@ -70,7 +70,8 @@ + (((_dev)->flags & (IFF_RUNNING|IFF_UP)) == (IFF_RUNNING|IFF_UP)) + #define IS_UP_AUTO(_vap) \ + (IS_UP((_vap)->iv_dev) && \ +- (_vap)->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO) ++ (((_vap)->iv_opmode == IEEE80211_M_HOSTAP) || \ ++ (_vap)->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO)) + #define RESCAN 1 + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) +@@ -283,7 +284,7 @@ ieee80211_ioctl_siwencode(struct net_dev + vap->iv_flags &= ~IEEE80211_F_DROPUNENC; + } + } +- if ((error == 0) && IS_UP(vap->iv_dev)) { ++ if ((error == 0) && IS_UP_AUTO(vap) && wepchange) { + /* + * Device is up and running; we must kick it to + * effect the change. If we're enabling/disabling +@@ -291,8 +292,7 @@ ieee80211_ioctl_siwencode(struct net_dev + * so the 802.11 state machine is reset. Otherwise + * the key state should have been updated above. + */ +- if (wepchange && IS_UP_AUTO(vap)) +- ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); ++ ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); + } + #ifdef ATH_SUPERG_XR + /* set the same params on the xr vap device if exists */ |