Skip to content

Commit

Permalink
wifi: mt76: mt7996: fix fortify warning
Browse files Browse the repository at this point in the history
Copy cck and ofdm separately in order to avoid __read_overflow2_field
warning.

Fixes: f75e477 ("wifi: mt76: mt7996: add txpower setting support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240203132446.54790-1-nbd@nbd.name
  • Loading branch information
Felix Fietkau authored and Kalle Valo committed Feb 5, 2024
1 parent 5bdda00 commit 0647903
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4477,7 +4477,8 @@ int mt7996_mcu_set_txpower_sku(struct mt7996_phy *phy)

skb_put_data(skb, &req, sizeof(req));
/* cck and ofdm */
skb_put_data(skb, &la.cck, sizeof(la.cck) + sizeof(la.ofdm));
skb_put_data(skb, &la.cck, sizeof(la.cck));
skb_put_data(skb, &la.ofdm, sizeof(la.ofdm));
/* ht20 */
skb_put_data(skb, &la.mcs[0], 8);
/* ht40 */
Expand Down

0 comments on commit 0647903

Please sign in to comment.