* [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
@ 2023-05-22 9:09 Lorenzo Bianconi
2023-05-22 12:22 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2023-05-22 9:09 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless
Fix the following endianness warning in mt7996_mac_write_txwi routine:
drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: warning: invalid assignment: |=
drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: left side has type restricted __le32
drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: right side has type unsigned long
Fixes: 15ee62e73705 ("wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 7905070afc2c..942152a70f6c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -1088,7 +1088,7 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
else if (beacon && mvif->beacon_rates_idx)
idx = mvif->beacon_rates_idx;
- txwi[6] |= FIELD_PREP(MT_TXD6_TX_RATE, idx);
+ txwi[6] |= cpu_to_le32(FIELD_PREP(MT_TXD6_TX_RATE, idx));
txwi[3] |= cpu_to_le32(MT_TXD3_BA_DISABLE);
}
}
--
2.40.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
2023-05-22 9:09 [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi Lorenzo Bianconi
@ 2023-05-22 12:22 ` Simon Horman
2023-05-24 9:46 ` Kalle Valo
2023-05-27 8:16 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2023-05-22 12:22 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless
On Mon, May 22, 2023 at 11:09:01AM +0200, Lorenzo Bianconi wrote:
> Fix the following endianness warning in mt7996_mac_write_txwi routine:
FWIIW, I think this fixes a bug on big endian hosts.
Which might be a better description.
But I don't feel strongly about this.
>
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: warning: invalid assignment: |=
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: left side has type restricted __le32
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: right side has type unsigned long
>
> Fixes: 15ee62e73705 ("wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
2023-05-22 9:09 [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi Lorenzo Bianconi
2023-05-22 12:22 ` Simon Horman
@ 2023-05-24 9:46 ` Kalle Valo
2023-05-27 8:16 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2023-05-24 9:46 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless
Lorenzo Bianconi <lorenzo@kernel.org> writes:
> Fix the following endianness warning in mt7996_mac_write_txwi routine:
>
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: warning: invalid assignment: |=
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: left side has type restricted __le32
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: right side has type unsigned long
>
> Fixes: 15ee62e73705 ("wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Commit 15ee62e73705 is in v6.4-rc1 so I should take this to wireless,
right? Felix, ack?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
2023-05-22 9:09 [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi Lorenzo Bianconi
2023-05-22 12:22 ` Simon Horman
2023-05-24 9:46 ` Kalle Valo
@ 2023-05-27 8:16 ` Kalle Valo
2023-05-27 9:26 ` Lorenzo Bianconi
2 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2023-05-27 8:16 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, lorenzo.bianconi, linux-wireless
Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> Fix the following endianness warning in mt7996_mac_write_txwi routine:
>
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: warning: invalid assignment: |=
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: left side has type restricted __le32
> drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: right side has type unsigned long
>
> Fixes: 15ee62e73705 ("wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
Failed to apply, please rebase over wireless tree.
error: sha1 information is lacking or useless (drivers/net/wireless/mediatek/mt76/mt7996/mac.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
Patch failed at 0001 wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
Patch set to Changes Requested.
--
https://patchwork.kernel.org/project/linux-wireless/patch/9509f4bc32d9321f3419a3c0029a01b426f13fd8.1684746447.git.lorenzo@kernel.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
2023-05-27 8:16 ` Kalle Valo
@ 2023-05-27 9:26 ` Lorenzo Bianconi
0 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Bianconi @ 2023-05-27 9:26 UTC (permalink / raw)
To: Kalle Valo; +Cc: nbd, lorenzo.bianconi, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1972 bytes --]
> Lorenzo Bianconi <lorenzo@kernel.org> wrote:
>
> > Fix the following endianness warning in mt7996_mac_write_txwi routine:
> >
> > drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: warning: invalid assignment: |=
> > drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: left side has type restricted __le32
> > drivers/net/wireless/mediatek/mt76/mt7996/mac.c:1091:25: right side has type unsigned long
> >
> > Fixes: 15ee62e73705 ("wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support")
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > Reviewed-by: Simon Horman <simon.horman@corigine.com>
>
> Failed to apply, please rebase over wireless tree.
>
> error: sha1 information is lacking or useless (drivers/net/wireless/mediatek/mt76/mt7996/mac.c).
> error: could not build fake ancestor
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> Applying: wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
> Patch failed at 0001 wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi
>
> Patch set to Changes Requested.
Hi Kalle,
my bad, it seems there is already a fix for this issue:
commit cdc26ee89bddb9b6b2ae026a46d97855d5ba6694
Author: Ryder Lee <ryder.lee@mediatek.com>
Date: Mon Apr 24 05:39:05 2023 +0800
wifi: mt76: mt7996: fix endianness of MT_TXD6_TX_RATE
To avoid sparse warning:
sparse: warning: invalid assignment: |=
sparse: left side has type restricted __le32
sparse: right side has type unsigned lon
Fixes: 15ee62e73705 ("wifi: mt76: mt7996: enable BSS_CHANGED_BASIC_RATES support")
we can drop this patch. Sorry for the noise.
Regards,
Lorenzo
>
> --
> https://patchwork.kernel.org/project/linux-wireless/patch/9509f4bc32d9321f3419a3c0029a01b426f13fd8.1684746447.git.lorenzo@kernel.org/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-27 9:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-22 9:09 [PATCH] wifi: mt76: mt7996: fix endianness warning in mt7996_mac_write_txwi Lorenzo Bianconi
2023-05-22 12:22 ` Simon Horman
2023-05-24 9:46 ` Kalle Valo
2023-05-27 8:16 ` Kalle Valo
2023-05-27 9:26 ` Lorenzo Bianconi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.