]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jan 2015 07:11:07 +0000 (15:11 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jan 2015 07:11:07 +0000 (15:11 +0800)
added patches:
cfg80211-fix-160-mhz-channels-with-80-80-and-160-mhz-drivers.patch

queue-3.10/cfg80211-fix-160-mhz-channels-with-80-80-and-160-mhz-drivers.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/cfg80211-fix-160-mhz-channels-with-80-80-and-160-mhz-drivers.patch b/queue-3.10/cfg80211-fix-160-mhz-channels-with-80-80-and-160-mhz-drivers.patch
new file mode 100644 (file)
index 0000000..6abf0c7
--- /dev/null
@@ -0,0 +1,56 @@
+From 08f6f147773b23b765b94633a8eaa82e7defcf4c Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <jouni@qca.qualcomm.com>
+Date: Thu, 11 Dec 2014 23:48:55 +0200
+Subject: cfg80211: Fix 160 MHz channels with 80+80 and 160 MHz drivers
+
+From: Jouni Malinen <jouni@qca.qualcomm.com>
+
+commit 08f6f147773b23b765b94633a8eaa82e7defcf4c upstream.
+
+The VHT supported channel width field is a two bit integer, not a
+bitfield. cfg80211_chandef_usable() was interpreting it incorrectly and
+ended up rejecting 160 MHz channel width if the driver indicated support
+for both 160 and 80+80 MHz channels.
+
+Fixes: 3d9d1d6656a73 ("nl80211/cfg80211: support VHT channel configuration")
+       (however, no real drivers had 160 MHz support it until 3.16)
+Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/wireless/chan.c |    9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/net/wireless/chan.c
++++ b/net/wireless/chan.c
+@@ -338,7 +338,7 @@ bool cfg80211_chandef_usable(struct wiph
+ {
+       struct ieee80211_sta_ht_cap *ht_cap;
+       struct ieee80211_sta_vht_cap *vht_cap;
+-      u32 width, control_freq;
++      u32 width, control_freq, cap;
+       if (WARN_ON(!cfg80211_chandef_valid(chandef)))
+               return false;
+@@ -370,7 +370,8 @@ bool cfg80211_chandef_usable(struct wiph
+                       return false;
+               break;
+       case NL80211_CHAN_WIDTH_80P80:
+-              if (!(vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ))
++              cap = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK;
++              if (cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)
+                       return false;
+       case NL80211_CHAN_WIDTH_80:
+               if (!vht_cap->vht_supported)
+@@ -381,7 +382,9 @@ bool cfg80211_chandef_usable(struct wiph
+       case NL80211_CHAN_WIDTH_160:
+               if (!vht_cap->vht_supported)
+                       return false;
+-              if (!(vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ))
++              cap = vht_cap->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK;
++              if (cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ &&
++                  cap != IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)
+                       return false;
+               prohibited_flags |= IEEE80211_CHAN_NO_160MHZ;
+               width = 160;
index c5bde00f93ea95565dfba52c4aeb00b1d64360a3..92b1e4fa6cde0df8d47b9f0ecdc666564c3024a5 100644 (file)
@@ -10,3 +10,4 @@ drm-radeon-properly-filter-dp1.2-4k-modes-on-non-dp1.2-hw.patch
 drm-i915-invalidate-media-caches-on-gen7.patch
 drm-i915-force-the-cs-stall-for-invalidate-flushes.patch
 arc-move-peripherals-to-match-model-to-fpga.patch
+cfg80211-fix-160-mhz-channels-with-80-80-and-160-mhz-drivers.patch