Move symbol reset detection code back into wi_reset. This is a more
reliable way to detect if the symbol cards have been reset or not. This makes symbol cards work better. Submitted by: deischen
This commit is contained in:
parent
08d49adb7f
commit
572ab50c54
@ -627,14 +627,10 @@ wi_init(void *arg)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wasenabled = sc->sc_enabled;
|
|
||||||
if (!sc->sc_enabled) {
|
|
||||||
sc->sc_enabled = 1;
|
|
||||||
} else
|
|
||||||
wi_stop(ifp, 0);
|
|
||||||
|
|
||||||
/* Symbol firmware cannot be initialized more than once */
|
/* Symbol firmware cannot be initialized more than once */
|
||||||
if (sc->sc_firmware_type != WI_SYMBOL || !wasenabled)
|
if ((wasenabled = sc->sc_enabled))
|
||||||
|
wi_stop(ifp, 0);
|
||||||
|
sc->sc_enabled = 1;
|
||||||
wi_reset(sc);
|
wi_reset(sc);
|
||||||
|
|
||||||
/* common 802.11 configuration */
|
/* common 802.11 configuration */
|
||||||
@ -957,6 +953,11 @@ wi_reset(struct wi_softc *sc)
|
|||||||
#define WI_INIT_TRIES 5
|
#define WI_INIT_TRIES 5
|
||||||
int i, error;
|
int i, error;
|
||||||
|
|
||||||
|
/* Symbol firmware cannot be reset more than once. */
|
||||||
|
if (sc->sc_firmware_type == WI_SYMBOL && sc->sc_reset)
|
||||||
|
return (0);
|
||||||
|
sc->sc_reset = 1;
|
||||||
|
|
||||||
for (i = 0; i < WI_INIT_TRIES; i++) {
|
for (i = 0; i < WI_INIT_TRIES; i++) {
|
||||||
if ((error = wi_cmd(sc, WI_CMD_INI, 0, 0, 0)) == 0)
|
if ((error = wi_cmd(sc, WI_CMD_INI, 0, 0, 0)) == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -68,6 +68,7 @@ struct wi_softc {
|
|||||||
int sc_unit;
|
int sc_unit;
|
||||||
int wi_gone;
|
int wi_gone;
|
||||||
int sc_enabled;
|
int sc_enabled;
|
||||||
|
int sc_reset;
|
||||||
int sc_firmware_type;
|
int sc_firmware_type;
|
||||||
#define WI_NOTYPE 0
|
#define WI_NOTYPE 0
|
||||||
#define WI_LUCENT 1
|
#define WI_LUCENT 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user