Commit 90262a95 authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: rtl8192e: Remove variable stats->freq as it is constant

stats->freq is initialized with 1 and then unchanged. All evaluations
will result accordingly. Remove resulting dead code and unused defines.
Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/4d8801d37889e6af4f43dff10d1426fc7918f562.1687007788.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5dfc6a8a
...@@ -1769,7 +1769,6 @@ static void _rtl92e_rx_normal(struct net_device *dev) ...@@ -1769,7 +1769,6 @@ static void _rtl92e_rx_normal(struct net_device *dev)
.signal = 0, .signal = 0,
.noise = (u8)-98, .noise = (u8)-98,
.rate = 0, .rate = 0,
.freq = RTLLIB_24GHZ_BAND,
}; };
unsigned int count = priv->rxringcount; unsigned int count = priv->rxringcount;
......
...@@ -500,9 +500,6 @@ enum _REG_PREAMBLE_MODE { ...@@ -500,9 +500,6 @@ enum _REG_PREAMBLE_MODE {
#define RTLLIB_CCK_MODULATION (1<<0) #define RTLLIB_CCK_MODULATION (1<<0)
#define RTLLIB_OFDM_MODULATION (1<<1) #define RTLLIB_OFDM_MODULATION (1<<1)
#define RTLLIB_24GHZ_BAND (1<<0)
#define RTLLIB_52GHZ_BAND (1<<1)
#define RTLLIB_CCK_RATE_LEN 4 #define RTLLIB_CCK_RATE_LEN 4
#define RTLLIB_CCK_RATE_1MB 0x02 #define RTLLIB_CCK_RATE_1MB 0x02
#define RTLLIB_CCK_RATE_2MB 0x04 #define RTLLIB_CCK_RATE_2MB 0x04
...@@ -549,10 +546,8 @@ struct rtllib_rx_stats { ...@@ -549,10 +546,8 @@ struct rtllib_rx_stats {
u8 signal; u8 signal;
u8 noise; u8 noise;
u16 rate; /* in 100 kbps */ u16 rate; /* in 100 kbps */
u8 received_channel;
u8 control; u8 control;
u8 mask; u8 mask;
u8 freq;
u16 len; u16 len;
u64 tsf; u64 tsf;
u32 beacon_time; u32 beacon_time;
......
...@@ -2301,12 +2301,7 @@ static inline int rtllib_network_init( ...@@ -2301,12 +2301,7 @@ static inline int rtllib_network_init(
network->CountryIeLen = 0; network->CountryIeLen = 0;
memset(network->CountryIeBuf, 0, MAX_IE_LEN); memset(network->CountryIeBuf, 0, MAX_IE_LEN);
HTInitializeBssDesc(&network->bssht); HTInitializeBssDesc(&network->bssht);
if (stats->freq == RTLLIB_52GHZ_BAND) { network->flags |= NETWORK_HAS_CCK;
/* for A band (No DS info) */
network->channel = stats->received_channel;
} else {
network->flags |= NETWORK_HAS_CCK;
}
network->wpa_ie_len = 0; network->wpa_ie_len = 0;
network->rsn_ie_len = 0; network->rsn_ie_len = 0;
...@@ -2321,14 +2316,10 @@ static inline int rtllib_network_init( ...@@ -2321,14 +2316,10 @@ static inline int rtllib_network_init(
network->mode = 0; network->mode = 0;
if (stats->freq == RTLLIB_52GHZ_BAND) { if (network->flags & NETWORK_HAS_OFDM)
network->mode = IEEE_A; network->mode |= IEEE_G;
} else { if (network->flags & NETWORK_HAS_CCK)
if (network->flags & NETWORK_HAS_OFDM) network->mode |= IEEE_B;
network->mode |= IEEE_G;
if (network->flags & NETWORK_HAS_CCK)
network->mode |= IEEE_B;
}
if (network->mode == 0) { if (network->mode == 0) {
netdev_dbg(ieee->dev, "Filtered out '%s (%pM)' network.\n", netdev_dbg(ieee->dev, "Filtered out '%s (%pM)' network.\n",
......
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