From patchwork Fri Mar 7 13:37:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rostislav Lisovy X-Patchwork-Id: 3791551 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 699969F35F for ; Fri, 7 Mar 2014 13:38:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 618FB201BA for ; Fri, 7 Mar 2014 13:38:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE3F3202BE for ; Fri, 7 Mar 2014 13:38:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753454AbaCGNiP (ORCPT ); Fri, 7 Mar 2014 08:38:15 -0500 Received: from mail-ea0-f175.google.com ([209.85.215.175]:35787 "EHLO mail-ea0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753209AbaCGNiN (ORCPT ); Fri, 7 Mar 2014 08:38:13 -0500 Received: by mail-ea0-f175.google.com with SMTP id d10so2321292eaj.34 for ; Fri, 07 Mar 2014 05:38:12 -0800 (PST) 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=lFiDAKiNvYIohT1OH+tYwMv5crTtKFzm/ALeEVEzaLM=; b=uPWhBtskLBwj51ZwJpjvJdwHhSoE78QlMVFdwaVukhyJBJL3YpAA14imIprA6fCEDb BZQWQQ1D7t9lezPn0l4JYyFMWMnBgcYydtrh+vJyi9zyRFNih9sYt8I+fGvUmCT+aCXz Uv/Sy3BxCcJl41f3vWFc9KmlF8onZs/7pQ1WdH827YTrXvzeZjBX880zlh6Vm/+MfITq 2mlAi81LqFUkaE7IE54J+jHxlVNW49486uwJDxD77fl59vGe3kt58tPuwXQObKUDYsp8 5BYjEpV5ARYEbEON+qseGuMuS+mLAENioU3zRu/hilEdIMD3C867iREloJxwwmtKAaiY zm1A== X-Received: by 10.15.102.74 with SMTP id bq50mr986610eeb.21.1394199492287; Fri, 07 Mar 2014 05:38:12 -0800 (PST) Received: from c2c-vostro1.felk.cvut.cz ([147.32.86.166]) by mx.google.com with ESMTPSA id 48sm6764355eee.2.2014.03.07.05.38.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Mar 2014 05:38:11 -0800 (PST) From: Rostislav Lisovy To: Johannes Berg , linux-wireless@vger.kernel.org Cc: Michal Sojka , s.sander@nordsys.de, jan-niklas.meier@volkswagen.de Subject: [RFC PATCH 6/8] nl80211: Support for 5/10 MHz channels when reporting BW restrictions Date: Fri, 7 Mar 2014 14:37:53 +0100 Message-Id: <1394199475-5208-7-git-send-email-rostislav.lisovy@fel.cvut.cz> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1394199475-5208-1-git-send-email-rostislav.lisovy@fel.cvut.cz> References: <1394199475-5208-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/nl80211.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 48040cd..8b40a3a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -606,6 +606,12 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, if ((chan->flags & IEEE80211_CHAN_NO_160MHZ) && nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_160MHZ)) goto nla_put_failure; + if ((chan->flags & IEEE80211_CHAN_NO_20MHZ) && + nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_20MHZ)) + goto nla_put_failure; + if ((chan->flags & IEEE80211_CHAN_NO_10MHZ) && + nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_10MHZ)) + goto nla_put_failure; } if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,