|
@@ -542,6 +542,13 @@ QDF_STATUS wlan_crypto_getkey(struct wlan_objmgr_vdev *vdev,
|
|
|
struct wlan_objmgr_psoc *psoc;
|
|
|
uint8_t macaddr[WLAN_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
|
|
|
|
|
+ if ((req_key->keyix != WLAN_CRYPTO_KEYIX_NONE) &&
|
|
|
+ (req_key->keyix >= WLAN_CRYPTO_MAXKEYIDX)) {
|
|
|
+ qdf_print("%s[%d] invalid keyix %d\n", __func__, __LINE__,
|
|
|
+ req_key->keyix);
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
wlan_vdev_obj_lock(vdev);
|
|
|
qdf_mem_copy(macaddr, wlan_vdev_mlme_get_macaddr(vdev), WLAN_ALEN);
|
|
|
psoc = wlan_vdev_get_psoc(vdev);
|