From 37148c7604ddab60af67e01dac1f1c6597385a41 Mon Sep 17 00:00:00 2001 From: Srinivas Dasari Date: Mon, 30 Mar 2020 20:23:48 +0530 Subject: [PATCH] qcacld-3.0: Print the remaining length when nla_put fails nla_put fails when there is no sufficient buffer to put the beacon IEs. Enhance the log to print available buffer length and the beacon IEs length. Change-Id: If6e37455f6fbe795b293f626ad9cbb24a9effcd0 CRs-Fixed: 2629807 --- core/hdd/src/wlan_hdd_station_info.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/hdd/src/wlan_hdd_station_info.c b/core/hdd/src/wlan_hdd_station_info.c index c316673abf10..f6b6a492e25a 100644 --- a/core/hdd/src/wlan_hdd_station_info.c +++ b/core/hdd/src/wlan_hdd_station_info.c @@ -693,11 +693,11 @@ static int hdd_get_station_info(struct hdd_context *hdd_ctx, if (ie_len) { if (nla_put(skb, BEACON_IES, ie_len, ies)) { - hdd_err("Failed to put beacon IEs"); + hdd_err("Failed to put beacon IEs: bytes left: %d, ie_len: %u total buf_len: %u", + skb_tailroom(skb), ie_len, nl_buf_len); goto fail; } qdf_mem_free(ies); - ie_len = 0; } return cfg80211_vendor_cmd_reply(skb); @@ -705,7 +705,6 @@ fail: if (skb) kfree_skb(skb); qdf_mem_free(ies); - ie_len = 0; return -EINVAL; }