From patchwork Thu Feb 2 00:05:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 9550843 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8113460236 for ; Thu, 2 Feb 2017 00:06:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7221E28249 for ; Thu, 2 Feb 2017 00:06:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6500C28435; Thu, 2 Feb 2017 00:06:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12A6128249 for ; Thu, 2 Feb 2017 00:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751088AbdBBAGB (ORCPT ); Wed, 1 Feb 2017 19:06:01 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33166 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751081AbdBBAGA (ORCPT ); Wed, 1 Feb 2017 19:06:00 -0500 Received: by mail-pg0-f66.google.com with SMTP id 194so33984pgd.0 for ; Wed, 01 Feb 2017 16:05:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=lkfvtEAt7qB8Vim7j86np9aYudziPXh45KtFPP6lkWY=; b=IwUgMjvKmzJWhFUZQMZSrHR8Y8E+SBdfsFrD3a90CIAH+YXAC6l8626qlgpXuDpdir qJ7aI2onTJ3A9EXTNChKeQ9kc2TBbQ13LmAE6r6uQEKViv8ZrK1EMa0M/zU7TNozW2R8 sMp2IvLSrfQcf9tJOpw5VFQpSadYpFpgN7wVEjMSh54pkZgxSHxW6J7aN+9bQyYF+7rS eXz4fgmUg+c85gUahHlpKYB35T1+Lx6tASFUd3jHuSCjpApolQ88KpXWWOqF0r0CBUiP RdY2DglHLoRhjm4xmG0ESVSSBA9xa8XGfYFBcnV5mGi9ZOupudKxm2oBLJ9e6Sx9276v QT4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lkfvtEAt7qB8Vim7j86np9aYudziPXh45KtFPP6lkWY=; b=TSyJkwzSTdr3jdwaAQxY8urGRnMyQ1COSoyFGzOTFDyjiEzqlTFCZjZO8yivYiB4hZ 8w4nZKxkp1uBHDB4HKEjcVajJpQPbqkrcqRiu1moW2J062AgV/OceLlpDY6i6ZbHZ829 2McbsT0+fWpRtMdXD2+6XneIIhG7ebfTtB0JDkBcadMD5GtDIC8jz3dL732nBEMfveC0 Ft1ozZUvxMwDs2gElp/1CTOWopbS04d1pauEHLsa/xzPrBNsN3FIopL77Mmsea4Oqexn qMhPjDKo3VojaQXzS6CfSoPeqGsDJlbYTPurHisgahAmsamnFWbVbpMk51IOWIBuHxME dmvg== X-Gm-Message-State: AIkVDXLy1Ibe+ZY7TcEZyZD01HB+UpWzHezA6YwK1bs8qeRZ/6CYvoKa1Pt8rLusJctfJA== X-Received: by 10.99.181.7 with SMTP id y7mr7009641pge.57.1485993938496; Wed, 01 Feb 2017 16:05:38 -0800 (PST) Received: from localhost.localdomain (p6e10d0.kngwnt01.ap.so-net.ne.jp. [218.110.16.208]) by smtp.gmail.com with ESMTPSA id d124sm52869297pga.30.2017.02.01.16.05.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Feb 2017 16:05:38 -0800 (PST) From: Masashi Honma To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Masashi Honma Subject: [PATCH] mac80211: Remove VHT Capabilities/Operation IEs from mesh beacon if VHT was disabled Date: Thu, 2 Feb 2017 09:05:28 +0900 Message-Id: <1485993928-3822-1-git-send-email-masashi.honma@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When wpa_supplicant.conf includes disable_ht=1, the beacon of the mesh node does not have HT Capabilities/Operation IEs. However, the beacon of the mesh node has VHT Capabilities/Operation IEs even though wpa_supplicant.conf includes disable_vht=1. This patch removes VHT Capabilities/Operation IEs when the wpa_supplicant.conf includes disable_vht=1. We recognize the local peer as 11ac ready, when it has more than 80MHz band width. Because net/mac80211/util.c#ieee80211_build_preq_ies_band() uses 80MHz threshold for VHT Capabilities IE inclusion. Signed-off-by: Masashi Honma --- net/mac80211/mesh.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 9c23172..a30be19 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -469,9 +469,9 @@ int mesh_add_vht_cap_ie(struct ieee80211_sub_if_data *sdata, sband = local->hw.wiphy->bands[band]; if (!sband->vht_cap.vht_supported || - sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) + !(sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_80 || + sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_80P80 || + sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_160)) return 0; if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_vht_cap)) @@ -506,9 +506,9 @@ int mesh_add_vht_oper_ie(struct ieee80211_sub_if_data *sdata, vht_cap = &sband->vht_cap; if (!vht_cap->vht_supported || - sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_20_NOHT || - sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_5 || - sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_10) + !(sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_80 || + sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_80P80 || + sdata->vif.bss_conf.chandef.width == NL80211_CHAN_WIDTH_160)) return 0; if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_vht_operation))