From patchwork Wed Aug 3 02:54:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masashi Honma X-Patchwork-Id: 9260711 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 340BA60467 for ; Wed, 3 Aug 2016 03:10:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CE4628547 for ; Wed, 3 Aug 2016 03:10:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 110FA2854C; Wed, 3 Aug 2016 03:10:55 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 A2ECE28547 for ; Wed, 3 Aug 2016 03:10:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755572AbcHCDKx (ORCPT ); Tue, 2 Aug 2016 23:10:53 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35342 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752300AbcHCDKv (ORCPT ); Tue, 2 Aug 2016 23:10:51 -0400 Received: by mail-pf0-f194.google.com with SMTP id h186so13647549pfg.2 for ; Tue, 02 Aug 2016 20:10:02 -0700 (PDT) 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=aCwStkykjikiY3PwIP65S+mDAgKAeDy9OS5a5KBD8xk=; b=POt/EFdKSPHYv+MrOpYQzTuIR2yYQUhm44DZoCvmrwIfYeclsc3n46u1WxxaVQImhM YjRhJA5jHwM4lZ+ajg+GI8cy5HUFO2mpKjc0yBZ8FbPQWSC/4OuQzeOv1AGGfKpfoMSQ j84vSZZ9iJv5NrOS/FWwFkKSkbow5Zzju8m8mklR+Pf5Nvvlqves9kvPBk7KDUv2eh3u XAuwSDogVBZnGf3lwNn24nUqnBwh1OrsvVDj1Pj67t0+nQuRZ3nSmhShVv/LZET93Phy Vh+tUQsuBz9kNjCNjm/MiFe149/nFuLsdrnnCoWMwLfNJSnA5LUe+saDi4n8citqZDpR LHhQ== 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=aCwStkykjikiY3PwIP65S+mDAgKAeDy9OS5a5KBD8xk=; b=Pto0AxT+3rrDv9dxL2Tqbf8FXKGK2NJIsNPCiIcNTUaVmkyKW1Dz6lEo+IYbKTsxWz qiid1wN/3v2wGATO9R4k9ek/SFSp9kda8FcTyofvcpaIDPF+V54bZ/Ws/H5qBEl7tcDh 4GDtxx0j+oBGWwGyDRfWFeuu64ePJhxxFqbR76SYN8g5B7/ca+QTd56wWh/ImLVR4Tns n6C9VQ80frNPoETzcUFXKV+yBZIibiNdg8YYszkylLZ8yFrPUIqPb50A3gXVhXTgRSr1 2hD0rzxhPqyQ5tFiBsxkANUWbkOauzg3ATJ6w5S0mxgsahRGVD+PO+3pT2sbbbreRnst erQg== X-Gm-Message-State: AEkoouuRXPc9Xi18762iiVEEWu7lJZOXLYyEV5SRtz9KIthtUVdktzfPS1GI+E9wH0MPTQ== X-Received: by 10.98.72.28 with SMTP id v28mr111138300pfa.139.1470192884947; Tue, 02 Aug 2016 19:54:44 -0700 (PDT) Received: from localhost.localdomain (p4a0890.kngwnt01.ap.so-net.ne.jp. [120.74.8.144]) by smtp.gmail.com with ESMTPSA id i62sm7848168pfg.62.2016.08.02.19.54.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Aug 2016 19:54:44 -0700 (PDT) From: Masashi Honma To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, j@w1.fi, me@bobcopeland.com, Masashi Honma Subject: [PATCH] mac80211: Include HT Capabilities element if capable Date: Wed, 3 Aug 2016 11:54:29 +0900 Message-Id: <1470192869-4206-1-git-send-email-masashi.honma@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470122837.2665.5.camel@sipsolutions.net> References: <1470122837.2665.5.camel@sipsolutions.net> 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 Previously, "HT Capabilities element" was not included in beacon and Mesh Peering Open/Close frames when wpa_supplicant config file includes disable_ht=1 even though HT is capable. But "HT Capabilities element" should not be modified because it is defined by hardware and software spec of the node. We do not change "HT Operation element" code, because it is defined by surrounding environment and configuration of the node. So it could be vanished by disable_ht=1. Signed-off-by: Masashi Honma --- net/mac80211/mesh.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index c66411d..ebd4159 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -409,10 +409,7 @@ int mesh_add_ht_cap_ie(struct ieee80211_sub_if_data *sdata, u8 *pos; sband = local->hw.wiphy->bands[band]; - if (!sband->ht_cap.ht_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) + if (!sband->ht_cap.ht_supported) return 0; if (skb_tailroom(skb) < 2 + sizeof(struct ieee80211_ht_cap))