From 82ea32676ca73b5fee0db79eb3bebd079aba00ca Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Fri, 2 Sep 2016 15:24:25 +0530 Subject: [PATCH] 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 --- wmi_unified.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wmi_unified.c b/wmi_unified.c index ee5f922b30..84df2507e7 100644 --- a/wmi_unified.c +++ b/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);