OSDN Git Service

staging: r8188eu: remove AntDivBeforeLinkHandler from hal_ops
authorMichael Straube <straube.linux@gmail.com>
Mon, 6 Sep 2021 19:02:15 +0000 (21:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Sep 2021 06:49:52 +0000 (08:49 +0200)
Remove AntDivBeforeLinkHandler from hal_ops and remove its wrapper
rtw_hal_antdiv_before_linked(). Call AntDivBeforeLink8188E() directly
instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20210906190223.11396-33-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c
drivers/staging/r8188eu/hal/hal_intf.c
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
drivers/staging/r8188eu/include/hal_intf.h

index 8dedab6..45acbd1 100644 (file)
@@ -6370,7 +6370,7 @@ void site_survey(struct adapter *padapter)
                        /*  20100721:Interrupt scan operation here. */
                        /*  For SW antenna diversity before link, it needs to switch to another antenna and scan again. */
                        /*  It compares the scan result and select beter one to do connection. */
-                       if (rtw_hal_antdiv_before_linked(padapter)) {
+                       if (AntDivBeforeLink8188E(padapter)) {
                                pmlmeext->sitesurvey_res.bss_cnt = 0;
                                pmlmeext->sitesurvey_res.channel_idx = -1;
                                pmlmeext->chan_scan_time = SURVEY_TO / 2;
index 27adaea..1bec02b 100644 (file)
@@ -206,13 +206,6 @@ void rtw_hal_bcn_related_reg_setting(struct adapter *adapt)
                adapt->HalFunc.SetBeaconRelatedRegistersHandler(adapt);
 }
 
-u8 rtw_hal_antdiv_before_linked(struct adapter *adapt)
-{
-       if (adapt->HalFunc.AntDivBeforeLinkHandler)
-               return adapt->HalFunc.AntDivBeforeLinkHandler(adapt);
-       return false;
-}
-
 void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
                                  struct wlan_bssid_ex *dst,
                                  struct wlan_bssid_ex *src)
index 33d4e53..62fd62c 100644 (file)
@@ -1773,7 +1773,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
        pHalFunc->run_thread = &rtl8188e_start_thread;
        pHalFunc->cancel_thread = &rtl8188e_stop_thread;
 
-       pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E;
        pHalFunc->AntDivCompareHandler = &AntDivCompare8188E;
        pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
        pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
index 4b937bd..929e861 100644 (file)
@@ -156,7 +156,6 @@ struct hal_ops {
        void    (*run_thread)(struct adapter *adapter);
        void    (*cancel_thread)(struct adapter *adapter);
 
-       u8      (*AntDivBeforeLinkHandler)(struct adapter *adapter);
        void    (*AntDivCompareHandler)(struct adapter *adapter,
                                        struct wlan_bssid_ex *dst,
                                        struct wlan_bssid_ex *src);
@@ -256,7 +255,6 @@ void        rtw_hal_write_rfreg(struct adapter *padapter,
                            enum rf_radio_path eRFPath, u32 RegAddr,
                            u32 BitMask, u32 Data);
 
-u8     rtw_hal_antdiv_before_linked(struct adapter *padapter);
 void   rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
                                     struct wlan_bssid_ex *dst,
                                     struct wlan_bssid_ex *src);