aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2200.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r--drivers/net/wireless/ipw2200.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 8e17308b5539..894192964c0b 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -4082,6 +4082,11 @@ static void ipw_bg_gather_stats(void *data)
4082 up(&priv->sem); 4082 up(&priv->sem);
4083} 4083}
4084 4084
4085/* Missed beacon behavior:
4086 * 1st missed -> roaming_threshold, just wait, don't do any scan/roam.
4087 * roaming_threshold -> disassociate_threshold, scan and roam for better signal.
4088 * Above disassociate threshold, give up and stop scanning.
4089 * Roaming is disabled if disassociate_threshold <= roaming_threshold */
4085static inline void ipw_handle_missed_beacon(struct ipw_priv *priv, 4090static inline void ipw_handle_missed_beacon(struct ipw_priv *priv,
4086 int missed_count) 4091 int missed_count)
4087{ 4092{
@@ -4116,9 +4121,12 @@ static inline void ipw_handle_missed_beacon(struct ipw_priv *priv,
4116 return; 4121 return;
4117 } 4122 }
4118 4123
4119 if (missed_count > priv->roaming_threshold) { 4124 if (missed_count > priv->roaming_threshold &&
4125 missed_count <= priv->disassociate_threshold) {
4120 /* If we are not already roaming, set the ROAM 4126 /* If we are not already roaming, set the ROAM
4121 * bit in the status and kick off a scan */ 4127 * bit in the status and kick off a scan.
4128 * This can happen several times before we reach
4129 * disassociate_threshold. */
4122 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, 4130 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE,
4123 "Missed beacon: %d - initiate " 4131 "Missed beacon: %d - initiate "
4124 "roaming\n", missed_count); 4132 "roaming\n", missed_count);
@@ -4480,11 +4488,16 @@ static inline void ipw_rx_notification(struct ipw_priv *priv,
4480 STATUS_DISASSOCIATING))) 4488 STATUS_DISASSOCIATING)))
4481 queue_work(priv->workqueue, &priv->associate); 4489 queue_work(priv->workqueue, &priv->associate);
4482 else if (priv->status & STATUS_ROAMING) { 4490 else if (priv->status & STATUS_ROAMING) {
4483 /* If a scan completed and we are in roam mode, then 4491 if (x->status == SCAN_COMPLETED_STATUS_COMPLETE)
4484 * the scan that completed was the one requested as a 4492 /* If a scan completed and we are in roam mode, then
4485 * result of entering roam... so, schedule the 4493 * the scan that completed was the one requested as a
4486 * roam work */ 4494 * result of entering roam... so, schedule the
4487 queue_work(priv->workqueue, &priv->roam); 4495 * roam work */
4496 queue_work(priv->workqueue,
4497 &priv->roam);
4498 else
4499 /* Don't schedule if we aborted the scan */
4500 priv->status &= ~STATUS_ROAMING;
4488 } else if (priv->status & STATUS_SCAN_PENDING) 4501 } else if (priv->status & STATUS_SCAN_PENDING)
4489 queue_work(priv->workqueue, 4502 queue_work(priv->workqueue,
4490 &priv->request_scan); 4503 &priv->request_scan);