summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-04-08 22:12:22 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-04-08 22:12:22 +0000
commitf6e2c42a9faec3e926fc2d60e8cdc93729f7a211 (patch)
treee3b067adbf0c80483a1b7270c3af320e43561f8b
parent354cdc86241db3659af6c32dfd698c5cd65c2881 (diff)
move reset of HAL descriptors to ath.c
-rw-r--r--sys/dev/ic/ar5210.c10
-rw-r--r--sys/dev/ic/ar5211.c10
-rw-r--r--sys/dev/ic/ar5212.c5
-rw-r--r--sys/dev/ic/ath.c5
4 files changed, 7 insertions, 23 deletions
diff --git a/sys/dev/ic/ar5210.c b/sys/dev/ic/ar5210.c
index 5cb4fb91896..fb17b26c521 100644
--- a/sys/dev/ic/ar5210.c
+++ b/sys/dev/ic/ar5210.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5210.c,v 1.18 2005/04/08 22:02:49 reyk Exp $ */
+/* $OpenBSD: ar5210.c,v 1.19 2005/04/08 22:12:21 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -1009,9 +1009,6 @@ ar5k_ar5210_setupTxDesc(hal, desc, packet_length, header_length, type, tx_power,
tx_desc = (struct ar5k_ar5210_tx_desc*)&desc->ds_ctl0;
- /* Clear descriptor */
- bzero(tx_desc, sizeof(struct ar5k_ar5210_tx_desc));
-
/*
* Validate input
*/
@@ -1322,11 +1319,6 @@ ar5k_ar5210_setupRxDesc(hal, desc, size, flags)
{
struct ar5k_ar5210_rx_desc *rx_desc;
- /* Reset descriptor */
- desc->ds_ctl0 = 0;
- desc->ds_ctl1 = 0;
- bzero(&desc->ds_hw[0], sizeof(struct ar5k_ar5210_rx_status));
-
rx_desc = (struct ar5k_ar5210_rx_desc*)&desc->ds_ctl0;
if ((rx_desc->rx_control_1 = (size &
diff --git a/sys/dev/ic/ar5211.c b/sys/dev/ic/ar5211.c
index da66f4e3d76..060fa111ebe 100644
--- a/sys/dev/ic/ar5211.c
+++ b/sys/dev/ic/ar5211.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5211.c,v 1.9 2005/04/08 22:02:49 reyk Exp $ */
+/* $OpenBSD: ar5211.c,v 1.10 2005/04/08 22:12:21 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -1118,9 +1118,6 @@ ar5k_ar5211_setupTxDesc(hal, desc, packet_length, header_length, type, tx_power,
tx_desc = (struct ar5k_ar5211_tx_desc*)&desc->ds_ctl0;
- /* Clear descriptor */
- bzero(tx_desc, sizeof(struct ar5k_ar5211_tx_desc));
-
/*
* Validate input
*/
@@ -1403,11 +1400,6 @@ ar5k_ar5211_setupRxDesc(hal, desc, size, flags)
{
struct ar5k_ar5211_rx_desc *rx_desc;
- /* Reset descriptor */
- desc->ds_ctl0 = 0;
- desc->ds_ctl1 = 0;
- bzero(&desc->ds_hw[0], sizeof(struct ar5k_ar5211_rx_status));
-
rx_desc = (struct ar5k_ar5211_rx_desc*)&desc->ds_ctl0;
if ((rx_desc->rx_control_1 = (size &
diff --git a/sys/dev/ic/ar5212.c b/sys/dev/ic/ar5212.c
index 796cdb7cf72..9d358a50740 100644
--- a/sys/dev/ic/ar5212.c
+++ b/sys/dev/ic/ar5212.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ar5212.c,v 1.13 2005/04/08 22:02:49 reyk Exp $ */
+/* $OpenBSD: ar5212.c,v 1.14 2005/04/08 22:12:21 reyk Exp $ */
/*
* Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
@@ -1267,9 +1267,6 @@ ar5k_ar5212_setupTxDesc(hal, desc, packet_length, header_length, type, tx_power,
tx_desc = (struct ar5k_ar5212_tx_desc*)&desc->ds_ctl0;
- /* Clear descriptor */
- bzero(tx_desc, sizeof(struct ar5k_ar5212_tx_desc));
-
/*
* Validate input
*/
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index a2cc2fe2fe0..f10077f072c 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.21 2005/04/06 09:14:53 reyk Exp $ */
+/* $OpenBSD: ath.c,v 1.22 2005/04/08 22:12:21 reyk Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -1320,6 +1320,7 @@ ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_node *ni)
/* setup descriptors */
ds = bf->bf_desc;
+ bzero(ds, sizeof(struct ath_desc));
if (ic->ic_opmode == IEEE80211_M_IBSS && sc->sc_hasveol) {
ds->ds_link = bf->bf_daddr; /* link to self */
@@ -1840,6 +1841,8 @@ ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf)
* someplace to write a new frame.
*/
ds = bf->bf_desc;
+ bzero(ds, sizeof(struct ath_desc));
+
ds->ds_link = bf->bf_daddr; /* link to self */
ds->ds_data = bf->bf_segs[0].ds_addr;
ath_hal_setuprxdesc(ah, ds