]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
staging: r8188eu: use ieee80211 helper to read "more data"
authorMartin Kaiser <martin@kaiser.cx>
Sun, 27 Feb 2022 16:41:45 +0000 (17:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Mar 2022 21:34:15 +0000 (22:34 +0100)
Use the ieee80211 helper to read the "more data" bit. The driver-specific
macro GetMData can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220227164147.1168847-7-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

index e8da2e5bbc3210a00604be60b651f99152a6dd6b..e7a1aa9457b74e5772ea0fa84c4978def76facf3 100644 (file)
@@ -1082,7 +1082,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
 
        pattrib->pw_save = GetPwrMgt(ptr);
        pattrib->mfrag = ieee80211_has_morefrags(fc);
-       pattrib->mdata = GetMData(ptr);
+       pattrib->mdata = ieee80211_has_moredata(fc);
        pattrib->privacy = GetPrivacy(ptr);
        pattrib->order = GetOrder(ptr);
 
index 1d703bc94fca3ed28227a2a176679ec772663438..336c32470150ac4e4b900964b00698b2ced11ae1 100644 (file)
@@ -205,8 +205,6 @@ enum WIFI_REG_DOMAIN {
 #define SetMData(pbuf) \
        *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
 
-#define GetMData(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_MORE_DATA_)) != 0)
-
 #define ClearMData(pbuf)       \
        *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))