From: Jouni Malinen Date: Fri, 19 Mar 2021 22:15:53 +0000 (+0200) Subject: nl80211: Debug print error from airtime weight configuration X-Git-Tag: hostap_2_10~373 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f778914963ce3f50213a901359ea2686b51f598;p=thirdparty%2Fhostap.git nl80211: Debug print error from airtime weight configuration It is better to be able to determine whether the airtime weight configuration for a STA actually was accepted by the driver or not. Signed-off-by: Jouni Malinen --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 35526fc2f..e7a28cae2 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -5789,6 +5789,7 @@ static int driver_nl80211_sta_set_airtime_weight(void *priv, const u8 *addr, { struct i802_bss *bss = priv; struct nl_msg *msg; + int ret; wpa_printf(MSG_DEBUG, "nl80211: Set STA airtime weight - ifname=%s addr=" MACSTR @@ -5799,7 +5800,13 @@ static int driver_nl80211_sta_set_airtime_weight(void *priv, const u8 *addr, nla_put_u16(msg, NL80211_ATTR_AIRTIME_WEIGHT, weight)) goto fail; - return send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL); + ret = send_and_recv_msgs(bss->drv, msg, NULL, NULL, NULL, NULL); + if (ret) { + wpa_printf(MSG_DEBUG, + "nl80211: SET_STATION[AIRTIME_WEIGHT] failed: ret=%d (%s)", + ret, strerror(-ret)); + } + return ret; fail: nlmsg_free(msg); return -ENOBUFS;