Skip to contentSkip to conversation

wifi: mt76: mt7915: fix background radar event being blocked

PATCH New StanleyYP.Wang 1 participant 1 message Mar 30, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: mt76: mt7915: fix background radar event being blocked

From: StanleyYP Wang <[email protected]>

The mcu event of background radar will be blocked since the band_idx of the background radar event is MT_RX_SEL2, which is larger than MT_BAND1. Therefore, this commit fixes the boundary of band_idx checking.

Fixes 7a53eecd5c87 ("wifi: mt76: mt7915: check the correctness of event data")
---
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +1 -1
index 16f09ead307d..a37ab903af99 100644
@@ -274,7 +274,7 @@ mt7915_mcu_rx_radar_detected(struct mt7915_dev *dev, struct sk_buff *skb)
 
 	r = (struct mt7915_mcu_rdd_report *)skb->data;
 
-	if (r->band_idx > MT_BAND1)
+	if (r->band_idx > MT_RX_SEL2)
 		return;
 
 	if ((r->band_idx && !dev->phy.mt76->band_idx) &&
Signature · 1 line
2.18.0