android_kernel_motorola_sm6225/net/mac80211
Johannes Berg ebbd7dc7ca mac80211: don't set set TDLS STA bandwidth wider than possible
[ Upstream commit f65607cdbc6b0da356ef5a22552ddd9313cf87a0 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-30 11:26:03 +01:00
..
aead_api.c
aead_api.h
aes_ccm.h
aes_cmac.c
aes_cmac.h
aes_gcm.h
aes_gmac.c
aes_gmac.h
agg-rx.c
agg-tx.c mac80211: Fix Tx aggregation session tear down with ITXQs 2019-03-23 20:09:45 +01:00
cfg.c mac80211: handle lack of sband->bitrates in rates 2020-10-30 10:38:28 +01:00
chan.c
debug.h
debugfs.c
debugfs.h
debugfs_key.c
debugfs_key.h
debugfs_netdev.c mac80211: fix txq null pointer dereference 2019-10-29 09:19:33 +01:00
debugfs_netdev.h
debugfs_sta.c
debugfs_sta.h
driver-ops.c mac80211: don't warn about CW params when not using them 2019-08-16 10:12:45 +02:00
driver-ops.h mac80211: do not call driver wake_tx_queue op during reconfig 2019-04-27 09:36:38 +02:00
ethtool.c
fils_aead.c
fils_aead.h
he.c
ht.c
ibss.c
ieee80211_i.h mac80211: add option for setting control flags 2020-04-02 15:28:20 +02:00
iface.c mac80211: Fix kernel panic due to use of txq after free 2019-05-25 18:23:43 +02:00
Kconfig
key.c mac80211: Honor SW_CRYPTO_CONTROL for unicast keys in AP VLAN mode 2019-05-08 07:21:54 +02:00
key.h
led.c
led.h
main.c mac80211: fix a kernel panic when TXing after TXQ teardown 2019-01-13 09:51:01 +01:00
Makefile
mesh.c mac80211: free peer keys before vif down in mesh 2019-07-14 08:11:06 +02:00
mesh.h mac80211: Use linked list instead of rhashtable walk for mesh tables 2019-02-27 10:08:49 +01:00
mesh_hwmp.c mac80211: mesh: fix discovery timer re-arming issue / crash 2020-06-03 08:19:43 +02:00
mesh_pathtbl.c mac80211: mesh: fix mesh_pathtbl_init() error path 2020-12-30 11:25:40 +01:00
mesh_plink.c
mesh_ps.c
mesh_sync.c
michael.c
michael.h
mlme.c mac80211: add ieee80211_is_any_nullfunc() 2020-05-10 10:30:12 +02:00
ocb.c
offchannel.c
pm.c
rate.c
rate.h
rc80211_minstrel.c mac80211: minstrel: fix tx status processing corner case 2020-11-24 13:27:26 +01:00
rc80211_minstrel.h mac80211: minstrel: remove deferred sampling code 2020-11-24 13:27:25 +01:00
rc80211_minstrel_debugfs.c
rc80211_minstrel_ht.c mac80211: minstrel_ht: fix per-group max throughput rate initialization 2020-01-27 14:51:06 +01:00
rc80211_minstrel_ht.h
rc80211_minstrel_ht_debugfs.c
rx.c mac80211: allow rx of mesh eapol frames with default rx key 2020-07-29 10:16:44 +02:00
scan.c
spectmgmt.c
sta_info.c mac80211: free sta in sta_info_insert_finish() on errors 2020-11-24 13:27:26 +01:00
sta_info.h
status.c mac80211: add ieee80211_is_any_nullfunc() 2020-05-10 10:30:12 +02:00
tdls.c mac80211: add option for setting control flags 2020-04-02 15:28:20 +02:00
tkip.c mac80211: Fix TKIP replay protection immediately after key setup 2020-02-05 14:43:46 +00:00
tkip.h
trace.c
trace.h
trace_msg.h mac80211: Increase MAX_MSG_LEN 2019-05-16 19:41:20 +02:00
tx.c mac80211: fix use of skb payload instead of header 2020-11-18 19:18:45 +01:00
util.c mac80211: consider more elements in parsing CRC 2020-03-05 16:42:13 +01:00
vht.c mac80211: don't set set TDLS STA bandwidth wider than possible 2020-12-30 11:26:03 +01:00
wep.c
wep.h
wme.c
wme.h
wpa.c mac80211: Do not use stack memory with scatterlist for GMAC 2019-06-25 11:36:02 +08:00
wpa.h