diff options
author | Hong Liu <hong.liu@intel.com> | 2005-09-14 22:04:15 -0400 |
---|---|---|
committer | James Ketrenos <jketreno@linux.intel.com> | 2005-11-07 18:51:47 -0500 |
commit | e63247269de722c3e753991025fb7f15c6aba9aa (patch) | |
tree | 905710c6c5ad75b90dbb11da009dd064b705c03a /drivers | |
parent | f4ff497d45c7071166277a39590cc59b50dc893c (diff) |
Fixes WEP firmware error condition.
The problem is caused by the patch in bug455 -- Channel change flood
generates fatal error.
The patch set the DISASSOCIATING status bit after sending the command.
The process was scheduled out when waiting for the command to be sent to
the card. The disassociated notification clears the DISASSOCIATING bit
in the tasklet before the process set the bit.
Move the bit setting code before sending the command now.
Signed-off-by: Hong Liu <hong.liu@intel.com>
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 549f582551e5..a7630920ace8 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -1882,18 +1882,6 @@ static int ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) | |||
1882 | return -EAGAIN; | 1882 | return -EAGAIN; |
1883 | } | 1883 | } |
1884 | 1884 | ||
1885 | if (priv->status & STATUS_ASSOCIATING) { | ||
1886 | IPW_DEBUG_HC("abandon a command while associating\n"); | ||
1887 | spin_unlock_irqrestore(&priv->lock, flags); | ||
1888 | return -1; | ||
1889 | } | ||
1890 | |||
1891 | if (priv->status & STATUS_DISASSOCIATING) { | ||
1892 | IPW_DEBUG_HC("abandon a command while disassociating\n"); | ||
1893 | spin_unlock_irqrestore(&priv->lock, flags); | ||
1894 | return -1; | ||
1895 | } | ||
1896 | |||
1897 | priv->status |= STATUS_HCMD_ACTIVE; | 1885 | priv->status |= STATUS_HCMD_ACTIVE; |
1898 | 1886 | ||
1899 | if (priv->cmdlog) { | 1887 | if (priv->cmdlog) { |
@@ -3697,10 +3685,14 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) | |||
3697 | MAC_ARG(priv->assoc_request.bssid), | 3685 | MAC_ARG(priv->assoc_request.bssid), |
3698 | priv->assoc_request.channel); | 3686 | priv->assoc_request.channel); |
3699 | 3687 | ||
3688 | priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED); | ||
3689 | priv->status |= STATUS_DISASSOCIATING; | ||
3690 | |||
3700 | if (quiet) | 3691 | if (quiet) |
3701 | priv->assoc_request.assoc_type = HC_DISASSOC_QUIET; | 3692 | priv->assoc_request.assoc_type = HC_DISASSOC_QUIET; |
3702 | else | 3693 | else |
3703 | priv->assoc_request.assoc_type = HC_DISASSOCIATE; | 3694 | priv->assoc_request.assoc_type = HC_DISASSOCIATE; |
3695 | |||
3704 | err = ipw_send_associate(priv, &priv->assoc_request); | 3696 | err = ipw_send_associate(priv, &priv->assoc_request); |
3705 | if (err) { | 3697 | if (err) { |
3706 | IPW_DEBUG_HC("Attempt to send [dis]associate command " | 3698 | IPW_DEBUG_HC("Attempt to send [dis]associate command " |
@@ -3708,9 +3700,6 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) | |||
3708 | return; | 3700 | return; |
3709 | } | 3701 | } |
3710 | 3702 | ||
3711 | priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED); | ||
3712 | priv->status |= STATUS_DISASSOCIATING; | ||
3713 | |||
3714 | } | 3703 | } |
3715 | 3704 | ||
3716 | static int ipw_disassociate(void *data) | 3705 | static int ipw_disassociate(void *data) |
@@ -7672,6 +7661,8 @@ static int ipw_associate_network(struct ipw_priv *priv, | |||
7672 | */ | 7661 | */ |
7673 | priv->channel = network->channel; | 7662 | priv->channel = network->channel; |
7674 | memcpy(priv->bssid, network->bssid, ETH_ALEN); | 7663 | memcpy(priv->bssid, network->bssid, ETH_ALEN); |
7664 | priv->status |= STATUS_ASSOCIATING; | ||
7665 | priv->status &= ~STATUS_SECURITY_UPDATED; | ||
7675 | 7666 | ||
7676 | priv->assoc_network = network; | 7667 | priv->assoc_network = network; |
7677 | 7668 | ||
@@ -7685,9 +7676,6 @@ static int ipw_associate_network(struct ipw_priv *priv, | |||
7685 | return err; | 7676 | return err; |
7686 | } | 7677 | } |
7687 | 7678 | ||
7688 | priv->status |= STATUS_ASSOCIATING; | ||
7689 | priv->status &= ~STATUS_SECURITY_UPDATED; | ||
7690 | |||
7691 | IPW_DEBUG(IPW_DL_STATE, "associating: '%s' " MAC_FMT " \n", | 7679 | IPW_DEBUG(IPW_DL_STATE, "associating: '%s' " MAC_FMT " \n", |
7692 | escape_essid(priv->essid, priv->essid_len), | 7680 | escape_essid(priv->essid, priv->essid_len), |
7693 | MAC_ARG(priv->bssid)); | 7681 | MAC_ARG(priv->bssid)); |
@@ -7791,6 +7779,13 @@ static int ipw_associate(void *data) | |||
7791 | return 0; | 7779 | return 0; |
7792 | } | 7780 | } |
7793 | 7781 | ||
7782 | if (priv->status & STATUS_DISASSOCIATING) { | ||
7783 | IPW_DEBUG_ASSOC("Not attempting association (in " | ||
7784 | "disassociating)\n "); | ||
7785 | queue_work(priv->workqueue, &priv->associate); | ||
7786 | return 0; | ||
7787 | } | ||
7788 | |||
7794 | if (!ipw_is_init(priv) || (priv->status & STATUS_SCANNING)) { | 7789 | if (!ipw_is_init(priv) || (priv->status & STATUS_SCANNING)) { |
7795 | IPW_DEBUG_ASSOC("Not attempting association (scanning or not " | 7790 | IPW_DEBUG_ASSOC("Not attempting association (scanning or not " |
7796 | "initialized)\n"); | 7791 | "initialized)\n"); |