Commit d436d0ce authored by Henry Ptasinski's avatar Henry Ptasinski Committed by Greg Kroah-Hartman

staging: brcm80211: use common pktq_flush functions

The softmac and fullmac drivers can use the same implementation of
pktq_flush(), so remove the unnecessary version.

Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: default avatarRoland Vossen <rvossen@broadcoom.com>
Reviewed-by: default avatarBrett Rudley <brudley@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c876ce07
...@@ -2835,7 +2835,7 @@ void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex) ...@@ -2835,7 +2835,7 @@ void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex)
dhdsdio_clkctl(bus, CLK_SDONLY, false); dhdsdio_clkctl(bus, CLK_SDONLY, false);
/* Clear the data packet queues */ /* Clear the data packet queues */
pktq_flush(&bus->txq, true); pktq_flush(&bus->txq, true, NULL, 0);
/* Clear any held glomming stuff */ /* Clear any held glomming stuff */
if (bus->glomd) if (bus->glomd)
......
...@@ -99,13 +99,8 @@ extern struct sk_buff *pkt_buf_get_skb(uint len); ...@@ -99,13 +99,8 @@ extern struct sk_buff *pkt_buf_get_skb(uint len);
extern void pkt_buf_free_skb(struct sk_buff *skb); extern void pkt_buf_free_skb(struct sk_buff *skb);
/* Empty the queue at particular precedence level */ /* Empty the queue at particular precedence level */
#ifdef BRCM_FULLMAC extern void pktq_pflush(struct pktq *pq, int prec,
extern void pktq_pflush(struct pktq *pq, int prec,
bool dir);
#else
extern void pktq_pflush(struct pktq *pq, int prec,
bool dir, ifpkt_cb_t fn, int arg); bool dir, ifpkt_cb_t fn, int arg);
#endif /* BRCM_FULLMAC */
/* operations on a set of precedences in packet queue */ /* operations on a set of precedences in packet queue */
...@@ -130,12 +125,8 @@ extern struct sk_buff *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out); ...@@ -130,12 +125,8 @@ extern struct sk_buff *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out);
extern void pktq_init(struct pktq *pq, int num_prec, int max_len); extern void pktq_init(struct pktq *pq, int num_prec, int max_len);
/* prec_out may be NULL if caller is not interested in return value */ /* prec_out may be NULL if caller is not interested in return value */
extern struct sk_buff *pktq_peek_tail(struct pktq *pq, int *prec_out); extern struct sk_buff *pktq_peek_tail(struct pktq *pq, int *prec_out);
#ifdef BRCM_FULLMAC
extern void pktq_flush(struct pktq *pq, bool dir);
#else
extern void pktq_flush(struct pktq *pq, bool dir, extern void pktq_flush(struct pktq *pq, bool dir,
ifpkt_cb_t fn, int arg); ifpkt_cb_t fn, int arg);
#endif
/* externs */ /* externs */
/* packet */ /* packet */
......
...@@ -213,32 +213,6 @@ struct sk_buff *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec) ...@@ -213,32 +213,6 @@ struct sk_buff *BCMFASTPATH pktq_pdeq_tail(struct pktq *pq, int prec)
return p; return p;
} }
#ifdef BRCM_FULLMAC
void pktq_pflush(struct pktq *pq, int prec, bool dir)
{
struct pktq_prec *q;
struct sk_buff *p;
q = &pq->q[prec];
p = q->head;
while (p) {
q->head = p->prev;
p->prev = NULL;
pkt_buf_free_skb(p);
q->len--;
pq->len--;
p = q->head;
}
q->tail = NULL;
}
void pktq_flush(struct pktq *pq, bool dir)
{
int prec;
for (prec = 0; prec < pq->num_prec; prec++)
pktq_pflush(pq, prec, dir);
}
#else /* !BRCM_FULLMAC */
void void
pktq_pflush(struct pktq *pq, int prec, bool dir, pktq_pflush(struct pktq *pq, int prec, bool dir,
ifpkt_cb_t fn, int arg) ifpkt_cb_t fn, int arg)
...@@ -278,7 +252,6 @@ void pktq_flush(struct pktq *pq, bool dir, ...@@ -278,7 +252,6 @@ void pktq_flush(struct pktq *pq, bool dir,
for (prec = 0; prec < pq->num_prec; prec++) for (prec = 0; prec < pq->num_prec; prec++)
pktq_pflush(pq, prec, dir, fn, arg); pktq_pflush(pq, prec, dir, fn, arg);
} }
#endif /* BRCM_FULLMAC */
void pktq_init(struct pktq *pq, int num_prec, int max_len) void pktq_init(struct pktq *pq, int num_prec, int max_len)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment