mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-02 17:20:59 +00:00
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
|
From 841bf82e99581f648325bee570de98892cad894f Mon Sep 17 00:00:00 2001
|
||
|
From: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
|
||
|
Date: Wed, 7 Feb 2024 11:31:23 +0800
|
||
|
Subject: [PATCH] wifi: mt76: fix the issue of missing txpwr settings from
|
||
|
ch153 to ch177
|
||
|
|
||
|
Because the number of channels to be configured is calculated using the %,
|
||
|
and it results in 0 when there's an exact division, this leads to some
|
||
|
channels not having their tx power configured.
|
||
|
|
||
|
Fixes: 7801da338856 ("wifi: mt76: mt7921: enable set txpower for UNII-4")
|
||
|
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
|
||
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||
|
---
|
||
|
mt76_connac_mcu.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
--- a/mt76_connac_mcu.c
|
||
|
+++ b/mt76_connac_mcu.c
|
||
|
@@ -2101,7 +2101,7 @@ mt76_connac_mcu_rate_txpower_band(struct
|
||
|
int j, msg_len, num_ch;
|
||
|
struct sk_buff *skb;
|
||
|
|
||
|
- num_ch = i == batch_size - 1 ? n_chan % batch_len : batch_len;
|
||
|
+ num_ch = i == batch_size - 1 ? n_chan - i * batch_len : batch_len;
|
||
|
msg_len = sizeof(tx_power_tlv) + num_ch * sizeof(sku_tlbv);
|
||
|
skb = mt76_mcu_msg_alloc(dev, NULL, msg_len);
|
||
|
if (!skb) {
|