From: Masashi Honma <masashi.honma@gmail.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Masashi Honma <masashi.honma@gmail.com>
Subject: [PATCH] mac80211: Remove VHT Capabilities/Operation IEs from mesh beacon if VHT was disabled
Date: Thu, 2 Feb 2017 09:05:28 +0900 [thread overview]
Message-ID: <1485993928-3822-1-git-send-email-masashi.honma@gmail.com> (raw)
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 <masashi.honma@gmail.com>
---
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))
--
2.7.4
next reply other threads:[~2017-02-02 0:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 0:05 Masashi Honma [this message]
2017-02-08 8:22 ` [PATCH] mac80211: Remove VHT Capabilities/Operation IEs from mesh beacon if VHT was disabled Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1485993928-3822-1-git-send-email-masashi.honma@gmail.com \
--to=masashi.honma@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox