Commit 4bf954b2 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: rtw_update_protection23a(): Use cfg80211_find_ie()

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e0facfa9
...@@ -1319,11 +1319,10 @@ s32 rtw_put_snap23a(u8 *data, u16 h_proto) ...@@ -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) void rtw_update_protection23a(struct rtw_adapter *padapter, u8 *ie, uint ie_len)
{ {
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct registry_priv *pregistrypriv = &padapter->registrypriv; struct registry_priv *pregistrypriv = &padapter->registrypriv;
uint protection; uint protection;
u8 *perp; const u8 *p;
int erp_len;
switch (pxmitpriv->vcs_setting) { switch (pxmitpriv->vcs_setting) {
case DISABLE_VCS: case DISABLE_VCS:
...@@ -1333,11 +1332,11 @@ void rtw_update_protection23a(struct rtw_adapter *padapter, u8 *ie, uint ie_len) ...@@ -1333,11 +1332,11 @@ void rtw_update_protection23a(struct rtw_adapter *padapter, u8 *ie, uint ie_len)
break; break;
case AUTO_VCS: case AUTO_VCS:
default: default:
perp = rtw_get_ie23a(ie, WLAN_EID_ERP_INFO, &erp_len, ie_len); p = cfg80211_find_ie(WLAN_EID_ERP_INFO, ie, ie_len);
if (perp == NULL) { if (!p)
pxmitpriv->vcs = NONE_VCS; pxmitpriv->vcs = NONE_VCS;
} else { else {
protection = (*(perp + 2)) & BIT(1); protection = (*(p + 2)) & BIT(1);
if (protection) { if (protection) {
if (pregistrypriv->vcs_type == RTS_CTS) if (pregistrypriv->vcs_type == RTS_CTS)
pxmitpriv->vcs = RTS_CTS; pxmitpriv->vcs = RTS_CTS;
......
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