From cee1c3f7f981003ca33566283b26b8afbf43c062 Mon Sep 17 00:00:00 2001 From: mtaylor Date: Thu, 10 Apr 2008 03:30:01 +0000 Subject: [PATCH] Add init/destroy for locks to correct places, including the new beacon buffer and group poll buffer locks which will be used in a subsequent checkin. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3507 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_ath.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ath/if_ath.c b/ath/if_ath.c index 034309b..afb5fba 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -548,6 +548,8 @@ ath_attach(u_int16_t devid, struct net_device *dev, HAL_BUS_TAG tag) ATH_HAL_LOCK_INIT(sc); ATH_TXBUF_LOCK_INIT(sc); ATH_RXBUF_LOCK_INIT(sc); + ATH_BBUF_LOCK_INIT(sc); + ATH_GBUF_LOCK_INIT(sc); atomic_set(&sc->sc_txbuf_counter, 0); @@ -1154,6 +1156,9 @@ bad: if (ah) _ath_hal_detach(ah); ATH_TXBUF_LOCK_DESTROY(sc); + ATH_RXBUF_LOCK_DESTROY(sc); + ATH_BBUF_LOCK_DESTROY(sc); + ATH_GBUF_LOCK_DESTROY(sc); ATH_LOCK_DESTROY(sc); ATH_HAL_LOCK_DESTROY(sc); sc->sc_invalid = 1; @@ -1214,6 +1219,10 @@ ath_detach(struct net_device *dev) ath_dynamic_sysctl_unregister(sc); ATH_LOCK_DESTROY(sc); + ATH_TXBUF_LOCK_DESTROY(sc); + ATH_RXBUF_LOCK_DESTROY(sc); + ATH_BBUF_LOCK_DESTROY(sc); + ATH_GBUF_LOCK_DESTROY(sc); ATH_HAL_LOCK_DESTROY(sc); dev->stop = NULL; /* prevent calling ath_stop again */ unregister_netdev(dev);