diff options
author | Zhu Yi <yi.zhu@intel.com> | 2007-11-21 21:53:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:55:27 -0500 |
commit | ece8edddf067d21c4e5abfe3f1205da1588edbb2 (patch) | |
tree | 25450d1aedc630a538ca2f13aa0fa47100256182 /net/mac80211/ieee80211_i.h | |
parent | f68635e627f9b21db05102e2d8fcd2894493d6bc (diff) |
mac80211: hardware scan rework
The scan code in mac80211 makes the software scan assumption in various
places. For example, we stop the Tx queue during a software scan so that
all the Tx packets will be queued by the stack. We also drop frames not
related to scan in the software scan process. But these are not true for
hardware scan.
Some wireless hardwares (for example iwl3945/4965) has the ability to
perform the whole scan process by hardware and/or firmware. The hardware
scan is relative powerful in that it tries to maintain normal network
traffic while doing a scan in the background. Some drivers (i.e iwlwifi)
do provide a way to tune the hardware scan parameters (for example if the
STA is associated, what's the max time could the STA leave from the
associated channel, how long the scans get suspended after returning to
the service channel, etc). But basically this is transparent to the
stack. mac80211 should not stop Tx queues or drop Rx packets during a
hardware scan.
This patch resolves the above problem by spliting the current scan
indicator local->sta_scanning into local->sta_sw_scanning and
local->sta_hw_scanning. It then changes the scan related code to be aware
of hardware scan or software scan in various places. With this patch,
iwlwifi performs much better in the scan-while-associated condition and
disable_hw_scan=1 should never be required.
Cc: Mohamed Abbas <mohamed.abbas@intel.com>
Cc: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 2be7fcebac48..e9109443cb10 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -470,7 +470,8 @@ struct ieee80211_local { | |||
470 | 470 | ||
471 | struct list_head interfaces; | 471 | struct list_head interfaces; |
472 | 472 | ||
473 | int sta_scanning; | 473 | bool sta_sw_scanning; |
474 | bool sta_hw_scanning; | ||
474 | int scan_channel_idx; | 475 | int scan_channel_idx; |
475 | enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state; | 476 | enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state; |
476 | unsigned long last_scan_completed; | 477 | unsigned long last_scan_completed; |
@@ -745,7 +746,8 @@ int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len); | |||
745 | void ieee80211_sta_req_auth(struct net_device *dev, | 746 | void ieee80211_sta_req_auth(struct net_device *dev, |
746 | struct ieee80211_if_sta *ifsta); | 747 | struct ieee80211_if_sta *ifsta); |
747 | int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len); | 748 | int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len); |
748 | void ieee80211_sta_rx_scan(struct net_device *dev, struct sk_buff *skb, | 749 | ieee80211_txrx_result ieee80211_sta_rx_scan(struct net_device *dev, |
750 | struct sk_buff *skb, | ||
749 | struct ieee80211_rx_status *rx_status); | 751 | struct ieee80211_rx_status *rx_status); |
750 | void ieee80211_rx_bss_list_init(struct net_device *dev); | 752 | void ieee80211_rx_bss_list_init(struct net_device *dev); |
751 | void ieee80211_rx_bss_list_deinit(struct net_device *dev); | 753 | void ieee80211_rx_bss_list_deinit(struct net_device *dev); |