mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 07:34:06 +08:00
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>
This commit is contained in:
parent
fbf54660d1
commit
7819ac84b6
@ -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);
|
ah = ath9k_hw_do_attach(devid, sc, error);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*error = -ENXIO;
|
*error = -EOPNOTSUPP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1295,7 +1295,6 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
|
|||||||
static int ath_init(u16 devid, struct ath_softc *sc)
|
static int ath_init(u16 devid, struct ath_softc *sc)
|
||||||
{
|
{
|
||||||
struct ath_hw *ah = NULL;
|
struct ath_hw *ah = NULL;
|
||||||
int status;
|
|
||||||
int error = 0, i;
|
int error = 0, i;
|
||||||
int csz = 0;
|
int csz = 0;
|
||||||
|
|
||||||
@ -1323,11 +1322,11 @@ static int ath_init(u16 devid, struct ath_softc *sc)
|
|||||||
/* XXX assert csz is non-zero */
|
/* XXX assert csz is non-zero */
|
||||||
sc->cachelsz = csz << 2; /* convert to bytes */
|
sc->cachelsz = csz << 2; /* convert to bytes */
|
||||||
|
|
||||||
ah = ath9k_hw_attach(devid, sc, &status);
|
ah = ath9k_hw_attach(devid, sc, &error);
|
||||||
if (ah == NULL) {
|
if (ah == NULL) {
|
||||||
DPRINTF(sc, ATH_DBG_FATAL,
|
DPRINTF(sc, ATH_DBG_FATAL,
|
||||||
"Unable to attach hardware; HAL status %d\n", status);
|
"Unable to attach hardware; "
|
||||||
error = -ENXIO;
|
"initialization status: %d\n", error);
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
sc->sc_ah = ah;
|
sc->sc_ah = ah;
|
||||||
|
Loading…
Reference in New Issue
Block a user