staging: rtl8192e: Remove unsupported modes IEEE_N_5G and IEEE_A
Remove unsupported modes IEEE_N_5G and IEEE_A as those are not supported by hardware and are not offered by user software. Remove resulting dead code and unused defines. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/40c5b21654376348144280dbe45203140c6e6807.1687007788.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
90262a95b0
commit
26cdc2b7bd
@ -1816,9 +1816,6 @@ void rtl92e_update_ratr_table(struct net_device *dev)
|
||||
rtl92e_config_rate(dev, &rate_config);
|
||||
ratr_value = rate_config | *pMcsRate << 12;
|
||||
switch (ieee->mode) {
|
||||
case IEEE_A:
|
||||
ratr_value &= 0x00000FF0;
|
||||
break;
|
||||
case IEEE_B:
|
||||
ratr_value &= 0x0000000F;
|
||||
break;
|
||||
@ -1827,7 +1824,6 @@ void rtl92e_update_ratr_table(struct net_device *dev)
|
||||
ratr_value &= 0x00000FF7;
|
||||
break;
|
||||
case IEEE_N_24G:
|
||||
case IEEE_N_5G:
|
||||
if (ieee->ht_info->peer_mimo_ps == 0)
|
||||
ratr_value &= 0x0007F007;
|
||||
else
|
||||
|
@ -424,14 +424,12 @@ static u8 HT_PickMCSRate(struct rtllib_device *ieee, u8 *pOperateMCS)
|
||||
}
|
||||
|
||||
switch (ieee->mode) {
|
||||
case IEEE_A:
|
||||
case IEEE_B:
|
||||
case IEEE_G:
|
||||
for (i = 0; i <= 15; i++)
|
||||
pOperateMCS[i] = 0;
|
||||
break;
|
||||
case IEEE_N_24G:
|
||||
case IEEE_N_5G:
|
||||
pOperateMCS[0] &= RATE_ADPT_1SS_MASK;
|
||||
pOperateMCS[1] &= RATE_ADPT_2SS_MASK;
|
||||
pOperateMCS[3] &= RATE_ADPT_MCS32_MASK;
|
||||
|
@ -309,9 +309,7 @@ enum rt_op_mode {
|
||||
};
|
||||
|
||||
#define aSifsTime \
|
||||
(((priv->rtllib->current_network.mode == IEEE_A) \
|
||||
|| (priv->rtllib->current_network.mode == IEEE_N_24G) \
|
||||
|| (priv->rtllib->current_network.mode == IEEE_N_5G)) ? 16 : 10)
|
||||
((priv->rtllib->current_network.mode == IEEE_N_24G) ? 16 : 10)
|
||||
|
||||
#define MGMT_QUEUE_NUM 5
|
||||
|
||||
@ -1724,12 +1722,10 @@ struct rtllib_device {
|
||||
u8 priv[];
|
||||
};
|
||||
|
||||
#define IEEE_A (1<<0)
|
||||
#define IEEE_B (1<<1)
|
||||
#define IEEE_G (1<<2)
|
||||
#define IEEE_N_24G (1<<4)
|
||||
#define IEEE_N_5G (1<<5)
|
||||
#define IEEE_MODE_MASK (IEEE_A|IEEE_B|IEEE_G)
|
||||
#define IEEE_MODE_MASK (IEEE_B | IEEE_G)
|
||||
|
||||
/* Generate a 802.11 header */
|
||||
|
||||
|
@ -2329,9 +2329,7 @@ static inline int rtllib_network_init(
|
||||
}
|
||||
|
||||
if (network->bssht.bd_support_ht) {
|
||||
if (network->mode == IEEE_A)
|
||||
network->mode = IEEE_N_5G;
|
||||
else if (network->mode & (IEEE_G | IEEE_B))
|
||||
if (network->mode & (IEEE_G | IEEE_B))
|
||||
network->mode = IEEE_N_24G;
|
||||
}
|
||||
if (rtllib_is_empty_essid(network->ssid, network->ssid_len))
|
||||
|
@ -181,9 +181,7 @@ static u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee)
|
||||
rate = ieee->basic_rate & 0x7f;
|
||||
|
||||
if (rate == 0) {
|
||||
if (ieee->mode == IEEE_A ||
|
||||
ieee->mode == IEEE_N_5G ||
|
||||
(ieee->mode == IEEE_N_24G && !ht_info->bCurSuppCCK))
|
||||
if (ieee->mode == IEEE_N_24G && !ht_info->bCurSuppCCK)
|
||||
rate = 0x0c;
|
||||
else
|
||||
rate = 0x02;
|
||||
@ -2577,7 +2575,7 @@ static void rtllib_start_ibss_wq(void *data)
|
||||
}
|
||||
|
||||
netdev_info(ieee->dev, "%s(): ieee->mode = %d\n", __func__, ieee->mode);
|
||||
if ((ieee->mode == IEEE_N_24G) || (ieee->mode == IEEE_N_5G))
|
||||
if (ieee->mode == IEEE_N_24G)
|
||||
HTUseDefaultSetting(ieee);
|
||||
else
|
||||
ieee->ht_info->bCurrentHTSupport = false;
|
||||
|
@ -489,7 +489,7 @@ int rtllib_wx_get_name(struct rtllib_device *ieee, struct iw_request_info *info,
|
||||
{
|
||||
const char *b = ieee->modulation & RTLLIB_CCK_MODULATION ? "b" : "";
|
||||
const char *g = ieee->modulation & RTLLIB_OFDM_MODULATION ? "g" : "";
|
||||
const char *n = ieee->mode & (IEEE_N_24G | IEEE_N_5G) ? "n" : "";
|
||||
const char *n = ieee->mode & (IEEE_N_24G) ? "n" : "";
|
||||
|
||||
scnprintf(wrqu->name, sizeof(wrqu->name), "802.11%s%s%s", b, g, n);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user