diff options
author | Reinette Chatre <reinette.chatre@intel.com> | 2008-11-04 12:21:35 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-06 16:37:12 -0500 |
commit | 14b5433606289dbc5b6fd70ced11462f80e95003 (patch) | |
tree | d7106b140206fe3b7d4b26ea9b800ab12655c473 | |
parent | 2420ebc104d38567ee977a3c15dc675a9dd3b07c (diff) |
iwl3945: do not send scan command if channel count zero
Do not send scan command if no channels to scan.
This avoids a Microcode error as reported in:
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1650
http://bugzilla.kernel.org/show_bug.cgi?id=11806
http://marc.info/?l=linux-wireless&m=122437145211886&w=2
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index b9eac5551d82..81dfcb882857 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -6256,6 +6256,11 @@ static void iwl3945_bg_request_scan(struct work_struct *data) n_probes, (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); + if (scan->channel_count == 0) { + IWL_DEBUG_SCAN("channel count %d\n", scan->channel_count); + goto done; + } + cmd.len += le16_to_cpu(scan->tx_cmd.len) + scan->channel_count * sizeof(struct iwl3945_scan_channel); cmd.data = scan; |