Skip to content

Commit 331aead

Browse files
committed
mac80211: use le16_encode_bits() instead of open-coding
Instead of open-coding the equivalent of le16_encode_bits(), just use that. Signed-off-by: Johannes Berg <[email protected]>
1 parent 6f52728 commit 331aead

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
549549

550550
if (status->encoding == RX_ENC_HE &&
551551
status->flag & RX_FLAG_RADIOTAP_HE) {
552-
#define HE_PREP(f, val) cpu_to_le16(FIELD_PREP(IEEE80211_RADIOTAP_HE_##f, val))
552+
#define HE_PREP(f, val) le16_encode_bits(val, IEEE80211_RADIOTAP_HE_##f)
553553

554554
if (status->enc_flags & RX_ENC_FLAG_STBC_MASK) {
555555
he.data6 |= HE_PREP(DATA6_NSTS,

0 commit comments

Comments
 (0)