diff options
author | Ben Cahill <ben.m.cahill@intel.com> | 2005-10-06 16:34:41 -0400 |
---|---|---|
committer | James Ketrenos <jketreno@linux.intel.com> | 2005-11-07 18:52:00 -0500 |
commit | e758256104c3c2475f7746bc1b348c99cdb207f2 (patch) | |
tree | c3076d27876f5d633db3ed5f8e3e4775679b7245 /drivers/net/wireless/ipw2200.c | |
parent | 8935f39e86e3707770e091fb58d9060307edf959 (diff) |
Fixes missed beacon logic in relation to on-network AP roaming.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Diffstat (limited to 'drivers/net/wireless/ipw2200.c')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 27 |
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 */ | ||
4085 | static inline void ipw_handle_missed_beacon(struct ipw_priv *priv, | 4090 | static 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); |