aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2009-07-23 07:18:01 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 15:24:17 -0400
commit142b9f5074dc0d09dc0025739ad437723d7bf527 (patch)
tree07173ed0ffae8956c1f8938bc41695b1d19cebb0 /net/mac80211/ieee80211_i.h
parentfbe9c429f195111bbf7f1630efa19aee295fd8e7 (diff)
mac80211: implement basic background scanning
Introduce a new scan flag "SCAN_OFF_CHANNEL" which basically tells us that we are currently on a different channel for scanning and cannot RX/TX. "SCAN_SW_SCANNING" tells us that we are currently running a software scan but we might as well be on the operating channel to RX/TX. While "SCAN_SW_SCANNING" is set during the whole scan "SCAN_OFF_CHANNEL" is set when leaving the operating channel and unset when coming back. Introduce two new scan states "SCAN_LEAVE_OPER_CHANNEL" and "SCAN_ENTER_OPER_CHANNEL" which basically implement the functionality we need to leave the operating channel (send a nullfunc to the AP and stop the queues) and enter it again (send a nullfunc to the AP and start the queues again). Enhance the scan state "SCAN_DECISION" to switch back to the operating channel after each scanned channel. In the future it sould be simple to enhance the decision state to scan as much channels in a row as the qos latency allows us. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 783a125402b0..efda19ee0152 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -570,9 +570,41 @@ enum queue_stop_reason {
570 IEEE80211_QUEUE_STOP_REASON_SKB_ADD, 570 IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
571}; 571};
572 572
573/**
574 * mac80211 scan flags - currently active scan mode
575 *
576 * @SCAN_SW_SCANNING: We're currently in the process of scanning but may as
577 * well be on the operating channel
578 * @SCAN_HW_SCANNING: The hardware is scanning for us, we have no way to
579 * determine if we are on the operating channel or not
580 * @SCAN_OFF_CHANNEL: We're off our operating channel for scanning,
581 * gets only set in conjunction with SCAN_SW_SCANNING
582 */
573enum { 583enum {
574 SCAN_SW_SCANNING, 584 SCAN_SW_SCANNING,
575 SCAN_HW_SCANNING 585 SCAN_HW_SCANNING,
586 SCAN_OFF_CHANNEL,
587};
588
589/**
590 * enum mac80211_scan_state - scan state machine states
591 *
592 * @SCAN_DECISION: Main entry point to the scan state machine, this state
593 * determines if we should keep on scanning or switch back to the
594 * operating channel
595 * @SCAN_SET_CHANNEL: Set the next channel to be scanned
596 * @SCAN_SEND_PROBE: Send probe requests and wait for probe responses
597 * @SCAN_LEAVE_OPER_CHANNEL: Leave the operating channel, notify the AP
598 * about us leaving the channel and stop all associated STA interfaces
599 * @SCAN_ENTER_OPER_CHANNEL: Enter the operating channel again, notify the
600 * AP about us being back and restart all associated STA interfaces
601 */
602enum mac80211_scan_state {
603 SCAN_DECISION,
604 SCAN_SET_CHANNEL,
605 SCAN_SEND_PROBE,
606 SCAN_LEAVE_OPER_CHANNEL,
607 SCAN_ENTER_OPER_CHANNEL,
576}; 608};
577 609
578struct ieee80211_local { 610struct ieee80211_local {
@@ -683,7 +715,7 @@ struct ieee80211_local {
683 int scan_channel_idx; 715 int scan_channel_idx;
684 int scan_ies_len; 716 int scan_ies_len;
685 717
686 enum { SCAN_DECISION, SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state; 718 enum mac80211_scan_state scan_state;
687 struct delayed_work scan_work; 719 struct delayed_work scan_work;
688 struct ieee80211_sub_if_data *scan_sdata; 720 struct ieee80211_sub_if_data *scan_sdata;
689 enum nl80211_channel_type oper_channel_type; 721 enum nl80211_channel_type oper_channel_type;