Przeglądaj źródła

Merge "qcacmn: Allocate additional 8 bytes for MIC in PMF case"

Linux Build Service Account 7 lat temu
rodzic
commit
594c179476
1 zmienionych plików z 8 dodań i 3 usunięć
  1. 8 3
      umac/cmn_services/crypto/src/wlan_crypto_ccmp.c

+ 8 - 3
umac/cmn_services/crypto/src/wlan_crypto_ccmp.c

@@ -58,9 +58,14 @@ static QDF_STATUS ccmp_encap(struct wlan_crypto_key *key,
 	if (encapdone) {
 		ivp = (uint8_t *)qdf_nbuf_data(wbuf);
 	} else {
-		ivp = (uint8_t *)qdf_nbuf_push_head(wbuf,
-							cipher_table->header);
-		qdf_mem_move(ivp, ivp + cipher_table->header, hdrlen);
+		uint8_t ivmic_len = cipher_table->header + cipher_table->miclen;
+		ivp = (uint8_t *)qdf_nbuf_push_head(wbuf, ivmic_len);
+		qdf_mem_move(ivp, ivp + ivmic_len, hdrlen);
+
+		qdf_mem_move(ivp + hdrlen + cipher_table->header,
+			ivp + hdrlen + ivmic_len,
+			(qdf_nbuf_len(wbuf) - hdrlen - ivmic_len));
+
 		ivp = (uint8_t *) qdf_nbuf_data(wbuf);
 	}