aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-02-24 11:28:30 -0500
committerReinette Chatre <reinette.chatre@intel.com>2010-03-09 19:12:57 -0500
commit4f4d4088b05155d4904e29d5c00316395ce32f27 (patch)
tree53613d8038411f726fd0f4f76838656a9d9b7c11 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent13115ba76b3200fca62d1bfd54f917f208e7d2e5 (diff)
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c22
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 dd33251d6918..252df12eeb38 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2799,7 +2799,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
2799 .len = sizeof(struct iwl3945_scan_cmd), 2799 .len = sizeof(struct iwl3945_scan_cmd),
2800 .flags = CMD_SIZE_HUGE, 2800 .flags = CMD_SIZE_HUGE,
2801 }; 2801 };
2802 int rc = 0;
2803 struct iwl3945_scan_cmd *scan; 2802 struct iwl3945_scan_cmd *scan;
2804 struct ieee80211_conf *conf = NULL; 2803 struct ieee80211_conf *conf = NULL;
2805 u8 n_probes = 0; 2804 u8 n_probes = 0;
@@ -2827,7 +2826,6 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
2827 if (test_bit(STATUS_SCAN_HW, &priv->status)) { 2826 if (test_bit(STATUS_SCAN_HW, &priv->status)) {
2828 IWL_DEBUG_INFO(priv, "Multiple concurrent scan requests " 2827 IWL_DEBUG_INFO(priv, "Multiple concurrent scan requests "
2829 "Ignoring second request.\n"); 2828 "Ignoring second request.\n");
2830 rc = -EIO;
2831 goto done; 2829 goto done;
2832 } 2830 }
2833 2831
@@ -2862,7 +2860,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
2862 priv->scan = kmalloc(sizeof(struct iwl3945_scan_cmd) + 2860 priv->scan = kmalloc(sizeof(struct iwl3945_scan_cmd) +
2863 IWL_MAX_SCAN_SIZE, GFP_KERNEL); 2861 IWL_MAX_SCAN_SIZE, GFP_KERNEL);
2864 if (!priv->scan) { 2862 if (!priv->scan) {
2865 rc = -ENOMEM; 2863 IWL_DEBUG_SCAN(priv, "Fail to allocate scan memory\n");
2866 goto done; 2864 goto done;
2867 } 2865 }
2868 } 2866 }
@@ -2905,7 +2903,9 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
2905 scan_suspend_time, interval); 2903 scan_suspend_time, interval);
2906 } 2904 }
2907 2905
2908 if (priv->scan_request->n_ssids) { 2906 if (priv->is_internal_short_scan) {
2907 IWL_DEBUG_SCAN(priv, "Start internal passive scan.\n");
2908 } else if (priv->scan_request->n_ssids) {
2909 int i, p = 0; 2909 int i, p = 0;
2910 IWL_DEBUG_SCAN(priv, "Kicking off active scan\n"); 2910 IWL_DEBUG_SCAN(priv, "Kicking off active scan\n");
2911 for (i = 0; i < priv->scan_request->n_ssids; i++) { 2911 for (i = 0; i < priv->scan_request->n_ssids; i++) {
@@ -2952,13 +2952,20 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
2952 goto done; 2952 goto done;
2953 } 2953 }
2954 2954
2955 scan->tx_cmd.len = cpu_to_le16( 2955 if (!priv->is_internal_short_scan) {
2956 scan->tx_cmd.len = cpu_to_le16(
2956 iwl_fill_probe_req(priv, 2957 iwl_fill_probe_req(priv,
2957 (struct ieee80211_mgmt *)scan->data, 2958 (struct ieee80211_mgmt *)scan->data,
2958 priv->scan_request->ie, 2959 priv->scan_request->ie,
2959 priv->scan_request->ie_len, 2960 priv->scan_request->ie_len,
2960 IWL_MAX_SCAN_SIZE - sizeof(*scan))); 2961 IWL_MAX_SCAN_SIZE - sizeof(*scan)));
2961 2962 } else {
2963 scan->tx_cmd.len = cpu_to_le16(
2964 iwl_fill_probe_req(priv,
2965 (struct ieee80211_mgmt *)scan->data,
2966 NULL, 0,
2967 IWL_MAX_SCAN_SIZE - sizeof(*scan)));
2968 }
2962 /* select Rx antennas */ 2969 /* select Rx antennas */
2963 scan->flags |= iwl3945_get_antenna_flags(priv); 2970 scan->flags |= iwl3945_get_antenna_flags(priv);
2964 2971
@@ -2980,8 +2987,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
2980 scan->len = cpu_to_le16(cmd.len); 2987 scan->len = cpu_to_le16(cmd.len);
2981 2988
2982 set_bit(STATUS_SCAN_HW, &priv->status); 2989 set_bit(STATUS_SCAN_HW, &priv->status);
2983 rc = iwl_send_cmd_sync(priv, &cmd); 2990 if (iwl_send_cmd_sync(priv, &cmd))
2984 if (rc)
2985 goto done; 2991 goto done;
2986 2992
2987 queue_delayed_work(priv->workqueue, &priv->scan_check, 2993 queue_delayed_work(priv->workqueue, &priv->scan_check,