staging: rtl8723bs: replace _ERPINFO_IE_

Replace unique _ERPINFO_IE_ macro with kernel provided WLAN_EID_ERP_INFO
from linux/ieee80211.h.

Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
Link: https://lore.kernel.org/r/20201208040733.379197-14-ross.schm.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ross Schmidt 2020-12-07 22:07:25 -06:00 committed by Greg Kroah-Hartman
parent 38caee0abe
commit 7bd332ec5e
5 changed files with 11 additions and 12 deletions

View File

@ -1059,7 +1059,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
/* parsing ERP_IE */
p = rtw_get_ie(
ie + _BEACON_IE_OFFSET_,
_ERPINFO_IE_,
WLAN_EID_ERP_INFO,
&ie_len,
(pbss_network->IELength - _BEACON_IE_OFFSET_)
);
@ -1585,7 +1585,7 @@ static void update_bcn_erpinfo_ie(struct adapter *padapter)
/* parsing ERP_IE */
p = rtw_get_ie(
ie + _BEACON_IE_OFFSET_,
_ERPINFO_IE_,
WLAN_EID_ERP_INFO,
&len,
(pnetwork->IELength - _BEACON_IE_OFFSET_)
);
@ -1768,7 +1768,7 @@ void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
break;
case _ERPINFO_IE_:
case WLAN_EID_ERP_INFO:
update_bcn_erpinfo_ie(padapter);
@ -1964,7 +1964,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
if (pmlmepriv->num_sta_non_erp == 1) {
beacon_updated = true;
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
update_beacon(padapter, WLAN_EID_ERP_INFO, NULL, true);
}
}
} else {
@ -1975,7 +1975,7 @@ void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta)
if (pmlmepriv->num_sta_non_erp == 0) {
beacon_updated = true;
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
update_beacon(padapter, WLAN_EID_ERP_INFO, NULL, true);
}
}
}
@ -2086,7 +2086,7 @@ u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta)
pmlmepriv->num_sta_non_erp--;
if (pmlmepriv->num_sta_non_erp == 0) {
beacon_updated = true;
update_beacon(padapter, _ERPINFO_IE_, NULL, true);
update_beacon(padapter, WLAN_EID_ERP_INFO, NULL, true);
}
}

View File

@ -1705,7 +1705,7 @@ unsigned int OnAssocRsp(struct adapter *padapter, union recv_frame *precv_frame)
HT_info_handler(padapter, pIE);
break;
case _ERPINFO_IE_:
case WLAN_EID_ERP_INFO:
ERP_IE_handler(padapter, pIE);
break;
@ -2555,7 +2555,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
pframe = rtw_set_ie(pframe, WLAN_EID_IBSS_PARAMS, 2, (unsigned char *)(&ATIMWindow), &pattrib->pktlen);
/* ERP IE */
pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen);
pframe = rtw_set_ie(pframe, WLAN_EID_ERP_INFO, 1, &erpinfo, &pattrib->pktlen);
}
@ -2758,7 +2758,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
pframe = rtw_set_ie(pframe, WLAN_EID_IBSS_PARAMS, 2, (unsigned char *)(&ATIMWindow), &pattrib->pktlen);
/* ERP IE */
pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen);
pframe = rtw_set_ie(pframe, WLAN_EID_ERP_INFO, 1, &erpinfo, &pattrib->pktlen);
}

View File

@ -1479,7 +1479,7 @@ void update_beacon_info(struct adapter *padapter, u8 *pframe, uint pkt_len, stru
bwmode_update_check(padapter, pIE);
break;
case _ERPINFO_IE_:
case WLAN_EID_ERP_INFO:
ERP_IE_handler(padapter, pIE);
VCS_update(padapter, psta);
break;

View File

@ -1447,7 +1447,7 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)
case AUTO_VCS:
default:
perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len);
perp = rtw_get_ie(ie, WLAN_EID_ERP_INFO, &erp_len, ie_len);
if (!perp) {
pxmitpriv->vcs = NONE_VCS;
} else {

View File

@ -389,7 +389,6 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe)
#define _SUPPORTED_CH_IE_ 36
#define _CH_SWTICH_ANNOUNCE_ 37 /* Secondary Channel Offset */
#define _ERPINFO_IE_ 42
#define _EXT_SUPPORTEDRATES_IE_ 50
#define _FTIE_ 55