From 301fc630ef3ea2f1e855d409cf6be34924f67ac9 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Mon, 21 Jul 2014 11:24:57 +0200 Subject: staging: rtl8723au: Eliminate ODM_CMNINFO_BW usage Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/odm.c | 19 ++++++++----------- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 3 ++- drivers/staging/rtl8723au/hal/rtl8723a_dm.c | 2 -- drivers/staging/rtl8723au/hal/usb_halinit.c | 4 ++-- drivers/staging/rtl8723au/include/odm.h | 17 +++-------------- 5 files changed, 15 insertions(+), 30 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index aa310a32987b..a15a8cba489d 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -417,9 +417,6 @@ void ODM23a_CmnInfoHook(struct dm_odm_t *pDM_Odm, /* Hook call by reference pointer. */ switch (CmnInfo) { /* Dynamic call by reference pointer. */ - case ODM_CMNINFO_BW: - pDM_Odm->pBandWidth = (u8 *)pValue; - break; case ODM_CMNINFO_CHNL: pDM_Odm->pChannel = (u8 *)pValue; break; @@ -506,7 +503,7 @@ static void odm_CommonInfoSelfUpdate(struct hal_data_8723a *pHalData) u8 EntryCnt = 0; u8 i; - if (*(pDM_Odm->pBandWidth) == ODM_BW40M) { + if (pHalData->CurrentChannelBW == HT_CHANNEL_WIDTH_40) { if (pHalData->nCur40MhzPrimeSC == 1) pDM_Odm->ControlChannel = *(pDM_Odm->pChannel) - 2; else if (pHalData->nCur40MhzPrimeSC == 2) @@ -549,7 +546,6 @@ void odm_CmnInfoInit_Debug23a(struct dm_odm_t *pDM_Odm) void odm_CmnInfoHook_Debug23a(struct dm_odm_t *pDM_Odm) { ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("odm_CmnInfoHook_Debug23a ==>\n")); - ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pBandWidth =%d\n", *(pDM_Odm->pBandWidth))); ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pChannel =%d\n", *(pDM_Odm->pChannel))); ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("pbScanInProcess =%d\n", *(pDM_Odm->pbScanInProcess))); @@ -1137,11 +1133,10 @@ void odm_RateAdaptiveMaskInit23a(struct dm_odm_t *pDM_Odm) pOdmRA->LowRSSIThresh = 20; } -u32 ODM_Get_Rate_Bitmap23a(struct dm_odm_t *pDM_Odm, - u32 macid, - u32 ra_mask, - u8 rssi_level) +u32 ODM_Get_Rate_Bitmap23a(struct hal_data_8723a *pHalData, u32 macid, + u32 ra_mask, u8 rssi_level) { + struct dm_odm_t *pDM_Odm = &pHalData->odmpriv; struct sta_info *pEntry; u32 rate_bitmap = 0x0fffffff; u8 WirelessMode; @@ -1181,7 +1176,8 @@ u32 ODM_Get_Rate_Bitmap23a(struct dm_odm_t *pDM_Odm, } else if (rssi_level == DM_RATR_STA_MIDDLE) { rate_bitmap = 0x000ff000; } else { - if (*(pDM_Odm->pBandWidth) == ODM_BW40M) + if (pHalData->CurrentChannelBW == + HT_CHANNEL_WIDTH_40) rate_bitmap = 0x000ff015; else rate_bitmap = 0x000ff005; @@ -1192,7 +1188,8 @@ u32 ODM_Get_Rate_Bitmap23a(struct dm_odm_t *pDM_Odm, } else if (rssi_level == DM_RATR_STA_MIDDLE) { rate_bitmap = 0x0f8ff000; } else { - if (*(pDM_Odm->pBandWidth) == ODM_BW40M) + if (pHalData->CurrentChannelBW == + HT_CHANNEL_WIDTH_40) rate_bitmap = 0x0f8ff015; else rate_bitmap = 0x0f8ff005; diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c index 7dd62b3dec8c..271c33d6ca5a 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c @@ -151,7 +151,8 @@ void rtl8723a_add_rateatid(struct rtw_adapter *pAdapter, u32 bitmap, u8 arg, u8 bitmap &= 0x0fffffff; if (rssi_level != DM_RATR_STA_INIT) - bitmap = ODM_Get_Rate_Bitmap23a(&pHalData->odmpriv, macid, bitmap, rssi_level); + bitmap = ODM_Get_Rate_Bitmap23a(pHalData, macid, bitmap, + rssi_level); bitmap |= ((raid<<28)&0xf0000000); diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_dm.c b/drivers/staging/rtl8723au/hal/rtl8723a_dm.c index 89ae2f27f2c2..dfed57e0786d 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_dm.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_dm.c @@ -152,8 +152,6 @@ static void Update_ODM_ComInfo_8723a(struct rtw_adapter *Adapter) /* Pointer reference */ rtl8723a_odm_support_ability_set(Adapter, DYNAMIC_ALL_FUNC_ENABLE); - ODM23a_CmnInfoHook(pDM_Odm, ODM_CMNINFO_BW, - &pHalData->CurrentChannelBW); ODM23a_CmnInfoHook(pDM_Odm, ODM_CMNINFO_CHNL, &pHalData->CurrentChannel); ODM23a_CmnInfoHook(pDM_Odm, ODM_CMNINFO_SCAN, &pmlmepriv->bScanInProcess); diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index e09329bb1f8d..b51762a10d78 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -1500,8 +1500,8 @@ void rtl8723a_update_ramask(struct rtw_adapter *padapter, /* mask &= 0x0fffffff; */ rate_bitmap = 0x0fffffff; - rate_bitmap = ODM_Get_Rate_Bitmap23a(&pHalData->odmpriv, - mac_id, mask, rssi_level); + rate_bitmap = ODM_Get_Rate_Bitmap23a(pHalData, mac_id, mask, + rssi_level); DBG_8723A("%s => mac_id:%d, networkType:0x%02x, " "mask:0x%08x\n\t ==> rssi_level:%d, rate_bitmap:0x%08x\n", __func__, mac_id, networkType, mask, rssi_level, rate_bitmap); diff --git a/drivers/staging/rtl8723au/include/odm.h b/drivers/staging/rtl8723au/include/odm.h index e361c45e2b8f..be0b84f6220c 100644 --- a/drivers/staging/rtl8723au/include/odm.h +++ b/drivers/staging/rtl8723au/include/odm.h @@ -319,7 +319,6 @@ enum odm_cmninfo { /* */ /* Dynamic value: */ /* */ - ODM_CMNINFO_BW, /* enum odm_band_width */ ODM_CMNINFO_CHNL, ODM_CMNINFO_SCAN, @@ -495,15 +494,6 @@ enum odm_sec_chnl_offset { ODM_ABOVE = 2 }; -/* ODM_CMNINFO_BW */ -enum odm_band_width { - ODM_BW20M = 0, - ODM_BW40M = 1, - ODM_BW80M = 2, - ODM_BW160M = 3, - ODM_BW10M = 4, -}; - /* ODM_CMNINFO_CHNL */ /* ODM_CMNINFO_BOARD_TYPE */ @@ -696,8 +686,6 @@ struct dm_odm_t { bool bool_temp; struct rtw_adapter *PADAPTER_temp; - /* BW info 20M/40M/80M = 0/1/2 */ - u8 *pBandWidth; /* Central channel location Ch1/Ch2/.... */ u8 *pChannel; /* central channel number */ /* Common info for Status */ @@ -962,6 +950,8 @@ extern u8 CCKSwingTable_Ch1423A [CCK_TABLE_SIZE][8]; #define SWAW_STEP_PEAK 0 #define SWAW_STEP_DETERMINE 1 +struct hal_data_8723a; + void ODM_Write_DIG23a(struct dm_odm_t *pDM_Odm, u8 CurrentIGI); void ODM_Write_CCK_CCA_Thres23a(struct dm_odm_t *pDM_Odm, u8 CurCCK_CCAThres); @@ -991,12 +981,11 @@ u32 GetPSDData(struct dm_odm_t *pDM_Odm, unsigned int point, u8 initial_gain_psd void odm_DIG23abyRSSI_LPS(struct dm_odm_t *pDM_Odm); -u32 ODM_Get_Rate_Bitmap23a(struct dm_odm_t *pDM_Odm, u32 macid, u32 ra_mask, u8 rssi_level); +u32 ODM_Get_Rate_Bitmap23a(struct hal_data_8723a *pHalData, u32 macid, u32 ra_mask, u8 rssi_level); void ODM23a_DMInit(struct dm_odm_t *pDM_Odm); -struct hal_data_8723a; void ODM_DMWatchdog23a(struct hal_data_8723a *pHalData); void ODM_CmnInfoInit23a(struct dm_odm_t *pDM_Odm, enum odm_cmninfo CmnInfo, u32 Value); -- cgit v1.2.3