Skip to content

Commit

Permalink
Revert "wl1251: enforce changed hw encryption support on monitor stat…
Browse files Browse the repository at this point in the history
…e change"

This reverts commit b90a116.

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 <[email protected]>
Tested-by: Pali Rohár <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
notaz authored and linvjw committed May 13, 2014
1 parent 3231d65 commit d5738b4
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions drivers/net/wireless/ti/wl1251/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,16 +687,6 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
wl->power_level = conf->power_level;
}

/*
* Tell stack that connection is lost because hw encryption isn't
* supported in monitor mode.
* This requires temporary enabling of the hw connection monitor flag
*/
if ((changed & IEEE80211_CONF_CHANGE_MONITOR) && wl->vif) {
wl->hw->flags |= IEEE80211_HW_CONNECTION_MONITOR;
ieee80211_connection_loss(wl->vif);
}

out_sleep:
wl1251_ps_elp_sleep(wl);

Expand Down Expand Up @@ -1129,9 +1119,6 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
}

if (changed & BSS_CHANGED_ASSOC) {
/* Disable temporary enabled hw connection monitor flag */
wl->hw->flags &= ~IEEE80211_HW_CONNECTION_MONITOR;

if (bss_conf->assoc) {
wl->beacon_int = bss_conf->beacon_int;

Expand Down

0 comments on commit d5738b4

Please sign in to comment.