diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2006-11-01 11:25:02 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2006-11-01 11:25:02 +0000 |
commit | 567ffd3016f89c359231960114bdf13d61ddbf31 (patch) | |
tree | 774c7fcca231c9cf19abeb6cb73bcf5374f7c2ed | |
parent | 982c0f50abc28ef11ce1509d9e49c6300b66a653 (diff) |
fix firmware fatal errors on re-associations.
reported and tested by Marc Winiger and dhartmei@
-rw-r--r-- | sys/dev/pci/if_wpi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index e3cc5ed5bbd..8fb7b06bc17 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.34 2006/10/23 18:19:26 damien Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.35 2006/11/01 11:25:01 damien Exp $ */ /*- * Copyright (c) 2006 @@ -790,6 +790,10 @@ wpi_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) ic->ic_state = nstate; return 0; + case IEEE80211_S_ASSOC: + if (ic->ic_state != IEEE80211_S_RUN) + break; + /* FALLTHROUGH */ case IEEE80211_S_AUTH: /* reset state to handle reassociations correctly */ sc->config.state = 0; @@ -845,7 +849,6 @@ wpi_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) wpi_set_led(sc, WPI_LED_LINK, 0, 1); break; - case IEEE80211_S_ASSOC: case IEEE80211_S_INIT: break; } |