summaryrefslogtreecommitdiff
path: root/package/kernel
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-06-22 11:42:24 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-06-22 11:42:24 +0000
commitb9019462f335d38ff15880b6e951fa0c885803ad (patch)
tree619763ba258297344c22818527fc0b490558991f /package/kernel
parent17d3ce64cfbfc16fdbccbc7c609d7d4a888d8260 (diff)
downloadmtk-20170518-b9019462f335d38ff15880b6e951fa0c885803ad.zip
mtk-20170518-b9019462f335d38ff15880b6e951fa0c885803ad.tar.gz
mtk-20170518-b9019462f335d38ff15880b6e951fa0c885803ad.tar.bz2
mac80211: revert a faulty upstream change which is causing channel 12 to be enabled for US regdomain
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 41298
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/mac80211/patches/300-pending_work.patch65
-rw-r--r--package/kernel/mac80211/patches/405-regd_no_assoc_hints.patch4
2 files changed, 67 insertions, 2 deletions
diff --git a/package/kernel/mac80211/patches/300-pending_work.patch b/package/kernel/mac80211/patches/300-pending_work.patch
index 25a34b3..56a3d84 100644
--- a/package/kernel/mac80211/patches/300-pending_work.patch
+++ b/package/kernel/mac80211/patches/300-pending_work.patch
@@ -1,3 +1,14 @@
+commit edcdf0989410a05a6a4b8438df4010447eaa7d9a
+Author: Felix Fietkau <nbd@openwrt.org>
+Date: Sun Jun 22 13:36:20 2014 +0200
+
+ Revert "cfg80211: Use 5MHz bandwidth by default when checking usable channels"
+
+ It enables channels that are not supposed to be enabled according to the
+ regulatory rules.
+
+ This reverts commit 8eca1fb692cc9557f386eddce75c300a3855d11a.
+
commit 6e7341074823d2a45b81f2742cbf75f1da790031
Author: Rafał Miłecki <zajec5@gmail.com>
Date: Sat May 31 19:40:45 2014 +0200
@@ -2855,3 +2866,57 @@ Date: Mon May 19 21:20:49 2014 +0200
case B43_PHYTYPE_N:
case B43_PHYTYPE_LP:
case B43_PHYTYPE_HT:
+--- a/net/wireless/reg.c
++++ b/net/wireless/reg.c
+@@ -935,7 +935,7 @@ freq_reg_info_regd(struct wiphy *wiphy,
+ if (!band_rule_found)
+ band_rule_found = freq_in_rule_band(fr, center_freq);
+
+- bw_fits = reg_does_bw_fit(fr, center_freq, MHZ_TO_KHZ(5));
++ bw_fits = reg_does_bw_fit(fr, center_freq, MHZ_TO_KHZ(20));
+
+ if (band_rule_found && bw_fits)
+ return rr;
+@@ -1019,10 +1019,10 @@ static void chan_reg_rule_print_dbg(cons
+ }
+ #endif
+
+-/* Find an ieee80211_reg_rule such that a 5MHz channel with frequency
+- * chan->center_freq fits there.
+- * If there is no such reg_rule, disable the channel, otherwise set the
+- * flags corresponding to the bandwidths allowed in the particular reg_rule
++/*
++ * Note that right now we assume the desired channel bandwidth
++ * is always 20 MHz for each individual channel (HT40 uses 20 MHz
++ * per channel, the primary and the extension channel).
+ */
+ static void handle_channel(struct wiphy *wiphy,
+ enum nl80211_reg_initiator initiator,
+@@ -1083,12 +1083,8 @@ static void handle_channel(struct wiphy
+ if (reg_rule->flags & NL80211_RRF_AUTO_BW)
+ max_bandwidth_khz = reg_get_max_bandwidth(regd, reg_rule);
+
+- if (max_bandwidth_khz < MHZ_TO_KHZ(10))
+- bw_flags = IEEE80211_CHAN_NO_10MHZ;
+- if (max_bandwidth_khz < MHZ_TO_KHZ(20))
+- bw_flags |= IEEE80211_CHAN_NO_20MHZ;
+ if (max_bandwidth_khz < MHZ_TO_KHZ(40))
+- bw_flags |= IEEE80211_CHAN_NO_HT40;
++ bw_flags = IEEE80211_CHAN_NO_HT40;
+ if (max_bandwidth_khz < MHZ_TO_KHZ(80))
+ bw_flags |= IEEE80211_CHAN_NO_80MHZ;
+ if (max_bandwidth_khz < MHZ_TO_KHZ(160))
+@@ -1522,12 +1518,8 @@ static void handle_channel_custom(struct
+ if (reg_rule->flags & NL80211_RRF_AUTO_BW)
+ max_bandwidth_khz = reg_get_max_bandwidth(regd, reg_rule);
+
+- if (max_bandwidth_khz < MHZ_TO_KHZ(10))
+- bw_flags = IEEE80211_CHAN_NO_10MHZ;
+- if (max_bandwidth_khz < MHZ_TO_KHZ(20))
+- bw_flags |= IEEE80211_CHAN_NO_20MHZ;
+ if (max_bandwidth_khz < MHZ_TO_KHZ(40))
+- bw_flags |= IEEE80211_CHAN_NO_HT40;
++ bw_flags = IEEE80211_CHAN_NO_HT40;
+ if (max_bandwidth_khz < MHZ_TO_KHZ(80))
+ bw_flags |= IEEE80211_CHAN_NO_80MHZ;
+ if (max_bandwidth_khz < MHZ_TO_KHZ(160))
diff --git a/package/kernel/mac80211/patches/405-regd_no_assoc_hints.patch b/package/kernel/mac80211/patches/405-regd_no_assoc_hints.patch
index 2152433..282b0d8 100644
--- a/package/kernel/mac80211/patches/405-regd_no_assoc_hints.patch
+++ b/package/kernel/mac80211/patches/405-regd_no_assoc_hints.patch
@@ -1,6 +1,6 @@
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
-@@ -2080,6 +2080,8 @@ void regulatory_hint_country_ie(struct w
+@@ -2072,6 +2072,8 @@ void regulatory_hint_country_ie(struct w
enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request = NULL, *lr;
@@ -9,7 +9,7 @@
/* IE len must be evenly divisible by 2 */
if (country_ie_len & 0x01)
return;
-@@ -2276,6 +2278,7 @@ static void restore_regulatory_settings(
+@@ -2268,6 +2270,7 @@ static void restore_regulatory_settings(
void regulatory_hint_disconnect(void)
{