Commit 2415ae7f authored by Ross Schmidt's avatar Ross Schmidt Committed by Greg Kroah-Hartman

staging: rtl8723bs: replace cap_* macros

Replace unique cap_* macros with kernel provided WLAN_CAPABILITY_*
macros.
Signed-off-by: default avatarRoss Schmidt <ross.schm.dev@gmail.com>
Link: https://lore.kernel.org/r/20201206034517.4276-3-ross.schm.dev@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5ed3e6f2
...@@ -1980,7 +1980,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta) ...@@ -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) { if (!psta->no_short_slot_time_set) {
psta->no_short_slot_time_set = 1; psta->no_short_slot_time_set = 1;
......
...@@ -314,13 +314,13 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) ...@@ -314,13 +314,13 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv)
/* capability info */ /* capability info */
*(u16 *)ie = 0; *(u16 *)ie = 0;
*(__le16 *)ie |= cpu_to_le16(cap_IBSS); *(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_IBSS);
if (pregistrypriv->preamble == PREAMBLE_SHORT) 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) if (pdev_network->Privacy)
*(__le16 *)ie |= cpu_to_le16(cap_Privacy); *(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
sz += 2; sz += 2;
ie += 2; ie += 2;
......
...@@ -424,8 +424,8 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea ...@@ -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))) && ((!memcmp(src->Ssid.Ssid, dst->Ssid.Ssid, src->Ssid.SsidLength))) &&
((s_cap & WLAN_CAPABILITY_IBSS) == ((s_cap & WLAN_CAPABILITY_IBSS) ==
(d_cap & WLAN_CAPABILITY_IBSS)) && (d_cap & WLAN_CAPABILITY_IBSS)) &&
((s_cap & WLAN_CAPABILITY_BSS) == ((s_cap & WLAN_CAPABILITY_ESS) ==
(d_cap & WLAN_CAPABILITY_BSS)); (d_cap & WLAN_CAPABILITY_ESS));
} }
......
...@@ -4600,7 +4600,7 @@ void start_create_ibss(struct adapter *padapter) ...@@ -4600,7 +4600,7 @@ void start_create_ibss(struct adapter *padapter)
/* update capability */ /* update capability */
caps = rtw_get_capability((struct wlan_bssid_ex *)pnetwork); caps = rtw_get_capability((struct wlan_bssid_ex *)pnetwork);
update_capinfo(padapter, caps); update_capinfo(padapter, caps);
if (caps&cap_IBSS) {/* adhoc master */ if (caps&WLAN_CAPABILITY_IBSS) {/* adhoc master */
val8 = 0xcf; val8 = 0xcf;
rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8)); rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8));
...@@ -4655,7 +4655,7 @@ void start_clnt_join(struct adapter *padapter) ...@@ -4655,7 +4655,7 @@ void start_clnt_join(struct adapter *padapter)
/* update capability */ /* update capability */
caps = rtw_get_capability((struct wlan_bssid_ex *)pnetwork); caps = rtw_get_capability((struct wlan_bssid_ex *)pnetwork);
update_capinfo(padapter, caps); update_capinfo(padapter, caps);
if (caps&cap_ESS) { if (caps&WLAN_CAPABILITY_ESS) {
Set_MSR(padapter, WIFI_FW_STATION_STATE); Set_MSR(padapter, WIFI_FW_STATION_STATE);
val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X) ? 0xcc : 0xcf; val8 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_8021X) ? 0xcc : 0xcf;
...@@ -4681,7 +4681,7 @@ void start_clnt_join(struct adapter *padapter) ...@@ -4681,7 +4681,7 @@ void start_clnt_join(struct adapter *padapter)
(REAUTH_TO * REAUTH_LIMIT) + (REASSOC_TO*REASSOC_LIMIT) + beacon_timeout); (REAUTH_TO * REAUTH_LIMIT) + (REASSOC_TO*REASSOC_LIMIT) + beacon_timeout);
pmlmeinfo->state = WIFI_FW_AUTH_NULL | WIFI_FW_STATION_STATE; 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); Set_MSR(padapter, WIFI_FW_ADHOC_STATE);
val8 = 0xcf; val8 = 0xcf;
...@@ -5952,9 +5952,9 @@ static int rtw_auto_ap_start_beacon(struct adapter *adapter) ...@@ -5952,9 +5952,9 @@ static int rtw_auto_ap_start_beacon(struct adapter *adapter)
/* capability info */ /* capability info */
*(u16 *)ie = 0; *(u16 *)ie = 0;
*(u16 *)ie |= cpu_to_le16(cap_ESS); *(u16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_ESS);
*(u16 *)ie |= cpu_to_le16(cap_ShortPremble); *(u16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE);
/* u16*)ie |= cpu_to_le16(cap_Privacy); */ /* u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY); */
sz += 2; sz += 2;
ie += 2; ie += 2;
......
...@@ -343,10 +343,6 @@ struct ieee80211_snap_hdr { ...@@ -343,10 +343,6 @@ struct ieee80211_snap_hdr {
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG) #define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG)
#define WLAN_GET_SEQ_SEQ(seq) ((seq) & RTW_IEEE80211_SCTL_SEQ) #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 */ /* Reason codes */
#define WLAN_REASON_ACTIVE_ROAM 65533 #define WLAN_REASON_ACTIVE_ROAM 65533
#define WLAN_REASON_JOIN_WRONG_CHANNEL 65534 #define WLAN_REASON_JOIN_WRONG_CHANNEL 65534
......
...@@ -516,18 +516,6 @@ enum ELEMENT_ID { ...@@ -516,18 +516,6 @@ enum ELEMENT_ID {
#define WLAN_ETHCONV_RFC1042 2 #define WLAN_ETHCONV_RFC1042 2
#define WLAN_ETHCONV_8021h 3 #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 Below is the definition for 802.11i / 802.1x
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
......
...@@ -163,8 +163,8 @@ static char *translate_scan(struct adapter *padapter, ...@@ -163,8 +163,8 @@ static char *translate_scan(struct adapter *padapter,
cap = le16_to_cpu(le_tmp); cap = le16_to_cpu(le_tmp);
} }
if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) { if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_ESS)) {
if (cap & WLAN_CAPABILITY_BSS) if (cap & WLAN_CAPABILITY_ESS)
iwe.u.mode = IW_MODE_MASTER; iwe.u.mode = IW_MODE_MASTER;
else else
iwe.u.mode = IW_MODE_ADHOC; iwe.u.mode = IW_MODE_ADHOC;
......
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