qcacmn: Change keyix in wlan_crypto_getkey for athkey tool

wlan_crypto_getkey only gets key data for default index.
Athkey get with idx 0 retrieves default key else, it will
retrieve custom key data.

Change-Id: I3d1d412f7f024b4ed40590be9b74c6a7fcec0303
This commit is contained in:
Nandha Kishore Easwaran 2017-06-22 13:51:03 +05:30 • committed by snandini
commit f6ddc0cd3e

View file

@ -561,7 +561,10 @@ QDF_STATUS wlan_crypto_getkey(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_INVAL;
}
key = crypto_priv->key[crypto_priv->def_tx_keyid];
if (req_key->keyix == WLAN_CRYPTO_KEYIX_NONE)
key = crypto_priv->key[crypto_priv->def_tx_keyid];
else
key = crypto_priv->key[req_key->keyix];
if (!key)
return QDF_STATUS_E_INVAL;
} else {
@ -585,7 +588,10 @@ QDF_STATUS wlan_crypto_getkey(struct wlan_objmgr_vdev *vdev,
return QDF_STATUS_E_INVAL;
}
key = crypto_priv->key[crypto_priv->def_tx_keyid];
if (req_key->keyix == WLAN_CRYPTO_KEYIX_NONE)
key = crypto_priv->key[crypto_priv->def_tx_keyid];
else
key = crypto_priv->key[req_key->keyix];
if (!key)
return QDF_STATUS_E_INVAL;
}