staging: rtl8723au: Fold rtl8723a_set_nav_upper() into rtl8723au_hal_init()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 21 Jul 2014 09:25:06 +0000 (11:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jul 2014 19:09:27 +0000 (12:09 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/hal_com.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/include/hal_com.h

index 4a66ed52d22fa13884f850fece7f402ff2ea9b2d..8f299ec89bb9e2187d4dd8ec193bbda38888299c 100644 (file)
@@ -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);
index b51762a10d78c9ada7e5409dac39996c617582c5..d896d06c627d3209228bcde76a8cbfefcad7b431 100644 (file)
@@ -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) !=
index 6c2ca4fedf68d932900dfe75215fc1420eaf5ca4..7c31865e9865a08c96c8fb7f95c935fd5e5a113d 100644 (file)
@@ -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);