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
This commit is contained in:
Srinivas Dasari
2020-03-30 20:23:48 +05:30
committed by nshrivas
parent 3381f78f92
commit 37148c7604

View File

@@ -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;
}