瀏覽代碼

qcacmn: Initialize spectral samp message with zero

Initialize the spectral samp message structure to zero.

CRs-Fixed: 2278403
Change-Id: I5d36662db32820c40f7fb2eafb56942d8654e7f6
Edayilliam Jayadev 6 年之前
父節點
當前提交
b3911b4c48
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      os_if/linux/spectral/src/os_if_spectral_netlink.c

+ 3 - 1
os_if/linux/spectral/src/os_if_spectral_netlink.c

@@ -251,7 +251,7 @@ os_if_spectral_prep_skb(struct wlan_objmgr_pdev *pdev)
 	qdf_nbuf_put_tail(ps->skb, MAX_SPECTRAL_PAYLOAD);
 	spectral_nlh = (struct nlmsghdr *)ps->skb->data;
 
-	OS_MEMZERO(spectral_nlh, sizeof(*spectral_nlh));
+	qdf_mem_zero(spectral_nlh, sizeof(*spectral_nlh));
 
 	/*
 	 * Possible bug that size of  struct spectral_samp_msg and
@@ -263,6 +263,8 @@ os_if_spectral_prep_skb(struct wlan_objmgr_pdev *pdev)
 	spectral_nlh->nlmsg_flags = 0;
 	spectral_nlh->nlmsg_type = WLAN_NL_MSG_SPECTRAL_SCAN;
 
+	qdf_mem_zero(NLMSG_DATA(spectral_nlh),
+		     sizeof(struct spectral_samp_msg));
 	return NLMSG_DATA(spectral_nlh);
 }