OSDN Git Service

staging: rtl8723au: struct phy_info and struct odm_phy_info are identical
authorJes Sorensen <Jes.Sorensen@redhat.com>
Fri, 9 May 2014 13:04:26 +0000 (15:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:12:03 +0000 (13:12 -0700)
We don't need two copies of the same struct, it just leads to
pointless typecasts.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/odm.c
drivers/staging/rtl8723au/hal/odm_HWConfig.c
drivers/staging/rtl8723au/hal/rtl8723au_recv.c
drivers/staging/rtl8723au/include/odm.h
drivers/staging/rtl8723au/include/odm_HWConfig.h

index d181cbc..5ef1fd3 100644 (file)
@@ -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)
 {
 }
 
index 2d458be..347c8e9 100644 (file)
@@ -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);
index 6a25ad5..f0ce944 100644 (file)
@@ -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)) {
index e2b14f8..aa46c6c 100644 (file)
@@ -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);
 
index d2367ec..6b98e05 100644 (file)
@@ -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
        );