nl80211: Provide association frequency in EVENT_ASSOC when IBSS is joined

Saurav Babu saurav.babu at samsung.com
Fri Jul 1 05:06:17 PDT 2016


This patch provides association frequency in EVENT_ASSOC when IBSS is
joined so that wpa_s->assoc_freq can be updated when any IBSS network is
joined.

Signed-off-by: Saurav Babu <saurav.babu at samsung.com>
---
 src/drivers/driver_nl80211_event.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index 961a2e4..9b4db3e 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -916,6 +916,7 @@ static void mlme_event_join_ibss(struct wpa_driver_nl80211_data *drv,
 				 struct nlattr *tb[])
 {
 	unsigned int freq;
+	union wpa_event_data event;
 
 	if (tb[NL80211_ATTR_MAC] == NULL) {
 		wpa_printf(MSG_DEBUG, "nl80211: No address in IBSS joined "
@@ -934,8 +935,10 @@ static void mlme_event_join_ibss(struct wpa_driver_nl80211_data *drv,
 			   freq);
 		drv->first_bss->freq = freq;
 	}
+	os_memset(&event, 0, sizeof(event));
+	event.assoc_info.freq = freq;
 
-	wpa_supplicant_event(drv->ctx, EVENT_ASSOC, NULL);
+	wpa_supplicant_event(drv->ctx, EVENT_ASSOC, &event);
 }
 
 
-- 
1.9.1


More information about the Hostap mailing list