From: Johannes Berg <johannes@sipsolutions.net>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org,
David Spinadel <david.spinadel@intel.com>
Subject: [PATCH 3/4] iwlwifi: invert the order of ssid list in scan cmd
Date: Fri, 11 May 2012 10:53:17 +0200 [thread overview]
Message-ID: <1336726398-13200-4-git-send-email-johannes@sipsolutions.net> (raw)
In-Reply-To: <1336726398-13200-1-git-send-email-johannes@sipsolutions.net>
From: David Spinadel <david.spinadel@intel.com>
The firmware inverts the order of ssid list of scan command, we
should invert the order before sending the command, in order to
get probe requests sent in wanted order.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/iwl-scan.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 0505e4e..031d8e2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -767,7 +767,11 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
ssid_len = priv->scan_request->ssids[0].ssid_len;
ssid = priv->scan_request->ssids[0].ssid;
- for (i = 1; i < priv->scan_request->n_ssids; i++) {
+ /*
+ * Invert the order of ssids, the firmware will invert
+ * it back.
+ */
+ for (i = priv->scan_request->n_ssids - 1; i >= 1; i--) {
scan->direct_scan[p].id = WLAN_EID_SSID;
scan->direct_scan[p].len =
priv->scan_request->ssids[i].ssid_len;
--
1.7.10
next prev parent reply other threads:[~2012-05-11 8:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 8:53 iwlwifi updates 2012-05-11 Johannes Berg
2012-05-11 8:53 ` [PATCH 1/4] iwlwifi: fix scan_cmd_size allocation Johannes Berg
2012-05-11 8:53 ` [PATCH 2/4] iwlwifi: disable default wildcard ssid scan Johannes Berg
2012-05-11 8:53 ` Johannes Berg [this message]
2012-05-11 8:53 ` [PATCH 4/4] iwlwifi: support explicit monitor interface Johannes Berg
2012-05-16 17:06 ` iwlwifi updates 2012-05-11 John W. Linville
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=1336726398-13200-4-git-send-email-johannes@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=david.spinadel@intel.com \
--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;
as well as URLs for NNTP newsgroup(s).