summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2005-05-24 21:46:17 +0000
committerreyk <reyk@openbsd.org>2005-05-24 21:46:17 +0000
commitdcc633efd5143e7b79751a8caad5fa986f724abd (patch)
tree7d3b8a697e99fcf2a796477eb5b7bca44062df53
parentOnly redistribute networks if the interface they depend on is actually (diff)
downloadwireguard-openbsd-dcc633efd5143e7b79751a8caad5fa986f724abd.tar.xz
wireguard-openbsd-dcc633efd5143e7b79751a8caad5fa986f724abd.zip
ath_hal_rx_monitor should be used for link state monitoring instead of
setting the promisc mode. rename it to ath_hal_rx_signal and remove the incorrect promisc flag. this should fix some problems with ath running in forwarding mode.
-rw-r--r--sys/dev/ic/ar5210.c12
-rw-r--r--sys/dev/ic/ar5211.c9
-rw-r--r--sys/dev/ic/ar5212.c9
-rw-r--r--sys/dev/ic/ar5xxx.h4
-rw-r--r--sys/dev/ic/ath.c5
-rw-r--r--sys/dev/ic/athvar.h6
6 files changed, 19 insertions, 26 deletions
diff --git a/sys/dev/ic/ar5210.c b/sys/dev/ic/ar5210.c
index 1c08ca87825..8466dffd121 100644
--- a/sys/dev/ic/ar5210.c
+++ b/sys/dev/ic/ar5210.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5210.c,v 1.23 2005/05/21 20:14:54 reyk Exp $ */
+/* $OpenBSD: ar5210.c,v 1.24 2005/05/24 21:46:17 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -87,7 +87,7 @@ ar5k_ar5210_fill(hal)
AR5K_HAL_FUNCTION(hal, ar5210, set_rx_filter);
AR5K_HAL_FUNCTION(hal, ar5210, setup_rx_desc);
AR5K_HAL_FUNCTION(hal, ar5210, proc_rx_desc);
- AR5K_HAL_FUNCTION(hal, ar5210, set_rx_monitor);
+ AR5K_HAL_FUNCTION(hal, ar5210, set_rx_signal);
/*
* Misc functions
@@ -1409,14 +1409,10 @@ ar5k_ar5210_proc_rx_desc(hal, desc, phys_addr, next)
}
void
-ar5k_ar5210_set_rx_monitor(hal)
+ar5k_ar5210_set_rx_signal(hal)
struct ath_hal *hal;
{
- /*
- * XXX Not sure, if this works correctly.
- */
- AR5K_REG_ENABLE_BITS(AR5K_AR5210_RX_FILTER,
- AR5K_AR5210_RX_FILTER_PROMISC);
+ /* Signal state monitoring is not yet supported */
}
/*
diff --git a/sys/dev/ic/ar5211.c b/sys/dev/ic/ar5211.c
index 06279fb8f3c..0e91773a987 100644
--- a/sys/dev/ic/ar5211.c
+++ b/sys/dev/ic/ar5211.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5211.c,v 1.14 2005/05/21 20:14:55 reyk Exp $ */
+/* $OpenBSD: ar5211.c,v 1.15 2005/05/24 21:46:18 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -97,7 +97,7 @@ ar5k_ar5211_fill(hal)
AR5K_HAL_FUNCTION(hal, ar5211, set_rx_filter);
AR5K_HAL_FUNCTION(hal, ar5211, setup_rx_desc);
AR5K_HAL_FUNCTION(hal, ar5211, proc_rx_desc);
- AR5K_HAL_FUNCTION(hal, ar5211, set_rx_monitor);
+ AR5K_HAL_FUNCTION(hal, ar5211, set_rx_signal);
/*
* Misc functions
@@ -1491,11 +1491,10 @@ ar5k_ar5211_proc_rx_desc(hal, desc, phys_addr, next)
}
void
-ar5k_ar5211_set_rx_monitor(hal)
+ar5k_ar5211_set_rx_signal(hal)
struct ath_hal *hal;
{
- AR5K_REG_ENABLE_BITS(AR5K_AR5211_RX_FILTER,
- AR5K_AR5211_RX_FILTER_PROMISC);
+ /* Signal state monitoring is not yet supported */
}
/*
diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c
index abe67443f40..973a6ca3505 100644
--- a/sys/dev/ic/ar5212.c
+++ b/sys/dev/ic/ar5212.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5212.c,v 1.18 2005/05/21 20:14:55 reyk Exp $ */
+/* $OpenBSD: ar5212.c,v 1.19 2005/05/24 21:46:18 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -94,7 +94,7 @@ ar5k_ar5212_fill(hal)
AR5K_HAL_FUNCTION(hal, ar5212, set_rx_filter);
AR5K_HAL_FUNCTION(hal, ar5212, setup_rx_desc);
AR5K_HAL_FUNCTION(hal, ar5212, proc_rx_desc);
- AR5K_HAL_FUNCTION(hal, ar5212, set_rx_monitor);
+ AR5K_HAL_FUNCTION(hal, ar5212, set_rx_signal);
/*
* Misc functions
@@ -1740,11 +1740,10 @@ ar5k_ar5212_proc_rx_desc(hal, desc, phys_addr, next)
}
void
-ar5k_ar5212_set_rx_monitor(hal)
+ar5k_ar5212_set_rx_signal(hal)
struct ath_hal *hal;
{
- AR5K_REG_ENABLE_BITS(AR5K_AR5212_RX_FILTER,
- AR5K_AR5212_RX_FILTER_PROMISC);
+ /* Signal state monitoring is not yet supported */
}
/*
diff --git a/sys/dev/ic/ar5xxx.h b/sys/dev/ic/ar5xxx.h
index 81d8cb043d6..45b5a1661c4 100644
--- a/sys/dev/ic/ar5xxx.h
+++ b/sys/dev/ic/ar5xxx.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5xxx.h,v 1.20 2005/05/08 18:13:17 reyk Exp $ */
+/* $OpenBSD: ar5xxx.h,v 1.21 2005/05/24 21:46:18 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -985,7 +985,7 @@ struct ath_desc {
struct ath_desc *, u_int32_t size, u_int flags); \
_t HAL_STATUS (_a _n##_proc_rx_desc)(struct ath_hal *, \
struct ath_desc *, u_int32_t phyAddr, struct ath_desc *next); \
- _t void (_a _n##_set_rx_monitor)(struct ath_hal *); \
+ _t void (_a _n##_set_rx_signal)(struct ath_hal *); \
/* Misc Functions */ \
_t void (_a _n##_dump_state)(struct ath_hal *); \
_t HAL_BOOL (_a _n##_get_diag_state)(struct ath_hal *, int, void **, \
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index 3ac8a96442b..5c4762f15d6 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.25 2005/05/11 05:15:01 reyk Exp $ */
+/* $OpenBSD: ath.c,v 1.26 2005/05/24 21:46:18 reyk Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -2051,7 +2051,7 @@ ath_rx_proc(void *arg, int npending)
TAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
} while (ath_rxbuf_init(sc, bf) == 0);
- ath_hal_set_rx_monitor(ah); /* rx signal state monitoring */
+ ath_hal_set_rx_signal(ah); /* rx signal state monitoring */
ath_hal_start_rx(ah); /* in case of RXEOL */
if ((ifp->if_flags & IFF_OACTIVE) == 0 && !IFQ_IS_EMPTY(&ifp->if_snd))
@@ -2597,7 +2597,6 @@ ath_stoprecv(struct ath_softc *sc)
ath_hal_stop_pcu_recv(ah); /* disable PCU */
ath_hal_set_rx_filter(ah, 0); /* clear recv filter */
ath_hal_stop_rx_dma(ah); /* disable DMA engine */
- DELAY(3000); /* long enough for 1 frame */
#ifdef AR_DEBUG
if (ath_debug & ATH_DEBUG_RESET) {
struct ath_buf *bf;
diff --git a/sys/dev/ic/athvar.h b/sys/dev/ic/athvar.h
index cce12f00f40..ac82ff812b4 100644
--- a/sys/dev/ic/athvar.h
+++ b/sys/dev/ic/athvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: athvar.h,v 1.7 2005/04/18 18:42:56 reyk Exp $ */
+/* $OpenBSD: athvar.h,v 1.8 2005/05/24 21:46:18 reyk Exp $ */
/* $NetBSD: athvar.h,v 1.10 2004/08/10 01:03:53 dyoung Exp $ */
/*-
@@ -526,8 +526,8 @@ int ath_intr(void *);
((*(_ah)->ah_has_veol)((_ah)))
#define ath_hal_get_rf_gain(_ah) \
((*(_ah)->ah_get_rf_gain)((_ah)))
-#define ath_hal_set_rx_monitor(_ah) \
- ((*(_ah)->ah_set_rx_monitor)((_ah)))
+#define ath_hal_set_rx_signal(_ah) \
+ ((*(_ah)->ah_set_rx_signal)((_ah)))
#define ath_hal_setup_rx_desc(_ah, _ds, _size, _intreq) \
((*(_ah)->ah_setup_rx_desc)((_ah), (_ds), (_size), (_intreq)))