mac80211: check if HT40+/- is allowed before sending assoc

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, June 15, 2009 - 2:16 pm

Gitweb:     http://git.kernel.org/linus/768777ea1118f6ff3f1a013557e7bc4f5d2683a4
Commit:     768777ea1118f6ff3f1a013557e7bc4f5d2683a4
Parent:     689da1b3b8b37ff41e79f3fb973c06cdfeef12e5
Author:     Luis R. Rodriguez <lrodriguez@atheros.com>
AuthorDate: Sat May 2 00:37:19 2009 -0400
Committer:  John W. Linville <linville@tuxdriver.com>
CommitDate: Wed May 20 14:46:23 2009 -0400

    mac80211: check if HT40+/- is allowed before sending assoc
    
    We weren't checking this at all.
    
    Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 net/mac80211/mlme.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index da582b6..a1944b8 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -121,10 +121,14 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
 		    (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) {
 			switch(hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
 			case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
-				channel_type = NL80211_CHAN_HT40PLUS;
+				if (!(local->hw.conf.channel->flags &
+				    IEEE80211_CHAN_NO_HT40PLUS))
+					channel_type = NL80211_CHAN_HT40PLUS;
 				break;
 			case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
-				channel_type = NL80211_CHAN_HT40MINUS;
+				if (!(local->hw.conf.channel->flags &
+				    IEEE80211_CHAN_NO_HT40MINUS))
+					channel_type = NL80211_CHAN_HT40MINUS;
 				break;
 			}
 		}
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
mac80211: check if HT40+/- is allowed before sending assoc, Linux Kernel Mailing ..., (Mon Jun 15, 2:16 pm)