diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2009-09-10 14:08:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:26 -0400 |
commit | 27c51f1a349f3e4eb9c1d6d3a548eafe1828cc7a (patch) | |
tree | 4bd882ed2bd08fb60e3f1cfd33c3c6304a9c94e6 /drivers/net/wireless/ath/ath9k/recv.c | |
parent | 394317fc793eb25dbbda4432d29d97cd80f3b561 (diff) |
ath9k: move ath_common to ath_hw
This ensures that we can access common on hw related code
independent of the driver core.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/recv.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 3bdd4e63721..97a5efe18d6 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -297,6 +297,7 @@ static void ath_opmode_init(struct ath_softc *sc) | |||
297 | 297 | ||
298 | int ath_rx_init(struct ath_softc *sc, int nbufs) | 298 | int ath_rx_init(struct ath_softc *sc, int nbufs) |
299 | { | 299 | { |
300 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | ||
300 | struct sk_buff *skb; | 301 | struct sk_buff *skb; |
301 | struct ath_buf *bf; | 302 | struct ath_buf *bf; |
302 | int error = 0; | 303 | int error = 0; |
@@ -306,10 +307,10 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) | |||
306 | spin_lock_init(&sc->rx.rxbuflock); | 307 | spin_lock_init(&sc->rx.rxbuflock); |
307 | 308 | ||
308 | sc->rx.bufsize = roundup(IEEE80211_MAX_MPDU_LEN, | 309 | sc->rx.bufsize = roundup(IEEE80211_MAX_MPDU_LEN, |
309 | min(sc->common.cachelsz, (u16)64)); | 310 | min(common->cachelsz, (u16)64)); |
310 | 311 | ||
311 | DPRINTF(sc->sc_ah, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n", | 312 | DPRINTF(sc->sc_ah, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n", |
312 | sc->common.cachelsz, sc->rx.bufsize); | 313 | common->cachelsz, sc->rx.bufsize); |
313 | 314 | ||
314 | /* Initialize rx descriptors */ | 315 | /* Initialize rx descriptors */ |
315 | 316 | ||
@@ -322,7 +323,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) | |||
322 | } | 323 | } |
323 | 324 | ||
324 | list_for_each_entry(bf, &sc->rx.rxbuf, list) { | 325 | list_for_each_entry(bf, &sc->rx.rxbuf, list) { |
325 | skb = ath_rxbuf_alloc(&sc->common, sc->rx.bufsize, GFP_KERNEL); | 326 | skb = ath_rxbuf_alloc(common, sc->rx.bufsize, GFP_KERNEL); |
326 | if (skb == NULL) { | 327 | if (skb == NULL) { |
327 | error = -ENOMEM; | 328 | error = -ENOMEM; |
328 | goto err; | 329 | goto err; |
@@ -654,6 +655,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
654 | struct sk_buff *skb = NULL, *requeue_skb; | 655 | struct sk_buff *skb = NULL, *requeue_skb; |
655 | struct ieee80211_rx_status rx_status; | 656 | struct ieee80211_rx_status rx_status; |
656 | struct ath_hw *ah = sc->sc_ah; | 657 | struct ath_hw *ah = sc->sc_ah; |
658 | struct ath_common *common = ath9k_hw_common(ah); | ||
657 | struct ieee80211_hdr *hdr; | 659 | struct ieee80211_hdr *hdr; |
658 | int hdrlen, padsize, retval; | 660 | int hdrlen, padsize, retval; |
659 | bool decrypt_error = false; | 661 | bool decrypt_error = false; |
@@ -752,7 +754,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
752 | 754 | ||
753 | /* Ensure we always have an skb to requeue once we are done | 755 | /* Ensure we always have an skb to requeue once we are done |
754 | * processing the current buffer's skb */ | 756 | * processing the current buffer's skb */ |
755 | requeue_skb = ath_rxbuf_alloc(&sc->common, sc->rx.bufsize, GFP_ATOMIC); | 757 | requeue_skb = ath_rxbuf_alloc(common, sc->rx.bufsize, GFP_ATOMIC); |
756 | 758 | ||
757 | /* If there is no memory we ignore the current RX'd frame, | 759 | /* If there is no memory we ignore the current RX'd frame, |
758 | * tell hardware it can give us a new frame using the old | 760 | * tell hardware it can give us a new frame using the old |