Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13589
b: refs/heads/master
c: e632472
h: refs/heads/master
i:
  13587: c522e18
v: v3
  • Loading branch information
Hong Liu authored and James Ketrenos committed Nov 7, 2005
1 parent d7de053 commit 87f1ae7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 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: f4ff497d45c7071166277a39590cc59b50dc893c
refs/heads/master: e63247269de722c3e753991025fb7f15c6aba9aa
31 changes: 13 additions & 18 deletions trunk/drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -1882,18 +1882,6 @@ 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 @@ -3697,20 +3685,21 @@ 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
priv->assoc_request.assoc_type = HC_DISASSOCIATE;

err = ipw_send_associate(priv, &priv->assoc_request);
if (err) {
IPW_DEBUG_HC("Attempt to send [dis]associate command "
"failed.\n");
return;
}

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

}

static int ipw_disassociate(void *data)
Expand Down Expand Up @@ -7672,6 +7661,8 @@ 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 @@ -7685,9 +7676,6 @@ 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 Expand Up @@ -7791,6 +7779,13 @@ static int ipw_associate(void *data)
return 0;
}

if (priv->status & STATUS_DISASSOCIATING) {
IPW_DEBUG_ASSOC("Not attempting association (in "
"disassociating)\n ");
queue_work(priv->workqueue, &priv->associate);
return 0;
}

if (!ipw_is_init(priv) || (priv->status & STATUS_SCANNING)) {
IPW_DEBUG_ASSOC("Not attempting association (scanning or not "
"initialized)\n");
Expand Down

0 comments on commit 87f1ae7

Please sign in to comment.