summaryrefslogtreecommitdiff
path: root/core/utils
diff options
context:
space:
mode:
authorPadma, Santhosh Kumar <skpadma@codeaurora.org>2016-08-09 17:00:13 +0530
committerNishank Aggarwal <naggar@codeaurora.org>2016-09-16 21:06:36 +0530
commiteb0191f5747987402a192188fae7c7c2fd7fba04 (patch)
tree8ee460f13bab08dc3c80c6637d8252d3b6f250d0 /core/utils
parentfaaa7bd8e2765fe5796d5500969ccde4eed7c326 (diff)
qcacld-3.0: Add proper lengths to payload
qcacld-2.0 to qcacld-3.0 propagation Currently, sizeof(tAniHdr) is not added to payload length in messages in wlan_send_sock_msg_to_app, ptt_sock_send_msg_to_app. These missing lengths can cause user space to drop these messages. Fix this by adding appropriate lengths. Change-Id: I2609029445110e661440a7fc55f36801e4f72afc CRs-Fixed: 985614
Diffstat (limited to 'core/utils')
-rw-r--r--core/utils/logging/src/wlan_logging_sock_svc.c2
-rw-r--r--core/utils/ptt/src/wlan_ptt_sock_svc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c
index 61cded5a3e5f..972a97867167 100644
--- a/core/utils/logging/src/wlan_logging_sock_svc.c
+++ b/core/utils/logging/src/wlan_logging_sock_svc.c
@@ -125,7 +125,7 @@ static int wlan_send_sock_msg_to_app(tAniHdr *wmsg, int radio,
return -EINVAL;
}
- payload_len = wmsg_length + sizeof(wnl->radio);
+ payload_len = wmsg_length + sizeof(wnl->radio) + sizeof(*wmsg);
tot_msg_len = NLMSG_SPACE(payload_len);
skb = dev_alloc_skb(tot_msg_len);
if (skb == NULL) {
diff --git a/core/utils/ptt/src/wlan_ptt_sock_svc.c b/core/utils/ptt/src/wlan_ptt_sock_svc.c
index 3370ad22758c..4efb50ffbc47 100644
--- a/core/utils/ptt/src/wlan_ptt_sock_svc.c
+++ b/core/utils/ptt/src/wlan_ptt_sock_svc.c
@@ -94,7 +94,7 @@ int ptt_sock_send_msg_to_app(tAniHdr *wmsg, int radio, int src_mod, int pid)
__func__, radio);
return -EINVAL;
}
- payload_len = wmsg_length + 4; /* 4 extra bytes for the radio idx */
+ payload_len = wmsg_length + sizeof(wnl->radio) + sizeof(*wmsg);
tot_msg_len = NLMSG_SPACE(payload_len);
skb = dev_alloc_skb(tot_msg_len);
if (skb == NULL) {