qcacmn: Handle multiple keyix cases for WEP

Add a check to see if the key index is more than 4.
Assign default key_id of 0 if an invalid index is provided.

Change-Id: Ic3a4230360f1fa4e05dfd3ba4f558ff0fb074aef
CRs-fixed: 1103920
diff --git a/wmi_unified_tlv.c b/wmi_unified_tlv.c
index d42183b..a652113 100644
--- a/wmi_unified_tlv.c
+++ b/wmi_unified_tlv.c
@@ -4152,6 +4152,10 @@
 			       (wmi_vdev_install_key_cmd_fixed_param));
 	cmd->vdev_id = key_params->vdev_id;
 	cmd->key_ix = key_params->key_idx;
+
+	if (key_params->key_idx >= (IEEE80211_WEP_NKID + 1))
+		cmd->key_ix = 0;
+
 	WMI_CHAR_ARRAY_TO_MAC_ADDR(key_params->peer_mac, &cmd->peer_macaddr);
 	cmd->key_flags |= key_params->key_flags;
 	cmd->key_cipher = key_params->key_cipher;