staging: rtl8723au: Eliminate HW_WAR_CHK_HI_QUEUE_EMPTY usage
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:55 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:29:13 +0000 (08:29 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_cmd.c
drivers/staging/rtl8723au/hal/hal_com.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/include/hal_com.h
drivers/staging/rtl8723au/include/hal_intf.h

index 0b25cd2f6584eb8097b065878716d83b1bad9252..2c558e0dd12b65a10b1bee1db8af2c0153647b44 100644 (file)
@@ -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) {
index 7b00dbadf1054001d0cbb541b389c6f2b7d0bb1a..d1701a35bc90a158c5ef535a4d2c05e82c076712 100644 (file)
@@ -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;
+}
index f9cf4c88f7ffc6f631dbc05dcc5a3a8a85b49ca3..9967c075a702c7f9c3ef0ebdb20822a9e308a0d2 100644 (file)
@@ -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;
        }
 }
 
index 84e472e671d1d4e2a87a2e1c944dd645be93657b..5f050a346a8a19b7c5e3c0a48aff01daa0c78461 100644 (file)
@@ -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__ */
index 35bedf984ba91fe0ca0deb7a41694fb6c091b821..e5b71ca639dc574a21ca315a1330f061fd0c6a6e 100644 (file)
@@ -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,
 };