From c7fff4e43ced0584bcbcef8a5f93bd9a813aac1b Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Fri, 9 May 2014 15:04:26 +0200 Subject: [PATCH] staging: rtl8723au: struct phy_info and struct odm_phy_info are identical We don't need two copies of the same struct, it just leads to pointless typecasts. Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/odm.c | 3 ++- drivers/staging/rtl8723au/hal/odm_HWConfig.c | 8 ++++---- drivers/staging/rtl8723au/hal/rtl8723au_recv.c | 4 ++-- drivers/staging/rtl8723au/include/odm.h | 16 +--------------- drivers/staging/rtl8723au/include/odm_HWConfig.h | 2 +- 5 files changed, 10 insertions(+), 23 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index d181cbc77f23..5ef1fd35f5d5 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -1639,7 +1639,8 @@ void odm_SwAntDivInit(struct dm_odm_t *pDM_Odm) { } -void ODM_SwAntDivChkPerPktRssi(struct dm_odm_t *pDM_Odm, u8 StationID, struct odm_phy_info *pPhyInfo) +void ODM_SwAntDivChkPerPktRssi(struct dm_odm_t *pDM_Odm, u8 StationID, + struct phy_info *pPhyInfo) { } diff --git a/drivers/staging/rtl8723au/hal/odm_HWConfig.c b/drivers/staging/rtl8723au/hal/odm_HWConfig.c index 2d458bef922a..347c8e90fed6 100644 --- a/drivers/staging/rtl8723au/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8723au/hal/odm_HWConfig.c @@ -91,7 +91,7 @@ odm_EVMdbToPercentage( } static void odm_RxPhyStatus92CSeries_Parsing(struct dm_odm_t *pDM_Odm, - struct odm_phy_info *pPhyInfo, + struct phy_info *pPhyInfo, u8 *pPhyStatus, struct odm_packet_info *pPktinfo) { @@ -281,7 +281,7 @@ void odm_Init_RSSIForDM23a(struct dm_odm_t *pDM_Odm) } static void odm_Process_RSSIForDM(struct dm_odm_t *pDM_Odm, - struct odm_phy_info *pPhyInfo, + struct phy_info *pPhyInfo, struct odm_packet_info *pPktinfo) { s32 UndecoratedSmoothedPWDB, UndecoratedSmoothedCCK; @@ -396,7 +396,7 @@ static void odm_Process_RSSIForDM(struct dm_odm_t *pDM_Odm, /* Endianness before calling this API */ static void ODM_PhyStatusQuery23a_92CSeries(struct dm_odm_t *pDM_Odm, - struct odm_phy_info *pPhyInfo, + struct phy_info *pPhyInfo, u8 *pPhyStatus, struct odm_packet_info *pPktinfo) { @@ -411,7 +411,7 @@ static void ODM_PhyStatusQuery23a_92CSeries(struct dm_odm_t *pDM_Odm, } } -void ODM_PhyStatusQuery23a(struct dm_odm_t *pDM_Odm, struct odm_phy_info *pPhyInfo, +void ODM_PhyStatusQuery23a(struct dm_odm_t *pDM_Odm, struct phy_info *pPhyInfo, u8 *pPhyStatus, struct odm_packet_info *pPktinfo) { ODM_PhyStatusQuery23a_92CSeries(pDM_Odm, pPhyInfo, pPhyStatus, pPktinfo); diff --git a/drivers/staging/rtl8723au/hal/rtl8723au_recv.c b/drivers/staging/rtl8723au/hal/rtl8723au_recv.c index 6a25ad572b26..f0ce944dc4c4 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723au_recv.c +++ b/drivers/staging/rtl8723au/hal/rtl8723au_recv.c @@ -184,7 +184,7 @@ void update_recvframe_phyinfo(struct recv_frame *precvframe, struct rtw_adapter *padapter = precvframe->adapter; struct rx_pkt_attrib *pattrib = &precvframe->attrib; struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); - struct odm_phy_info *pPHYInfo = (struct odm_phy_info *)(&pattrib->phy_info); + struct phy_info *pPHYInfo = &pattrib->phy_info; struct odm_packet_info pkt_info; u8 *sa = NULL, *da; struct sta_priv *pstapriv; @@ -247,7 +247,7 @@ void update_recvframe_phyinfo(struct recv_frame *precvframe, pkt_info.Rate = pattrib->mcs_rate; ODM_PhyStatusQuery23a(&pHalData->odmpriv, pPHYInfo, - (u8 *)pphy_status, &pkt_info); + (u8 *)pphy_status, &pkt_info); precvframe->psta = NULL; if (pkt_info.bPacketMatchBSSID && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) { diff --git a/drivers/staging/rtl8723au/include/odm.h b/drivers/staging/rtl8723au/include/odm.h index e2b14f8b2d53..aa46c6c56898 100644 --- a/drivers/staging/rtl8723au/include/odm.h +++ b/drivers/staging/rtl8723au/include/odm.h @@ -255,20 +255,6 @@ struct odm_rate_adapt { /* Declare for common info */ -struct odm_phy_info { - u8 RxPWDBAll; - u8 SignalQuality; /* in 0-100 index. */ - u8 RxMIMOSignalQuality[RF_PATH_MAX]; /* EVM */ - u8 RxMIMOSignalStrength[RF_PATH_MAX];/* in 0~100 index */ - s8 RxPower; /* in dBm Translate from PWdB */ - s8 RecvSignalPower;/* Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures. */ - u8 BTRxRSSIPercentage; - u8 SignalStrength; /* in 0-100 index. */ - u8 RxPwr[RF_PATH_MAX];/* per-path's pwdb */ - u8 RxSNR[RF_PATH_MAX];/* per-path's SNR */ -}; - - struct odm_phy_dbg_info { /* ODM Write,debug info */ s8 RxSNRdB[RF_PATH_MAX]; @@ -1136,7 +1122,7 @@ bool ODM_RAStateCheck23a(struct dm_odm_t *pDM_Odm, s32 RSSI, bool bForceUpdate, #define dm_SWAW_RSSI_Check ODM_SwAntDivChkPerPktRssi void ODM_SwAntDivChkPerPktRssi(struct dm_odm_t *pDM_Odm, u8 StationID, - struct odm_phy_info *pPhyInfo); + struct phy_info *pPhyInfo); u32 ConvertTo_dB23a(u32 Value); diff --git a/drivers/staging/rtl8723au/include/odm_HWConfig.h b/drivers/staging/rtl8723au/include/odm_HWConfig.h index d2367ec95f17..6b98e05d0460 100644 --- a/drivers/staging/rtl8723au/include/odm_HWConfig.h +++ b/drivers/staging/rtl8723au/include/odm_HWConfig.h @@ -147,7 +147,7 @@ void odm_Init_RSSIForDM23a(struct dm_odm_t *pDM_Odm); void ODM_PhyStatusQuery23a( struct dm_odm_t *pDM_Odm, - struct odm_phy_info *pPhyInfo, + struct phy_info *pPhyInfo, u8 * pPhyStatus, struct odm_packet_info *pPktinfo ); -- 2.20.1