From patchwork Sun Dec 2 17:10:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1831131 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 77AC63FCA5 for ; Sun, 2 Dec 2012 17:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752975Ab2LBRLU (ORCPT ); Sun, 2 Dec 2012 12:11:20 -0500 Received: from ht2.myhostedexchange.com ([69.50.2.38]:26090 "EHLO ht1.hostedexchange.local" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752068Ab2LBRLT (ORCPT ); Sun, 2 Dec 2012 12:11:19 -0500 Received: from eagle4.ritirata.org (88.149.249.169) by ht2.hostedexchange.local (172.16.69.40) with Microsoft SMTP Server id 8.3.279.5; Sun, 2 Dec 2012 09:11:19 -0800 From: Antonio Quartulli To: Johannes Berg CC: , Antonio Quartulli Subject: [PATCHv2 1/2] cfg80211: allow user to specify short_preamble on ibss join Date: Sun, 2 Dec 2012 18:10:17 +0100 Message-ID: <1354468218-30605-1-git-send-email-antonio@open-mesh.com> X-Mailer: git-send-email 1.8.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Short preamble can be used to improve wireless performance on devices different from lagacy-802.11. This patch enabled the user to specify such capability on IBSS join. Signed-off-by: Antonio Quartulli --- * fixed email address include/net/cfg80211.h | 1 + net/wireless/nl80211.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8e6a6b7..c93955c 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1416,6 +1416,7 @@ struct cfg80211_ibss_params { bool privacy; bool control_port; int mcast_rate[IEEE80211_NUM_BANDS]; + bool use_short_preamble; }; /** diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index f45706a..e82c51a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5459,6 +5459,7 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) struct wiphy *wiphy; struct cfg80211_cached_keys *connkeys = NULL; int err; + bool sp; memset(&ibss, 0, sizeof(ibss)); @@ -5554,6 +5555,9 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info) ibss.control_port = nla_get_flag(info->attrs[NL80211_ATTR_CONTROL_PORT]); + sp = nla_get_flags(info->attr[NL80211_ATTR_BSS_SHORT_PREAMBLE]); + ibss.use_short_preamble = sp; + err = cfg80211_join_ibss(rdev, dev, &ibss, connkeys); if (err) kfree(connkeys);