Browse Source

qcacld-3.0: Propagate key sequence counter to SME

Currently the key sequence counter received from userspace is not
propagated to SME, so add logic to propagate it.

Change-Id: I5371700003744eb967c578c44e4d130628efcdc8
CRs-Fixed: 2129237
Jeff Johnson 7 years ago
parent
commit
b05f4fdbf9
1 changed files with 9 additions and 1 deletions
  1. 9 1
      core/hdd/src/wlan_hdd_cfg80211.c

+ 9 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -14083,13 +14083,21 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	hdd_debug("called with key index = %d & key length %d", key_index, params->key_len);
+	if (CSR_MAX_RSC_LEN < params->seq_len) {
+		hdd_err("Invalid seq length %d", params->seq_len);
+
+		return -EINVAL;
+	}
+
+	hdd_debug("key index %d, key length %d, seq length %d",
+		  key_index, params->key_len, params->seq_len);
 
 	/*extract key idx, key len and key */
 	qdf_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
 	setKey.keyId = key_index;
 	setKey.keyLength = params->key_len;
 	qdf_mem_copy(&setKey.Key[0], params->key, params->key_len);
+	qdf_mem_copy(&setKey.keyRsc[0], params->seq, params->seq_len);
 
 	switch (params->cipher) {
 	case WLAN_CIPHER_SUITE_WEP40: