From patchwork Thu Jan 7 07:22:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benoit PAPILLAULT X-Patchwork-Id: 71553 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o077Mh9m024380 for ; Thu, 7 Jan 2010 07:22:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756114Ab0AGHWm (ORCPT ); Thu, 7 Jan 2010 02:22:42 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756111Ab0AGHWm (ORCPT ); Thu, 7 Jan 2010 02:22:42 -0500 Received: from 2.mail-out.ovh.net ([91.121.26.226]:57023 "HELO 2.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752822Ab0AGHWl (ORCPT ); Thu, 7 Jan 2010 02:22:41 -0500 Received: (qmail 14589 invoked by uid 503); 7 Jan 2010 08:48:19 -0000 Received: from b7.ovh.net (HELO mail610.ha.ovh.net) (213.186.33.57) by 2.mail-out.ovh.net with SMTP; 7 Jan 2010 08:48:19 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 7 Jan 2010 07:22:40 -0000 Received: from ns.popipo.fr (HELO ?192.168.1.70?) (benoit.papillault%luceor.com@88.163.232.53) by ns0.ovh.net with SMTP; 7 Jan 2010 07:22:39 -0000 Message-ID: <4B458BBC.6040200@free.fr> Date: Thu, 07 Jan 2010 08:22:36 +0100 From: Benoit PAPILLAULT User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: "Luis R. Rodriguez" CC: linux-wireless@vger.kernel.org Subject: Re: Issue connecting to an HT40 AP that sends a Country IE References: <4B3DBB6B.4010107@free.fr> <43e72e891001011524r190950c8pdfc89e765afb205d@mail.gmail.com> <4B3F1010.3070906@free.fr> <43e72e891001021004r2c9cf855p52b007a88123bba7@mail.gmail.com> <43e72e891001061739t5ded13e7u6b16c73f1b26b246@mail.gmail.com> In-Reply-To: <43e72e891001061739t5ded13e7u6b16c73f1b26b246@mail.gmail.com> X-Ovh-Tracer-Id: 10069485818349244406 X-Ovh-Remote: 88.163.232.53 (ns.popipo.fr) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org commit b716fd7e8506eaff946f1429f048c258a03249ba Author: Benoit Papillault 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 = ®_rule->power_rule; freq_range = ®_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 = ®_rule->power_rule; freq_range = ®_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);