staging: rtl8723au: This gets rid of the last HW_VAR_BCN_VALID usage
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 9 Apr 2014 21:20:15 +0000 (23:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Apr 2014 15:28:58 +0000 (08:28 -0700)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme_ext.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 7be834f996abf81ed7d3566a8767bb6f403d926f..28750eb4169ee44db39c1011b97a72e1521b8969 100644 (file)
@@ -7555,7 +7555,7 @@ unsigned int send_delba23a(struct rtw_adapter *padapter, u8 initiator, u8 *addr)
 
 unsigned int send_beacon23a(struct rtw_adapter *padapter)
 {
-       u8      bxmitok = false;
+       bool    bxmitok;
        int     issue = 0;
        int poll = 0;
        unsigned long start = jiffies;
@@ -7567,9 +7567,9 @@ unsigned int send_beacon23a(struct rtw_adapter *padapter)
                issue++;
                do {
                        yield();
-                       rtw23a_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok));
+                       bxmitok = rtl8723a_get_bcn_valid(padapter);
                        poll++;
-               } while ((poll%10)!= 0 && false == bxmitok &&
+               } while ((poll % 10) != 0 && bxmitok == false &&
                         !padapter->bSurpriseRemoved &&
                         !padapter->bDriverStopped);
 
index 0640f3522136d5783b8e1cb35c164f16e792bdd2..5f20117e4e4f8342d4d16fc736b5da94c00d2421 100644 (file)
@@ -752,6 +752,15 @@ void rtl8723a_bcn_valid(struct rtw_adapter *padapter)
                   rtw_read8(padapter, REG_TDECTRL + 2) | BIT0);
 }
 
+bool rtl8723a_get_bcn_valid(struct rtw_adapter *padapter)
+{
+       bool retval;
+
+       retval = (rtw_read8(padapter, REG_TDECTRL + 2) & BIT0) ? true : false;
+
+       return retval;
+}
+
 void rtl8723a_set_tx_pause(struct rtw_adapter *padapter, u8 pause)
 {
        rtw_write8(padapter, REG_TXPAUSE, pause);
index a09716907569039357de57d051af3b45636ba9fa..26efc706997747724734a0cef6e5b01a3369a686 100644 (file)
@@ -3305,12 +3305,6 @@ void GetHwReg8723A(struct rtw_adapter *padapter, u8 variable, u8 *val)
                *val = rtw_read8(padapter, REG_TXPAUSE);
                break;
 
-       case HW_VAR_BCN_VALID:
-               /* BCN_VALID, BIT16 of REG_TDECTRL = BIT0 of REG_TDECTRL+2 */
-               val[0] = (BIT0 & rtw_read8(padapter, REG_TDECTRL + 2)) ? true :
-                       false;
-               break;
-
        case HW_VAR_RF_TYPE:
                *val = pHalData->rf_type;
                break;
index 20f983cfc2b7a7b16e5b38d1d65d765270e364cb..8e94d2e3ecef02cc16fadd00a2d909363c399cbb 100644 (file)
@@ -189,6 +189,7 @@ void rtl8723a_cam_write(struct rtw_adapter *padapter, u32 val1, u32 val2);
 void rtl8723a_fifo_cleanup(struct rtw_adapter *padapter);
 void rtl8723a_set_apfm_on_mac(struct rtw_adapter *padapter, u8 val);
 void rtl8723a_bcn_valid(struct rtw_adapter *padapter);
+bool rtl8723a_get_bcn_valid(struct rtw_adapter *padapter);
 void rtl8723a_set_tx_pause(struct rtw_adapter *padapter, u8 pause);
 void rtl8723a_set_beacon_interval(struct rtw_adapter *padapter, u16 interval);
 void rtl8723a_set_resp_sifs(struct rtw_adapter *padapter,
index 5bd47136def7d9da04651ad4f05b65e23c75910c..a5306e618f9a604eaa2e5c90cebb52e3a054a837 100644 (file)
@@ -53,7 +53,6 @@ enum HW_VARIABLES {
        HW_VAR_RESP_SIFS,
        HW_VAR_ACK_PREAMBLE,
        HW_VAR_SEC_CFG,
-       HW_VAR_BCN_VALID,
        HW_VAR_RF_TYPE,
        HW_VAR_DM_FLAG,
        HW_VAR_DM_FUNC_OP,