Thread (2 messages) flat view 2 messages, 2 authors, 2021-07-14

Re: [PATCH] mt76: mt7915: fix endianness warnings in mu radiotap

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2021-07-14 19:59:14
Also in: linux-mediatek

-	he_mu->ru_ch1[0] = FIELD_GET(MT_CRXV_HE_RU0, cpu_to_le32(rxv[3]));
+	he_mu->ru_ch1[0] = FIELD_GET(MT_CRXV_HE_RU0, le32_to_cpu(rxv[3]));
Instead of

	FIELD_GET(MASK, le32_to_cpu(value))

you should probably consider

	le32_get_bits(value, MASK)

(not really sure why the order of arguments got inverted though ...)

We might even consider doing an spatch to get rid of all the FIELD_GET()
I guess.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help