From: Yogesh Hegde <yogi.kernel@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v2 3/5] staging: rtl8192e: Remove variable LeisurePSLeave
Date: Wed, 7 Jun 2023 20:32:31 +0530 [thread overview]
Message-ID: <e97e9b82c9b3bc3c237d63ac2d9fae21f6c4f839.1686149467.git.yogi.kernel@gmail.com> (raw)
In-Reply-To: <cover.1686149467.git.yogi.kernel@gmail.com>
The variable LeisurePSLeave is set in only one place throughout the
driver. This patch removes the variable and calls the real function
directly instead, eliminating the unnecessary indirection.
Additionally, the removal of the variable aligns with the checkpatch
guidelines by removing the use of CamelCase.
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
---
v2: Removed the variable and called the function direction instead of
just renaming the variable as suggested by Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtllib.h | 1 -
drivers/staging/rtl8192e/rtllib_rx.c | 3 ++-
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 3 ++-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 6f6c31344441..231903002233 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -716,7 +716,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
priv->rtllib->check_nic_enough_desc = _rtl92e_check_nic_enough_desc;
priv->rtllib->handle_assoc_response = _rtl92e_handle_assoc_response;
priv->rtllib->handle_beacon = _rtl92e_handle_beacon;
- priv->rtllib->LeisurePSLeave = rtl92e_leisure_ps_leave;
priv->rf_set_chan = rtl92e_set_channel;
priv->rtllib->start_send_beacons = rtl92e_start_beacon;
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index d22a586043f2..f7fd8b77db99 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1719,7 +1719,6 @@ struct rtllib_device {
void (*rtllib_ips_leave_wq)(struct net_device *dev);
void (*rtllib_ips_leave)(struct net_device *dev);
- void (*LeisurePSLeave)(struct net_device *dev);
/* This must be the last item so that it points to the data
* allocated beyond this structure by alloc_rtllib
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index d44bf261de54..d8acede4b808 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -35,6 +35,7 @@
#include "rtllib.h"
#include "dot11d.h"
+#include "rtl8192e/rtl_ps.h"
static void rtllib_rx_mgt(struct rtllib_device *ieee, struct sk_buff *skb,
struct rtllib_rx_stats *stats);
@@ -1212,7 +1213,7 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast,
if (((ieee->link_detect_info.NumRxUnicastOkInPeriod +
ieee->link_detect_info.NumTxOkInPeriod) > 8) ||
(ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) {
- ieee->LeisurePSLeave(ieee->dev);
+ rtl92e_leisure_ps_leave(ieee->dev);
}
}
}
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index 9fb4fee93990..07c46ad4f20e 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -16,6 +16,7 @@
#include "rtllib.h"
#include "dot11d.h"
#include "rtl8192e/r8192E_phy.h"
+#include "rtl8192e/rtl_ps.h"
/* FIXME: add A freqs */
const long rtllib_wlan_frequencies[] = {
@@ -341,7 +342,7 @@ void rtllib_wx_sync_scan_wq(void *data)
chan = ieee->current_network.channel;
- ieee->LeisurePSLeave(ieee->dev);
+ rtl92e_leisure_ps_leave(ieee->dev);
/* notify AP to be in PS mode */
rtllib_sta_ps_send_null_frame(ieee, 1);
rtllib_sta_ps_send_null_frame(ieee, 1);
--
2.25.1
next prev parent reply other threads:[~2023-06-07 15:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 15:01 [PATCH v2 0/5] Trivial code cleanup patches Yogesh Hegde
2023-06-07 15:01 ` [PATCH v2 1/5] staging: rtl8192e: Remove variable SetWirelessMode Yogesh Hegde
2023-06-07 15:07 ` Dan Carpenter
2023-06-07 20:18 ` Philipp Hortmann
2023-06-08 9:00 ` Dan Carpenter
2023-06-08 9:59 ` Yogesh Hegde
2023-06-08 10:27 ` Dan Carpenter
2023-06-08 12:43 ` Philipp Hortmann
2023-06-12 1:52 ` kernel test robot
2023-06-07 15:02 ` [PATCH v2 2/5] staging: rtl8192e: Remove variable SetBWModeHandler Yogesh Hegde
2023-06-13 9:16 ` kernel test robot
2023-06-07 15:02 ` Yogesh Hegde [this message]
2023-06-07 15:02 ` [PATCH v2 4/5] staging: rtl8192e: Remove variable InitialGainHandler Yogesh Hegde
2023-06-07 15:03 ` [PATCH v2 5/5] staging: rtl8192e: Remove DRV_NAME definition in rtllib_debug.h Yogesh Hegde
2023-06-07 15:10 ` [PATCH v2 0/5] Trivial code cleanup patches Dan Carpenter
2023-06-15 10:36 ` Greg Kroah-Hartman
2023-06-15 14:09 ` Yogesh Hegde
2023-06-15 14:34 ` Greg Kroah-Hartman
2023-06-15 16:11 ` Yogesh Hegde
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=e97e9b82c9b3bc3c237d63ac2d9fae21f6c4f839.1686149467.git.yogi.kernel@gmail.com \
--to=yogi.kernel@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®