|
@@ -2693,11 +2693,11 @@ int hdd_softap_unpack_ie(tHalHandle halHandle,
|
|
|
bool *pMFPRequired,
|
|
|
uint16_t gen_ie_len, uint8_t *gen_ie)
|
|
|
{
|
|
|
- tDot11fIERSN dot11RSNIE = {0};
|
|
|
- tDot11fIEWPA dot11WPAIE = {0};
|
|
|
-
|
|
|
+ uint32_t ret;
|
|
|
uint8_t *pRsnIe;
|
|
|
uint16_t RSNIeLen;
|
|
|
+ tDot11fIERSN dot11RSNIE = {0};
|
|
|
+ tDot11fIEWPA dot11WPAIE = {0};
|
|
|
|
|
|
if (NULL == halHandle) {
|
|
|
hdd_err("Error haHandle returned NULL");
|
|
@@ -2720,8 +2720,12 @@ int hdd_softap_unpack_ie(tHalHandle halHandle,
|
|
|
RSNIeLen = gen_ie_len - 2;
|
|
|
/* Unpack the RSN IE */
|
|
|
memset(&dot11RSNIE, 0, sizeof(tDot11fIERSN));
|
|
|
- sme_unpack_rsn_ie(halHandle, pRsnIe, RSNIeLen,
|
|
|
- &dot11RSNIE, false);
|
|
|
+ ret = sme_unpack_rsn_ie(halHandle, pRsnIe, RSNIeLen,
|
|
|
+ &dot11RSNIE, false);
|
|
|
+ if (DOT11F_FAILED(ret)) {
|
|
|
+ hdd_err("unpack failed, ret: 0x%x", ret);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
/* Copy out the encryption and authentication types */
|
|
|
hdd_debug("pairwise cipher suite count: %d",
|
|
|
dot11RSNIE.pwise_cipher_suite_count);
|
|
@@ -2757,8 +2761,12 @@ int hdd_softap_unpack_ie(tHalHandle halHandle,
|
|
|
RSNIeLen = gen_ie_len - (2 + 4);
|
|
|
/* Unpack the WPA IE */
|
|
|
memset(&dot11WPAIE, 0, sizeof(tDot11fIEWPA));
|
|
|
- dot11f_unpack_ie_wpa((tpAniSirGlobal) halHandle,
|
|
|
+ ret = dot11f_unpack_ie_wpa((tpAniSirGlobal) halHandle,
|
|
|
pRsnIe, RSNIeLen, &dot11WPAIE, false);
|
|
|
+ if (DOT11F_FAILED(ret)) {
|
|
|
+ hdd_err("unpack failed, ret: 0x%x", ret);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
/* Copy out the encryption and authentication types */
|
|
|
hdd_debug("WPA unicast cipher suite count: %d",
|
|
|
dot11WPAIE.unicast_cipher_count);
|
|
@@ -6526,19 +6534,24 @@ static bool wlan_hdd_rate_is_11g(u8 rate)
|
|
|
*/
|
|
|
static bool wlan_hdd_get_sap_obss(struct hdd_adapter *adapter)
|
|
|
{
|
|
|
+ uint32_t ret;
|
|
|
+ const uint8_t *ie = NULL;
|
|
|
uint8_t ht_cap_ie[DOT11F_IE_HTCAPS_MAX_LEN];
|
|
|
tDot11fIEHTCaps dot11_ht_cap_ie = {0};
|
|
|
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
struct hdd_beacon_data *beacon = adapter->session.ap.beacon;
|
|
|
- const uint8_t *ie = NULL;
|
|
|
|
|
|
ie = wlan_get_ie_ptr_from_eid(WLAN_EID_HT_CAPABILITY,
|
|
|
beacon->tail, beacon->tail_len);
|
|
|
if (ie && ie[1]) {
|
|
|
qdf_mem_copy(ht_cap_ie, &ie[2], DOT11F_IE_HTCAPS_MAX_LEN);
|
|
|
- dot11f_unpack_ie_ht_caps((tpAniSirGlobal)hdd_ctx->hHal,
|
|
|
- ht_cap_ie, ie[1], &dot11_ht_cap_ie,
|
|
|
- false);
|
|
|
+ ret = dot11f_unpack_ie_ht_caps((tpAniSirGlobal)hdd_ctx->hHal,
|
|
|
+ ht_cap_ie, ie[1],
|
|
|
+ &dot11_ht_cap_ie, false);
|
|
|
+ if (DOT11F_FAILED(ret)) {
|
|
|
+ hdd_err("unpack failed, ret: 0x%x", ret);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
return dot11_ht_cap_ie.supportedChannelWidthSet;
|
|
|
}
|
|
|
|