ath5k: remove double cache alignment, ath_rxbuf_alloc() already does it
[pandora-kernel.git] / drivers / net / wireless / ath / ath5k / base.c
index 07c1e52..4cefd9e 100644 (file)
@@ -323,10 +323,13 @@ static inline void ath5k_txbuf_free(struct ath5k_softc *sc,
 static inline void ath5k_rxbuf_free(struct ath5k_softc *sc,
                                struct ath5k_buf *bf)
 {
+       struct ath5k_hw *ah = sc->ah;
+       struct ath_common *common = ath5k_hw_common(ah);
+
        BUG_ON(!bf);
        if (!bf->skb)
                return;
-       pci_unmap_single(sc->pdev, bf->skbaddr, sc->rxbufsize,
+       pci_unmap_single(sc->pdev, bf->skbaddr, common->rx_bufsize,
                        PCI_DMA_FROMDEVICE);
        dev_kfree_skb_any(bf->skb);
        bf->skb = NULL;
@@ -1146,7 +1149,6 @@ ath5k_mode_setup(struct ath5k_softc *sc)
        /* configure operational mode */
        ath5k_hw_set_opmode(ah);
 
-       ath5k_hw_set_mcast_filter(ah, 0, 0);
        ATH5K_DBG(sc, ATH5K_DEBUG_MODE, "RX filter 0x%x\n", rfilt);
 }
 
@@ -1182,17 +1184,18 @@ struct sk_buff *ath5k_rx_skb_alloc(struct ath5k_softc *sc, dma_addr_t *skb_addr)
         * fake physical layer header at the start.
         */
        skb = ath_rxbuf_alloc(common,
-                             sc->rxbufsize + common->cachelsz - 1,
+                             common->rx_bufsize,
                              GFP_ATOMIC);
 
        if (!skb) {
                ATH5K_ERR(sc, "can't alloc skbuff of size %u\n",
-                               sc->rxbufsize + common->cachelsz - 1);
+                               common->rx_bufsize);
                return NULL;
        }
 
        *skb_addr = pci_map_single(sc->pdev,
-               skb->data, sc->rxbufsize, PCI_DMA_FROMDEVICE);
+                                  skb->data, common->rx_bufsize,
+                                  PCI_DMA_FROMDEVICE);
        if (unlikely(pci_dma_mapping_error(sc->pdev, *skb_addr))) {
                ATH5K_ERR(sc, "%s: DMA mapping failed\n", __func__);
                dev_kfree_skb(skb);
@@ -1632,10 +1635,10 @@ ath5k_rx_start(struct ath5k_softc *sc)
        struct ath5k_buf *bf;
        int ret;
 
-       sc->rxbufsize = roundup(IEEE80211_MAX_LEN, common->cachelsz);
+       common->rx_bufsize = roundup(IEEE80211_MAX_LEN, common->cachelsz);
 
-       ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "cachelsz %u rxbufsize %u\n",
-               common->cachelsz, sc->rxbufsize);
+       ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "cachelsz %u rx_bufsize %u\n",
+                 common->cachelsz, common->rx_bufsize);
 
        spin_lock_bh(&sc->rxbuflock);
        sc->rxlink = NULL;
@@ -1770,6 +1773,8 @@ ath5k_tasklet_rx(unsigned long data)
        struct sk_buff *skb, *next_skb;
        dma_addr_t next_skb_addr;
        struct ath5k_softc *sc = (void *)data;
+       struct ath5k_hw *ah = sc->ah;
+       struct ath_common *common = ath5k_hw_common(ah);
        struct ath5k_buf *bf;
        struct ath5k_desc *ds;
        int ret;
@@ -1847,7 +1852,7 @@ accept:
                if (!next_skb)
                        goto next;
 
-               pci_unmap_single(sc->pdev, bf->skbaddr, sc->rxbufsize,
+               pci_unmap_single(sc->pdev, bf->skbaddr, common->rx_bufsize,
                                PCI_DMA_FROMDEVICE);
                skb_put(skb, rs.rs_datalen);