qcacld-3.0: Add NLMSG_HDRLEN for each nest
Currently while calculating skb length for usable channel list host doesn't consider space needed for each nla_nest_start. Hence sometime seeing failure in filling skb because less memory gets allocated. To address this issue, add NLMSG_HDRLEN size for each nest. Change-Id: If630a48bb30e491651c775f5ffdb957626fdbfd9 CRs-Fixed: 3877033
This commit is contained in:
parent
0c2a8ca0ca
commit
1e226d0968
@ -19568,7 +19568,13 @@ hdd_send_usable_channel(struct hdd_context *hdd_ctx,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
skb_len += NLMSG_HDRLEN;
|
||||
/**
|
||||
* As each nesting occupies NLMSG_HDRLEN size in the skb, add
|
||||
* NLMSG_HDRLEN worth space for each nesting.
|
||||
*/
|
||||
skb_len += NLMSG_HDRLEN * (count + 1);
|
||||
|
||||
|
||||
skb = wlan_cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, skb_len);
|
||||
if (!skb) {
|
||||
hdd_info("wlan_cfg80211_vendor_cmd_alloc_reply_skb failed");
|
||||
|
Loading…
Reference in New Issue
Block a user