diff options
author | Arend van Spriel | 2010-12-04 16:35:43 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2010-12-07 01:08:31 +0100 |
commit | 8538576474e162e4967532a80305d17e871f2fa5 (patch) | |
tree | f1ef5a63c58c0725b1254d133fe53c9f6133eca0 /drivers/staging/brcm80211/util | |
parent | staging: brcm80211: remove macro usage for sk_buff allocation (diff) | |
download | kernel-qcow2-linux-8538576474e162e4967532a80305d17e871f2fa5.tar.gz kernel-qcow2-linux-8538576474e162e4967532a80305d17e871f2fa5.tar.xz kernel-qcow2-linux-8538576474e162e4967532a80305d17e871f2fa5.zip |
staging: brcm80211: remove macro usage for sk_buff release
PKTFREE macro calls osl_pktfree. This function has been renamed to
pkt_buf_free_skb as it comprises of functionality additional to
dev_kfree_skb(_any) function and to get rid of the OSL concept in
this driver.
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Reviewed-by: Dowan Kim <dowan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/util')
-rw-r--r-- | drivers/staging/brcm80211/util/bcmutils.c | 4 | ||||
-rw-r--r-- | drivers/staging/brcm80211/util/hnddma.c | 17 | ||||
-rw-r--r-- | drivers/staging/brcm80211/util/linux_osl.c | 5 |
3 files changed, 10 insertions, 16 deletions
diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c index 9c4d46764aca..fd30cc6fb7f8 100644 --- a/drivers/staging/brcm80211/util/bcmutils.c +++ b/drivers/staging/brcm80211/util/bcmutils.c @@ -198,7 +198,7 @@ void pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir) while (p) { q->head = p->prev; p->prev = NULL; - PKTFREE(osh, p, dir); + pkt_buf_free_skb(osh, p, dir); q->len--; pq->len--; p = q->head; @@ -232,7 +232,7 @@ pktq_pflush(struct osl_info *osh, struct pktq *pq, int prec, bool dir, else prev->prev = p->prev; p->prev = NULL; - PKTFREE(osh, p, dir); + pkt_buf_free_skb(osh, p, dir); q->len--; pq->len--; p = (head ? q->head : prev->prev); diff --git a/drivers/staging/brcm80211/util/hnddma.c b/drivers/staging/brcm80211/util/hnddma.c index a7805a88b5fe..cf9e469af988 100644 --- a/drivers/staging/brcm80211/util/hnddma.c +++ b/drivers/staging/brcm80211/util/hnddma.c @@ -1046,7 +1046,7 @@ static void *BCMFASTPATH _dma_rx(dma_info_t *di) if ((di->hnddma.dmactrlflags & DMA_CTRL_RXMULTI) == 0) { DMA_ERROR(("%s: dma_rx: bad frame length (%d)\n", di->name, len)); - PKTFREE(di->osh, head, false); + pkt_buf_free_skb(di->osh, head, false); di->hnddma.rxgiants++; goto next_frame; } @@ -1230,15 +1230,10 @@ static void _dma_rxreclaim(dma_info_t *di) { void *p; - /* "unused local" warning suppression for OSLs that - * define PKTFREE() without using the di->osh arg - */ - di = di; - DMA_TRACE(("%s: dma_rxreclaim\n", di->name)); while ((p = _dma_getnextrxp(di, true))) - PKTFREE(di->osh, p, false); + pkt_buf_free_skb(di->osh, p, false); } static void *BCMFASTPATH _dma_getnextrxp(dma_info_t *di, bool forceall) @@ -1501,7 +1496,7 @@ static void dma32_txreclaim(dma_info_t *di, txd_range_t range) return; while ((p = dma32_getnexttxp(di, range))) - PKTFREE(di->osh, p, true); + pkt_buf_free_skb(di->osh, p, true); } static bool dma32_txstopped(dma_info_t *di) @@ -1772,7 +1767,7 @@ static int dma32_txfast(dma_info_t *di, struct sk_buff *p0, bool commit) outoftxd: DMA_ERROR(("%s: dma_txfast: out of txds\n", di->name)); - PKTFREE(di->osh, p0, true); + pkt_buf_free_skb(di->osh, p0, true); di->hnddma.txavail = 0; di->hnddma.txnobuf++; return -1; @@ -2071,7 +2066,7 @@ static void BCMFASTPATH dma64_txreclaim(dma_info_t *di, txd_range_t range) while ((p = dma64_getnexttxp(di, range))) { /* For unframed data, we don't have any packets to free */ if (!(di->hnddma.dmactrlflags & DMA_CTRL_UNFRAMED)) - PKTFREE(di->osh, p, true); + pkt_buf_free_skb(di->osh, p, true); } } @@ -2422,7 +2417,7 @@ static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0, outoftxd: DMA_ERROR(("%s: dma_txfast: out of txds !!!\n", di->name)); - PKTFREE(di->osh, p0, true); + pkt_buf_free_skb(di->osh, p0, true); di->hnddma.txavail = 0; di->hnddma.txnobuf++; return -1; diff --git a/drivers/staging/brcm80211/util/linux_osl.c b/drivers/staging/brcm80211/util/linux_osl.c index cd78edbcf43f..e6716e823baa 100644 --- a/drivers/staging/brcm80211/util/linux_osl.c +++ b/drivers/staging/brcm80211/util/linux_osl.c @@ -95,12 +95,11 @@ struct sk_buff *BCMFASTPATH pkt_buf_get_skb(struct osl_info *osh, uint len) } /* Free the driver packet. Free the tag if present */ -void BCMFASTPATH osl_pktfree(struct osl_info *osh, void *p, bool send) +void BCMFASTPATH pkt_buf_free_skb(struct osl_info *osh, struct sk_buff *skb, bool send) { - struct sk_buff *skb, *nskb; + struct sk_buff *nskb; int nest = 0; - skb = (struct sk_buff *)p; ASSERT(skb); /* perversion: we use skb->next to chain multi-skb packets */ |