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 | |
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')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 27 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.h | 3 |
2 files changed, 23 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); |
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index 3e7699430c6c..617ec4dba17a 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h | |||
@@ -590,6 +590,9 @@ struct notif_channel_result { | |||
590 | u8 uReserved; | 590 | u8 uReserved; |
591 | } __attribute__ ((packed)); | 591 | } __attribute__ ((packed)); |
592 | 592 | ||
593 | #define SCAN_COMPLETED_STATUS_COMPLETE 1 | ||
594 | #define SCAN_COMPLETED_STATUS_ABORTED 2 | ||
595 | |||
593 | struct notif_scan_complete { | 596 | struct notif_scan_complete { |
594 | u8 scan_type; | 597 | u8 scan_type; |
595 | u8 num_channels; | 598 | u8 num_channels; |