1 From 507b06d0622480f8026d49a94f86068bb0fd6ed6 Mon Sep 17 00:00:00 2001
2 From: Dan Williams <dcbw@redhat.com>
3 Date: Tue, 3 Jun 2008 23:39:55 -0400
4 Subject: mac80211: send association event on IBSS create
6 From: Dan Williams <dcbw@redhat.com>
8 patch 507b06d0622480f8026d49a94f86068bb0fd6ed6 upstream
10 Otherwise userspace has no idea the IBSS creation succeeded.
12 Signed-off-by: Dan Williams <dcbw@redhat.com>
13 Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 net/mac80211/ieee80211_sta.c | 5 +++++
18 1 file changed, 5 insertions(+)
20 --- a/net/mac80211/ieee80211_sta.c
21 +++ b/net/mac80211/ieee80211_sta.c
22 @@ -2723,6 +2723,7 @@ static int ieee80211_sta_join_ibss(struc
23 struct rate_selection ratesel;
25 struct ieee80211_sub_if_data *sdata;
26 + union iwreq_data wrqu;
28 /* Remove possible STA entries from other IBSS networks. */
29 sta_info_flush(local, NULL);
30 @@ -2863,6 +2864,10 @@ static int ieee80211_sta_join_ibss(struc
32 ieee80211_rx_bss_put(dev, bss);
34 + memset(&wrqu, 0, sizeof(wrqu));
35 + memcpy(wrqu.ap_addr.sa_data, bss->bssid, ETH_ALEN);
36 + wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);