[kernel/f18] Patch to have mac80211 connect with HT20 if HT40 is not allowed (rhbz 866013)
Josh Boyer
jwboyer at fedoraproject.org
Thu Oct 18 12:54:45 UTC 2012
commit 5a7aaca8ae0d9964ead90956f1897d678ec1c796
Author: Josh Boyer <jwboyer at redhat.com>
Date: Thu Oct 18 08:52:16 2012 -0400
Patch to have mac80211 connect with HT20 if HT40 is not allowed (rhbz 866013)
kernel.spec | 7 ++
...onnect-with-HT20-if-HT40-is-not-permitted.patch | 75 ++++++++++++++++++++
2 files changed, 82 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 2fece53..28a0512 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -765,6 +765,9 @@ Patch22071: iwlwifi-fix-6000-ch-switch.patch
#rhbz 862168
Patch22073: mac80211_local_deauth_v3.6.patch
+#rhbz 866013
+Patch22074: mac80211-connect-with-HT20-if-HT40-is-not-permitted.patch
+
# END OF PATCH DEFINITIONS
%endif
@@ -1481,6 +1484,9 @@ ApplyPatch iwlwifi-fix-6000-ch-switch.patch
#rhbz 862168
ApplyPatch mac80211_local_deauth_v3.6.patch
+#rhbz 866013
+ApplyPatch mac80211-connect-with-HT20-if-HT40-is-not-permitted.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2334,6 +2340,7 @@ fi
# || ||
%changelog
* Thu Oct 18 2012 Josh Boyer <jwboyer at redhat.com>
+- Patch to have mac80211 connect with HT20 if HT40 is not allowed (rhbz 866013)
- Enable VFIO (rhbz 867152)
- Apply patch from Stanislaw Gruszka to fix mac80211 issue (rhbz 862168)
- Apply patch to fix iwlwifi crash (rhbz 770484)
diff --git a/mac80211-connect-with-HT20-if-HT40-is-not-permitted.patch b/mac80211-connect-with-HT20-if-HT40-is-not-permitted.patch
new file mode 100644
index 0000000..8c46db6
--- /dev/null
+++ b/mac80211-connect-with-HT20-if-HT40-is-not-permitted.patch
@@ -0,0 +1,75 @@
+From 3a40414f826a8f1096d9b94c4a53ef91b25ba28d Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Mon, 1 Oct 2012 15:52:00 +0200
+Subject: [PATCH] mac80211: connect with HT20 if HT40 is not permitted
+
+Some changes to fix issues with HT40 APs in Korea
+and follow-up changes to allow using HT40 even if
+the local regulatory database disallows it caused
+issues with iwlwifi (and could cause issues with
+other devices); iwlwifi firmware would assert if
+you tried to connect to an AP that has an invalid
+configuration (e.g. using HT40- on channel 140.)
+
+Fix this, while avoiding the "Korean AP" issue by
+disabling HT40 and advertising HT20 to the AP
+when connecting.
+
+Cc: stable at vger.kernel.org [3.6]
+Reported-by: Florian Reitmeir <florian at reitmeir.org>
+Tested-by: Florian Reitmeir <florian at reitmeir.org>
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ net/mac80211/mlme.c | 30 ++++++++++++++++++++----------
+ 1 files changed, 20 insertions(+), 10 deletions(-)
+
+diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
+index e510a33..1b7eed2 100644
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -3099,22 +3099,32 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
+ ht_cfreq, ht_oper->primary_chan,
+ cbss->channel->band);
+ ht_oper = NULL;
++ } else {
++ channel_type = NL80211_CHAN_HT20;
+ }
+ }
+
+- if (ht_oper) {
+- channel_type = NL80211_CHAN_HT20;
++ if (ht_oper && sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
++ /*
++ * cfg80211 already verified that the channel itself can
++ * be used, but it didn't check that we can do the right
++ * HT type, so do that here as well. If HT40 isn't allowed
++ * on this channel, disable 40 MHz operation.
++ */
+
+- if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
+- switch (ht_oper->ht_param &
+- IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
+- case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
++ switch (ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
++ case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
++ if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40PLUS)
++ ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
++ else
+ channel_type = NL80211_CHAN_HT40PLUS;
+- break;
+- case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
++ break;
++ case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
++ if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40MINUS)
++ ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
++ else
+ channel_type = NL80211_CHAN_HT40MINUS;
+- break;
+- }
++ break;
+ }
+ }
+
+--
+1.7.6.5
+
More information about the scm-commits
mailing list