Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13577
b: refs/heads/master
c: 7b99659
h: refs/heads/master
i:
  13575: 7888684
v: v3
  • Loading branch information
Hong Liu authored and James Ketrenos committed Nov 7, 2005
1 parent 9ce07ee commit 816eaa9
Show file tree
Hide file tree
Showing 2 changed files with 26 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: a0e04ab36048eb1c3da2524b5b0b802b6ab064f0
refs/heads/master: 7b99659f97ca20e5f1ea56253a9449d278d825d5
31 changes: 25 additions & 6 deletions trunk/drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,18 @@ static int ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd)
return -EAGAIN;
}

if (priv->status & STATUS_ASSOCIATING) {
IPW_DEBUG_HC("abandon a command while associating\n");
spin_unlock_irqrestore(&priv->lock, flags);
return -1;
}

if (priv->status & STATUS_DISASSOCIATING) {
IPW_DEBUG_HC("abandon a command while disassociating\n");
spin_unlock_irqrestore(&priv->lock, flags);
return -1;
}

priv->status |= STATUS_HCMD_ACTIVE;

if (priv->cmdlog) {
Expand Down Expand Up @@ -3671,7 +3683,13 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
{
int err;

if (!(priv->status & (STATUS_ASSOCIATING | STATUS_ASSOCIATED))) {
if (priv->status & STATUS_ASSOCIATING) {
IPW_DEBUG_ASSOC("Disassociating while associating.\n");
queue_work(priv->workqueue, &priv->disassociate);
return;
}

if (!(priv->status & STATUS_ASSOCIATED)) {
IPW_DEBUG_ASSOC("Disassociating while not associated.\n");
return;
}
Expand All @@ -3681,9 +3699,6 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
MAC_ARG(priv->assoc_request.bssid),
priv->assoc_request.channel);

priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED);
priv->status |= STATUS_DISASSOCIATING;

if (quiet)
priv->assoc_request.assoc_type = HC_DISASSOC_QUIET;
else
Expand All @@ -3695,6 +3710,9 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
return;
}

priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED);
priv->status |= STATUS_DISASSOCIATING;

}

static int ipw_disassociate(void *data)
Expand Down Expand Up @@ -7625,8 +7643,6 @@ static int ipw_associate_network(struct ipw_priv *priv,
*/
priv->channel = network->channel;
memcpy(priv->bssid, network->bssid, ETH_ALEN);
priv->status |= STATUS_ASSOCIATING;
priv->status &= ~STATUS_SECURITY_UPDATED;

priv->assoc_network = network;

Expand All @@ -7640,6 +7656,9 @@ static int ipw_associate_network(struct ipw_priv *priv,
return err;
}

priv->status |= STATUS_ASSOCIATING;
priv->status &= ~STATUS_SECURITY_UPDATED;

IPW_DEBUG(IPW_DL_STATE, "associating: '%s' " MAC_FMT " \n",
escape_essid(priv->essid, priv->essid_len),
MAC_ARG(priv->bssid));
Expand Down

0 comments on commit 816eaa9

Please sign in to comment.