From: Jes Sorensen Date: Wed, 9 Apr 2014 21:20:55 +0000 (+0200) Subject: staging: rtl8723au: Eliminate HW_WAR_CHK_HI_QUEUE_EMPTY usage X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8d3fd6145b963c5d156e442677193c3fa10df708;p=linux-beck.git staging: rtl8723au: Eliminate HW_WAR_CHK_HI_QUEUE_EMPTY usage Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c b/drivers/staging/rtl8723au/core/rtw_cmd.c index 0b25cd2f6584..2c558e0dd12b 100644 --- a/drivers/staging/rtl8723au/core/rtw_cmd.c +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c @@ -1441,11 +1441,11 @@ static void rtw_chk_hi_queue_hdl(struct rtw_adapter *padapter) return; if (psta_bmc->sleepq_len == 0) { - u8 val = 0; + bool val; - rtw23a_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &val); + val = rtl8723a_chk_hi_queue_empty(padapter); - while(val == false) { + while (val == false) { msleep(100); cnt++; @@ -1453,8 +1453,7 @@ static void rtw_chk_hi_queue_hdl(struct rtw_adapter *padapter) if (cnt>10) break; - rtw23a_hal_get_hwreg(padapter, - HW_VAR_CHK_HI_QUEUE_EMPTY, &val); + val = rtl8723a_chk_hi_queue_empty(padapter); } if (cnt <= 10) { diff --git a/drivers/staging/rtl8723au/hal/hal_com.c b/drivers/staging/rtl8723au/hal/hal_com.c index 7b00dbadf105..d1701a35bc90 100644 --- a/drivers/staging/rtl8723au/hal/hal_com.c +++ b/drivers/staging/rtl8723au/hal/hal_com.c @@ -919,3 +919,12 @@ bool rtl8723a_get_fwlps_rf_on(struct rtw_adapter *padapter) return retval; } + +bool rtl8723a_chk_hi_queue_empty(struct rtw_adapter *padapter) +{ + u32 hgq; + + hgq = rtw_read32(padapter, REG_HGQ_INFORMATION); + + return ((hgq & 0x0000ff00) == 0) ? true : false; +} diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index f9cf4c88f7ff..9967c075a702 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -3135,11 +3135,6 @@ void hw_var_set_mlme_join(struct rtw_adapter *padapter, u8 type) void GetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val) { switch (variable) { - case HW_VAR_CHK_HI_QUEUE_EMPTY: - *val = - ((rtw_read32(padapter, REG_HGQ_INFORMATION) & 0x0000ff00) == - 0) ? true : false; - break; } } diff --git a/drivers/staging/rtl8723au/include/hal_com.h b/drivers/staging/rtl8723au/include/hal_com.h index 84e472e671d1..5f050a346a8a 100644 --- a/drivers/staging/rtl8723au/include/hal_com.h +++ b/drivers/staging/rtl8723au/include/hal_com.h @@ -209,5 +209,6 @@ void rtl8723a_odm_support_ability_clr(struct rtw_adapter *padapter, u32 val); void rtl8723a_set_rpwm(struct rtw_adapter *padapter, u8 val); u8 rtl8723a_get_rf_type(struct rtw_adapter *padapter); bool rtl8723a_get_fwlps_rf_on(struct rtw_adapter *padapter); +bool rtl8723a_chk_hi_queue_empty(struct rtw_adapter *padapter); #endif /* __HAL_COMMON_H__ */ diff --git a/drivers/staging/rtl8723au/include/hal_intf.h b/drivers/staging/rtl8723au/include/hal_intf.h index 35bedf984ba9..e5b71ca639dc 100644 --- a/drivers/staging/rtl8723au/include/hal_intf.h +++ b/drivers/staging/rtl8723au/include/hal_intf.h @@ -52,7 +52,6 @@ enum HW_VARIABLES { /* Unit in microsecond. 0 means disable this function. */ HW_VAR_RPT_TIMER_SETTING, HW_VAR_TX_RPT_MAX_MACID, - HW_VAR_CHK_HI_QUEUE_EMPTY, HW_VAR_READ_LLT_TAB, };