From patchwork Tue Mar 11 13:05:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rostislav Lisovy X-Patchwork-Id: 3812421 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A81E49F402 for ; Tue, 11 Mar 2014 13:06:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DAE6820221 for ; Tue, 11 Mar 2014 13:06:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 216B72021C for ; Tue, 11 Mar 2014 13:06:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754586AbaCKNFd (ORCPT ); Tue, 11 Mar 2014 09:05:33 -0400 Received: from mail-ea0-f172.google.com ([209.85.215.172]:51107 "EHLO mail-ea0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753951AbaCKNFb (ORCPT ); Tue, 11 Mar 2014 09:05:31 -0400 Received: by mail-ea0-f172.google.com with SMTP id l9so4318941eaj.17 for ; Tue, 11 Mar 2014 06:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JmTZgEbtOSNISxr/CblgrknfDslRQXb1hE3QrUZJFaw=; b=N3ujO89wY0K9yDbBYtPIcXQcf458EQE/unYM7dipHvfw9jUFXaAlUjuIvMqlbGOUsO +YHotezzGTcFWhr8gTqsODV9ke+7FSO50INE0WszMDAg3DBJ80Ehbj7GoZe0/Xsv+709 kx5mR12ChmPEzBhRxMQm1bLb5H0MY1N6jm3xysy25+U016gnTfY1ksj8m/lrpCnfEhhV gFF5MGJhFa0PLV63q7s6FfLOrh9Z7vOTtLlp1imKMb43CPoFYicZzvcNoM+nn7zQ9svU sJIdGJ9vq3Ysb/A7BLqEDrdCByYqTiUsbBi12cbvSIqjppRksOLV4oLceJ/d6LQnR+Tg Gk0g== X-Received: by 10.15.76.9 with SMTP id m9mr3635417eey.96.1394543129904; Tue, 11 Mar 2014 06:05:29 -0700 (PDT) Received: from c2c-vostro1.felk.cvut.cz ([147.32.86.166]) by mx.google.com with ESMTPSA id o5sm57343965eeg.8.2014.03.11.06.05.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Mar 2014 06:05:28 -0700 (PDT) From: Rostislav Lisovy To: Johannes Berg , "John W. Linville" , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michal Sojka , s.sander@nordsys.de, jan-niklas.meier@volkswagen.de, Rostislav Lisovy Subject: [PATCH 3/5] cfg80211: Take the BW restrictions into account when checking the channel Date: Tue, 11 Mar 2014 14:05:12 +0100 Message-Id: <1394543114-6700-4-git-send-email-rostislav.lisovy@fel.cvut.cz> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1394543114-6700-1-git-send-email-rostislav.lisovy@fel.cvut.cz> References: <1394543114-6700-1-git-send-email-rostislav.lisovy@fel.cvut.cz> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Rostislav Lisovy --- net/wireless/chan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 78559b5..87e1576 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -531,12 +531,14 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy, width = 5; break; case NL80211_CHAN_WIDTH_10: + prohibited_flags |= IEEE80211_CHAN_NO_10MHZ; width = 10; break; case NL80211_CHAN_WIDTH_20: if (!ht_cap->ht_supported) return false; case NL80211_CHAN_WIDTH_20_NOHT: + prohibited_flags |= IEEE80211_CHAN_NO_20MHZ; width = 20; break; case NL80211_CHAN_WIDTH_40: