All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org,
	Johannes Berg <johannes.berg@intel.com>,
	Greenman, Gregory <gregory.greenman@intel.com>
Subject: [PATCH 11/14] wifi: mac80211: don't set ESS capab bit in assoc request
Date: Mon, 11 Dec 2023 09:05:29 +0200	[thread overview]
Message-ID: <20231211085121.65005aba900b.I3d00c8741400572a89a7508b5ae612c968874ad7@changeid> (raw)
In-Reply-To: <20231211070532.2458539-1-miriam.rachel.korenblit@intel.com>

From: Johannes Berg <johannes.berg@intel.com>

The ESS capability bit is reserved in frames transmitted by
the client, so we shouldn't set it. Since we've set it for
decades, keep that old behaviour unless we're connection to
a new EHT AP.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
 net/mac80211/mlme.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 2b1b64eb82f7..a693ca2cf8cd 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1385,7 +1385,7 @@ static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
 	struct ieee80211_mgmt *mgmt;
 	u8 *pos, qos_info, *ie_start;
 	size_t offset, noffset;
-	u16 capab = WLAN_CAPABILITY_ESS, link_capab;
+	u16 capab = 0, link_capab;
 	__le16 listen_int;
 	struct element *ext_capa = NULL;
 	enum nl80211_iftype iftype = ieee80211_vif_type_p2p(&sdata->vif);
@@ -1532,6 +1532,17 @@ static int ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
 	*pos++ = assoc_data->ssid_len;
 	memcpy(pos, assoc_data->ssid, assoc_data->ssid_len);
 
+	/*
+	 * This bit is technically reserved, so it shouldn't matter for either
+	 * the AP or us, but it also means we shouldn't set it. However, we've
+	 * always set it in the past, and apparently some EHT APs check that
+	 * we don't set it. To avoid interoperability issues with old APs that
+	 * for some reason check it and want it to be set, set the bit for all
+	 * pre-EHT connections as we used to do.
+	 */
+	if (link->u.mgd.conn_flags & IEEE80211_CONN_DISABLE_EHT)
+		capab |= WLAN_CAPABILITY_ESS;
+
 	/* add the elements for the assoc (main) link */
 	link_capab = capab;
 	offset = ieee80211_assoc_link_elems(sdata, skb, &link_capab,
-- 
2.34.1


  parent reply	other threads:[~2023-12-10 13:06 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-11  7:05 [PATCH 00/14] cfg80211/mac80211 patches from our internal tree 2023-12-10 Miri Korenblit
2023-12-11  7:05 ` [PATCH 01/14] wifi: mac80211: don't re-add debugfs during reconfig Miri Korenblit
2023-12-11  7:05 ` [PATCH 02/14] wifi: cfg80211: add BSS usage reporting Miri Korenblit
2023-12-11  7:05 ` [PATCH 03/14] wifi: mac80211: update some locking documentation Miri Korenblit
2023-12-11  7:05 ` [PATCH 04/14] wifi: cfg80211: Add support for setting TID to link mapping Miri Korenblit
2023-12-11  7:05 ` [PATCH 05/14] wifi: mac80211: add a flag to disallow puncturing Miri Korenblit
2023-12-11  7:05 ` [PATCH 06/14] wifi: cfg80211: Update the default DSCP-to-UP mapping Miri Korenblit
2023-12-12  9:39   ` Johannes Berg
2023-12-13 11:52     ` Peer, Ilan
2023-12-17  9:42   ` Jouni Malinen
2023-12-17 15:11     ` Peer, Ilan
2023-12-18  9:30   ` [PATCH v2] " Ilan Peer
2023-12-11  7:05 ` [PATCH 07/14] wifi: mac80211: Replace ENOTSUPP with EOPNOTSUPP Miri Korenblit
2023-12-11  7:05 ` [PATCH 08/14] wifi: cfg80211: " Miri Korenblit
2023-12-11  7:05 ` [PATCH 09/14] wifi: cfg80211: generate an ML element for per-STA profiles Miri Korenblit
2023-12-11  7:05 ` [PATCH 10/14] wifi: cfg80211: consume both probe response and beacon IEs Miri Korenblit
2023-12-11  7:05 ` Miri Korenblit [this message]
2023-12-11  7:05 ` [PATCH 12/14] wifi: mac80211: check defragmentation succeeded Miri Korenblit
2023-12-11  7:05 ` [PATCH 13/14] wifi: mac80211: mesh_plink: fix matches_local logic Miri Korenblit
2023-12-11  7:05 ` [PATCH 14/14] wifi: mac80211: mesh: check element parsing succeeded Miri Korenblit

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=20231211085121.65005aba900b.I3d00c8741400572a89a7508b5ae612c968874ad7@changeid \
    --to=miriam.rachel.korenblit@intel.com \
    --cc=gregory.greenman@intel.com \
    --cc=johannes.berg@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.