Lines Matching full:ss

71 #define	SCAN_PRIVATE(ss)	((struct scan_state *) ss)
98 struct ieee80211_scan_state *ss = ic->ic_scan;
100 if (ss != NULL) {
101 scan_signal(ss, ISCAN_ABORT);
102 ieee80211_draintask(ic, &SCAN_PRIVATE(ss)->ss_scan_start);
104 &SCAN_PRIVATE(ss)->ss_scan_curchan);
115 if (ss->ss_ops != NULL) {
116 ss->ss_ops->scan_detach(ss);
117 ss->ss_ops = NULL;
120 IEEE80211_FREE(SCAN_PRIVATE(ss), M_80211_SCAN);
138 struct ieee80211_scan_state *ss = ic->ic_scan;
142 if (ss != NULL && ss->ss_vap == vap &&
144 scan_signal_locked(ss, ISCAN_ABORT);
151 struct ieee80211_scan_state *ss = ic->ic_scan;
156 SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD;
157 SCAN_PRIVATE(ss)->ss_duration = duration;
170 struct ieee80211_scan_state *ss = ic->ic_scan;
193 if (ss->ss_ops != NULL) {
195 ieee80211_scan_copy_ssid(vap, ss, nssid, ssids);
197 ss->ss_flags = flags & IEEE80211_SCAN_PUBLIC_MASK;
198 if (ss->ss_flags & IEEE80211_SCAN_ACTIVE)
203 ss->ss_ops->scan_flush(ss);
210 ss->ss_next = 0;
211 ss->ss_mindwell = mindwell;
212 ss->ss_maxdwell = maxdwell;
214 ss->ss_ops->scan_start(ss, vap);
217 ieee80211_scan_dump(ss);
222 ieee80211_runtask(ic, &SCAN_PRIVATE(ss)->ss_scan_start);
228 ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive");
272 struct ieee80211_scan_state *ss = ic->ic_scan;
277 if (ss->ss_ops != NULL) {
284 ieee80211_scan_copy_ssid(vap, ss, nssid, ssids);
303 SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_DISCARD;
307 ss->ss_flags = flags & IEEE80211_SCAN_PUBLIC_MASK;
308 result = ss->ss_ops->scan_end(ss, vap);
311 SCAN_PRIVATE(ss)->ss_iflags &= ~ISCAN_DISCARD;
335 struct ieee80211_scan_state *ss = ic->ic_scan;
355 ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive",
359 if (ss->ss_ops != NULL) {
360 ss->ss_vap = vap;
375 ss->ss_flags |= IEEE80211_SCAN_NOPICK
380 if (ss->ss_next >= ss->ss_last) {
381 if (ss->ss_flags & IEEE80211_SCAN_ACTIVE)
390 ss->ss_next = 0;
391 if (ss->ss_last != 0) {
393 ss->ss_ops->scan_restart(ss, vap);
395 ss->ss_ops->scan_start(ss, vap);
398 ieee80211_scan_dump(ss);
403 ss->ss_maxdwell = duration;
407 &SCAN_PRIVATE(ss)->ss_scan_start);
415 ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive");
432 struct ieee80211_scan_state *ss = ic->ic_scan;
433 struct scan_state *ss_priv = SCAN_PRIVATE(ss);
439 (any || ss->ss_vap == vap) &&
444 ss->ss_flags & IEEE80211_SCAN_ACTIVE ?
448 ss->ss_flags &= ~IEEE80211_SCAN_NOPICK;
450 scan_signal_locked(ss, signal);
456 (ss->ss_vap == vap ? "match" : "nomatch"),
493 struct ieee80211_scan_state *ss = vap->iv_ic->ic_scan;
498 scan_signal(ss, 0);
510 struct ieee80211_scan_state *ss = ic->ic_scan;
514 scan_signal_locked(ss, 0);
528 struct ieee80211_scan_state *ss = ic->ic_scan;
543 for (i = 0; i < ss->ss_nssid; i++)
547 ss->ss_ssid[i].ssid, ss->ss_ssid[i].len);
548 if ((ss->ss_flags & IEEE80211_SCAN_NOBCAST) == 0)
561 scan_curchan(struct ieee80211_scan_state *ss, unsigned long maxdwell)
563 struct ieee80211vap *vap = ss->ss_vap;
564 struct ieee80211com *ic = ss->ss_ic;
571 if (ss->ss_flags & IEEE80211_SCAN_ACTIVE)
574 &SCAN_PRIVATE(ss)->ss_scan_curchan, maxdwell);
579 scan_signal(struct ieee80211_scan_state *ss, int iflags)
581 struct ieee80211com *ic = ss->ss_ic;
586 scan_signal_locked(ss, iflags);
591 scan_signal_locked(struct ieee80211_scan_state *ss, int iflags)
593 struct scan_state *ss_priv = SCAN_PRIVATE(ss);
595 struct ieee80211com *ic = ss->ss_ic;
611 scan_mindwell(struct ieee80211_scan_state *ss)
614 IEEE80211_DPRINTF(ss->ss_vap, IEEE80211_MSG_SCAN, "%s: called\n",
617 scan_signal(ss, 0);
624 struct ieee80211_scan_state *ss = (struct ieee80211_scan_state *) arg;
625 struct scan_state *ss_priv = SCAN_PRIVATE(ss);
626 struct ieee80211vap *vap = ss->ss_vap;
627 struct ieee80211com *ic = ss->ss_ic;
633 scan_done(ss, 0);
637 if (ss->ss_next == ss->ss_last) {
640 scan_done(ss, 1);
660 scan_done(ss, 0);
674 scan_curchan_task(ss, 0);
680 struct ieee80211_scan_state *ss = arg;
681 struct scan_state *ss_priv = SCAN_PRIVATE(ss);
682 struct ieee80211com *ic = ss->ss_ic;
694 * call scan_end(ss, 1) if we're just PAUSEing the scan.
696 scandone = (ss->ss_next >= ss->ss_last) ||
698 scanstop = (ss->ss_next >= ss->ss_last) ||
701 IEEE80211_DPRINTF(ss->ss_vap, IEEE80211_MSG_SCAN,
707 (uint32_t) ss->ss_next,
708 (uint32_t) ss->ss_last);
710 if (scanstop || (ss->ss_flags & IEEE80211_SCAN_GOTPICK) ||
712 ieee80211_time_after(ticks + ss->ss_mindwell, ss_priv->ss_scanend)) {
714 scan_end(ss, scandone);
719 chan = ss->ss_chans[ss->ss_next++];
724 if (ieee80211_time_after(ticks + ss->ss_maxdwell, ss_priv->ss_scanend))
727 maxdwell = ss->ss_maxdwell;
729 IEEE80211_DPRINTF(ss->ss_vap, IEEE80211_MSG_SCAN,
736 (ss->ss_flags & IEEE80211_SCAN_ACTIVE) &&
739 ticks_to_msecs(ss->ss_mindwell), ticks_to_msecs(maxdwell));
765 ic->ic_scan_curchan(ss, maxdwell);
770 ss_priv->ss_chanmindwell = ticks + ss->ss_mindwell;
780 IEEE80211_DPRINTF(ss->ss_vap, IEEE80211_MSG_SCAN, "%s: waiting\n",
786 scan_end(struct ieee80211_scan_state *ss, int scandone)
788 struct scan_state *ss_priv = SCAN_PRIVATE(ss);
789 struct ieee80211vap *vap = ss->ss_vap;
790 struct ieee80211com *ic = ss->ss_ic;
797 scan_done(ss, scandone);
837 ss->ss_flags &= ~IEEE80211_SCAN_GOTPICK;
847 !ss->ss_ops->scan_end(ss, vap) &&
848 (ss->ss_flags & IEEE80211_SCAN_ONCE) == 0 &&
849 ieee80211_time_before(ticks + ss->ss_mindwell, ss_priv->ss_scanend)) {
854 ticks, ss->ss_mindwell, ss_priv->ss_scanend);
855 ss->ss_next = 0; /* reset to beginning */
856 if (ss->ss_flags & IEEE80211_SCAN_ACTIVE)
862 ss->ss_ops->scan_restart(ss, vap); /* XXX? */
869 if ((ss->ss_flags & IEEE80211_SCAN_BGSCAN) == 0)
875 ticks, ss->ss_mindwell, ss_priv->ss_scanend);
890 scan_done(ss, scandone);
894 scan_done(struct ieee80211_scan_state *ss, int scandone)
896 struct scan_state *ss_priv = SCAN_PRIVATE(ss);
897 struct ieee80211com *ic = ss->ss_ic;
898 struct ieee80211vap *vap = ss->ss_vap;
926 if (ss->ss_next >= ss->ss_last) {
930 (uint32_t) ss->ss_next,
931 (uint32_t) ss->ss_last);
937 (ss->ss_next >= ss->ss_last))
942 ss->ss_flags &= ~(IEEE80211_SCAN_ONCE | IEEE80211_SCAN_PICK1ST);
958 struct ieee80211_scan_state *ss = ic->ic_scan;
968 if (SCAN_PRIVATE(ss)->ss_iflags & ISCAN_DISCARD)
974 if (ss->ss_ops != NULL &&
975 ss->ss_ops->scan_add(ss, curchan, sp, wh, subtype, rssi, noise)) {
980 if ((SCAN_PRIVATE(ss)->ss_iflags & ISCAN_MINDWELL) == 0 &&
981 ieee80211_time_after_eq(ticks, SCAN_PRIVATE(ss)->ss_chanmindwell)) {
987 ticks, SCAN_PRIVATE(ss)->ss_chanmindwell);
988 SCAN_PRIVATE(ss)->ss_iflags |= ISCAN_MINDWELL;
993 ic->ic_scan_mindwell(ss);
1021 struct scan_state *ss;
1029 ss = (struct scan_state *) IEEE80211_MALLOC(sizeof(struct scan_state),
1031 if (ss == NULL) {
1035 TASK_INIT(&ss->ss_scan_start, 0, scan_start, ss);
1036 TIMEOUT_TASK_INIT(ic->ic_tq, &ss->ss_scan_curchan, 0,
1037 scan_curchan_task, ss);
1039 ic->ic_scan = &ss->base;
1040 ss->base.ss_ic = ic;