]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mac80211: send association event on IBSS create
authorDan Williams <dcbw@redhat.com>
Wed, 4 Jun 2008 03:39:55 +0000 (23:39 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 16 Jun 2008 20:20:07 +0000 (13:20 -0700)
patch 507b06d0622480f8026d49a94f86068bb0fd6ed6 upstream

Otherwise userspace has no idea the IBSS creation succeeded.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/mac80211/ieee80211_sta.c

index c1706855460a294d3e8507a2483ec7874c8fd173..7d5c2631caf38a8772d2982f6dc2279c2d11e7a9 100644 (file)
@@ -2723,6 +2723,7 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
        struct rate_selection ratesel;
        u8 *pos;
        struct ieee80211_sub_if_data *sdata;
+       union iwreq_data wrqu;
 
        /* Remove possible STA entries from other IBSS networks. */
        sta_info_flush(local, NULL);
@@ -2863,6 +2864,10 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
 
        ieee80211_rx_bss_put(dev, bss);
 
+       memset(&wrqu, 0, sizeof(wrqu));
+       memcpy(wrqu.ap_addr.sa_data, bss->bssid, ETH_ALEN);
+       wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
+
        return res;
 }