Commit 42282f41 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: Only validate vendor specific ies, when they it is vendor specific

Don't run rtw_validate_vendor_specific_ies() on anything but
WLAN_EID_VENDOR_SPECIFIC. In addition use the proper
WLAN_OUI_TYPE_MICROSOFT_* definitions.
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 98f979f1
...@@ -1204,11 +1204,11 @@ static int rtw_validate_vendor_specific_ies(const u8 *pos, int elen) ...@@ -1204,11 +1204,11 @@ static int rtw_validate_vendor_specific_ies(const u8 *pos, int elen)
/* Microsoft/Wi-Fi information elements are further typed and /* Microsoft/Wi-Fi information elements are further typed and
* subtyped */ * subtyped */
switch (pos[3]) { switch (pos[3]) {
case 1: case WLAN_OUI_TYPE_MICROSOFT_WPA:
/* Microsoft OUI (00:50:F2) with OUI Type 1: /* Microsoft OUI (00:50:F2) with OUI Type 1:
* real WPA information element */ * real WPA information element */
break; break;
case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */ case WLAN_OUI_TYPE_MICROSOFT_WMM:
if (elen < 5) { if (elen < 5) {
DBG_8723A("short WME information element " DBG_8723A("short WME information element "
"ignored (len =%i)\n", elen); "ignored (len =%i)\n", elen);
...@@ -1227,7 +1227,7 @@ static int rtw_validate_vendor_specific_ies(const u8 *pos, int elen) ...@@ -1227,7 +1227,7 @@ static int rtw_validate_vendor_specific_ies(const u8 *pos, int elen)
return -EINVAL; return -EINVAL;
} }
break; break;
case 4: case WLAN_OUI_TYPE_MICROSOFT_WPS:
/* Wi-Fi Protected Setup (WPS) IE */ /* Wi-Fi Protected Setup (WPS) IE */
break; break;
default: default:
...@@ -1289,6 +1289,7 @@ static int rtw_validate_frame_ies(const u8 *start, uint len) ...@@ -1289,6 +1289,7 @@ static int rtw_validate_frame_ies(const u8 *start, uint len)
case WLAN_EID_CHALLENGE: case WLAN_EID_CHALLENGE:
case WLAN_EID_ERP_INFO: case WLAN_EID_ERP_INFO:
case WLAN_EID_EXT_SUPP_RATES: case WLAN_EID_EXT_SUPP_RATES:
break;
case WLAN_EID_VENDOR_SPECIFIC: case WLAN_EID_VENDOR_SPECIFIC:
if (rtw_validate_vendor_specific_ies(pos, elen)) if (rtw_validate_vendor_specific_ies(pos, elen))
unknown++; unknown++;
......
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