From patchwork Fri Jan 16 10:38:40 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: 5646981 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 3CBA89F357 for ; Fri, 16 Jan 2015 10:39:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5D2632011D for ; Fri, 16 Jan 2015 10:39:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7AD222010F for ; Fri, 16 Jan 2015 10:39:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754214AbbAPKjj (ORCPT ); Fri, 16 Jan 2015 05:39:39 -0500 Received: from mail-wi0-f182.google.com ([209.85.212.182]:55566 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751980AbbAPKjh (ORCPT ); Fri, 16 Jan 2015 05:39:37 -0500 Received: by mail-wi0-f182.google.com with SMTP id n3so1221856wiv.3 for ; Fri, 16 Jan 2015 02:39:36 -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=63CqBGMEGYiaTzW3B6+eWOr0C0lx4+PzMg78iWxkSTU=; b=vCFWn8zVtHQVqRFvacKjlXSRpGXj/JF2qeS7wNcSnnb1JKqeOtuoRb6opdf0jT1c7E xD/YOu6HqJ2EgLEeyJ+FtkRD4bdW0oQphRyu42/YdOUt3LO8tismqR5vfsdFDPV2ftby 3nqRkltwpkiUNI+vamM05E5WQ4o+fjQENEuyc= 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=63CqBGMEGYiaTzW3B6+eWOr0C0lx4+PzMg78iWxkSTU=; b=Zso4swvevcbGXhXjgsyXHbkJ5usWJIRii1HGf3nIhVcsG0aIKH+MUbIk6TVm1MVhjC IReEGKTAF50tthBm1iyuzReFPLyAG5l+LMWfhUrKdbVHY+F02Ba4MWfeoGRB36H8RJ/p VYjEleF9j/XhOm2J0h0TGz8DB+2TuAxu7OVx65jtvQUeQ4WezguyWhCoZsm8ZIyLnwEN tSOc1rJZCGcEQm5HnTj8rRiJl5GfYnYjEH52RhUOKjJ4mAAj7N6EAWX8dY52yD8N18Xk S4TttbLg2n554q3u4AyceyZuiJDUscxZcirTYNpvvcnKZhu1u8qgw2amF+bb4pMaFQpN QH7A== X-Gm-Message-State: ALoCoQlJ2syjf30fLWRwrefMeuFYxX7uJWS3qSVZGIGxN6lupzZ3vy1xTkjKK+dkWRbgrWNyBv2s0UTs0iw6va+e1Z6+Y3KnhG2J6Yo4NGDpVDwD+AF58ZqMob7FKkUu1KHl28U4Hhtj+o+PQhy7w/YMKO9+zVbxaNQSwUkY9eijIlxqr6YhLLCRQDjkkx7Svh/46ffdTUnL X-Received: by 10.180.72.178 with SMTP id e18mr4715659wiv.23.1421404775585; Fri, 16 Jan 2015 02:39:35 -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 bo5sm148423wjc.39.2015.01.16.02.39.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Jan 2015 02:39:34 -0800 (PST) From: Janusz Dziedzic To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Janusz Dziedzic Subject: [RFCv2 2/6] cfg80211: add VHT support for IBSS Date: Fri, 16 Jan 2015 11:38:40 +0100 Message-Id: <1421404724-32326-2-git-send-email-janusz.dziedzic@tieto.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421404724-32326-1-git-send-email-janusz.dziedzic@tieto.com> References: <1421404724-32326-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 b6c1a00..8f7422e 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -4308,11 +4308,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 38078437..4b79340 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7240,8 +7240,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; }