mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7925: fix incorrect length field in txpower command
Set `tx_power_tlv->len` to `msg_len` instead of `sizeof(*tx_power_tlv)` to ensure the correct message length is sent to firmware. Cc: [email protected] Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Ming Yen Hsieh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
0d6eaa4174
commit
015349622b
+1
-1
@@ -3678,7 +3678,7 @@ mt7925_mcu_rate_txpower_band(struct mt76_phy *phy,
|
||||
memcpy(tx_power_tlv->alpha2, dev->alpha2, sizeof(dev->alpha2));
|
||||
tx_power_tlv->n_chan = num_ch;
|
||||
tx_power_tlv->tag = cpu_to_le16(0x1);
|
||||
tx_power_tlv->len = cpu_to_le16(sizeof(*tx_power_tlv));
|
||||
tx_power_tlv->len = cpu_to_le16(msg_len);
|
||||
|
||||
switch (band) {
|
||||
case NL80211_BAND_2GHZ:
|
||||
|
||||
Reference in New Issue
Block a user