From patchwork Tue Jan 20 12:35:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz.Dziedzic@tieto.com X-Patchwork-Id: 5668971 X-Patchwork-Delegate: johannes@sipsolutions.net 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CF9489F357 for ; Tue, 20 Jan 2015 12:36:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ECE0720304 for ; Tue, 20 Jan 2015 12:36:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A06D20328 for ; Tue, 20 Jan 2015 12:36:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755145AbbATMgt (ORCPT ); Tue, 20 Jan 2015 07:36:49 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:49511 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755137AbbATMgr (ORCPT ); Tue, 20 Jan 2015 07:36:47 -0500 Received: by mail-wi0-f172.google.com with SMTP id bs8so24708673wib.5 for ; Tue, 20 Jan 2015 04:36:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iFFrD5FYoQ+bYkMLJUoJU5+vShyIg+mLI8pQyVprG28=; b=cyrYXlNIZPUduJOvlD/1vZrhtMWsd3bBtu6JhhxPF/YrtEr1g3fJ424jAfEpHIJ4xT UCJYRuVtqKOKErXY713doW0HKzER031Aea6ME43VMSgFYhld9p8hI5F9jagVTdvp0bS7 VHzFZxaN2q5KwqXMLEaHVlHqT/zpDyVOkE2N4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iFFrD5FYoQ+bYkMLJUoJU5+vShyIg+mLI8pQyVprG28=; b=mqoxuCrOVadJf593xbWCOBfqLsBt3S3RkaIkubPkU/aAcXXytTEZhUZ7+2STi30pus dCUggdc7jXEhuz6lbb4XQc724hKn1tQ+T90+16WkCIM1LNs6a2dlsb/+a2vxbZJE7UZ/ yy+lJldfOWfCx2LZQQF4/tfJqPjj6IW04qZOAuOPWQVDH9LrL+ZfabpaSZpLq7cCcfEZ 9/xfHFQ2wb+t1X9ogoJKVwX57kTW3CIUcqHRCXOBXWPDvg5Mc2qbsTTe2d1dUQcaVKOB Bo4NqFOMLdsKsTa4koPD0hCrX59PRi9r2/4ymuXRfvTnnKvEcUMZtH1X0MPh5q4l+612 GjBA== X-Gm-Message-State: ALoCoQmaiG5rJv08HuDFZGjh2AC1gxavnSsZQooRZ5HpqHqHhEzlChryC0EbO4dV8/TRAGQFBsvwHQKz617GlGmyR25Lvm6IXZhP3uJIGd+SkFJMjt9N8tbgp+Q0LkyMrpGkHRifG5DhutiJnO/JbBU76AvKclsXRKl4/V5YBkwSyVKQ0cFwceeBMLzbUIlxR1SzAE03mwZf X-Received: by 10.180.221.201 with SMTP id qg9mr46688200wic.29.1421757405835; Tue, 20 Jan 2015 04:36:45 -0800 (PST) Received: from localhost.localdomain (apn-46-76-65-212.dynamic.gprs.plus.pl. [46.76.65.212]) by mx.google.com with ESMTPSA id d7sm8816890wjs.2.2015.01.20.04.36.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jan 2015 04:36:45 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Janusz Dziedzic Subject: [RFCv3 2/4] cfg80211: add VHT support for IBSS Date: Tue, 20 Jan 2015 13:35:16 +0100 Message-Id: <1421757318-8343-2-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421757318-8343-1-git-send-email-janusz.dziedzic@tieto.com> References: <1421757318-8343-1-git-send-email-janusz.dziedzic@tieto.com> X-DomainID: tieto.com 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_SIGNED, 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 Add NL80211_FEATURE_VHT_IBSS flag and VHT support for IBSS. Signed-off-by: Janusz Dziedzic --- include/uapi/linux/nl80211.h | 2 ++ net/wireless/nl80211.c | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index e2fc08b..3f40789 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -4203,11 +4203,13 @@ enum nl80211_feature_flags { /** * enum nl80211_ext_feature_index - bit index of extended features. + * @NL80211_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates. * * @NUM_NL80211_EXT_FEATURES: number of extended features. * @MAX_NL80211_EXT_FEATURES: highest extended feature index. */ enum nl80211_ext_feature_index { + NL80211_FEATURE_VHT_IBSS, /* add new features before the definition below */ NUM_NL80211_EXT_FEATURES, diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b18d2bc..05d6db0 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7095,8 +7095,18 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) break; case NL80211_CHAN_WIDTH_20: case NL80211_CHAN_WIDTH_40: - if (rdev->wiphy.features & NL80211_FEATURE_HT_IBSS) - break; + if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) + return -EINVAL; + break; + case NL80211_CHAN_WIDTH_80: + case NL80211_CHAN_WIDTH_80P80: + case NL80211_CHAN_WIDTH_160: + if (!(rdev->wiphy.features & NL80211_FEATURE_HT_IBSS)) + return -EINVAL; + if (!wiphy_ext_feature_isset(&rdev->wiphy, + NL80211_FEATURE_VHT_IBSS)) + return -EINVAL; + break; default: return -EINVAL; }