]> www.infradead.org Git - users/hch/misc.git/commitdiff
staging: rtl8723bs: merge rtw_os_indicate_disconnect into rtw_indicate_disconnect
authorMichael Straube <straube.linux@gmail.com>
Fri, 1 Aug 2025 08:31:29 +0000 (10:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Aug 2025 05:21:22 +0000 (07:21 +0200)
Merge the functionality of the function rtw_os_indicate_disconnect into the
function rtw_indicate_disconnect to reduce code in the os_dep directory.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Tested-by: Hans de Goede <hansg@kernel.org>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250801083131.82915-7-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/include/mlme_osdep.h
drivers/staging/rtl8723bs/os_dep/mlme_linux.c

index b77dbf104692868e50421b2e83fe426a5fd41c99..d0579cba3e3229955712c466d5ed8ff566b5cc84 100644 (file)
@@ -932,10 +932,14 @@ void rtw_indicate_disconnect(struct adapter *padapter)
        if (rtw_to_roam(padapter) > 0)
                _clr_fwstate_(pmlmepriv, _FW_LINKED);
 
-       if (check_fwstate(&padapter->mlmepriv, _FW_LINKED)
-               || (rtw_to_roam(padapter) <= 0)
-       ) {
-               rtw_os_indicate_disconnect(padapter);
+       if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) || rtw_to_roam(padapter) <= 0) {
+               /*  Do it first for tx broadcast pkt after disconnection issue! */
+               netif_carrier_off(padapter->pnetdev);
+
+               rtw_cfg80211_indicate_disconnect(padapter);
+
+               /* modify for CONFIG_IEEE80211W, none 11w also can use the same command */
+               rtw_reset_securitypriv_cmd(padapter);
 
                /* set ips_deny_time to avoid enter IPS before LPS leave */
                rtw_set_ips_deny(padapter, 3000);
index 00c0a44c125a9fc7166b84010f3f094cc74bdb83..8e8b5de285dc52bfa4483aecbc6688f323b09c84 100644 (file)
@@ -8,7 +8,6 @@
 #define __MLME_OSDEP_H_
 
 
-extern void rtw_os_indicate_disconnect(struct adapter *adapter);
 extern void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie);
 
 void rtw_reset_securitypriv(struct adapter *adapter);
index 326acbd8dc84255c6afdecbc5719cd2ae57a518d..d2f4855e9d9d32a180c2b55304ba64b92166f440 100644 (file)
@@ -66,18 +66,6 @@ void rtw_reset_securitypriv(struct adapter *adapter)
        spin_unlock_bh(&adapter->security_key_mutex);
 }
 
-void rtw_os_indicate_disconnect(struct adapter *adapter)
-{
-       /* struct rt_pmkid_list   backupPMKIDList[ NUM_PMKID_CACHE ]; */
-
-       netif_carrier_off(adapter->pnetdev); /*  Do it first for tx broadcast pkt after disconnection issue! */
-
-       rtw_cfg80211_indicate_disconnect(adapter);
-
-       /* modify for CONFIG_IEEE80211W, none 11w also can use the same command */
-       rtw_reset_securitypriv_cmd(adapter);
-}
-
 void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
 {
        uint    len;