Commit d3bf1084 authored by Nam Cao's avatar Nam Cao Committed by Greg Kroah-Hartman

staging: r8188eu: replace confusing macros

The macro GET_TX_REPORT_TYPE1_RERTY_0 and similar macros are not
obvious on what they are doing. Replace them with clearer codes.
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarNam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/e697e47aad21362f68d148d2351e6d49f4fa9eaf.1655220367.git.namcaov@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 488ca2cb
...@@ -614,12 +614,12 @@ void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm, u8 *TxRPT_Buf, u16 ...@@ -614,12 +614,12 @@ void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm, u8 *TxRPT_Buf, u16
pRAInfo = &dm_odm->RAInfo[MacId]; pRAInfo = &dm_odm->RAInfo[MacId];
if (valid) { if (valid) {
pRAInfo->RTY[0] = (u16)GET_TX_REPORT_TYPE1_RERTY_0(pBuffer); pRAInfo->RTY[0] = le16_to_cpup((__le16 *)pBuffer);
pRAInfo->RTY[1] = (u16)GET_TX_REPORT_TYPE1_RERTY_1(pBuffer); pRAInfo->RTY[1] = pBuffer[2];
pRAInfo->RTY[2] = (u16)GET_TX_REPORT_TYPE1_RERTY_2((u8 *)pBuffer); pRAInfo->RTY[2] = pBuffer[3];
pRAInfo->RTY[3] = (u16)GET_TX_REPORT_TYPE1_RERTY_3(pBuffer); pRAInfo->RTY[3] = pBuffer[4];
pRAInfo->RTY[4] = (u16)GET_TX_REPORT_TYPE1_RERTY_4(pBuffer); pRAInfo->RTY[4] = pBuffer[5];
pRAInfo->DROP = (u16)GET_TX_REPORT_TYPE1_DROP_0(pBuffer); pRAInfo->DROP = pBuffer[6];
pRAInfo->TOTAL = pRAInfo->RTY[0] + pRAInfo->RTY[1] + pRAInfo->TOTAL = pRAInfo->RTY[0] + pRAInfo->RTY[1] +
pRAInfo->RTY[2] + pRAInfo->RTY[3] + pRAInfo->RTY[2] + pRAInfo->RTY[3] +
pRAInfo->RTY[4] + pRAInfo->DROP; pRAInfo->RTY[4] + pRAInfo->DROP;
......
...@@ -22,19 +22,6 @@ ...@@ -22,19 +22,6 @@
le32_to_cpu((*(__le32 *)(__rxstatusdesc + 16)) le32_to_cpu((*(__le32 *)(__rxstatusdesc + 16))
#define GET_TX_RPT2_DESC_MACID_VALID_2_88E(__rxstatusdesc) \ #define GET_TX_RPT2_DESC_MACID_VALID_2_88E(__rxstatusdesc) \
le32_to_cpu((*(__le32 *)(__rxstatusdesc + 20)) le32_to_cpu((*(__le32 *)(__rxstatusdesc + 20))
#define GET_TX_REPORT_TYPE1_RERTY_0(__paddr) \
le16_get_bits(*(__le16 *)__paddr, GENMASK(15, 0))
#define GET_TX_REPORT_TYPE1_RERTY_1(__paddr) \
LE_BITS_TO_1BYTE(__paddr + 2, 0, 8)
#define GET_TX_REPORT_TYPE1_RERTY_2(__paddr) \
LE_BITS_TO_1BYTE(__paddr + 3, 0, 8)
#define GET_TX_REPORT_TYPE1_RERTY_3(__paddr) \
LE_BITS_TO_1BYTE(__paddr + 4, 0, 8)
#define GET_TX_REPORT_TYPE1_RERTY_4(__paddr) \
LE_BITS_TO_1BYTE(__paddr + 5, 0, 8)
#define GET_TX_REPORT_TYPE1_DROP_0(__paddr) \
LE_BITS_TO_1BYTE(__paddr + 6, 0, 8)
/* End rate adaptive define */ /* End rate adaptive define */
int ODM_RAInfo_Init_all(struct odm_dm_struct *dm_odm); int ODM_RAInfo_Init_all(struct odm_dm_struct *dm_odm);
......
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