[PATCH] softmac: report when scanning has finished
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 13 Apr 2006 09:41:28 +0000 (11:41 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 19 Apr 2006 21:25:40 +0000 (17:25 -0400)
Make softmac report a scan event when scanning has finished, that way
userspace can wait for the event to happen instead of polling for the
results.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/ieee80211/softmac/ieee80211softmac_event.c

index 5bdd5edd432c1e2c876e6d0688d114e022a52cc2..8cc8f3f0f8e73d3809556a6cb30c3c8cf588c111 100644 (file)
@@ -152,6 +152,12 @@ ieee80211softmac_call_events_locked(struct ieee80211softmac_device *mac, int eve
                        wrqu.ap_addr.sa_family = ARPHRD_ETHER;
                        we_event = SIOCGIWAP;
                        break;
+               case IEEE80211SOFTMAC_EVENT_SCAN_FINISHED:
+                       wrqu.data.length = 0;
+                       wrqu.data.flags = 0;
+                       memset(&wrqu, '\0', sizeof (union iwreq_data));
+                       we_event = SIOCGIWSCAN;
+                       break;
                default:
                        msg = event_descriptions[event];
                        wrqu.data.length = strlen(msg);