diff mbox

Issue connecting to an HT40 AP that sends a Country IE

Message ID 4B458BBC.6040200@free.fr (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Benoit PAPILLAULT Jan. 7, 2010, 7:22 a.m. UTC
None
diff mbox

Patch

commit b716fd7e8506eaff946f1429f048c258a03249ba
Author: Benoit Papillault <benoit.papillault@free.fr>
Date:   Thu Dec 31 10:58:14 2009 +0100

    mac80211: quick fix to allow HT40 with a country IE
    
    This patch fixes an issue to connect to an HT40 AP sending country IE for
    all channels. Doing this way, each channel is 20 MHz only and as such, current
    code would disallow HT40 operation. This can be seen in ht40allow_map

diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 87ea60d..bb141c8 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -999,10 +999,10 @@  static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band,
 
 	power_rule = &reg_rule->power_rule;
 	freq_range = &reg_rule->freq_range;
-
+	/*
 	if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(40))
 		bw_flags = IEEE80211_CHAN_NO_HT40;
-
+	*/
 	if (last_request->initiator == NL80211_REGDOM_SET_BY_DRIVER &&
 	    request_wiphy && request_wiphy == wiphy &&
 	    request_wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY) {
@@ -1318,10 +1318,10 @@  static void handle_channel_custom(struct wiphy *wiphy,
 
 	power_rule = &reg_rule->power_rule;
 	freq_range = &reg_rule->freq_range;
-
+	/*
 	if (freq_range->max_bandwidth_khz < MHZ_TO_KHZ(40))
 		bw_flags = IEEE80211_CHAN_NO_HT40;
-
+	*/
 	chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags;
 	chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain);
 	chan->max_power = (int) MBM_TO_DBM(power_rule->max_eirp);