From patchwork Mon May 17 15:30:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 100140 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4HFVE5N014196 for ; Mon, 17 May 2010 15:31:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751626Ab0EQPbO (ORCPT ); Mon, 17 May 2010 11:31:14 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:11133 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522Ab0EQPbN (ORCPT ); Mon, 17 May 2010 11:31:13 -0400 Received: by fg-out-1718.google.com with SMTP id 22so606177fge.1 for ; Mon, 17 May 2010 08:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:subject:date :user-agent:cc:mime-version:message-id:x-uid:x-length:content-type :content-transfer-encoding; bh=MIr51Lpgb3PWUWhq3TD/yZBMLLU+aw4g5YugnVz7iYU=; b=TZXb6a4fxsW2SwjvBiU9kkoqGJNjU9d6ciJpsWqMUi71yILWvf6wYBETf6g1Q49sqx BALtT0N5Ll/sB/ZJVexxdvk5zfO/dGD1Tl9LZoaa24sK1p3x5HL0OUaLL4Dw1BsZLKke 04Dr4/c//FEcrBDveiiC3MF8K0tPTTJCH3dW0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:message-id:x-uid :x-length:content-type:content-transfer-encoding; b=ffa3PDXcBiwTYam6vZE6NN15nSkrGk2BhEAT8vM9w7+gHFk1FOJIQfnGaxZmrgqgEj K5dpbBcLjf4twGK3nIrJM2VB9WNy8WxG59rMv/actX5wCScCnBrrqZMokyLb/Chet77H T4MpTeYV4JhY+LOsp+wGq+xDRad51N9oodxtA= Received: by 10.86.6.37 with SMTP id 37mr8815588fgf.7.1274110270972; Mon, 17 May 2010 08:31:10 -0700 (PDT) Received: from helmutmobil.localnet (p5495A88C.dip.t-dialin.net [84.149.168.140]) by mx.google.com with ESMTPS id d6sm9869786fga.8.2010.05.17.08.31.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 17 May 2010 08:31:09 -0700 (PDT) Received: from helmutmobil.localnet (p5495A88C.dip.t-dialin.net [84.149.168.140]) by mx.google.com with ESMTPS id e11sm7311267fga.28.2010.05.17.07.58.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 17 May 2010 07:58:44 -0700 (PDT) From: Helmut Schaa To: John Linville Subject: [PATCH] cfg80211: don't refuse HT20 channels on devices that don't support HT40 Date: Mon, 17 May 2010 17:30:59 +0200 User-Agent: KMail/1.12.4 (Linux/2.6.34-rc7-wl-default; KDE/4.3.5; x86_64; ; ) Cc: linux-wireless@vger.kernel.org, Johannes Berg MIME-Version: 1.0 Message-Id: <201005171730.59566.helmut.schaa@googlemail.com> X-UID: 1188 X-Length: 1961 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 17 May 2010 15:31:15 +0000 (UTC) diff --git a/net/wireless/chan.c b/net/wireless/chan.c index d92d088..647832a 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -35,8 +35,9 @@ rdev_freq_to_chan(struct cfg80211_registered_device *rdev, if (!ht_cap->ht_supported) return NULL; - if (!(ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) || - ht_cap->cap & IEEE80211_HT_CAP_40MHZ_INTOLERANT) + if (channel_type != NL80211_CHAN_HT20 && + (!(ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) || + ht_cap->cap & IEEE80211_HT_CAP_40MHZ_INTOLERANT)) return NULL; }