wifi: mac80211: don't add VHT capa on links without them
authorJohannes Berg <johannes.berg@intel.com>
Wed, 28 Feb 2024 08:40:51 +0000 (09:40 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 4 Mar 2024 13:31:02 +0000 (14:31 +0100)
commitbf7bc8c5974b78a09f266be3a5a84ed3865f30a6
tree49ba039121d2032762b350e5d23e354afc0e2807
parent5fcc7c51f9e72d1e62991f8b32be4a5adf44d556
wifi: mac80211: don't add VHT capa on links without them

When a link doesn't have VHT capability, before the rework
we'd have set IEEE80211_CONN_DISABLE_VHT, but now with the
linear progression of 'mode', we no longer have that. Add
an explicit check for VHT being supported, so we don't add
a zeroed VHT capabilities element where it shouldn't be.

Fixes: 310c8387c638 ("wifi: mac80211: clean up connection process")
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240228094207.bfe4283bcde7.Ib70a558bc6bdbcec3d9e663079229dfcc2493682@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c