diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2014-04-21 20:09:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-13 15:55:56 -0400 |
commit | d5738b41e555f97f597b19bc549fa811b516d6b6 (patch) | |
tree | b57b4abc0e9540169ad49b093e6f74efcd0f484e | |
parent | 3231d65ffe36e177caf5006d4079867d9b7b2d4a (diff) |
Revert "wl1251: enforce changed hw encryption support on monitor state change"
This reverts commit b90a1165a72fabdc260abaa9eeadcbfd29e267eb.
That commit (or rather, hack) triggers a scary WARN in IBSS (ad-hoc) mode.
Steps to reproduce:
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc
ifconfig wlan0 up
------------[ cut here ]------------
WARNING: CPU: 0 PID: 905 at kernel/workqueue.c:1400 __queue_work+0x21c/0x2f4()
Modules linked in: wl1251_sdio wl1251 mac80211 cfg80211
CPU: 0 PID: 905 Comm: ifconfig Not tainted 3.15.0-rc2#233
[<c0015f38>] (unwind_backtrace) from [<c0012938>]
[<c0012938>] (show_stack) from [<c05d4034>]
[<c05d4034>] (dump_stack) from [<c0043984>]
[<c0043984>] (warn_slowpath_common) from [<c00439c0>]
[<c00439c0>] (warn_slowpath_null) from [<c005b6c8>]
[<c005b6c8>] (__queue_work) from [<c005b820>]
[<c005b820>] (queue_work_on) from [<bf134ac0>]
[<bf134ac0>] (wl1251_op_config [wl1251])
[<bf099a70>] (ieee80211_hw_config [mac80211])
...
This happens because ieee80211_connection_loss() is not expected to be
called in IBSS mode (mac80211 ends up queuing uninitialized work
in that case).
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ti/wl1251/main.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index 757e25784a8a..c22e2251ad67 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c | |||
@@ -687,16 +687,6 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) | |||
687 | wl->power_level = conf->power_level; | 687 | wl->power_level = conf->power_level; |
688 | } | 688 | } |
689 | 689 | ||
690 | /* | ||
691 | * Tell stack that connection is lost because hw encryption isn't | ||
692 | * supported in monitor mode. | ||
693 | * This requires temporary enabling of the hw connection monitor flag | ||
694 | */ | ||
695 | if ((changed & IEEE80211_CONF_CHANGE_MONITOR) && wl->vif) { | ||
696 | wl->hw->flags |= IEEE80211_HW_CONNECTION_MONITOR; | ||
697 | ieee80211_connection_loss(wl->vif); | ||
698 | } | ||
699 | |||
700 | out_sleep: | 690 | out_sleep: |
701 | wl1251_ps_elp_sleep(wl); | 691 | wl1251_ps_elp_sleep(wl); |
702 | 692 | ||
@@ -1129,9 +1119,6 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1129 | } | 1119 | } |
1130 | 1120 | ||
1131 | if (changed & BSS_CHANGED_ASSOC) { | 1121 | if (changed & BSS_CHANGED_ASSOC) { |
1132 | /* Disable temporary enabled hw connection monitor flag */ | ||
1133 | wl->hw->flags &= ~IEEE80211_HW_CONNECTION_MONITOR; | ||
1134 | |||
1135 | if (bss_conf->assoc) { | 1122 | if (bss_conf->assoc) { |
1136 | wl->beacon_int = bss_conf->beacon_int; | 1123 | wl->beacon_int = bss_conf->beacon_int; |
1137 | 1124 | ||