]> git.baikalelectronics.ru Git - kernel.git/commit
staging: r8188eu: use ieee80211 macro for sequence number
authorMartin Kaiser <martin@kaiser.cx>
Sun, 27 Mar 2022 18:09:43 +0000 (20:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Apr 2022 05:33:47 +0000 (07:33 +0200)
commit3b735105956deb1e35113c164defd465e43aabc5
tree0d70dfeaf25655b96bcfce673256909ba96134a8
parentfbf44561d762b31e700d24d0775e436b0b066327
staging: r8188eu: use ieee80211 macro for sequence number

Use the IEEE80211_SEQ_TO_SN macro in function validate_recv_frame to get
the sequence number of an incoming frame.

Map the incoming rx bytes to a struct ieee80211_hdr. Replace the fc
variable with struct ieee80211_hdr's frame control component.

The IEEE80211_SEQ_TO_SN macro takes the sequence control field of an
ieee80211 header and extracts the sequence number. The macro's input
parameter must be in host endianness, the sequence number in the 80211
header is little-endian, we have to convert it to host endianness.

Remove the local GetSequence macro, it is not used any more.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220327180944.712545-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_recv.c
drivers/staging/r8188eu/include/wifi.h