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

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.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5ed3e6f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;

+3 −3
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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));

}

+6 −6
Original line number Diff line number Diff line
@@ -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;

+0 −4
Original line number Diff line number Diff line
@@ -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
Loading