Revert "wl1251: enforce changed hw encryption support on monitor state change"
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 Apr 2014 00:21:14 +0000 (03:21 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 Apr 2014 00:21:14 +0000 (03:21 +0300)
This reverts commit 1c0a933c25ed0c5a2a78c3f04d9c0622c7243f10.

This commit (or rather, hack) breaks ad-hoc mode. Steps to reproduce:
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc
ifconfig wlan0 up
[  209.124298] ------------[ cut here ]------------
[  209.129333] kernel BUG at kernel/workqueue.c:1060!
[  209.134460] Internal error: Oops - undefined instruction: 0 [#1]
...
[  209.391571] [<c0052d4c>] (__queue_work+0x144/0x270) from [<c0052ec4>]
[  209.400878] [<c0052ec4>] (queue_work_on+0x30/0x38) from [<c0052ef8>]
[  209.409851] [<c0052ef8>] (queue_work+0x18/0x1c) from [<bf1aaaf4>]
[  209.420135] [<bf1aaaf4>] (wl1251_op_config+0x160/0x260 [wl1251])
...

drivers/net/wireless/wl1251/main.c

index 5924cc6..24e7aac 100644 (file)
@@ -820,16 +820,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);
 
@@ -1239,9 +1229,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;