From d5472f2c52d1d412657683e6b206bfeaa23e9631 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sun, 20 Apr 2014 03:21:14 +0300 Subject: [PATCH] Revert "wl1251: enforce changed hw encryption support on monitor state change" 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] [] (__queue_work+0x144/0x270) from [] [ 209.400878] [] (queue_work_on+0x30/0x38) from [] [ 209.409851] [] (queue_work+0x18/0x1c) from [] [ 209.420135] [] (wl1251_op_config+0x160/0x260 [wl1251]) ... --- drivers/net/wireless/wl1251/main.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c index 5924cc6f2aa6..24e7aac4669e 100644 --- a/drivers/net/wireless/wl1251/main.c +++ b/drivers/net/wireless/wl1251/main.c @@ -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; -- 2.47.3