From 2e8d47e039ec09959800ce559ed6396c4a29351d Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 17 Jul 2014 22:59:57 +0200 Subject: [PATCH] staging: rtl8723au: Remove pointless IS_STA_VALID() macro Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/odm.c | 8 ++++---- drivers/staging/rtl8723au/hal/odm_HWConfig.c | 2 +- drivers/staging/rtl8723au/include/odm.h | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index f21861e74390..ce192de04758 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -570,7 +570,7 @@ void odm_CommonInfoSelfUpdate23a(struct dm_odm_t *pDM_Odm) for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { pEntry = pDM_Odm->pODM_StaInfo[i]; - if (IS_STA_VALID(pEntry)) + if (pEntry) EntryCnt++; } if (EntryCnt == 1) @@ -1216,7 +1216,7 @@ u32 ODM_Get_Rate_Bitmap23a(struct dm_odm_t *pDM_Odm, /* u8 WirelessMode =*(pDM_Odm->pWirelessMode); */ pEntry = pDM_Odm->pODM_StaInfo[macid]; - if (!IS_STA_VALID(pEntry)) + if (!pEntry) return ra_mask; WirelessMode = pEntry->wireless_mode; @@ -1338,7 +1338,7 @@ void odm_RefreshRateAdaptiveMask23aCE23a(struct dm_odm_t *pDM_Odm) for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { struct sta_info *pstat = pDM_Odm->pODM_StaInfo[i]; - if (IS_STA_VALID(pstat)) { + if (pstat) { if (ODM_RAStateCheck23a(pDM_Odm, pstat->rssi_stat.UndecoratedSmoothedPWDB, false, &pstat->rssi_level)) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_RA_MASK, ODM_DBG_LOUD, ("RSSI:%d, RSSI_LEVEL:%d\n", @@ -1480,7 +1480,7 @@ void odm_RSSIMonitorCheck23aCE(struct dm_odm_t *pDM_Odm) for (i = 0; i < ODM_ASSOCIATE_ENTRY_NUM; i++) { psta = pDM_Odm->pODM_StaInfo[i]; - if (IS_STA_VALID(psta)) { + if (psta) { if (psta->rssi_stat.UndecoratedSmoothedPWDB < tmpEntryMinPWDB) tmpEntryMinPWDB = psta->rssi_stat.UndecoratedSmoothedPWDB; diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c b/drivers/staging/rtl8723au/hal/odm_HWConfig.c index 26fbf6c38b99..ab820a888c0f 100644 --- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c @@ -291,7 +291,7 @@ static void odm_Process_RSSIForDM(struct dm_odm_t *pDM_Odm, return; pEntry = pDM_Odm->pODM_StaInfo[pPktinfo->StationID]; - if (!IS_STA_VALID(pEntry)) + if (!pEntry) return; if ((!pPktinfo->bPacketMatchBSSID)) return; diff --git a/drivers/staging/rtl8723au/include/odm.h b/drivers/staging/rtl8723au/include/odm.h index b466a81b3364..b2f661e4e176 100644 --- a/drivers/staging/rtl8723au/include/odm.h +++ b/drivers/staging/rtl8723au/include/odm.h @@ -1001,10 +1001,6 @@ extern u8 CCKSwingTable_Ch1423A [CCK_TABLE_SIZE][8]; -/* */ -/* check Sta pointer valid or not */ -/* */ -#define IS_STA_VALID(pSta) (pSta) /* 20100514 Joseph: Add definition for antenna switching test after link. */ /* This indicates two different the steps. */ /* In SWAW_STEP_PEAK, driver needs to switch antenna and listen to the signal on the air. */ -- 2.30.2