mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
wifi: mt76: fix the issue of missing txpwr settings from ch153 to ch177
[ Upstream commite9a46175a7
] 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:7801da3388
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
43d1e02760
commit
917b69bb18
1 changed files with 1 additions and 1 deletions
|
@ -2100,7 +2100,7 @@ mt76_connac_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 = 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) {
|
||||
|
|
Loading…
Reference in a new issue