From: Mahesh Palivela <maheshp@posedge.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: [PATCH] mac80211: Enable sw scan with chan context
Date: Mon, 11 Mar 2013 19:35:47 +0530 [thread overview]
Message-ID: <513DE4BB.9010104@posedge.com> (raw)
From: Mahesh Palivela <maheshp@posedge.com>
Enable software scan with channel context in use.
Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
---
net/mac80211/scan.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 43a45cf..58076ec 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -309,10 +309,6 @@ EXPORT_SYMBOL(ieee80211_scan_completed);
static int ieee80211_start_sw_scan(struct ieee80211_local *local)
{
- /* Software scan is not supported in multi-channel cases */
- if (local->use_chanctx)
- return -EOPNOTSUPP;
-
/*
* Hardware/driver doesn't support hw_scan, so use software
* scanning instead. First send a nullfunc frame with power save
@@ -387,9 +383,18 @@ static void ieee80211_scan_state_send_probe(struct
ieee80211_local *local,
{
int i;
struct ieee80211_sub_if_data *sdata;
- enum ieee80211_band band = local->hw.conf.channel->band;
+ enum ieee80211_band band;
+ struct ieee80211_channel *scan_chan;
u32 tx_flags;
+ if (!local->use_chanctx) {
+ band = local->hw.conf.channel->band;
+ scan_chan = local->hw.conf.channel;
+ } else {
+ band = local->scan_channel->band;
+ scan_chan = local->scan_channel;
+ }
+
tx_flags = IEEE80211_TX_INTFL_OFFCHAN_TX_OK;
if (local->scan_req->no_cck)
tx_flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
@@ -404,7 +409,7 @@ static void ieee80211_scan_state_send_probe(struct
ieee80211_local *local,
local->scan_req->ssids[i].ssid_len,
local->scan_req->ie, local->scan_req->ie_len,
local->scan_req->rates[band], false,
- tx_flags, local->hw.conf.channel, true);
+ tx_flags, scan_chan, true);
/*
* After sending probe requests, wait for probe responses
next reply other threads:[~2013-03-11 14:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-11 14:05 Mahesh Palivela [this message]
2013-03-11 14:39 ` [PATCH] mac80211: Enable sw scan with chan context Johannes Berg
2013-03-11 15:21 ` Mahesh Palivela
2013-03-11 15:25 ` Johannes Berg
2013-03-12 3:09 ` Mahesh Palivela
2013-03-12 10:09 ` Karl Beldan
2013-03-15 15:25 ` Johannes Berg
2013-03-14 13:46 ` Mahesh Palivela
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=513DE4BB.9010104@posedge.com \
--to=maheshp@posedge.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/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.