Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH wireless] wifi: mt76: mt7996: fix fortify warning
@ 2024-02-03 13:24 Felix Fietkau
  2024-02-05 18:00 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2024-02-03 13:24 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo

Copy cck and ofdm separately in order to avoid __read_overflow2_field
warning.

Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
index 3c729b563edc..699be57309c2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
@@ -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 */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH wireless] wifi: mt76: mt7996: fix fortify warning
  2024-02-03 13:24 [PATCH wireless] wifi: mt76: mt7996: fix fortify warning Felix Fietkau
@ 2024-02-05 18:00 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2024-02-05 18:00 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless

Felix Fietkau <nbd@nbd.name> wrote:

> Copy cck and ofdm separately in order to avoid __read_overflow2_field
> warning.
> 
> Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support")
> Signed-off-by: Felix Fietkau <nbd@nbd.name>

Patch applied to wireless.git, thanks.

0647903efbc8 wifi: mt76: mt7996: fix fortify warning

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20240203132446.54790-1-nbd@nbd.name/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-05 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-03 13:24 [PATCH wireless] wifi: mt76: mt7996: fix fortify warning Felix Fietkau
2024-02-05 18:00 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox