summaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu/include/wifi.h
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-03-27 20:09:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-04 07:33:47 +0200
commit16405e4689d128435019f9d02a4d38cf28e94227 (patch)
tree0d70dfeaf25655b96bcfce673256909ba96134a8 /drivers/staging/r8188eu/include/wifi.h
parent6cb1bfc9995d275e9641908798868ef3a8c29ef9 (diff)
downloadlinux-16405e4689d128435019f9d02a4d38cf28e94227.tar.bz2
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>
Diffstat (limited to 'drivers/staging/r8188eu/include/wifi.h')
-rw-r--r--drivers/staging/r8188eu/include/wifi.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 24d404f0f5f4..dbda1880c45a 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -189,9 +189,6 @@ enum WIFI_REG_DOMAIN {
*(__le16 *)(pbuf) |= cpu_to_le16(type); \
} while (0)
-#define GetSequence(pbuf) \
- (le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) >> 4)
-
#define GetFragNum(pbuf) \
(le16_to_cpu(*(__le16 *)((size_t)(pbuf) + 22)) & 0x0f)