qcacld-3.0: Fix regression in wlan_hdd_add_hostapd_conf_vsie api

Currently In wlan_hdd_add_hostapd_conf_vsie api after checking the
length of element, return is being done because of which it is skipping
the remaining elements.
To fix this issue, don't return after invalid length, instead process
the remaining elements.

Change-Id: I1b370bc30a4400aa4fd5fce5783741272c64386a
CRs-Fixed: 2087787
This commit is contained in:
Ashish Kumar Dhanotiya 2017-08-04 17:59:38 +05:30 • committed by Anjaneedevi Kapparapu
commit 20f09e4c84

View file

@ -6717,12 +6717,13 @@ static void wlan_hdd_add_hostapd_conf_vsie(hdd_adapter_t *pHostapdAdapter,
elem_id = ptr[0];
elem_len = ptr[1];
left -= 2;
if (elem_len > left || elem_len < WPS_OUI_TYPE_SIZE) {
if (elem_len > left) {
hdd_err("**Invalid IEs eid: %d elem_len: %d left: %d**",
elem_id, elem_len, left);
return;
}
if (IE_EID_VENDOR == elem_id) {
if (IE_EID_VENDOR == elem_id &&
(elem_len >= WPS_OUI_TYPE_SIZE)) {
/* skipping the VSIE's which we don't want to include or
* it will be included by existing code
*/