diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-05-27 04:10:07 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2005-05-27 04:10:07 +0000 |
commit | 0ad0d3638f6ef0319b6d344ba9b7cceaf67e351d (patch) | |
tree | a0e021a4927ac466a1c07112801ef594a60947d7 /sys/dev | |
parent | 78d1e449e770d8abfe489fa57c3b9c6f2993cc20 (diff) |
- disable the gpio user interface for now, it's just an unimportant
button which is not yet available on non-i386 platforms
- fix endianess and attachement on big endian platforms (tested on
macppc - ath attaches correctly, receives frames but assoc still
fails)
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/ar5xxx.c | 11 | ||||
-rw-r--r-- | sys/dev/ic/ar5xxx.h | 6 | ||||
-rw-r--r-- | sys/dev/ic/ath.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/athvar.h | 4 |
4 files changed, 17 insertions, 14 deletions
diff --git a/sys/dev/ic/ar5xxx.c b/sys/dev/ic/ar5xxx.c index b5b32bdbad3..a19ff07a548 100644 --- a/sys/dev/ic/ar5xxx.c +++ b/sys/dev/ic/ar5xxx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5xxx.c,v 1.23 2005/05/16 04:54:31 reyk Exp $ */ +/* $OpenBSD: ar5xxx.c,v 1.24 2005/05/27 04:10:06 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> @@ -245,7 +245,7 @@ ath_hal_attach(device, sc, st, sh, status) } /* Get MAC address */ - if ((*status = ar5k_eeprom_read_mac(hal, mac)) != HAL_OK) { + if ((*status = ar5k_eeprom_read_mac(hal, mac)) != 0) { AR5K_PRINTF("unable to read address from EEPROM: 0x%04x\n", device); goto failed; @@ -878,10 +878,6 @@ ar5k_eeprom_init(hal) int ret, i; u_int mode; - /* Check if EEPROM is busy */ - if (hal->ah_eeprom_is_busy(hal) == AH_TRUE) - return (EBUSY); - /* Initial TX thermal adjustment values */ ee->ee_tx_clip = 4; ee->ee_pwd_84 = ee->ee_pwd_90 = 1; @@ -1064,9 +1060,6 @@ ar5k_eeprom_read_mac(hal, mac) bzero(mac, IEEE80211_ADDR_LEN); bzero(&mac_d, IEEE80211_ADDR_LEN); - if (hal->ah_eeprom_is_busy(hal)) - return (EBUSY); - if (hal->ah_eeprom_read(hal, 0x20, &data) != 0) return (EIO); diff --git a/sys/dev/ic/ar5xxx.h b/sys/dev/ic/ar5xxx.h index 45b5a1661c4..fd64d5ea405 100644 --- a/sys/dev/ic/ar5xxx.h +++ b/sys/dev/ic/ar5xxx.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ar5xxx.h,v 1.21 2005/05/24 21:46:18 reyk Exp $ */ +/* $OpenBSD: ar5xxx.h,v 1.22 2005/05/27 04:10:06 reyk Exp $ */ /* * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net> @@ -1343,9 +1343,9 @@ typedef HAL_BOOL (ar5k_rfgain_t) */ #define AR5K_REG_WRITE(_reg, _val) \ - bus_space_write_4(hal->ah_st, hal->ah_sh, (_reg), htole32(_val)) + bus_space_write_4(hal->ah_st, hal->ah_sh, (_reg), (_val)) #define AR5K_REG_READ(_reg) \ - (letoh32(bus_space_read_4(hal->ah_st, hal->ah_sh, (_reg)))) + bus_space_read_4(hal->ah_st, hal->ah_sh, (_reg)) #define AR5K_REG_SM(_val, _flags) \ (((_val) << _flags##_S) & (_flags)) diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index 5c4762f15d6..878d76c9f2b 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ath.c,v 1.26 2005/05/24 21:46:18 reyk Exp $ */ +/* $OpenBSD: ath.c,v 1.27 2005/05/27 04:10:06 reyk Exp $ */ /* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */ /*- @@ -80,7 +80,9 @@ #include <net80211/ieee80211_var.h> #include <net80211/ieee80211_compat.h> +#ifdef notyet #include <dev/gpio/gpiovar.h> +#endif #include <dev/ic/athvar.h> int ath_init(struct ifnet *); @@ -141,12 +143,14 @@ int ath_enable(struct ath_softc *); void ath_disable(struct ath_softc *); void ath_power(int, void *); +#ifdef notyet #if NGPIO > 0 int ath_gpio_attach(struct ath_softc *); int ath_gpio_pin_read(void *, int); void ath_gpio_pin_write(void *, int, int); void ath_gpio_pin_ctl(void *, int, int); #endif +#endif #ifdef AR_DEBUG void ath_printrxbuf(struct ath_buf *, int); @@ -409,10 +413,12 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) printf(", %s, address %s\n", ieee80211_regdomain2name(ath_regdomain), ether_sprintf(ic->ic_myaddr)); +#ifdef notyet #if NGPIO > 0 if (ath_gpio_attach(sc) == 0) sc->sc_flags |= ATH_GPIO; #endif +#endif return 0; bad2: @@ -3230,6 +3236,7 @@ ath_printtxbuf(struct ath_buf *bf, int done) } #endif /* AR_DEBUG */ +#ifdef notyet #if NGPIO > 0 int ath_gpio_attach(struct ath_softc *sc) @@ -3302,3 +3309,4 @@ ath_gpio_pin_ctl(void *arg, int pin, int flags) } } #endif /* NGPIO */ +#endif diff --git a/sys/dev/ic/athvar.h b/sys/dev/ic/athvar.h index ac82ff812b4..6efc7a600a6 100644 --- a/sys/dev/ic/athvar.h +++ b/sys/dev/ic/athvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: athvar.h,v 1.8 2005/05/24 21:46:18 reyk Exp $ */ +/* $OpenBSD: athvar.h,v 1.9 2005/05/27 04:10:06 reyk Exp $ */ /* $NetBSD: athvar.h,v 1.10 2004/08/10 01:03:53 dyoung Exp $ */ /*- @@ -48,7 +48,9 @@ #include <net80211/ieee80211_radiotap.h> #include <dev/ic/ar5xxx.h> +#ifdef notyet #include "gpio.h" +#endif #define ATH_TIMEOUT 1000 |