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 function rtl92e_update_rx_pkt_timestamp()
Date: Fri, 24 Nov 2023 22:31:27 +0100 [thread overview]
Message-ID: <89a21fa17b32d66e07514bfad5b604d5d4835e25.1700860759.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1700860758.git.philipp.g.hortmann@gmail.com>
mac_time and last_rx_desc_tsf are only used in
rtl92e_update_rx_pkt_timestamp(). Depending on a condition one is equal
to the other or vice versa. But since those are not used anywhere else
the function rtl92e_update_rx_pkt_timestamp() is just dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 11 -----------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 4 ----
drivers/staging/rtl8192e/rtllib.h | 1 -
4 files changed, 18 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 73315a236e76..13e3f26279aa 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1673,8 +1673,6 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
stats->TimeStampLow = pDrvInfo->TSFL;
stats->TimeStampHigh = rtl92e_readl(dev, TSFR + 4);
- rtl92e_update_rx_pkt_timestamp(dev, stats);
-
if ((stats->RxBufShift + stats->RxDrvInfoSize) > 0)
stats->bShift = 1;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index fc6e8ea039a3..bad34221d8b7 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1433,17 +1433,6 @@ void rtl92e_reset_desc_ring(struct net_device *dev)
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
}
-void rtl92e_update_rx_pkt_timestamp(struct net_device *dev,
- struct rtllib_rx_stats *stats)
-{
- struct r8192_priv *priv = rtllib_priv(dev);
-
- if (stats->bIsAMPDU && !stats->bFirstMPDU)
- stats->mac_time = priv->last_rx_desc_tsf;
- else
- priv->last_rx_desc_tsf = stats->mac_time;
-}
-
long rtl92e_translate_to_dbm(struct r8192_priv *priv, u8 signal_strength_index)
{
long signal_power;
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 846f0f7a737b..546c8a33dae8 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -234,8 +234,6 @@ struct r8192_priv {
int rxringcount;
u16 rxbuffersize;
- u64 last_rx_desc_tsf;
-
u32 receive_config;
u8 retry_data;
u8 retry_rts;
@@ -391,8 +389,6 @@ void rtl92e_irq_enable(struct net_device *dev);
void rtl92e_config_rate(struct net_device *dev, u16 *rate_config);
void rtl92e_irq_disable(struct net_device *dev);
-void rtl92e_update_rx_pkt_timestamp(struct net_device *dev,
- struct rtllib_rx_stats *stats);
long rtl92e_translate_to_dbm(struct r8192_priv *priv, u8 signal_strength_index);
void rtl92e_update_rx_statistics(struct r8192_priv *priv,
struct rtllib_rx_stats *pprevious_stats);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 04433c79b3a7..47da9b1a8682 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -471,7 +471,6 @@ enum _REG_PREAMBLE_MODE {
* any adverse affects.
*/
struct rtllib_rx_stats {
- u64 mac_time;
s8 rssi;
u8 signal;
u8 noise;
--
2.42.0
prev parent reply other threads:[~2023-11-24 21:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-24 21:30 [PATCH 0/8] staging: rtl8192e: Remove sending beacons Philipp Hortmann
2023-11-24 21:30 ` [PATCH 1/8] staging: rtl8192e: Remove unused interrupt for IMR_BcnInt Philipp Hortmann
2023-11-24 21:30 ` [PATCH 2/8] staging: rtl8192e: Remove unused function rtllib_get_beacon() Philipp Hortmann
2023-11-24 21:30 ` [PATCH 3/8] staging: rtl8192e: Remove unused timer beacon_timer Philipp Hortmann
2023-11-24 21:31 ` [PATCH 4/8] staging: rtl8192e: Remove unused function rtllib_send_beacon() Philipp Hortmann
2023-11-24 21:31 ` [PATCH 5/8] staging: rtl8192e: Remove unused function rtllib_get_beacon_() Philipp Hortmann
2023-11-24 21:31 ` [PATCH 6/8] staging: rtl8192e: Remove unused function rtllib_probe_resp() Philipp Hortmann
2023-11-24 21:31 ` [PATCH 7/8] staging: rtl8192e: Remove unused function HTConstructInfoElement() Philipp Hortmann
2023-11-24 21:31 ` Philipp Hortmann [this message]
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=89a21fa17b32d66e07514bfad5b604d5d4835e25.1700860759.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®