Commit 58e7509d authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: rtl8192e: Remove unused variables numpacket.. and received_pre..

numpacket_toself, numpacket_matchbssid and received_preamble_GI are
initialized and increased but never read. Remove dead code. As a result
the local variable preamble_guardinterval is unused. Remove it also.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0ed5f4134176393110fdb0b7424df7a8a6fc6262.1674675808.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3690e799
...@@ -1685,10 +1685,6 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev, ...@@ -1685,10 +1685,6 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
ether_addr_equal(praddr, priv->rtllib->dev->dev_addr); ether_addr_equal(praddr, priv->rtllib->dev->dev_addr);
if (WLAN_FC_GET_FRAMETYPE(fc) == RTLLIB_STYPE_BEACON) if (WLAN_FC_GET_FRAMETYPE(fc) == RTLLIB_STYPE_BEACON)
bPacketBeacon = true; bPacketBeacon = true;
if (bpacket_match_bssid)
priv->stats.numpacket_matchbssid++;
if (bpacket_toself)
priv->stats.numpacket_toself++;
_rtl92e_process_phyinfo(priv, tmp_buf, &previous_stats, pstats); _rtl92e_process_phyinfo(priv, tmp_buf, &previous_stats, pstats);
_rtl92e_query_rxphystatus(priv, pstats, pdesc, pdrvinfo, _rtl92e_query_rxphystatus(priv, pstats, pdesc, pdrvinfo,
&previous_stats, bpacket_match_bssid, &previous_stats, bpacket_match_bssid,
...@@ -1703,18 +1699,12 @@ static void _rtl92e_update_received_rate_histogram_stats( ...@@ -1703,18 +1699,12 @@ static void _rtl92e_update_received_rate_histogram_stats(
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
u32 rcvType = 1; u32 rcvType = 1;
u32 rateIndex; u32 rateIndex;
u32 preamble_guardinterval;
if (pstats->bCRC) if (pstats->bCRC)
rcvType = 2; rcvType = 2;
else if (pstats->bICV) else if (pstats->bICV)
rcvType = 3; rcvType = 3;
if (pstats->bShortPreamble)
preamble_guardinterval = 1;
else
preamble_guardinterval = 0;
switch (pstats->rate) { switch (pstats->rate) {
case MGN_1M: case MGN_1M:
rateIndex = 0; rateIndex = 0;
...@@ -1804,7 +1794,6 @@ static void _rtl92e_update_received_rate_histogram_stats( ...@@ -1804,7 +1794,6 @@ static void _rtl92e_update_received_rate_histogram_stats(
rateIndex = 28; rateIndex = 28;
break; break;
} }
priv->stats.received_preamble_GI[preamble_guardinterval][rateIndex]++;
priv->stats.received_rate_histogram[0][rateIndex]++; priv->stats.received_rate_histogram[0][rateIndex]++;
priv->stats.received_rate_histogram[rcvType][rateIndex]++; priv->stats.received_rate_histogram[rcvType][rateIndex]++;
} }
......
...@@ -184,9 +184,6 @@ enum reset_type { ...@@ -184,9 +184,6 @@ enum reset_type {
struct rt_stats { struct rt_stats {
unsigned long received_rate_histogram[4][32]; unsigned long received_rate_histogram[4][32];
unsigned long received_preamble_GI[2][32];
unsigned long numpacket_matchbssid;
unsigned long numpacket_toself;
unsigned long num_process_phyinfo; unsigned long num_process_phyinfo;
unsigned long numqry_phystatus; unsigned long numqry_phystatus;
unsigned long numqry_phystatusCCK; unsigned long numqry_phystatusCCK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment