diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-08-03 15:24:35 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-04 16:44:27 -0400 |
commit | 7819ac84b689b61340f29af6233fa1d15b76a6ef (patch) | |
tree | 088a5b201762c087fd57507f80ad4c433bbc0896 /drivers | |
parent | fbf54660d1b48fba8527aae5c628ba72feee8f83 (diff) |
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')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 8228f41c9c33..2e09204fc8ac 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1223,7 +1223,7 @@ struct ath_hw *ath9k_hw_attach(u16 devid, struct ath_softc *sc, int *error) | |||
1223 | ah = ath9k_hw_do_attach(devid, sc, error); | 1223 | ah = ath9k_hw_do_attach(devid, sc, error); |
1224 | break; | 1224 | break; |
1225 | default: | 1225 | default: |
1226 | *error = -ENXIO; | 1226 | *error = -EOPNOTSUPP; |
1227 | break; | 1227 | break; |
1228 | } | 1228 | } |
1229 | 1229 | ||
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, | |||
1295 | static int ath_init(u16 devid, struct ath_softc *sc) | 1295 | static int ath_init(u16 devid, struct ath_softc *sc) |
1296 | { | 1296 | { |
1297 | struct ath_hw *ah = NULL; | 1297 | struct ath_hw *ah = NULL; |
1298 | int status; | ||
1299 | int error = 0, i; | 1298 | int error = 0, i; |
1300 | int csz = 0; | 1299 | int csz = 0; |
1301 | 1300 | ||
@@ -1323,11 +1322,11 @@ static int ath_init(u16 devid, struct ath_softc *sc) | |||
1323 | /* XXX assert csz is non-zero */ | 1322 | /* XXX assert csz is non-zero */ |
1324 | sc->cachelsz = csz << 2; /* convert to bytes */ | 1323 | sc->cachelsz = csz << 2; /* convert to bytes */ |
1325 | 1324 | ||
1326 | ah = ath9k_hw_attach(devid, sc, &status); | 1325 | ah = ath9k_hw_attach(devid, sc, &error); |
1327 | if (ah == NULL) { | 1326 | if (ah == NULL) { |
1328 | DPRINTF(sc, ATH_DBG_FATAL, | 1327 | DPRINTF(sc, ATH_DBG_FATAL, |
1329 | "Unable to attach hardware; HAL status %d\n", status); | 1328 | "Unable to attach hardware; " |
1330 | error = -ENXIO; | 1329 | "initialization status: %d\n", error); |
1331 | goto bad; | 1330 | goto bad; |
1332 | } | 1331 | } |
1333 | sc->sc_ah = ah; | 1332 | sc->sc_ah = ah; |