All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grazvydas Ignotas <notasas@gmail.com>
To: linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>
Cc: "Pavel Machek" <pavel@ucw.cz>,
	"Pali Rohár" <pali.rohar@gmail.com>,
	"David Gnedt" <david.gnedt@davizone.at>,
	"Grazvydas Ignotas" <notasas@gmail.com>
Subject: [PATCH 1/4] Revert "wl1251: enforce changed hw encryption support on monitor state change"
Date: Tue, 22 Apr 2014 03:09:52 +0300	[thread overview]
Message-ID: <1398125395-5579-2-git-send-email-notasas@gmail.com> (raw)
In-Reply-To: <1398125395-5579-1-git-send-email-notasas@gmail.com>

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>
---
 drivers/net/wireless/ti/wl1251/main.c |   13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 757e257..c22e225 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)
 		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);
 
@@ -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;
 
-- 
1.7.9.5


  reply	other threads:[~2014-04-22  0:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22  0:09 [PATCH 0/4] wl1251 IBSS fixes Grazvydas Ignotas
2014-04-22  0:09 ` Grazvydas Ignotas [this message]
2014-04-22  0:09 ` [PATCH 2/4] wl1251: fix null data for IBSS Grazvydas Ignotas
2014-04-22  0:09 ` [PATCH 3/4] wl1251: fix mixed up args for join Grazvydas Ignotas
2014-04-22  0:09 ` [PATCH 4/4] wl1251: only call ieee80211_beacon_loss in managed mode Grazvydas Ignotas
2014-05-09  0:21 ` [PATCH 0/4] wl1251 IBSS fixes Grazvydas Ignotas
2014-05-09 20:03   ` Pali Rohár
2014-05-10 12:28     ` Pali Rohár
2014-05-30 16:18       ` Pali Rohár
2014-05-31 13:15         ` Grazvydas Ignotas
2014-05-31 13:20           ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1398125395-5579-2-git-send-email-notasas@gmail.com \
    --to=notasas@gmail.com \
    --cc=david.gnedt@davizone.at \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=pali.rohar@gmail.com \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.