diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-08-03 23:24:35 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-05 00:44:27 +0400 |
commit | 7819ac84b689b61340f29af6233fa1d15b76a6ef (patch) | |
tree | 088a5b201762c087fd57507f80ad4c433bbc0896 /drivers/net/wireless/ath/ath9k/main.c | |
parent | fbf54660d1b48fba8527aae5c628ba72feee8f83 (diff) | |
download | linux-7819ac84b689b61340f29af6233fa1d15b76a6ef.tar.xz |
ath9k: propagate hw initialization errors
We were never propagating hw initialization errors, lets
do that now and also use -EOPNOTSUPP when device revision is
not supported yet.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 292ac2b41891..ada5fef924c8 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1295,7 +1295,6 @@ static int ath9k_reg_notifier(struct wiphy *wiphy, static int ath_init(u16 devid, struct ath_softc *sc) { struct ath_hw *ah = NULL; - int status; int error = 0, i; int csz = 0; @@ -1323,11 +1322,11 @@ static int ath_init(u16 devid, struct ath_softc *sc) /* XXX assert csz is non-zero */ sc->cachelsz = csz << 2; /* convert to bytes */ - ah = ath9k_hw_attach(devid, sc, &status); + ah = ath9k_hw_attach(devid, sc, &error); if (ah == NULL) { DPRINTF(sc, ATH_DBG_FATAL, - "Unable to attach hardware; HAL status %d\n", status); - error = -ENXIO; + "Unable to attach hardware; " + "initialization status: %d\n", error); goto bad; } sc->sc_ah = ah; |