staging: rtl8192e: Remove constant parameter from rtllib_stop_protocol()
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Mon, 2 Oct 2023 17:53:56 +0000 (19:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Oct 2023 07:59:05 +0000 (09:59 +0200)
Remove constant parameter shutdown of function rtllib_stop_protocol().
shutdown is always true. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/7eebcd3a8637b686331e34532136df3e7760f869.1696266965.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_softmac.c
drivers/staging/rtl8192e/rtllib_softmac_wx.c

index 65f29afa81be2fe0c07ab92859b6a6bc575e5e02..ff1728d1824d74bbcc0e59f039741a3e9379a54c 100644 (file)
@@ -1698,7 +1698,7 @@ void rtllib_start_scan_syncro(struct rtllib_device *ieee);
 void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee, short pwr);
 void rtllib_sta_ps_send_pspoll_frame(struct rtllib_device *ieee);
 void rtllib_start_protocol(struct rtllib_device *ieee);
-void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown);
+void rtllib_stop_protocol(struct rtllib_device *ieee);
 
 void rtllib_EnableNetMonitorMode(struct net_device *dev, bool bInitState);
 void rtllib_DisableNetMonitorMode(struct net_device *dev, bool bInitState);
index 1a086f0ff10d9ad03ab2da620d779b7e2a48910c..79a62bd9a2973ed26cfa4b088e6beba87d35b7a2 100644 (file)
@@ -2283,21 +2283,19 @@ void rtllib_softmac_stop_protocol(struct rtllib_device *ieee)
 {
        rtllib_stop_scan_syncro(ieee);
        mutex_lock(&ieee->wx_mutex);
-       rtllib_stop_protocol(ieee, true);
+       rtllib_stop_protocol(ieee);
        mutex_unlock(&ieee->wx_mutex);
 }
 EXPORT_SYMBOL(rtllib_softmac_stop_protocol);
 
-void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown)
+void rtllib_stop_protocol(struct rtllib_device *ieee)
 {
        if (!ieee->proto_started)
                return;
 
-       if (shutdown) {
-               ieee->proto_started = 0;
-               ieee->proto_stoppping = 1;
-               ieee->rtllib_ips_leave(ieee->dev);
-       }
+       ieee->proto_started = 0;
+       ieee->proto_stoppping = 1;
+       ieee->rtllib_ips_leave(ieee->dev);
 
        del_timer_sync(&ieee->associate_timer);
        mutex_unlock(&ieee->wx_mutex);
@@ -2315,10 +2313,9 @@ void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown)
                rtllib_disassociate(ieee);
        }
 
-       if (shutdown) {
-               RemoveAllTS(ieee);
-               ieee->proto_stoppping = 0;
-       }
+       RemoveAllTS(ieee);
+       ieee->proto_stoppping = 0;
+
        kfree(ieee->assocreq_ies);
        ieee->assocreq_ies = NULL;
        ieee->assocreq_ies_len = 0;
index 3c7c0f07ab0bfb9c74e26c83c81b8b53c57e51dd..e9da566646c5622857216a4a564f1be5ba7aad8c 100644 (file)
@@ -134,7 +134,7 @@ int rtllib_wx_set_wap(struct rtllib_device *ieee,
        }
 
        if (ifup)
-               rtllib_stop_protocol(ieee, true);
+               rtllib_stop_protocol(ieee);
 
        /* just to avoid to give inconsistent infos in the
         * get wx method. not really needed otherwise
@@ -277,7 +277,7 @@ int rtllib_wx_set_mode(struct rtllib_device *ieee, struct iw_request_info *a,
        if (!ieee->proto_started) {
                ieee->iw_mode = wrqu->mode;
        } else {
-               rtllib_stop_protocol(ieee, true);
+               rtllib_stop_protocol(ieee);
                ieee->iw_mode = wrqu->mode;
                rtllib_start_protocol(ieee);
        }
@@ -401,7 +401,7 @@ int rtllib_wx_set_essid(struct rtllib_device *ieee,
        }
 
        if (proto_started)
-               rtllib_stop_protocol(ieee, true);
+               rtllib_stop_protocol(ieee);
 
        /* this is just to be sure that the GET wx callback
         * has consistent infos. not needed otherwise