Date: Sun, 30 Jan 2011 14:05:21 +0000 (UTC) From: Bernhard Schmidt <bschmidt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218092 - head/sys/net80211 Message-ID: <201101301405.p0UE5LLL074027@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bschmidt Date: Sun Jan 30 14:05:21 2011 New Revision: 218092 URL: http://svn.freebsd.org/changeset/base/218092 Log: Instead of always returning 0 to a scan request, indicate if there is one running already. MFC after: 1 month Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Sun Jan 30 14:00:50 2011 (r218091) +++ head/sys/net80211/ieee80211_ioctl.c Sun Jan 30 14:05:21 2011 (r218092) @@ -2384,7 +2384,7 @@ ieee80211_scanreq(struct ieee80211vap *v IEEE80211_IOC_SCAN_NOJOIN | IEEE80211_IOC_SCAN_FLUSH | \ IEEE80211_IOC_SCAN_CHECK) struct ieee80211com *ic = vap->iv_ic; - int i; + int error, i; /* convert duration */ if (sr->sr_duration == IEEE80211_IOC_SCAN_FOREVER) @@ -2458,20 +2458,21 @@ ieee80211_scanreq(struct ieee80211vap *v } else { vap->iv_flags_ext &= ~IEEE80211_FEXT_SCANREQ; IEEE80211_UNLOCK(ic); - /* XXX neeed error return codes */ if (sr->sr_flags & IEEE80211_IOC_SCAN_CHECK) { - (void) ieee80211_check_scan(vap, sr->sr_flags, + error = ieee80211_check_scan(vap, sr->sr_flags, sr->sr_duration, sr->sr_mindwell, sr->sr_maxdwell, sr->sr_nssid, /* NB: cheat, we assume structures are compatible */ (const struct ieee80211_scan_ssid *) &sr->sr_ssid[0]); } else { - (void) ieee80211_start_scan(vap, sr->sr_flags, + error = ieee80211_start_scan(vap, sr->sr_flags, sr->sr_duration, sr->sr_mindwell, sr->sr_maxdwell, sr->sr_nssid, /* NB: cheat, we assume structures are compatible */ (const struct ieee80211_scan_ssid *) &sr->sr_ssid[0]); } + if (error == 0) + return EINPROGRESS; } return 0; #undef IEEE80211_IOC_SCAN_FLAGS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101301405.p0UE5LLL074027>