From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 8/8] staging: rtl8192e: Remove constant parameter from rtllib_stop_protocol()
Date: Mon, 2 Oct 2023 19:53:56 +0200 [thread overview]
Message-ID: <7eebcd3a8637b686331e34532136df3e7760f869.1696266965.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1696266964.git.philipp.g.hortmann@gmail.com>
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>
---
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_softmac.c | 19 ++++++++-----------
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 6 +++---
3 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 65f29afa81be..ff1728d1824d 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -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);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 1a086f0ff10d..79a62bd9a297 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -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;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index 3c7c0f07ab0b..e9da566646c5 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -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
--
2.42.0
next prev parent reply other threads:[~2023-10-02 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-02 17:53 [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Philipp Hortmann
2023-10-02 17:53 ` [PATCH 1/8] staging: rtl8192e: Remove unused function rtl92e_dm_backup_state() Philipp Hortmann
2023-10-02 17:53 ` [PATCH 2/8] staging: rtl8192e: Remove unused function rtl92e_dm_restore_state() Philipp Hortmann
2023-10-02 17:53 ` [PATCH 3/8] staging: rtl8192e: Remove unused function rtl92e_cam_restore() Philipp Hortmann
2023-10-02 17:53 ` [PATCH 4/8] staging: rtl8192e: Remove unused variable last_ratr Philipp Hortmann
2023-10-02 17:53 ` [PATCH 5/8] staging: rtl8192e: Remove unused variable rate_adaptive_disabled Philipp Hortmann
2023-10-02 17:53 ` [PATCH 6/8] staging: rtl8192e: Remove unused variable rfc_txpowertrackingindex Philipp Hortmann
2023-10-02 17:53 ` [PATCH 7/8] staging: rtl8192e: Remove unused/constant parameter mesh_flag and shutdown Philipp Hortmann
2023-10-02 17:53 ` Philipp Hortmann [this message]
2023-10-04 8:19 ` [PATCH 0/8] staging: rtl8192e: Remove unused functions related to removed reset Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7eebcd3a8637b686331e34532136df3e7760f869.1696266965.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®