ath9k: propagate hw initialization errors
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Mon, 3 Aug 2009 19:24:35 +0000 (12:24 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Aug 2009 20:44:27 +0000 (16:44 -0400)
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>
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/main.c

index 8228f41c9c33bf710bcf6ded7f5318e431dec883..2e09204fc8ac385232bd52910b917aea0bcb36c2 100644 (file)
@@ -1223,7 +1223,7 @@ struct ath_hw *ath9k_hw_attach(u16 devid, struct ath_softc *sc, int *error)
                ah = ath9k_hw_do_attach(devid, sc, error);
                break;
        default:
-               *error = -ENXIO;
+               *error = -EOPNOTSUPP;
                break;
        }
 
index 292ac2b41891868ae41b01a6f45df333a225f9d5..ada5fef924c8685e089b551a6425139ee14925be 100644 (file)
@@ -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;
This page took 0.043425 seconds and 5 git commands to generate.