瀏覽代碼

qcacmn: Clear WMI cmd buffer after TX completion

WMI command buffer is not cleared after WMI command TX completion.
For DISA certification TK and GTK should not remain in the memory
area after disconnection. Since WMI command buffer is not cleared,
hence content of TK and GTK is still in host memory region.
Clear WMI cmd buffer after TX completion.

Propagation from qcacld-2.0 to qcacmn.

Change-Id: Ib09a77b630c932409645b7a989bd959f0ed4f514
CRs-Fixed: 1060982
Govind Singh 8 年之前
父節點
當前提交
0f785150ba
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      wmi/src/wmi_unified.c

+ 5 - 1
wmi/src/wmi_unified.c

@@ -2365,7 +2365,8 @@ void wmi_htc_tx_complete(void *ctx, HTC_PACKET *htc_pkt)
 {
 	struct wmi_unified *wmi_handle = (struct wmi_unified *)ctx;
 	wmi_buf_t wmi_cmd_buf = GET_HTC_PACKET_NET_BUF_CONTEXT(htc_pkt);
-
+	u_int8_t *buf_ptr;
+	u_int32_t len;
 #ifdef WMI_INTERFACE_EVENT_LOGGING
 	uint32_t cmd_id;
 #endif
@@ -2392,6 +2393,9 @@ void wmi_htc_tx_complete(void *ctx, HTC_PACKET *htc_pkt)
 	qdf_spin_unlock_bh(&wmi_handle->log_info.wmi_record_lock);
 	}
 #endif
+	buf_ptr = (u_int8_t *) wmi_buf_data(wmi_cmd_buf);
+	len = qdf_nbuf_len(wmi_cmd_buf);
+	qdf_mem_zero(buf_ptr, len);
 	qdf_nbuf_free(wmi_cmd_buf);
 	qdf_mem_free(htc_pkt);
 	qdf_atomic_dec(&wmi_handle->pending_cmds);