mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 05:16:57 +00:00
1ba5cc4b4023effc234869f1bef6d43905a9fede
In mt7925_mac_link_bss_add(), the MT7927 branch added an else-if that checked mvif->phy->mt76->chandef.chan before assigning it to the local chan pointer. If that check failed, chan stayed NULL and chan->band was dereferenced unconditionally a line later. phy->chandef.chan is set during phy registration in mt76_check_sband() and is never cleared, so the check is a no-op. Drop it and use the chandef channel as an unconditional fallback, matching the assumption made elsewhere in the driver (e.g. the existing basic_rates_idx selection right below this block and mt7925/mac.c). Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Felix Fietkau <[email protected]>
Description
mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
105 MiB
Languages
C
99.7%
Perl
0.2%
Makefile
0.1%