staging: rtl8192e: Remove function rtl92e_update_rx_pkt_timestamp()
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Fri, 24 Nov 2023 21:31:27 +0000 (22:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Nov 2023 10:27:49 +0000 (10:27 +0000)
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>
Link: https://lore.kernel.org/r/89a21fa17b32d66e07514bfad5b604d5d4835e25.1700860759.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.h
drivers/staging/rtl8192e/rtllib.h

index 73315a236e769804c15460eacad7fcb0ef6b84da..13e3f26279aa82bfa1e65c134487c9e171bb5951 100644 (file)
@@ -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;
 
index fc6e8ea039a3b737d3af117e41508af3ee189948..bad34221d8b70aad15975051264e893aba86b954 100644 (file)
@@ -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;
index 846f0f7a737ba67eb40ce14983efff31a2289b46..546c8a33dae8c52bd1367695297c9644128551c6 100644 (file)
@@ -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);
index 04433c79b3a73a03e27fe44e8d4b90b8aa3590c8..47da9b1a8682090ce9222578dd489933ff26e5c9 100644 (file)
@@ -471,7 +471,6 @@ enum _REG_PREAMBLE_MODE {
  *       any adverse affects.
  */
 struct rtllib_rx_stats {
-       u64 mac_time;
        s8  rssi;
        u8  signal;
        u8  noise;