mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-09 15:24:32 +08:00
staging: r8188eu: Remove all 5GHz network types
Remove all 5Ghz network types. r8188eu works on 802.11bgn standards and on 2.4Ghz band. Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210812002519.23678-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e7dd1a58ce
commit
1fee0cc939
@ -460,11 +460,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
||||
}
|
||||
|
||||
if (pcur_network->Configuration.DSConfig > 14) {
|
||||
/* 5G band */
|
||||
if (tx_ra_bitmap & 0xffff000)
|
||||
sta_band |= WIRELESS_11_5N | WIRELESS_11A;
|
||||
else
|
||||
sta_band |= WIRELESS_11A;
|
||||
sta_band |= WIRELESS_INVALID;
|
||||
} else {
|
||||
if (tx_ra_bitmap & 0xffff000)
|
||||
sta_band |= WIRELESS_11_24N | WIRELESS_11G | WIRELESS_11B;
|
||||
@ -547,9 +543,7 @@ void update_bmc_sta(struct adapter *padapter)
|
||||
}
|
||||
|
||||
if (pcur_network->Configuration.DSConfig > 14) {
|
||||
/* force to A mode. 5G doesn't support CCK rates */
|
||||
network_type = WIRELESS_11A;
|
||||
tx_ra_bitmap = 0x150; /* 6, 12, 24 Mbps */
|
||||
network_type = WIRELESS_INVALID;
|
||||
} else {
|
||||
/* force to b mode */
|
||||
network_type = WIRELESS_11B;
|
||||
@ -1050,9 +1044,6 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||
case WIRELESS_11BG_24N:
|
||||
pbss_network->NetworkTypeInUse = Ndis802_11OFDM24;
|
||||
break;
|
||||
case WIRELESS_11A:
|
||||
pbss_network->NetworkTypeInUse = Ndis802_11OFDM5;
|
||||
break;
|
||||
default:
|
||||
pbss_network->NetworkTypeInUse = Ndis802_11OFDM24;
|
||||
break;
|
||||
|
@ -98,10 +98,7 @@ uint rtw_is_cckratesonly_included(u8 *rate)
|
||||
int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
|
||||
{
|
||||
if (channel > 14) {
|
||||
if ((rtw_is_cckrates_included(rate)) == true)
|
||||
return WIRELESS_INVALID;
|
||||
else
|
||||
return WIRELESS_11A;
|
||||
return WIRELESS_INVALID;
|
||||
} else { /* could be pure B, pure G, or B/G */
|
||||
if ((rtw_is_cckratesonly_included(rate)) == true)
|
||||
return WIRELESS_11B;
|
||||
@ -328,9 +325,6 @@ void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
|
||||
memcpy(SupportedRates, WIFI_CCKRATES, IEEE80211_CCK_RATE_LEN);
|
||||
break;
|
||||
case WIRELESS_11G:
|
||||
case WIRELESS_11A:
|
||||
case WIRELESS_11_5N:
|
||||
case WIRELESS_11A_5N:/* Todo: no basic rate for ofdm ? */
|
||||
memcpy(SupportedRates, WIFI_OFDMRATES, IEEE80211_NUM_OFDM_RATESLEN);
|
||||
break;
|
||||
case WIRELESS_11BG:
|
||||
@ -393,16 +387,9 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
||||
ie = rtw_set_ie(ie, _SSID_IE_, pdev_network->Ssid.SsidLength, pdev_network->Ssid.Ssid, &sz);
|
||||
|
||||
/* supported rates */
|
||||
if (pregistrypriv->wireless_mode == WIRELESS_11ABGN) {
|
||||
if (pdev_network->Configuration.DSConfig > 14)
|
||||
wireless_mode = WIRELESS_11A_5N;
|
||||
else
|
||||
wireless_mode = WIRELESS_11BG_24N;
|
||||
} else {
|
||||
wireless_mode = pregistrypriv->wireless_mode;
|
||||
}
|
||||
wireless_mode = pregistrypriv->wireless_mode;
|
||||
|
||||
rtw_set_supported_rate(pdev_network->SupportedRates, wireless_mode);
|
||||
rtw_set_supported_rate(pdev_network->SupportedRates, wireless_mode);
|
||||
|
||||
rateLen = rtw_get_rateset_len(pdev_network->SupportedRates);
|
||||
|
||||
|
@ -795,7 +795,7 @@ u16 rtw_get_cur_max_rate(struct adapter *adapter)
|
||||
(!check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)))
|
||||
return 0;
|
||||
|
||||
if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N|WIRELESS_11_5N)) {
|
||||
if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N)) {
|
||||
p = rtw_get_ie(&pcur_bss->IEs[12], _HT_CAPABILITY_IE_, &ht_ielen, pcur_bss->IELength-12);
|
||||
if (p && ht_ielen > 0) {
|
||||
pht_capie = (struct ieee80211_ht_cap *)(p+2);
|
||||
|
@ -1916,16 +1916,6 @@ void rtw_update_registrypriv_dev_network(struct adapter *adapter)
|
||||
case WIRELESS_11BG_24N:
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);
|
||||
break;
|
||||
case WIRELESS_11A:
|
||||
case WIRELESS_11A_5N:
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5);
|
||||
break;
|
||||
case WIRELESS_11ABGN:
|
||||
if (pregistrypriv->channel > 14)
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM5);
|
||||
else
|
||||
pdev_network->NetworkTypeInUse = (Ndis802_11OFDM24);
|
||||
break;
|
||||
default:
|
||||
/* TODO */
|
||||
break;
|
||||
|
@ -1950,7 +1950,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
||||
/* Added by Albert 2011/03/22 */
|
||||
/* In the P2P mode, the driver should not support the b mode. */
|
||||
/* So, the Tx packet shouldn't use the CCK rate */
|
||||
update_tx_basic_rate(padapter, WIRELESS_11AGN);
|
||||
update_tx_basic_rate(padapter, (WIRELESS_11G | WIRELESS_11_24N));
|
||||
|
||||
/* Enable P2P function */
|
||||
init_wifidirect_info(padapter, role);
|
||||
|
@ -78,7 +78,6 @@ unsigned char networktype_to_raid(unsigned char network_type)
|
||||
case WIRELESS_11B:
|
||||
raid = RATR_INX_WIRELESS_B;
|
||||
break;
|
||||
case WIRELESS_11A:
|
||||
case WIRELESS_11G:
|
||||
raid = RATR_INX_WIRELESS_G;
|
||||
break;
|
||||
@ -86,10 +85,8 @@ unsigned char networktype_to_raid(unsigned char network_type)
|
||||
raid = RATR_INX_WIRELESS_GB;
|
||||
break;
|
||||
case WIRELESS_11_24N:
|
||||
case WIRELESS_11_5N:
|
||||
raid = RATR_INX_WIRELESS_N;
|
||||
break;
|
||||
case WIRELESS_11A_5N:
|
||||
case WIRELESS_11G_24N:
|
||||
raid = RATR_INX_WIRELESS_NG;
|
||||
break;
|
||||
@ -110,10 +107,7 @@ u8 judge_network_type(struct adapter *padapter, unsigned char *rate, int ratelen
|
||||
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
|
||||
|
||||
if (pmlmeext->cur_channel > 14) {
|
||||
if (pmlmeinfo->HT_enable)
|
||||
network_type = WIRELESS_11_5N;
|
||||
|
||||
network_type |= WIRELESS_11A;
|
||||
network_type |= WIRELESS_INVALID;
|
||||
} else {
|
||||
if (pmlmeinfo->HT_enable)
|
||||
network_type = WIRELESS_11_24N;
|
||||
@ -1490,8 +1484,6 @@ void update_capinfo(struct adapter *Adapter, u16 updateCap)
|
||||
if (pmlmeinfo->slotTime != NON_SHORT_SLOT_TIME)
|
||||
pmlmeinfo->slotTime = NON_SHORT_SLOT_TIME;
|
||||
}
|
||||
} else if (pmlmeext->cur_wireless_mode & (WIRELESS_11A | WIRELESS_11_5N)) {
|
||||
pmlmeinfo->slotTime = SHORT_SLOT_TIME;
|
||||
} else {
|
||||
/* B Mode */
|
||||
pmlmeinfo->slotTime = NON_SHORT_SLOT_TIME;
|
||||
@ -1516,10 +1508,7 @@ void update_wireless_mode(struct adapter *padapter)
|
||||
pmlmeinfo->HT_enable = 1;
|
||||
|
||||
if (pmlmeext->cur_channel > 14) {
|
||||
if (pmlmeinfo->HT_enable)
|
||||
network_type = WIRELESS_11_5N;
|
||||
|
||||
network_type |= WIRELESS_11A;
|
||||
network_type |= WIRELESS_INVALID;
|
||||
} else {
|
||||
if (pmlmeinfo->HT_enable)
|
||||
network_type = WIRELESS_11_24N;
|
||||
|
@ -1136,7 +1136,6 @@ u32 ODM_Get_Rate_Bitmap(struct odm_dm_struct *pDM_Odm, u32 macid, u32 ra_mask, u
|
||||
break;
|
||||
default:
|
||||
/* case WIRELESS_11_24N: */
|
||||
/* case WIRELESS_11_5N: */
|
||||
if (pDM_Odm->RFType == RF_1T2R)
|
||||
rate_bitmap = 0x000fffff;
|
||||
else
|
||||
|
@ -145,53 +145,34 @@ enum NETWORK_TYPE {
|
||||
/* Sub-Element */
|
||||
WIRELESS_11B = BIT(0), /* tx:cck only, rx:cck only, hw: cck */
|
||||
WIRELESS_11G = BIT(1), /* tx:ofdm only, rx:ofdm & cck, hw:cck & ofdm*/
|
||||
WIRELESS_11A = BIT(2), /* tx:ofdm only, rx: ofdm only, hw:ofdm only */
|
||||
WIRELESS_11_24N = BIT(3), /* tx:MCS only, rx:MCS & cck, hw:MCS & cck */
|
||||
WIRELESS_11_5N = BIT(4), /* tx:MCS only, rx:MCS & ofdm, hw:ofdm only */
|
||||
WIRELESS_AC = BIT(6),
|
||||
|
||||
/* Combination */
|
||||
/* tx: cck & ofdm, rx: cck & ofdm & MCS, hw: cck & ofdm */
|
||||
WIRELESS_11BG = (WIRELESS_11B | WIRELESS_11G),
|
||||
/* tx: ofdm & MCS, rx: ofdm & cck & MCS, hw: cck & ofdm */
|
||||
WIRELESS_11G_24N = (WIRELESS_11G | WIRELESS_11_24N),
|
||||
/* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */
|
||||
WIRELESS_11A_5N = (WIRELESS_11A | WIRELESS_11_5N),
|
||||
/* tx: ofdm & cck & MCS, rx: ofdm & cck & MCS, hw: ofdm & cck */
|
||||
WIRELESS_11BG_24N = (WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N),
|
||||
/* tx: ofdm & MCS, rx: ofdm & MCS, hw: ofdm only */
|
||||
WIRELESS_11AGN = (WIRELESS_11A | WIRELESS_11G | WIRELESS_11_24N |
|
||||
WIRELESS_11_5N),
|
||||
WIRELESS_11ABGN = (WIRELESS_11A | WIRELESS_11B | WIRELESS_11G |
|
||||
WIRELESS_11_24N | WIRELESS_11_5N),
|
||||
};
|
||||
|
||||
#define SUPPORTED_24G_NETTYPE_MSK \
|
||||
(WIRELESS_11B | WIRELESS_11G | WIRELESS_11_24N)
|
||||
#define SUPPORTED_5G_NETTYPE_MSK \
|
||||
(WIRELESS_11A | WIRELESS_11_5N)
|
||||
|
||||
#define IsSupported24G(NetType) \
|
||||
((NetType) & SUPPORTED_24G_NETTYPE_MSK ? true : false)
|
||||
#define IsSupported5G(NetType) \
|
||||
((NetType) & SUPPORTED_5G_NETTYPE_MSK ? true : false)
|
||||
|
||||
#define IsEnableHWCCK(NetType) \
|
||||
IsSupported24G(NetType)
|
||||
#define IsEnableHWOFDM(NetType) \
|
||||
((NetType) & (WIRELESS_11G | WIRELESS_11_24N | \
|
||||
SUPPORTED_5G_NETTYPE_MSK) ? true : false)
|
||||
|
||||
#define IsSupportedRxCCK(NetType) IsEnableHWCCK(NetType)
|
||||
#define IsSupportedRxOFDM(NetType) IsEnableHWOFDM(NetType)
|
||||
#define IsSupportedRxMCS(NetType) IsEnableHWOFDM(NetType)
|
||||
|
||||
#define IsSupportedTxCCK(NetType) \
|
||||
((NetType) & (WIRELESS_11B) ? true : false)
|
||||
#define IsSupportedTxOFDM(NetType) \
|
||||
((NetType) & (WIRELESS_11G|WIRELESS_11A) ? true : false)
|
||||
((NetType) & (WIRELESS_11G) ? true : false)
|
||||
#define IsSupportedTxMCS(NetType) \
|
||||
((NetType) & (WIRELESS_11_24N|WIRELESS_11_5N) ? true : false)
|
||||
((NetType) & (WIRELESS_11_24N) ? true : false)
|
||||
|
||||
struct ieee_param {
|
||||
u32 cmd;
|
||||
|
@ -464,7 +464,7 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe)
|
||||
#define _PRE_ALLOCMICHDR_ 6
|
||||
|
||||
#define _SIFSTIME_ \
|
||||
((priv->pmib->dot11BssType.net_work_type & WIRELESS_11A) ? 16 : 10)
|
||||
(priv->pmib->dot11BssType.net_work_type = 10)
|
||||
#define _ACKCTSLNG_ 14 /* 14 bytes long, including crclng */
|
||||
#define _CRCLNG_ 4
|
||||
|
||||
|
@ -254,7 +254,7 @@ static inline uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
||||
|
||||
struct wlan_network {
|
||||
struct list_head list;
|
||||
int network_type; /* refer to ieee80211.h for WIRELESS_11A/B/G */
|
||||
int network_type; /* refer to ieee80211.h for WIRELESS_11B/G */
|
||||
int fixed; /* set fixed when not to be removed
|
||||
* in site-surveying */
|
||||
unsigned long last_scanned; /* timestamp for the network */
|
||||
|
Loading…
Reference in New Issue
Block a user