From d0b39f87427c806b984c57d52148200af9c57bf2 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Mon, 21 Jul 2014 11:25:06 +0200 Subject: [PATCH] staging: rtl8723au: Fold rtl8723a_set_nav_upper() into rtl8723au_hal_init() Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/hal_com.c | 18 ------------------ drivers/staging/rtl8723au/hal/usb_halinit.c | 4 +++- drivers/staging/rtl8723au/include/hal_com.h | 1 - 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/hal_com.c b/drivers/staging/rtl8723au/hal/hal_com.c index 4a66ed52d22f..8f299ec89bb9 100644 --- a/drivers/staging/rtl8723au/hal/hal_com.c +++ b/drivers/staging/rtl8723au/hal/hal_com.c @@ -818,24 +818,6 @@ void rtl8723a_set_rxdma_agg_pg_th(struct rtw_adapter *padapter, u8 val) rtl8723au_write8(padapter, REG_RXDMA_AGG_PG_TH, val); } -void rtl8723a_set_nav_upper(struct rtw_adapter *padapter, u32 usNavUpper) -{ - if (usNavUpper > HAL_8723A_NAV_UPPER_UNIT * 0xFF) { - RT_TRACE(_module_hal_init_c_, _drv_notice_, - ("The setting value (0x%08X us) of NAV_UPPER " - "is larger than (%d * 0xFF)!!!\n", - usNavUpper, HAL_8723A_NAV_UPPER_UNIT)); - return; - } - - /* The value of ((usNavUpper + HAL_8723A_NAV_UPPER_UNIT - 1) / - HAL_8723A_NAV_UPPER_UNIT) */ - /* is getting the upper integer. */ - usNavUpper = (usNavUpper + HAL_8723A_NAV_UPPER_UNIT - 1) / - HAL_8723A_NAV_UPPER_UNIT; - rtl8723au_write8(padapter, REG_NAV_UPPER, (u8) usNavUpper); -} - void rtl8723a_set_initial_gain(struct rtw_adapter *padapter, u32 rx_gain) { struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index b51762a10d78..d896d06c627d 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -780,7 +780,9 @@ static int rtl8723au_hal_init(struct rtw_adapter *Adapter) rtl8723a_InitHalDm(Adapter); - rtl8723a_set_nav_upper(Adapter, WiFiNavUpperUs); + val8 = ((WiFiNavUpperUs + HAL_8723A_NAV_UPPER_UNIT - 1) / + HAL_8723A_NAV_UPPER_UNIT); + rtl8723au_write8(Adapter, REG_NAV_UPPER, val8); /* 2011/03/09 MH debug only, UMC-B cut pass 2500 S5 test, but we need to fin root cause. */ if (((rtl8723au_read32(Adapter, rFPGA0_RFMOD) & 0xFF000000) != diff --git a/drivers/staging/rtl8723au/include/hal_com.h b/drivers/staging/rtl8723au/include/hal_com.h index 6c2ca4fedf68..7c31865e9865 100644 --- a/drivers/staging/rtl8723au/include/hal_com.h +++ b/drivers/staging/rtl8723au/include/hal_com.h @@ -197,7 +197,6 @@ void rtl8723a_set_ac_param_vi(struct rtw_adapter *padapter, u32 vi); void rtl8723a_set_ac_param_be(struct rtw_adapter *padapter, u32 be); void rtl8723a_set_ac_param_bk(struct rtw_adapter *padapter, u32 bk); void rtl8723a_set_rxdma_agg_pg_th(struct rtw_adapter *padapter, u8 val); -void rtl8723a_set_nav_upper(struct rtw_adapter *padapter, u32 usNavUpper); void rtl8723a_set_initial_gain(struct rtw_adapter *padapter, u32 rx_gain); void rtl8723a_odm_support_ability_write(struct rtw_adapter *padapter, u32 val); -- 2.30.2