summaryrefslogtreecommitdiff
path: root/CORE/SVC/src
diff options
context:
space:
mode:
authorPadma, Santhosh Kumar <skpadma@qti.qualcomm.com>2016-03-10 17:36:55 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-22 18:14:48 +0530
commitde75c67fece17ecd52ca3fdddc9c151667e15f70 (patch)
treee84bdcda0088f6e1b2630d20dbb2b36aa38937d1 /CORE/SVC/src
parenteed1af142bce722e20d202f272df574ac55fda22 (diff)
Revert "qcacld-2.0: Send proper length in netlink message."
prima to qcacld-2.0 propagation This reverts change-id I69867f20dcf2a74bf4e630f957e0dc86f7c9ae54. Extra nlmsghdr length is added to payload length as this length is already taken care in NLMSG_SPACE before allocation of skb. This can cause incorrect decoding in user space. Fix them by removing extra nlmsghdr length. Change-Id: I719151aee125f256d6e3ddec2936c4837d15333f CRs-Fixed: 985608
Diffstat (limited to 'CORE/SVC/src')
-rw-r--r--CORE/SVC/src/logging/wlan_logging_sock_svc.c6
-rw-r--r--CORE/SVC/src/ptt/wlan_ptt_sock_svc.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
index 4123d6fcce3b..df4c0463d138 100644
--- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c
+++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
@@ -198,8 +198,7 @@ static int wlan_send_sock_msg_to_app(tAniHdr *wmsg, int radio,
return -EINVAL;
}
- payload_len = wmsg_length + sizeof(wnl->radio) +
- sizeof(struct nlmsghdr);
+ payload_len = wmsg_length + sizeof(wnl->radio);
tot_msg_len = NLMSG_SPACE(payload_len);
skb = dev_alloc_skb(tot_msg_len);
if (skb == NULL) {
@@ -618,8 +617,7 @@ static int send_filled_buffers_to_user(void)
spin_unlock_irqrestore(&gwlan_logging.spin_lock, flags);
/* 4 extra bytes for the radio idx */
payload_len = plog_msg->filled_length +
- sizeof(wnl->radio) + sizeof(tAniHdr) +
- sizeof(struct nlmsghdr);
+ sizeof(wnl->radio) + sizeof(tAniHdr);
tot_msg_len = NLMSG_SPACE(payload_len);
nlh = nlmsg_put(skb, 0, nlmsg_seq++,
diff --git a/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c b/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c
index ce8dbed37eea..b51fa3e16e5a 100644
--- a/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c
+++ b/CORE/SVC/src/ptt/wlan_ptt_sock_svc.c
@@ -80,8 +80,7 @@ int ptt_sock_send_msg_to_app(tAniHdr *wmsg, int radio, int src_mod, int pid)
__func__, radio);
return -EINVAL;
}
- /* 4 extra bytes for the radio idx */
- payload_len = wmsg_length + 4 + sizeof(struct nlmsghdr);
+ payload_len = wmsg_length + 4; // 4 extra bytes for the radio idx
tot_msg_len = NLMSG_SPACE(payload_len);
if ((skb = dev_alloc_skb(tot_msg_len)) == NULL) {
PTT_TRACE(VOS_TRACE_LEVEL_ERROR, "%s: dev_alloc_skb() failed for msg size[%d]\n",