linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cfg80211: set the rates mask in connection probes over specified freq
@ 2014-10-07  9:42 Karl Beldan
  2014-10-09  9:32 ` Johannes Berg
  0 siblings, 1 reply; 10+ messages in thread
From: Karl Beldan @ 2014-10-07  9:42 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Karl Beldan, Karl Beldan

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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-10-10 16:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07  9:42 [PATCH] cfg80211: set the rates mask in connection probes over specified freq Karl Beldan
2014-10-09  9:32 ` 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

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).