lkml.org 
[lkml]   [2022]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 8/8] staging: r8188eu: use ieee80211 helper to read the "order" bit
Date
Use the ieee80211 helper to read the "order" bit. The driver-specific
macro GetOrder can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_recv.c | 2 +-
drivers/staging/r8188eu/include/wifi.h | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
index b245b0d54973..d77d983510a0 100644
--- a/drivers/staging/r8188eu/core/rtw_recv.c
+++ b/drivers/staging/r8188eu/core/rtw_recv.c
@@ -1084,7 +1084,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pattrib->mfrag = ieee80211_has_morefrags(fc);
pattrib->mdata = ieee80211_has_moredata(fc);
pattrib->privacy = ieee80211_has_protected(fc);
- pattrib->order = GetOrder(ptr);
+ pattrib->order = ieee80211_has_order(fc);

/* Dump rx packets */
GetHalDefVar8188EUsb(adapter, HAL_DEF_DBG_DUMP_RXPKT, &bDumpRxPkt);
diff --git a/drivers/staging/r8188eu/include/wifi.h b/drivers/staging/r8188eu/include/wifi.h
index 336c32470150..39b7a596e4c1 100644
--- a/drivers/staging/r8188eu/include/wifi.h
+++ b/drivers/staging/r8188eu/include/wifi.h
@@ -217,9 +217,6 @@ enum WIFI_REG_DOMAIN {
#define ClearPrivacy(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))

-#define GetOrder(pbuf) \
- (((*(__le16 *)(pbuf)) & cpu_to_le16(_ORDER_)) != 0)
-
#define GetFrameType(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))

--
2.30.2
\
 
 \ /
  Last update: 2022-02-27 17:43    [W:0.266 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site