rtlwifi: rtl8723ae: Remove usage of private bit manipulation macros
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 25 Nov 2019 22:09:32 +0000 (16:09 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 18 Dec 2019 18:22:32 +0000 (20:22 +0200)
Besides the previously changed macros for the RX and TX descriptors.
the local macros are used in other places. These are replaced with
standard bit manipulation macros.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/fw.h

index 5c84373..3f9ed9b 100644 (file)
 #define pagenum_128(_len)      (u32)(((_len)>>7) + ((_len)&0x7F ? 1 : 0))
 
 #define SET_H2CCMD_PWRMODE_PARM_MODE(__ph2ccmd, __val)                 \
-       SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)
+       *(u8 *)__ph2ccmd = __val
 #define SET_H2CCMD_PWRMODE_PARM_SMART_PS(__ph2ccmd, __val)             \
-       SET_BITS_TO_LE_1BYTE((__ph2ccmd)+1, 0, 8, __val)
+       *(u8 *)(__ph2ccmd + 1) = __val
 #define SET_H2CCMD_PWRMODE_PARM_BCN_PASS_TIME(__ph2ccmd, __val)        \
-       SET_BITS_TO_LE_1BYTE((__ph2ccmd)+2, 0, 8, __val)
+       *(u8 *)(__ph2ccmd + 2) = __val
 #define SET_H2CCMD_JOINBSSRPT_PARM_OPMODE(__ph2ccmd, __val)            \
-       SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)
+       *(u8 *)__ph2ccmd = __val
 #define SET_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(__ph2ccmd, __val)            \
-       SET_BITS_TO_LE_1BYTE(__ph2ccmd, 0, 8, __val)
+       *(u8 *)__ph2ccmd = __val
 #define SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(__ph2ccmd, __val)               \
-       SET_BITS_TO_LE_1BYTE((__ph2ccmd)+1, 0, 8, __val)
+       *(u8 *)(__ph2ccmd + 1) = __val
 #define SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(__ph2ccmd, __val)            \
-       SET_BITS_TO_LE_1BYTE((__ph2ccmd)+2, 0, 8, __val)
+       *(u8 *)(__ph2ccmd + 2) = __val
 
 void rtl8723e_fill_h2c_cmd(struct ieee80211_hw *hw, u8 element_id,
                           u32 cmd_len, u8 *p_cmdbuffer);