91 lines
3.0 KiB
Diff
91 lines
3.0 KiB
Diff
|
From dcde3533b9f501ad079c297b3bf7659739c4c287 Mon Sep 17 00:00:00 2001
|
||
|
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||
|
Date: Wed, 24 Feb 2010 08:28:30 -0800
|
||
|
Subject: [PATCH] iwlwifi: add internal short scan support for 3945
|
||
|
|
||
|
Add internal short scan support for 3945 NIC, This allows 3945 NIC
|
||
|
to support radio reset request like the other series of NICs.
|
||
|
|
||
|
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
|
||
|
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
|
||
|
---
|
||
|
drivers/net/wireless/iwlwifi/iwl3945-base.c | 22 ++++++++++++++--------
|
||
|
1 files changed, 14 insertions(+), 8 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||
|
index b74a56c..19c77a8 100644
|
||
|
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||
|
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
|
||
|
@@ -2821,7 +2821,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||
|
.len = sizeof(struct iwl3945_scan_cmd),
|
||
|
.flags = CMD_SIZE_HUGE,
|
||
|
};
|
||
|
- int rc = 0;
|
||
|
struct iwl3945_scan_cmd *scan;
|
||
|
struct ieee80211_conf *conf = NULL;
|
||
|
u8 n_probes = 0;
|
||
|
@@ -2849,7 +2848,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||
|
if (test_bit(STATUS_SCAN_HW, &priv->status)) {
|
||
|
IWL_DEBUG_INFO(priv, "Multiple concurrent scan requests "
|
||
|
"Ignoring second request.\n");
|
||
|
- rc = -EIO;
|
||
|
goto done;
|
||
|
}
|
||
|
|
||
|
@@ -2884,7 +2882,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||
|
priv->scan = kmalloc(sizeof(struct iwl3945_scan_cmd) +
|
||
|
IWL_MAX_SCAN_SIZE, GFP_KERNEL);
|
||
|
if (!priv->scan) {
|
||
|
- rc = -ENOMEM;
|
||
|
+ IWL_DEBUG_SCAN(priv, "Fail to allocate scan memory\n");
|
||
|
goto done;
|
||
|
}
|
||
|
}
|
||
|
@@ -2927,7 +2925,9 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||
|
scan_suspend_time, interval);
|
||
|
}
|
||
|
|
||
|
- if (priv->scan_request->n_ssids) {
|
||
|
+ if (priv->is_internal_short_scan) {
|
||
|
+ IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n");
|
||
|
+ } else if (priv->scan_request->n_ssids) {
|
||
|
int i, p = 0;
|
||
|
IWL_DEBUG_SCAN(priv, "Kicking off active scan\n");
|
||
|
for (i = 0; i < priv->scan_request->n_ssids; i++) {
|
||
|
@@ -2975,13 +2975,20 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||
|
goto done;
|
||
|
}
|
||
|
|
||
|
- scan->tx_cmd.len = cpu_to_le16(
|
||
|
+ if (!priv->is_internal_short_scan) {
|
||
|
+ scan->tx_cmd.len = cpu_to_le16(
|
||
|
iwl_fill_probe_req(priv,
|
||
|
(struct ieee80211_mgmt *)scan->data,
|
||
|
priv->scan_request->ie,
|
||
|
priv->scan_request->ie_len,
|
||
|
IWL_MAX_SCAN_SIZE - sizeof(*scan)));
|
||
|
-
|
||
|
+ } else {
|
||
|
+ scan->tx_cmd.len = cpu_to_le16(
|
||
|
+ iwl_fill_probe_req(priv,
|
||
|
+ (struct ieee80211_mgmt *)scan->data,
|
||
|
+ NULL, 0,
|
||
|
+ IWL_MAX_SCAN_SIZE - sizeof(*scan)));
|
||
|
+ }
|
||
|
/* select Rx antennas */
|
||
|
scan->flags |= iwl3945_get_antenna_flags(priv);
|
||
|
|
||
|
@@ -3003,8 +3010,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
|
||
|
scan->len = cpu_to_le16(cmd.len);
|
||
|
|
||
|
set_bit(STATUS_SCAN_HW, &priv->status);
|
||
|
- rc = iwl_send_cmd_sync(priv, &cmd);
|
||
|
- if (rc)
|
||
|
+ if (iwl_send_cmd_sync(priv, &cmd))
|
||
|
goto done;
|
||
|
|
||
|
queue_delayed_work(priv->workqueue, &priv->scan_check,
|
||
|
--
|
||
|
1.7.0.1
|
||
|
|