Commit 5aaec657 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman

staging: r8188eu: remove some unused local ieee80211 macros

Remove some macros from wifi.h which are not used by this driver.
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220315205041.2714168-6-martin@kaiser.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3524c88e
...@@ -167,17 +167,11 @@ enum WIFI_REG_DOMAIN { ...@@ -167,17 +167,11 @@ enum WIFI_REG_DOMAIN {
#define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0) #define GetToDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_TO_DS_)) != 0)
#define ClearToDs(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_TO_DS_))
#define SetFrDs(pbuf) \ #define SetFrDs(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_) *(__le16 *)(pbuf) |= cpu_to_le16(_FROM_DS_)
#define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0) #define GetFrDs(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_FROM_DS_)) != 0)
#define ClearFrDs(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_FROM_DS_))
#define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe)) #define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
#define SetMFrag(pbuf) \ #define SetMFrag(pbuf) \
...@@ -186,46 +180,25 @@ enum WIFI_REG_DOMAIN { ...@@ -186,46 +180,25 @@ enum WIFI_REG_DOMAIN {
#define ClearMFrag(pbuf) \ #define ClearMFrag(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_)) *(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_FRAG_))
#define SetRetry(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_RETRY_)
#define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0) #define GetRetry(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_RETRY_)) != 0)
#define ClearRetry(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_RETRY_))
#define SetPwrMgt(pbuf) \ #define SetPwrMgt(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_) *(__le16 *)(pbuf) |= cpu_to_le16(_PWRMGT_)
#define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0) #define GetPwrMgt(pbuf) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PWRMGT_)) != 0)
#define ClearPwrMgt(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PWRMGT_))
#define SetMData(pbuf) \ #define SetMData(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_) *(__le16 *)(pbuf) |= cpu_to_le16(_MORE_DATA_)
#define ClearMData(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_MORE_DATA_))
#define SetPrivacy(pbuf) \ #define SetPrivacy(pbuf) \
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_) *(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
#define GetPrivacy(pbuf) \ #define GetPrivacy(pbuf) \
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0) (((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
#define ClearPrivacy(pbuf) \
*(__le16 *)(pbuf) &= (~cpu_to_le16(_PRIVACY_))
#define GetFrameType(pbuf) \ #define GetFrameType(pbuf) \
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2))) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
#define SetFrameType(pbuf, type) \
do { \
*(unsigned short *)(pbuf) &= __constant_cpu_to_le16(~(BIT(3) | BIT(2))); \
*(unsigned short *)(pbuf) |= __constant_cpu_to_le16(type); \
} while (0)
#define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\ #define GetFrameSubType(pbuf) (le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(7) |\
BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2))) BIT(6) | BIT(5) | BIT(4) | BIT(3) | BIT(2)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment