staging: rtl8723au: No need for two copies of rf_type
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9939cf9427
commit
162904699a
|
@ -319,9 +319,6 @@ void ODM_CmnInfoInit23a(struct dm_odm_t *pDM_Odm,
|
|||
case ODM_CMNINFO_FAB_VER:
|
||||
pDM_Odm->FabVersion = (u8)Value;
|
||||
break;
|
||||
case ODM_CMNINFO_RF_TYPE:
|
||||
pDM_Odm->RFType = (u8)Value;
|
||||
break;
|
||||
case ODM_CMNINFO_BOARD_TYPE:
|
||||
pDM_Odm->BoardType = (u8)Value;
|
||||
break;
|
||||
|
@ -383,9 +380,6 @@ void ODM_CmnInfoUpdate23a(struct dm_odm_t *pDM_Odm, u32 CmnInfo, u64 Value)
|
|||
{
|
||||
/* This init variable may be changed in run time. */
|
||||
switch (CmnInfo) {
|
||||
case ODM_CMNINFO_RF_TYPE:
|
||||
pDM_Odm->RFType = (u8)Value;
|
||||
break;
|
||||
case ODM_CMNINFO_WIFI_DIRECT:
|
||||
pDM_Odm->bWIFI_Direct = (bool)Value;
|
||||
break;
|
||||
|
@ -460,7 +454,6 @@ void odm_CmnInfoInit_Debug23a(struct dm_odm_t *pDM_Odm)
|
|||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("SupportICType = 0x%x\n", pDM_Odm->SupportICType));
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("CutVersion =%d\n", pDM_Odm->CutVersion));
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("FabVersion =%d\n", pDM_Odm->FabVersion));
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("RFType =%d\n", pDM_Odm->RFType));
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("BoardType =%d\n", pDM_Odm->BoardType));
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtLNA =%d\n", pDM_Odm->ExtLNA));
|
||||
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("ExtPA =%d\n", pDM_Odm->ExtPA));
|
||||
|
@ -1053,7 +1046,8 @@ u32 ODM_Get_Rate_Bitmap23a(struct hal_data_8723a *pHalData, u32 macid,
|
|||
break;
|
||||
case (ODM_WM_B|ODM_WM_G|ODM_WM_N24G):
|
||||
case (ODM_WM_A|ODM_WM_B|ODM_WM_G|ODM_WM_N24G):
|
||||
if (pDM_Odm->RFType == ODM_1T2R || pDM_Odm->RFType == ODM_1T1R) {
|
||||
if (pHalData->rf_type == RF_1T2R ||
|
||||
pHalData->rf_type == RF_1T1R) {
|
||||
if (rssi_level == DM_RATR_STA_HIGH) {
|
||||
rate_bitmap = 0x000f0000;
|
||||
} else if (rssi_level == DM_RATR_STA_MIDDLE) {
|
||||
|
@ -1082,7 +1076,7 @@ u32 ODM_Get_Rate_Bitmap23a(struct hal_data_8723a *pHalData, u32 macid,
|
|||
default:
|
||||
/* case WIRELESS_11_24N: */
|
||||
/* case WIRELESS_11_5N: */
|
||||
if (pDM_Odm->RFType == RF_1T2R)
|
||||
if (pHalData->rf_type == RF_1T2R)
|
||||
rate_bitmap = 0x000fffff;
|
||||
else
|
||||
rate_bitmap = 0x0fffffff;
|
||||
|
|
|
@ -121,13 +121,6 @@ void rtl8723a_init_dm_priv(struct rtw_adapter *Adapter)
|
|||
}
|
||||
ODM_CmnInfoInit23a(pDM_Odm, ODM_CMNINFO_PATCH_ID, pHalData->CustomerID);
|
||||
ODM_CmnInfoInit23a(pDM_Odm, ODM_CMNINFO_BWIFI_TEST, Adapter->registrypriv.wifi_spec);
|
||||
|
||||
if (pHalData->rf_type == RF_1T1R)
|
||||
ODM_CmnInfoUpdate23a(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_1T1R);
|
||||
else if (pHalData->rf_type == RF_2T2R)
|
||||
ODM_CmnInfoUpdate23a(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_2T2R);
|
||||
else if (pHalData->rf_type == RF_1T2R)
|
||||
ODM_CmnInfoUpdate23a(pDM_Odm, ODM_CMNINFO_RF_TYPE, ODM_1T2R);
|
||||
}
|
||||
|
||||
static void Update_ODM_ComInfo_8723a(struct rtw_adapter *Adapter)
|
||||
|
|
|
@ -304,7 +304,6 @@ enum odm_cmninfo {
|
|||
ODM_CMNINFO_IC_TYPE, /* enum odm_ic_type_def */
|
||||
ODM_CMNINFO_CUT_VER, /* enum odm_cut_version */
|
||||
ODM_CMNINFO_FAB_VER, /* enum odm_fab_version */
|
||||
ODM_CMNINFO_RF_TYPE, /* enum rf_path_def or enum odm_rf_type? */
|
||||
ODM_CMNINFO_BOARD_TYPE, /* enum odm_board_type */
|
||||
ODM_CMNINFO_EXT_LNA, /* true */
|
||||
ODM_CMNINFO_EXT_PA,
|
||||
|
@ -409,7 +408,6 @@ enum odm_fab_version {
|
|||
ODM_UMC = 1,
|
||||
};
|
||||
|
||||
/* ODM_CMNINFO_RF_TYPE */
|
||||
/* For example 1T2R (A+AB = BIT0|BIT4|BIT5) */
|
||||
enum rf_path_def {
|
||||
ODM_RF_TX_A = BIT(0),
|
||||
|
@ -422,18 +420,6 @@ enum rf_path_def {
|
|||
ODM_RF_RX_D = BIT(7),
|
||||
};
|
||||
|
||||
|
||||
enum odm_rf_type {
|
||||
ODM_1T1R = 0,
|
||||
ODM_1T2R = 1,
|
||||
ODM_2T2R = 2,
|
||||
ODM_2T3R = 3,
|
||||
ODM_2T4R = 4,
|
||||
ODM_3T3R = 5,
|
||||
ODM_3T4R = 6,
|
||||
ODM_4T4R = 7,
|
||||
};
|
||||
|
||||
/* ODM Dynamic common info value definition */
|
||||
|
||||
enum odm_mac_phy_mode {
|
||||
|
@ -653,8 +639,6 @@ struct dm_odm_t {
|
|||
u8 CutVersion;
|
||||
/* Fab Version TSMC/UMC = 0/1 */
|
||||
u8 FabVersion;
|
||||
/* RF Type 4T4R/3T3R/2T2R/1T2R/1T1R/... */
|
||||
u8 RFType;
|
||||
/* Board Type Normal/HighPower/MiniCard/SLIM/Combo/... = 0/1/2/3/4/... */
|
||||
u8 BoardType;
|
||||
/* with external LNA NO/Yes = 0/1 */
|
||||
|
|
Loading…
Reference in New Issue