public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: internally clear failed scans properly
Date: Thu, 23 Apr 2009 10:38:26 +0200	[thread overview]
Message-ID: <1240475906.30082.173.camel@johannes.local> (raw)

When the IBSS code wants to scan, but that fails, we can
get stuck in a situation where you can never scan again.
Fix this by properly notifying ourselves when the scan
request has failed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
 net/mac80211/ibss.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- wireless-testing.orig/net/mac80211/ibss.c	2009-04-23 10:33:18.000000000 +0200
+++ wireless-testing/net/mac80211/ibss.c	2009-04-23 10:33:19.000000000 +0200
@@ -447,7 +447,8 @@ static void ieee80211_sta_merge_ibss(str
 	memcpy(sdata->local->int_scan_req.ssids[0].ssid,
 	       ifibss->ssid, IEEE80211_MAX_SSID_LEN);
 	sdata->local->int_scan_req.ssids[0].ssid_len = ifibss->ssid_len;
-	ieee80211_request_scan(sdata, &sdata->local->int_scan_req);
+	if (ieee80211_request_scan(sdata, &sdata->local->int_scan_req))
+		ieee80211_scan_failed(sdata->local);
 }
 
 static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
@@ -565,7 +566,8 @@ static void ieee80211_sta_find_ibss(stru
 		       ifibss->ssid, IEEE80211_MAX_SSID_LEN);
 		local->int_scan_req.ssids[0].ssid_len =
 			ifibss->ssid_len;
-		ieee80211_request_scan(sdata, &local->int_scan_req);
+		if (ieee80211_request_scan(sdata, &local->int_scan_req))
+			ieee80211_scan_failed(local);
 	} else if (ifibss->state != IEEE80211_IBSS_MLME_JOINED) {
 		int interval = IEEE80211_SCAN_INTERVAL;
 



                 reply	other threads:[~2009-04-23  8:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1240475906.30082.173.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox