Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193710
b: refs/heads/master
c: 4f4d408
h: refs/heads/master
v: v3
  • Loading branch information
Wey-Yi Guy authored and Reinette Chatre committed Mar 10, 2010
1 parent 6e8ba8a commit fb44909
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13115ba76b3200fca62d1bfd54f917f208e7d2e5
refs/heads/master: 4f4d4088b05155d4904e29d5c00316395ce32f27
22 changes: 14 additions & 8 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2799,7 +2799,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;
Expand Down Expand Up @@ -2827,7 +2826,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;
}

Expand Down Expand Up @@ -2862,7 +2860,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;
}
}
Expand Down Expand Up @@ -2905,7 +2903,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++) {
Expand Down Expand Up @@ -2952,13 +2952,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);

Expand All @@ -2980,8 +2987,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,
Expand Down

0 comments on commit fb44909

Please sign in to comment.