From: Karl Beldan <karl.beldan@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Karl Beldan <karl.beldan@gmail.com>,
Karl Beldan <karl.beldan@rivierawaves.com>
Subject: [PATCH] cfg80211: set the rates mask in connection probes over specified freq
Date: Tue, 7 Oct 2014 11:42:18 +0200 [thread overview]
Message-ID: <1412674938-13071-1-git-send-email-karl.beldan@gmail.com> (raw)
From: Karl Beldan <karl.beldan@rivierawaves.com>
ATM, specifying the frequency when connecting sends a void 'supported
rates' EID.
Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
---
net/wireless/sme.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 8bbeeb3..2ebc54b 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -80,9 +80,16 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev)
if (!request)
return -ENOMEM;
- if (wdev->conn->params.channel)
+ if (wdev->conn->params.channel) {
+ enum ieee80211_band band = wdev->conn->params.channel->band;
+ struct ieee80211_supported_band *sband =
+ wdev->wiphy->bands[band];
+
+ if (!sband)
+ return -EINVAL;
request->channels[0] = wdev->conn->params.channel;
- else {
+ request->rates[band] = (1 << sband->n_bitrates) - 1;
+ } else {
int i = 0, j;
enum ieee80211_band band;
struct ieee80211_supported_band *bands;
--
2.0.1
next reply other threads:[~2014-10-07 9:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 9:42 Karl Beldan [this message]
2014-10-09 9:32 ` [PATCH] cfg80211: set the rates mask in connection probes over specified freq Johannes Berg
2014-10-09 13:00 ` Karl Beldan
2014-10-09 13:26 ` Johannes Berg
2014-10-09 16:26 ` Karl Beldan
2014-10-09 18:36 ` Johannes Berg
2014-10-09 20:49 ` Karl Beldan
2014-10-10 15:10 ` Johannes Berg
2014-10-10 15:11 ` Johannes Berg
2014-10-10 16:07 ` Karl Beldan
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=1412674938-13071-1-git-send-email-karl.beldan@gmail.com \
--to=karl.beldan@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=karl.beldan@rivierawaves.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox