From patchwork Mon May 17 14:58:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 100133 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 o4HEwmBZ004636 for ; Mon, 17 May 2010 14:58:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752996Ab0EQO6r (ORCPT ); Mon, 17 May 2010 10:58:47 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:9649 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752476Ab0EQO6q (ORCPT ); Mon, 17 May 2010 10:58:46 -0400 Received: by fg-out-1718.google.com with SMTP id d23so2766911fga.1 for ; Mon, 17 May 2010 07:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:cc:mime-version:content-type:content-transfer-encoding :message-id; bh=je74F2Eh0OVUhpx2zoma/JoJEZgjlL5dw2qWbEjITeU=; b=UMXbgunULEw+7E9SlLuFS3W4EK7VoyJwD+VjmCOqx5BhN6C70pAuM2A2Pu5iezWVcg a8EtGlEqyVLdla4DaLe7TQoVBg2gDgcXE+4f/Hej8XzKcC7Xfyh4tCsRb7FCU0fqWUog QUEzAVCXwvVVxcL9ejt5DjV1aYZ8vnAoL7gxA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-type :content-transfer-encoding:message-id; b=Jkbw/TVqELkFIEdUkin5+v5xfM9h0J2LdUdOgPSFRyjevVXnI1BdbpBoiNf34LCp7x 0UxKidiZuwoOahywFlzF/HU/k6s9Gp0nbH47R+CDFt1EoqtRDqdxv6Fdc5PaC27mk+vK agInqveFwTTH0NSgh9RzW3fakMrK5bQ0wDugk= Received: by 10.87.45.15 with SMTP id x15mr8771722fgj.42.1274108324885; Mon, 17 May 2010 07:58:44 -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: linux-wireless@vger.kernel.org Subject: [RFC] cfg80211: allow HT20 channels on devices incabable of HT40 Date: Mon, 17 May 2010 16:58:33 +0200 User-Agent: KMail/1.12.4 (Linux/2.6.34-rc7-wl-default; KDE/4.3.5; x86_64; ; ) Cc: Johannes Berg MIME-Version: 1.0 Message-Id: <201005171658.33673.helmut.schaa@googlemail.com> 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 14:58:48 +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; }