Skip to contentSkip to conversation

wifi: mt76: mt7925: add 5.9G channel list and last batch size for sar update

PATCH New JB Tsai 1 participant 1 message Nov 10

Subsystems (2)
lore
Share & tools
lore

JB Tsai

author
#0 lore raw

PATCH 1/1 wifi: mt76: mt7925: add 5.9G channel list and last batch size for sar update

From: Jared Huang <[email protected]>

Use min(batch_len, n_chan - idx) so the last batch always holds the channels that are left. Also add the missing 5.9G channel list.

Fixes c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
---
 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c +3 -2
index f45b0d81fd08..80a4f395c472 100644
@@ -4140,7 +4140,8 @@ mt7925_mcu_rate_txpower_band(struct mt76_phy *phy,
 		112, 114, 116, 118, 120, 122, 124,
 		126, 128, 132, 134, 136, 138, 140,
 		142, 144, 149, 151, 153, 155, 157,
-		159, 161, 165, 167
+		159, 161, 163, 165, 167, 169, 173,
+		175, 177
 	};
 	static const u8 chan_list_6ghz[] = {
 		  1,   3,   5,   7,   9,  11,  13,
@@ -4199,7 +4200,7 @@ mt7925_mcu_rate_txpower_band(struct mt76_phy *phy,
 		int j, msg_len, num_ch;
 		struct sk_buff *skb;
 
-		num_ch = i == batch_size - 1 ? n_chan % batch_len : batch_len;
+		num_ch = min(batch_len, n_chan - idx);
 		msg_len = sizeof(*tx_power_tlv) + num_ch * sku_len;
 		skb = mt76_mcu_msg_alloc(dev, NULL, msg_len);
 		if (!skb) {
Signature · 1 line
2.45.2