diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-03-29 11:04:41 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2019-03-29 11:04:41 +0000 |
commit | c931def288e91c874c3402ae8bc8025cb18695fc (patch) | |
tree | f2f8cb3ea73ff9a08700d5fb68ae9ffe7520b889 /sys | |
parent | 721bf35892cb740f6306c7f6c75c2871f094394b (diff) |
Read the EEPROM of AR9287 USB devices from the correct offset.
Fixes kevlo's TL-WN821nv3.
test & ok kevlo@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/ar9287.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/ar9287reg.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/ar9287.c b/sys/dev/ic/ar9287.c index 74025dba1af..ebe030cdf09 100644 --- a/sys/dev/ic/ar9287.c +++ b/sys/dev/ic/ar9287.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar9287.c,v 1.26 2019/02/01 16:15:07 stsp Exp $ */ +/* $OpenBSD: ar9287.c,v 1.27 2019/03/29 11:04:40 stsp Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -100,7 +100,8 @@ void ar9280_spur_mitigate(struct athn_softc *, struct ieee80211_channel *, int ar9287_attach(struct athn_softc *sc) { - sc->eep_base = AR9287_EEP_START_LOC; + sc->eep_base = (sc->flags & ATHN_FLAG_USB) ? + AR9287_HTC_EEP_START_LOC : AR9287_EEP_START_LOC; sc->eep_size = sizeof(struct ar9287_eeprom); sc->ngpiopins = (sc->flags & ATHN_FLAG_USB) ? 16 : 11; sc->led_pin = 8; diff --git a/sys/dev/ic/ar9287reg.h b/sys/dev/ic/ar9287reg.h index 340b28c2f84..bd683eaf2b2 100644 --- a/sys/dev/ic/ar9287reg.h +++ b/sys/dev/ic/ar9287reg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ar9287reg.h,v 1.5 2019/02/01 16:15:07 stsp Exp $ */ +/* $OpenBSD: ar9287reg.h,v 1.6 2019/03/29 11:04:40 stsp Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -60,6 +60,7 @@ * ROM layout used by AR9287 (2GHz only). */ #define AR9287_EEP_START_LOC 128 +#define AR9287_HTC_EEP_START_LOC 256 #define AR9287_NUM_2G_CAL_PIERS 3 #define AR9287_NUM_2G_CCK_TARGET_POWERS 3 #define AR9287_NUM_2G_20_TARGET_POWERS 3 |