From bd51246924795b01b7e8d835df0b2137e989d8a2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 2 Dec 2018 19:50:59 +0200 Subject: [PATCH] nl80211: Debug print TX queue parameter values and result Some mac80211_hwsim test cases have failed with mysterious sequence where mac80211 has claimed the parameters are invalid ("wlan3: invalid CW_min/CW_max: 9484/40"). Those values look strange since they are not from hostapd configuration or default values.. hostapd is seeing TX queue parameter set failing for queues 0, 1, and 3 (but not 2) for these cases. Add debug prints to hostapd to get more details on what exactly is happening if such error cases can be reproduced. Signed-off-by: Jouni Malinen --- src/drivers/driver_nl80211.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index c808b64aa..871a5d0b4 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -6297,6 +6297,7 @@ static int i802_set_tx_queue_params(void *priv, int queue, int aifs, struct wpa_driver_nl80211_data *drv = bss->drv; struct nl_msg *msg; struct nlattr *txq, *params; + int res; msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_WIPHY); if (!msg) @@ -6342,7 +6343,11 @@ static int i802_set_tx_queue_params(void *priv, int queue, int aifs, nla_nest_end(msg, txq); - if (send_and_recv_msgs(drv, msg, NULL, NULL) == 0) + res = send_and_recv_msgs(drv, msg, NULL, NULL); + wpa_printf(MSG_DEBUG, + "nl80211: TX queue param set: queue=%d aifs=%d cw_min=%d cw_max=%d burst_time=%d --> res=%d", + queue, aifs, cw_min, cw_max, burst_time, res); + if (res == 0) return 0; msg = NULL; fail: