Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122677
b: refs/heads/master
c: 14a4dfe
h: refs/heads/master
i:
  122675: 1b0a427
v: v3
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Dec 12, 2008
1 parent 789eb73 commit 9fe73f0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 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: d8004cb9267b15cd902eef01a75bb1ffa3995af8
refs/heads/master: 14a4dfe2ff8c353f59ae8324059ded1cfe22c7d9
28 changes: 22 additions & 6 deletions trunk/drivers/net/wireless/ipw2x00/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -4345,7 +4345,8 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv,
return;
}

if (priv->status & STATUS_SCANNING) {
if (priv->status & STATUS_SCANNING &&
missed_count > IPW_MB_SCAN_CANCEL_THRESHOLD) {
/* Stop scan to keep fw from getting
* stuck (only if we aren't roaming --
* otherwise we'll never scan more than 2 or 3
Expand Down Expand Up @@ -6271,6 +6272,20 @@ static void ipw_add_scan_channels(struct ipw_priv *priv,
}
}

static int ipw_passive_dwell_time(struct ipw_priv *priv)
{
/* staying on passive channels longer than the DTIM interval during a
* scan, while associated, causes the firmware to cancel the scan
* without notification. Hence, don't stay on passive channels longer
* than the beacon interval.
*/
if (priv->status & STATUS_ASSOCIATED
&& priv->assoc_network->beacon_interval > 10)
return priv->assoc_network->beacon_interval - 10;
else
return 120;
}

static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct)
{
struct ipw_scan_request_ext scan;
Expand Down Expand Up @@ -6314,16 +6329,16 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct)
scan.full_scan_index = cpu_to_le32(ieee80211_get_scans(priv->ieee));

if (type == IW_SCAN_TYPE_PASSIVE) {
IPW_DEBUG_WX("use passive scanning\n");
scan_type = IPW_SCAN_PASSIVE_FULL_DWELL_SCAN;
IPW_DEBUG_WX("use passive scanning\n");
scan_type = IPW_SCAN_PASSIVE_FULL_DWELL_SCAN;
scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] =
cpu_to_le16(120);
cpu_to_le16(ipw_passive_dwell_time(priv));
ipw_add_scan_channels(priv, &scan, scan_type);
goto send_request;
}

/* Use active scan by default. */
if (priv->config & CFG_SPEED_SCAN)
if (priv->config & CFG_SPEED_SCAN)
scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] =
cpu_to_le16(30);
else
Expand All @@ -6333,7 +6348,8 @@ static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct)
scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] =
cpu_to_le16(20);

scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = cpu_to_le16(120);
scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] =
cpu_to_le16(ipw_passive_dwell_time(priv));
scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20);

#ifdef CONFIG_IPW2200_MONITOR
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ipw2x00/ipw2200.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ enum connection_manager_assoc_states {
#define HOST_NOTIFICATION_S36_MEASUREMENT_REFUSED 31

#define HOST_NOTIFICATION_STATUS_BEACON_MISSING 1
#define IPW_MB_SCAN_CANCEL_THRESHOLD 3
#define IPW_MB_ROAMING_THRESHOLD_MIN 1
#define IPW_MB_ROAMING_THRESHOLD_DEFAULT 8
#define IPW_MB_ROAMING_THRESHOLD_MAX 30
Expand Down

0 comments on commit 9fe73f0

Please sign in to comment.