mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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]>