linux-stable/net/mac80211
Johannes Berg f65607cdbc mac80211: don't set set TDLS STA bandwidth wider than possible
When we set up a TDLS station, we set sta->sta.bandwidth solely based
on the capabilities, because the "what's the current bandwidth" check
is bypassed and only applied for other types of stations.

This leads to the unfortunate scenario that the sta->sta.bandwidth is
160 MHz if both stations support it, but we never actually configure
this bandwidth unless the AP is already using 160 MHz; even for wider
bandwidth support we only go up to 80 MHz (at least right now.)

For iwlwifi, this can also lead to firmware asserts, telling us that
we've configured the TX rates for a higher bandwidth than is actually
available due to the PHY configuration.

For non-TDLS, we check against the interface's requested bandwidth,
but we explicitly skip this check for TDLS to cope with the wider BW
case. Change this to
 (a) still limit to the TDLS peer's own chandef, which gets factored
     into the overall PHY configuration we request from the driver,
     and
 (b) limit it to when the TDLS peer is authorized, because it's only
     factored into the channel context in this case.

Fixes: 504871e602 ("mac80211: fix bandwidth computation for TDLS peers")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20201206145305.fcc7d29c4590.I11f77e9e25ddf871a3c8d5604650c763e2c5887a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-12-11 13:20:05 +01:00
..
aead_api.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
aead_api.h
aes_ccm.h
aes_cmac.c mac80211: Update BIP to support Beacon frames 2020-02-24 10:36:03 +01:00
aes_cmac.h
aes_gcm.h
aes_gmac.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
aes_gmac.h
agg-rx.c net: mac80211: agg-rx.c: fix duplicated words 2020-08-27 11:23:08 +02:00
agg-tx.c mac80211: accept aggregation sessions on 6 GHz 2020-05-31 11:27:16 +02:00
airtime.c mac80211: add AQL support for VHT160 tx rates 2020-09-18 11:36:03 +02:00
cfg.c mac80211: use struct assignment for he_obss_pd 2020-12-11 13:20:05 +01:00
chan.c mac80211: remove WDS-related code 2020-11-11 08:39:13 +01:00
debug.h
debugfs.c mac80211: remove trailing semicolon in macro definitions 2020-12-11 12:51:55 +01:00
debugfs.h
debugfs_key.c mac80211: remove trailing semicolon in macro definitions 2020-12-11 12:51:55 +01:00
debugfs_key.h mac80211: Support BIGTK configuration for Beacon protection 2020-02-24 10:35:57 +01:00
debugfs_netdev.c mac80211: remove trailing semicolon in macro definitions 2020-12-11 12:51:55 +01:00
debugfs_netdev.h
debugfs_sta.c mac80211: remove trailing semicolon in macro definitions 2020-12-11 12:51:55 +01:00
debugfs_sta.h
driver-ops.c mac80211: don't warn about CW params when not using them 2019-07-20 21:40:32 +02:00
driver-ops.h mac80211: notify the driver when a sta uses 4-address mode 2020-09-18 12:16:16 +02:00
ethtool.c
fils_aead.c
fils_aead.h
he.c mac80211: use HE 6 GHz band capability and pass it to the driver 2020-05-31 11:27:03 +02:00
ht.c mac80211: Use fallthrough pseudo-keyword 2020-07-31 09:24:23 +02:00
ibss.c mac80211: support S1G association 2020-09-28 14:09:07 +02:00
ieee80211_i.h mac80211: support driver-based disconnect with reconnect hint 2020-12-11 13:20:05 +01:00
iface.c mac80211: remove WDS-related code 2020-11-11 08:39:13 +01:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
key.c mac80211: support MIC error/replay detected counters driver update 2020-12-11 12:53:48 +01:00
key.h mac80211: Support BIGTK configuration for Beacon protection 2020-02-24 10:35:57 +01:00
led.c
led.h
main.c Some updates: 2020-11-13 12:03:22 -08:00
Makefile mac80211: initialize last_rate for S1G STAs 2020-10-08 10:40:57 +02:00
mesh.c mac80211: save HE oper info in BSS config for mesh 2020-11-06 10:03:21 +01:00
mesh.h mac80211: add HE 6 GHz Band Capability element 2020-05-31 11:26:39 +02:00
mesh_hwmp.c mac80211: swap NEED_TXPROCESSING and HW_80211_ENCAP tx flags 2020-09-18 12:13:06 +02:00
mesh_pathtbl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
mesh_plink.c mac80211: fix some more kernel-doc in mesh 2020-09-28 14:36:53 +02:00
mesh_ps.c mac80211: fix some more kernel-doc in mesh 2020-09-28 14:36:53 +02:00
mesh_sync.c
michael.c
michael.h
mlme.c mac80211: support driver-based disconnect with reconnect hint 2020-12-11 13:20:05 +01:00
ocb.c
offchannel.c mac80211: Inform AP when returning operating channel 2020-09-28 13:18:53 +02:00
pm.c mac80211: remove WDS-related code 2020-11-11 08:39:13 +01:00
rate.c mac80211: initialize last_rate for S1G STAs 2020-10-08 10:40:57 +02:00
rate.h mac80211: populate debugfs only after cfg80211 init 2020-04-24 11:30:13 +02:00
rc80211_minstrel.c mac80211: minstrel: fix tx status processing corner case 2020-11-12 11:25:09 +01:00
rc80211_minstrel.h mac80211: minstrel: remove deferred sampling code 2020-11-12 11:24:43 +01:00
rc80211_minstrel_debugfs.c mac80211: minstrel_ht: rename prob_ewma to prob_avg, use it for the new average 2019-10-11 10:31:45 +02:00
rc80211_minstrel_ht.c One batch of changes, containing: 2020-05-26 20:17:35 -07:00
rc80211_minstrel_ht.h mac80211: minstrel_ht: rename prob_ewma to prob_avg, use it for the new average 2019-10-11 10:31:45 +02:00
rc80211_minstrel_ht_debugfs.c mac80211: minstrel_ht: rename prob_ewma to prob_avg, use it for the new average 2019-10-11 10:31:45 +02:00
rx.c net: mac80211: use core API for updating TX/RX stats 2020-12-11 12:47:26 +01:00
s1g.c mac80211: initialize last_rate for S1G STAs 2020-10-08 10:40:57 +02:00
scan.c mac80211: convert S1G beacon to scan results 2020-09-28 13:53:25 +02:00
spectmgmt.c mac80211: avoid using ext NSS high BW if not supported 2020-05-31 11:26:50 +02:00
sta_info.c mac80211: free sta in sta_info_insert_finish() on errors 2020-11-13 09:48:32 +01:00
sta_info.h mac80211: fix kernel-doc markups 2020-10-30 10:06:09 +01:00
status.c mac80211: fix memory leak on filtered powersave frames 2020-11-12 11:23:58 +01:00
tdls.c mac80211: Use fallthrough pseudo-keyword 2020-07-31 09:24:23 +02:00
tkip.c mac80211: Fix TKIP replay protection immediately after key setup 2020-01-15 09:52:12 +01:00
tkip.h
trace.c
trace.h mac80211: support driver-based disconnect with reconnect hint 2020-12-11 13:20:05 +01:00
trace_msg.h
tx.c net: mac80211: use core API for updating TX/RX stats 2020-12-11 12:47:26 +01:00
util.c Some updates: 2020-11-13 12:03:22 -08:00
vht.c mac80211: don't set set TDLS STA bandwidth wider than possible 2020-12-11 13:20:05 +01:00
wep.c mac80211: make ieee80211_wep_init() return void 2020-02-07 12:40:34 +01:00
wep.h mac80211: make ieee80211_wep_init() return void 2020-02-07 12:40:34 +01:00
wme.c mac80211: remove WDS-related code 2020-11-11 08:39:13 +01:00
wme.h
wpa.c mac80211: add IEEE80211_KEY_FLAG_GENERATE_MMIE to ieee80211_key_flags 2019-07-26 16:14:12 +02:00
wpa.h