OSDN Git Service

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

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

index d330f58..848b1d4 100644 (file)
@@ -14,6 +14,7 @@
 #include "../include/wlan_bssdef.h"
 #include "../include/rtw_ioctl_set.h"
 #include "../include/usb_osintf.h"
+#include "../include/rtl8188e_dm.h"
 
 extern unsigned char   MCS_rate_2R[16];
 extern unsigned char   MCS_rate_1R[16];
@@ -469,7 +470,7 @@ void update_network(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
        u8 sq_final;
        long rssi_final;
 
-       rtw_hal_antdiv_rssi_compared(padapter, dst, src); /* this will update src.Rssi, need consider again */
+       AntDivCompare8188E(padapter, dst, src); /* this will update src.Rssi, need consider again */
 
        /* The rule below is 1/5 for sample value, 4/5 for history value */
        if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) && is_same_network(&padapter->mlmepriv.cur_network.network, src)) {
index 1bec02b..e723742 100644 (file)
@@ -206,14 +206,6 @@ void rtw_hal_bcn_related_reg_setting(struct adapter *adapt)
                adapt->HalFunc.SetBeaconRelatedRegistersHandler(adapt);
 }
 
-void rtw_hal_antdiv_rssi_compared(struct adapter *adapt,
-                                 struct wlan_bssid_ex *dst,
-                                 struct wlan_bssid_ex *src)
-{
-       if (adapt->HalFunc.AntDivCompareHandler)
-               adapt->HalFunc.AntDivCompareHandler(adapt, dst, src);
-}
-
 int rtw_hal_iol_cmd(struct adapter  *adapter, struct xmit_frame *xmit_frame,
                    u32 max_wating_ms, u32 bndy_cnt)
 {
index 62fd62c..84449d8 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->AntDivCompareHandler = &AntDivCompare8188E;
        pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg;
        pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg;
        pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
index 929e861..2c6a3d1 100644 (file)
@@ -156,10 +156,6 @@ struct hal_ops {
        void    (*run_thread)(struct adapter *adapter);
        void    (*cancel_thread)(struct adapter *adapter);
 
-       void    (*AntDivCompareHandler)(struct adapter *adapter,
-                                       struct wlan_bssid_ex *dst,
-                                       struct wlan_bssid_ex *src);
-
        s32     (*hal_xmit)(struct adapter *padapter,
                            struct xmit_frame *pxmitframe);
        s32 (*mgnt_xmit)(struct adapter *padapter,
@@ -255,10 +251,6 @@ void       rtw_hal_write_rfreg(struct adapter *padapter,
                            enum rf_radio_path eRFPath, u32 RegAddr,
                            u32 BitMask, u32 Data);
 
-void   rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
-                                    struct wlan_bssid_ex *dst,
-                                    struct wlan_bssid_ex *src);
-
 int rtw_hal_iol_cmd(struct adapter  *adapter, struct xmit_frame *xmit_frame,
                    u32 max_wating_ms, u32 bndy_cnt);