From patchwork Tue Mar 11 13:05:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rostislav Lisovy X-Patchwork-Id: 3812451 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2675CBF540 for ; Tue, 11 Mar 2014 13:08:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 43BEB202A1 for ; Tue, 11 Mar 2014 13:08:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6141120221 for ; Tue, 11 Mar 2014 13:08:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754481AbaCKNH0 (ORCPT ); Tue, 11 Mar 2014 09:07:26 -0400 Received: from mail-ee0-f54.google.com ([74.125.83.54]:37840 "EHLO mail-ee0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752845AbaCKNFY (ORCPT ); Tue, 11 Mar 2014 09:05:24 -0400 Received: by mail-ee0-f54.google.com with SMTP id d49so3743384eek.27 for ; Tue, 11 Mar 2014 06:05:23 -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=GjiJv1/k4PyZZTD11m+xvgeY79HlSopTb76EJ+CMtYg=; b=jQQefI82tNXZUqSBjOx27s+DxhbXg6flor5fCroLHPRuomV6uOV8OczeaBofyZ+/NI IdwORUbHwD8u9mrJOkGEFjZFdEIjQYtmKa7HRpiRJ52lCIWpGMSMGpT3+cdeWTaDgeUd HXYxVVJVtRSAVdYPjjSN8X225hSodatAEICD6YYW+Ve3G+FCytK/tGEzBJcUmL95N9GS Tg3A2TKKe5yr6qzyBxcJZHr8mj64qV6mjrg/X6N2pyK9oOmPCjEiGpjN1HnjfW/WISsL l/d9yJxfiDVvxrGN3MBxeymc3tht58Ocj5Esqj4GTW8f+VXioA6YXo4qRk8FFEPwLrt1 l1Gg== X-Received: by 10.14.109.201 with SMTP id s49mr3648592eeg.88.1394543123664; Tue, 11 Mar 2014 06:05:23 -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.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Mar 2014 06:05:22 -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 1/5] cfg80211: Add attributes describing prohibited channel bandwidth Date: Tue, 11 Mar 2014 14:05:10 +0100 Message-Id: <1394543114-6700-2-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=unavailable 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 Since there are channels which have only 10 or 5 MHz bandwidth, we have to keep track about this information (and be able to report it via netlink to userspace). Signed-off-by: Rostislav Lisovy --- include/net/cfg80211.h | 6 ++++++ include/uapi/linux/nl80211.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index b1f84b0..f5ecd6c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -109,6 +109,10 @@ enum ieee80211_band { * channel as the control or any of the secondary channels. * This may be due to the driver or due to regulatory bandwidth * restrictions. + * @IEEE80211_CHAN_NO_20MHZ: 20 MHz bandwidth is not permitted + * on this channel. + * @IEEE80211_CHAN_NO_10MHZ: 10 MHz bandwidth is not permitted + * on this channel. */ enum ieee80211_channel_flags { IEEE80211_CHAN_DISABLED = 1<<0, @@ -120,6 +124,8 @@ enum ieee80211_channel_flags { IEEE80211_CHAN_NO_OFDM = 1<<6, IEEE80211_CHAN_NO_80MHZ = 1<<7, IEEE80211_CHAN_NO_160MHZ = 1<<8, + IEEE80211_CHAN_NO_20MHZ = 1<<9, + IEEE80211_CHAN_NO_10MHZ = 1<<10, }; #define IEEE80211_CHAN_NO_HT40 \ diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 91054fd..0748026 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2304,6 +2304,10 @@ enum nl80211_band_attr { * @NL80211_FREQUENCY_ATTR_NO_160MHZ: any 160 MHz (but not 80+80) channel * using this channel as the primary or any of the secondary channels * isn't possible + * @NL80211_FREQUENCY_ATTR_NO_20MHZ: 20 MHz operation is not allowed + * on this channel in current regulatory domain. + * @NL80211_FREQUENCY_ATTR_NO_10MHZ: 10 MHz operation is not allowed + * on this channel in current regulatory domain. * @NL80211_FREQUENCY_ATTR_MAX: highest frequency attribute number * currently defined * @__NL80211_FREQUENCY_ATTR_AFTER_LAST: internal use @@ -2322,6 +2326,8 @@ enum nl80211_frequency_attr { NL80211_FREQUENCY_ATTR_NO_HT40_PLUS, NL80211_FREQUENCY_ATTR_NO_80MHZ, NL80211_FREQUENCY_ATTR_NO_160MHZ, + NL80211_FREQUENCY_ATTR_NO_20MHZ, + NL80211_FREQUENCY_ATTR_NO_10MHZ, /* keep last */ __NL80211_FREQUENCY_ATTR_AFTER_LAST,