Changeset 41301


Ignore:
Timestamp:
2014-06-22T14:13:18+02:00 (4 years ago)
Author:
nbd
Message:

mac80211: revert a faulty upstream change which is causing channel 12 to be enabled for US regdomain

Signed-off-by: Felix Fietkau <nbd@…>

Backport of r41298

Location:
branches/attitude_adjustment/package/mac80211/patches
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/package/mac80211/patches/300-pending_work.patch

    r41182 r41301  
     1commit edcdf0989410a05a6a4b8438df4010447eaa7d9a 
     2Author: Felix Fietkau <nbd@openwrt.org> 
     3Date:   Sun Jun 22 13:36:20 2014 +0200 
     4 
     5    Revert "cfg80211: Use 5MHz bandwidth by default when checking usable channels" 
     6     
     7    It enables channels that are not supposed to be enabled according to the 
     8    regulatory rules. 
     9     
     10    This reverts commit 8eca1fb692cc9557f386eddce75c300a3855d11a. 
     11 
    112commit 6e7341074823d2a45b81f2742cbf75f1da790031 
    213Author: Rafał Miłecki <zajec5@gmail.com> 
     
    28562867        case B43_PHYTYPE_LP: 
    28572868        case B43_PHYTYPE_HT: 
     2869--- a/net/wireless/reg.c 
     2870+++ b/net/wireless/reg.c 
     2871@@ -935,7 +935,7 @@ freq_reg_info_regd(struct wiphy *wiphy,  
     2872                if (!band_rule_found) 
     2873                        band_rule_found = freq_in_rule_band(fr, center_freq); 
     2874  
     2875-               bw_fits = reg_does_bw_fit(fr, center_freq, MHZ_TO_KHZ(5)); 
     2876+               bw_fits = reg_does_bw_fit(fr, center_freq, MHZ_TO_KHZ(20)); 
     2877  
     2878                if (band_rule_found && bw_fits) 
     2879                        return rr; 
     2880@@ -1019,10 +1019,10 @@ static void chan_reg_rule_print_dbg(cons 
     2881 } 
     2882 #endif 
     2883  
     2884-/* Find an ieee80211_reg_rule such that a 5MHz channel with frequency 
     2885- * chan->center_freq fits there. 
     2886- * If there is no such reg_rule, disable the channel, otherwise set the 
     2887- * flags corresponding to the bandwidths allowed in the particular reg_rule 
     2888+/* 
     2889+ * Note that right now we assume the desired channel bandwidth 
     2890+ * is always 20 MHz for each individual channel (HT40 uses 20 MHz 
     2891+ * per channel, the primary and the extension channel). 
     2892  */ 
     2893 static void handle_channel(struct wiphy *wiphy, 
     2894                           enum nl80211_reg_initiator initiator, 
     2895@@ -1083,12 +1083,8 @@ static void handle_channel(struct wiphy  
     2896        if (reg_rule->flags & NL80211_RRF_AUTO_BW) 
     2897                max_bandwidth_khz = reg_get_max_bandwidth(regd, reg_rule); 
     2898  
     2899-       if (max_bandwidth_khz < MHZ_TO_KHZ(10)) 
     2900-               bw_flags = IEEE80211_CHAN_NO_10MHZ; 
     2901-       if (max_bandwidth_khz < MHZ_TO_KHZ(20)) 
     2902-               bw_flags |= IEEE80211_CHAN_NO_20MHZ; 
     2903        if (max_bandwidth_khz < MHZ_TO_KHZ(40)) 
     2904-               bw_flags |= IEEE80211_CHAN_NO_HT40; 
     2905+               bw_flags = IEEE80211_CHAN_NO_HT40; 
     2906        if (max_bandwidth_khz < MHZ_TO_KHZ(80)) 
     2907                bw_flags |= IEEE80211_CHAN_NO_80MHZ; 
     2908        if (max_bandwidth_khz < MHZ_TO_KHZ(160)) 
     2909@@ -1522,12 +1518,8 @@ static void handle_channel_custom(struct 
     2910        if (reg_rule->flags & NL80211_RRF_AUTO_BW) 
     2911                max_bandwidth_khz = reg_get_max_bandwidth(regd, reg_rule); 
     2912  
     2913-       if (max_bandwidth_khz < MHZ_TO_KHZ(10)) 
     2914-               bw_flags = IEEE80211_CHAN_NO_10MHZ; 
     2915-       if (max_bandwidth_khz < MHZ_TO_KHZ(20)) 
     2916-               bw_flags |= IEEE80211_CHAN_NO_20MHZ; 
     2917        if (max_bandwidth_khz < MHZ_TO_KHZ(40)) 
     2918-               bw_flags |= IEEE80211_CHAN_NO_HT40; 
     2919+               bw_flags = IEEE80211_CHAN_NO_HT40; 
     2920        if (max_bandwidth_khz < MHZ_TO_KHZ(80)) 
     2921                bw_flags |= IEEE80211_CHAN_NO_80MHZ; 
     2922        if (max_bandwidth_khz < MHZ_TO_KHZ(160)) 
  • branches/attitude_adjustment/package/mac80211/patches/405-regd_no_assoc_hints.patch

    r41116 r41301  
    11--- a/net/wireless/reg.c 
    22+++ b/net/wireless/reg.c 
    3 @@ -2080,6 +2080,8 @@ void regulatory_hint_country_ie(struct w 
     3@@ -2072,6 +2072,8 @@ void regulatory_hint_country_ie(struct w 
    44        enum environment_cap env = ENVIRON_ANY; 
    55        struct regulatory_request *request = NULL, *lr; 
     
    1010        if (country_ie_len & 0x01) 
    1111                return; 
    12 @@ -2276,6 +2278,7 @@ static void restore_regulatory_settings( 
     12@@ -2268,6 +2270,7 @@ static void restore_regulatory_settings( 
    1313  
    1414 void regulatory_hint_disconnect(void) 
Note: See TracChangeset for help on using the changeset viewer.