diff options
author | Ryder Lee <ryder.lee@mediatek.com> | 2020-12-05 07:37:14 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-01-26 20:07:46 +0100 |
commit | 446e06c6e00843211eeb942f9b146bd4b07bf9c2 (patch) | |
tree | 3062eefc5d388df03fe38277aef5f00dfb58b94a /drivers/net/wireless/mediatek/mt76/mt7915 | |
parent | 4832bb371c4175ffb506a96accbb08ef2b2466e7 (diff) | |
download | linux-446e06c6e00843211eeb942f9b146bd4b07bf9c2.tar.bz2 |
mt76: mt7915: add vif check in mt7915_update_vif_beacon()
To avoid the warn_on() calltrace in station mode.
[ 4522.024382] ieee80211_tx_dequeue+0x1258/0x1298 [mac80211]
[ 4522.029868] ieee80211_beacon_get_template+0x10/0x18 [mac80211]
[ 4522.035780] mt7915_mcu_add_beacon+0x2c/0x208 [mt7915e]
[ 4522.040997] mt7915_mcu_get_rx_rate+0x304/0x878 [mt7915e]
[ 4522.046394] ieee80211_delayed_tailroom_dec+0x158/0x180 [mac80211]
[ 4522.052573] ieee80211_iterate_interfaces+0x48/0x68 [mac80211]
[ 4522.058398] mt7915_mac_reset_work+0x3b4/0x630 [mt7915e]
[ 4522.063704] process_one_work+0x1fc/0x390
[ 4522.067703] worker_thread+0x48/0x4d0
[ 4522.071356] kthread+0x120/0x128
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7915')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index f504eeb221f9..529cffc3484b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -1434,7 +1434,15 @@ mt7915_update_vif_beacon(void *priv, u8 *mac, struct ieee80211_vif *vif) { struct ieee80211_hw *hw = priv; - mt7915_mcu_add_beacon(hw, vif, vif->bss_conf.enable_beacon); + switch (vif->type) { + case NL80211_IFTYPE_MESH_POINT: + case NL80211_IFTYPE_ADHOC: + case NL80211_IFTYPE_AP: + mt7915_mcu_add_beacon(hw, vif, vif->bss_conf.enable_beacon); + break; + default: + break; + } } static void |