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 --- This patch depends on the previous patch 4. If you want, I can resend the whole series with proper patch x/5 headers etc. I don't know if these can still go in before .17, but it'd be very good if they could, they're essentially bug fixes for things I either didn't know or just plain bugs :) Index: wireless-2.6/net/ieee80211/softmac/ieee80211softmac_event.c =================================================================== --- wireless-2.6.orig/net/ieee80211/softmac/ieee80211softmac_event.c 2006-04-13 02:42:59.000000000 +0200 +++ wireless-2.6/net/ieee80211/softmac/ieee80211softmac_event.c 2006-04-13 11:30:59.896998787 +0200 @@ -152,6 +152,12 @@ 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);