mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 06:36:44 +07:00
staging: rtl8723au: rtw_update_protection23a(): Use cfg80211_find_ie()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e0facfa97c
commit
4bf954b2f9
@ -1319,11 +1319,10 @@ s32 rtw_put_snap23a(u8 *data, u16 h_proto)
|
||||
|
||||
void rtw_update_protection23a(struct rtw_adapter *padapter, u8 *ie, uint ie_len)
|
||||
{
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
uint protection;
|
||||
u8 *perp;
|
||||
int erp_len;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
uint protection;
|
||||
const u8 *p;
|
||||
|
||||
switch (pxmitpriv->vcs_setting) {
|
||||
case DISABLE_VCS:
|
||||
@ -1333,11 +1332,11 @@ void rtw_update_protection23a(struct rtw_adapter *padapter, u8 *ie, uint ie_len)
|
||||
break;
|
||||
case AUTO_VCS:
|
||||
default:
|
||||
perp = rtw_get_ie23a(ie, WLAN_EID_ERP_INFO, &erp_len, ie_len);
|
||||
if (perp == NULL) {
|
||||
p = cfg80211_find_ie(WLAN_EID_ERP_INFO, ie, ie_len);
|
||||
if (!p)
|
||||
pxmitpriv->vcs = NONE_VCS;
|
||||
} else {
|
||||
protection = (*(perp + 2)) & BIT(1);
|
||||
else {
|
||||
protection = (*(p + 2)) & BIT(1);
|
||||
if (protection) {
|
||||
if (pregistrypriv->vcs_type == RTS_CTS)
|
||||
pxmitpriv->vcs = RTS_CTS;
|
||||
|
Loading…
Reference in New Issue
Block a user