staging: r8188eu: merge rtw_{os,}_indicate_disconnect()
authorMichael Straube <straube.linux@gmail.com>
Fri, 19 Aug 2022 12:54:25 +0000 (14:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Aug 2022 13:40:26 +0000 (15:40 +0200)
Merge rtw_os_indicate_disconnect() into rtw_indicate_disconnect().
The function rtw_os_indicate_disconnect() was moved from the os_dep
directory. It looks like the driver was originaly written to support
different operating systems. We do not need this wrapping into an
extra _os_ function obviously.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220819125428.8412-9-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme.c

index 6e51d73..3050c85 100644 (file)
@@ -837,15 +837,6 @@ static void rtw_reset_securitypriv(struct adapter *adapter)
        }
 }
 
-static void rtw_os_indicate_disconnect(struct adapter *adapter)
-{
-       /*  Do it first for tx broadcast pkt after disconnection issue! */
-       netif_carrier_off(adapter->pnetdev);
-
-       rtw_indicate_wx_disassoc_event(adapter);
-       rtw_reset_securitypriv(adapter);
-}
-
 /*
 *rtw_indicate_connect: the caller has to lock pmlmepriv->lock
 */
@@ -882,7 +873,11 @@ void rtw_indicate_disconnect(struct adapter *padapter)
 
        if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) ||
            (pmlmepriv->to_roaming <= 0)) {
-               rtw_os_indicate_disconnect(padapter);
+               /*  Do it first for tx broadcast pkt after disconnection issue! */
+               netif_carrier_off(padapter->pnetdev);
+
+               rtw_indicate_wx_disassoc_event(padapter);
+               rtw_reset_securitypriv(padapter);
 
                _clr_fwstate_(pmlmepriv, _FW_LINKED);
                rtw_led_control(padapter, LED_CTL_NO_LINK);