소스 검색

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);
 	qdf_nbuf_put_tail(ps->skb, MAX_SPECTRAL_PAYLOAD);
 	spectral_nlh = (struct nlmsghdr *)ps->skb->data;
 	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
 	 * 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_flags = 0;
 	spectral_nlh->nlmsg_type = WLAN_NL_MSG_SPECTRAL_SCAN;
 	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);
 	return NLMSG_DATA(spectral_nlh);
 }
 }