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

Johannes Berg johannes at sipsolutions.net
Wed Jul 14 12:48:12 PDT 2021


> 
> -	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




More information about the Linux-mediatek mailing list