From: Jouni Malinen Date: Thu, 26 Nov 2015 15:47:36 +0000 (+0200) Subject: nl80211: Fix SIGNAL_POLL in IBSS and mesh X-Git-Tag: hostap_2_6~1335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d6955e668a4f58af79727a0d774d6819c51d8c5;p=thirdparty%2Fhostap.git nl80211: Fix SIGNAL_POLL in IBSS and mesh NL80211_CMD_GET_STATION does not work with the IBSS/mesh BSSID, so clear the signal strength instead of returning failure when SIGNAL_POLL is used in an IBSS/mesh. Signed-off-by: Jouni Malinen --- diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 43dd0b165..f24bdba5a 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -6560,8 +6560,12 @@ static int nl80211_signal_poll(void *priv, struct wpa_signal_info *si) os_memset(si, 0, sizeof(*si)); res = nl80211_get_link_signal(drv, si); - if (res != 0) - return res; + if (res) { + if (drv->nlmode != NL80211_IFTYPE_ADHOC && + drv->nlmode != NL80211_IFTYPE_MESH_POINT) + return res; + si->current_signal = 0; + } res = nl80211_get_channel_width(drv, si); if (res != 0)