mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
staging: rtl8723bs: replace cap_* macros
Replace unique cap_* macros with kernel provided WLAN_CAPABILITY_* macros. Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com> Link: https://lore.kernel.org/r/20201206034517.4276-3-ross.schm.dev@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5ed3e6f29f
commit
2415ae7fa2
|
|
@ -1980,7 +1980,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
|
|||
}
|
||||
}
|
||||
|
||||
if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT)) {
|
||||
if (!(psta->capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)) {
|
||||
if (!psta->no_short_slot_time_set) {
|
||||
psta->no_short_slot_time_set = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -314,13 +314,13 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
|
|||
/* capability info */
|
||||
*(u16 *)ie = 0;
|
||||
|
||||
*(__le16 *)ie |= cpu_to_le16(cap_IBSS);
|
||||
*(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_IBSS);
|
||||
|
||||
if (pregistrypriv->preamble == PREAMBLE_SHORT)
|
||||
*(__le16 *)ie |= cpu_to_le16(cap_ShortPremble);
|
||||
*(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE);
|
||||
|
||||
if (pdev_network->Privacy)
|
||||
*(__le16 *)ie |= cpu_to_le16(cap_Privacy);
|
||||
*(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
|
||||
|
||||
sz += 2;
|
||||
ie += 2;
|
||||
|
|
|
|||
|
|
@ -424,8 +424,8 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea
|
|||
((!memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength))) &&
|
||||
((s_cap & WLAN_CAPABILITY_IBSS) ==
|
||||
(d_cap & WLAN_CAPABILITY_IBSS)) &&
|
||||
((s_cap & WLAN_CAPABILITY_BSS) ==
|
||||
(d_cap & WLAN_CAPABILITY_BSS));
|
||||
((s_cap & WLAN_CAPABILITY_ESS) ==
|
||||
(d_cap & WLAN_CAPABILITY_ESS));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4600,7 +4600,7 @@ void start_create_ibss(struct adapter *padapter)
|
|||
/* update capability */
|
||||
caps = rtw_get_capability((struct wlan_bssid_ex *)pnetwork);
|
||||
update_capinfo(padapter, caps);
|
||||
if (caps&cap_IBSS) {/* adhoc master */
|
||||
if (caps&WLAN_CAPABILITY_IBSS) {/* adhoc master */
|
||||
val8 = 0xcf;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8));
|
||||
|
||||
|
|
@ -4655,7 +4655,7 @@ void start_clnt_join(struct adapter *padapter)
|
|||
/* update capability */
|
||||
caps = rtw_get_capability((struct wlan_bssid_ex *)pnetwork);
|
||||
update_capinfo(padapter, caps);
|
||||
if (caps&cap_ESS) {
|
||||
if (caps&WLAN_CAPABILITY_ESS) {
|
||||
Set_MSR(padapter, WIFI_FW_STATION_STATE);
|
||||
|
||||
val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X) ? 0xcc : 0xcf;
|
||||
|
|
@ -4681,7 +4681,7 @@ void start_clnt_join(struct adapter *padapter)
|
|||
(REAUTH_TO * REAUTH_LIMIT) + (REASSOC_TO*REASSOC_LIMIT) + beacon_timeout);
|
||||
|
||||
pmlmeinfo->state = WIFI_FW_AUTH_NULL | WIFI_FW_STATION_STATE;
|
||||
} else if (caps&cap_IBSS) { /* adhoc client */
|
||||
} else if (caps&WLAN_CAPABILITY_IBSS) { /* adhoc client */
|
||||
Set_MSR(padapter, WIFI_FW_ADHOC_STATE);
|
||||
|
||||
val8 = 0xcf;
|
||||
|
|
@ -5952,9 +5952,9 @@ static int rtw_auto_ap_start_beacon(struct adapter *adapter)
|
|||
|
||||
/* capability info */
|
||||
*(u16 *)ie = 0;
|
||||
*(u16 *)ie |= cpu_to_le16(cap_ESS);
|
||||
*(u16 *)ie |= cpu_to_le16(cap_ShortPremble);
|
||||
/* u16*)ie |= cpu_to_le16(cap_Privacy); */
|
||||
*(u16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_ESS);
|
||||
*(u16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE);
|
||||
/* u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY); */
|
||||
sz += 2;
|
||||
ie += 2;
|
||||
|
||||
|
|
|
|||
|
|
@ -343,10 +343,6 @@ struct ieee80211_snap_hdr {
|
|||
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG)
|
||||
#define WLAN_GET_SEQ_SEQ(seq) ((seq) & RTW_IEEE80211_SCTL_SEQ)
|
||||
|
||||
/* Authentication algorithms */
|
||||
#define WLAN_CAPABILITY_BSS (1<<0)
|
||||
#define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
|
||||
|
||||
/* Reason codes */
|
||||
#define WLAN_REASON_ACTIVE_ROAM 65533
|
||||
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
|
||||
|
|
|
|||
|
|
@ -516,18 +516,6 @@ enum ELEMENT_ID {
|
|||
#define WLAN_ETHCONV_RFC1042 2
|
||||
#define WLAN_ETHCONV_8021h 3
|
||||
|
||||
#define cap_ESS BIT(0)
|
||||
#define cap_IBSS BIT(1)
|
||||
#define cap_CFPollable BIT(2)
|
||||
#define cap_CFRequest BIT(3)
|
||||
#define cap_Privacy BIT(4)
|
||||
#define cap_ShortPremble BIT(5)
|
||||
#define cap_PBCC BIT(6)
|
||||
#define cap_ChAgility BIT(7)
|
||||
#define cap_SpecMgmt BIT(8)
|
||||
#define cap_QoS BIT(9)
|
||||
#define cap_ShortSlot BIT(10)
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
Below is the definition for 802.11i / 802.1x
|
||||
------------------------------------------------------------------------------*/
|
||||
|
|
|
|||
|
|
@ -163,8 +163,8 @@ static char *translate_scan(struct adapter *padapter,
|
|||
cap = le16_to_cpu(le_tmp);
|
||||
}
|
||||
|
||||
if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) {
|
||||
if (cap & WLAN_CAPABILITY_BSS)
|
||||
if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_ESS)) {
|
||||
if (cap & WLAN_CAPABILITY_ESS)
|
||||
iwe.u.mode = IW_MODE_MASTER;
|
||||
else
|
||||
iwe.u.mode = IW_MODE_ADHOC;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user