ieee80211_scan.c (232373) | ieee80211_scan.c (241138) |
---|---|
1/*- 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan.c 232373 2012-03-02 02:53:43Z adrian $"); | 27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_scan.c 241138 2012-10-02 17:45:19Z adrian $"); |
28 29/* 30 * IEEE 802.11 scanning support. 31 */ 32#include "opt_wlan.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> --- 825 unchanged lines hidden (view full) --- 861 "%s: no channels to scan\n", __func__); 862 goto done; 863 } 864 865 if (vap->iv_opmode == IEEE80211_M_STA && 866 vap->iv_state == IEEE80211_S_RUN) { 867 if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { 868 /* Enable station power save mode */ | 28 29/* 30 * IEEE 802.11 scanning support. 31 */ 32#include "opt_wlan.h" 33 34#include <sys/param.h> 35#include <sys/systm.h> --- 825 unchanged lines hidden (view full) --- 861 "%s: no channels to scan\n", __func__); 862 goto done; 863 } 864 865 if (vap->iv_opmode == IEEE80211_M_STA && 866 vap->iv_state == IEEE80211_S_RUN) { 867 if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { 868 /* Enable station power save mode */ |
869 ieee80211_sta_pwrsave(vap, 1); | 869 vap->iv_sta_ps(vap, 1); |
870 /* 871 * Use an 1ms delay so the null data frame has a chance 872 * to go out. 873 * XXX Should use M_TXCB mechanism to eliminate this. 874 */ 875 cv_timedwait(&SCAN_PRIVATE(ss)->ss_scan_cv, 876 IEEE80211_LOCK_OBJ(ic), hz / 1000); 877 if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) --- 164 unchanged lines hidden (view full) --- 1042 * completed. If this scan was prematurely terminated 1043 * because it is a background scan then don't notify 1044 * the ap; we'll either return to scanning after we 1045 * receive the beacon frame or we'll drop out of power 1046 * save mode because the beacon indicates we have frames 1047 * waiting for us. 1048 */ 1049 if (scandone) { | 870 /* 871 * Use an 1ms delay so the null data frame has a chance 872 * to go out. 873 * XXX Should use M_TXCB mechanism to eliminate this. 874 */ 875 cv_timedwait(&SCAN_PRIVATE(ss)->ss_scan_cv, 876 IEEE80211_LOCK_OBJ(ic), hz / 1000); 877 if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_ABORT) --- 164 unchanged lines hidden (view full) --- 1042 * completed. If this scan was prematurely terminated 1043 * because it is a background scan then don't notify 1044 * the ap; we'll either return to scanning after we 1045 * receive the beacon frame or we'll drop out of power 1046 * save mode because the beacon indicates we have frames 1047 * waiting for us. 1048 */ 1049 if (scandone) { |
1050 ieee80211_sta_pwrsave(vap, 0); | 1050 vap->iv_sta_ps(vap, 0); |
1051 if (ss->ss_next >= ss->ss_last) { 1052 ieee80211_notify_scan_done(vap); 1053 ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; 1054 } 1055 } 1056 SCAN_PRIVATE(ss)->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT); 1057 ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST); 1058 IEEE80211_UNLOCK(ic); --- 196 unchanged lines hidden --- | 1051 if (ss->ss_next >= ss->ss_last) { 1052 ieee80211_notify_scan_done(vap); 1053 ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; 1054 } 1055 } 1056 SCAN_PRIVATE(ss)->ss_iflags &= ~(ISCAN_CANCEL|ISCAN_ABORT); 1057 ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST); 1058 IEEE80211_UNLOCK(ic); --- 196 unchanged lines hidden --- |