qcacmn: Fix return type of auth type and akm
Currently api osif_nl_to_crypto_auth_type is trying to convert the nl specific auth types to driver specific auth types but it does not return the correct value, this api always returns auth type as none as it never updates the return value after the initialization. While parsing WPA and WAPI, open authmode and cipher and akm are set as none by default. Thus return converted value of the auth type. Also fix the return type of the akm conversion. Also avoid setting open authmode and cipher and akm as none while parsing WPA and WAPI ie. Change-Id: I260e58a28ddbf6b20a290488e205586a624c9b46 CRs-Fixed: 2725323
Tento commit je obsažen v:

odevzdal
nshrivas

rodič
1fe461c320
revize
eba983ed1e
@@ -2517,7 +2517,6 @@ QDF_STATUS wlan_crypto_wpaie_check(struct wlan_crypto_params *crypto_params,
|
||||
* version, mcast cipher, and 2 selector counts.
|
||||
* Other, variable-length data, must be checked separately.
|
||||
*/
|
||||
RESET_AUTHMODE(crypto_params);
|
||||
SET_AUTHMODE(crypto_params, WLAN_CRYPTO_AUTH_WPA);
|
||||
|
||||
if (len < 14)
|
||||
@@ -2532,7 +2531,6 @@ QDF_STATUS wlan_crypto_wpaie_check(struct wlan_crypto_params *crypto_params,
|
||||
frm += 2, len -= 2;
|
||||
|
||||
/* multicast/group cipher */
|
||||
RESET_MCAST_CIPHERS(crypto_params);
|
||||
w = wlan_crypto_wpa_suite_to_cipher(frm);
|
||||
if (w < 0)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
@@ -2545,7 +2543,6 @@ QDF_STATUS wlan_crypto_wpaie_check(struct wlan_crypto_params *crypto_params,
|
||||
if (len < n*4+2)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
RESET_UCAST_CIPHERS(crypto_params);
|
||||
for (; n > 0; n--) {
|
||||
w = wlan_crypto_wpa_suite_to_cipher(frm);
|
||||
if (w < 0)
|
||||
@@ -2564,7 +2561,6 @@ QDF_STATUS wlan_crypto_wpaie_check(struct wlan_crypto_params *crypto_params,
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
w = 0;
|
||||
RESET_KEY_MGMT(crypto_params);
|
||||
for (; n > 0; n--) {
|
||||
w = wlan_crypto_wpa_suite_to_keymgmt(frm);
|
||||
if (w < 0)
|
||||
@@ -3136,7 +3132,6 @@ QDF_STATUS wlan_crypto_wapiie_check(struct wlan_crypto_params *crypto_params,
|
||||
* version, mcast cipher, and 2 selector counts.
|
||||
* Other, variable-length data, must be checked separately.
|
||||
*/
|
||||
RESET_AUTHMODE(crypto_params);
|
||||
SET_AUTHMODE(crypto_params, WLAN_CRYPTO_AUTH_WAPI);
|
||||
|
||||
if (len < WLAN_CRYPTO_WAPI_IE_LEN)
|
||||
@@ -3155,7 +3150,6 @@ QDF_STATUS wlan_crypto_wapiie_check(struct wlan_crypto_params *crypto_params,
|
||||
if (len < n*4+2)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
RESET_KEY_MGMT(crypto_params);
|
||||
for (; n > 0; n--) {
|
||||
w = wlan_crypto_wapi_keymgmt(frm);
|
||||
if (w < 0)
|
||||
@@ -3171,7 +3165,6 @@ QDF_STATUS wlan_crypto_wapiie_check(struct wlan_crypto_params *crypto_params,
|
||||
if (len < n*4+2)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
RESET_UCAST_CIPHERS(crypto_params);
|
||||
for (; n > 0; n--) {
|
||||
w = wlan_crypto_wapi_suite_to_cipher(frm);
|
||||
if (w < 0)
|
||||
@@ -3184,7 +3177,6 @@ QDF_STATUS wlan_crypto_wapiie_check(struct wlan_crypto_params *crypto_params,
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
/* multicast/group cipher */
|
||||
RESET_MCAST_CIPHERS(crypto_params);
|
||||
w = wlan_crypto_wapi_suite_to_cipher(frm);
|
||||
|
||||
if (w < 0)
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele