Skip to content

Commit

Permalink
dnet: replace obsolete *netif_rx_* functions with *napi_*
Browse files Browse the repository at this point in the history
*netif_rx_* functions is obsolete and removed in newer kernels so
we need to use corresponding *napi_* functions instead.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ilya Yanok authored and David S. Miller committed Mar 13, 2009
1 parent 6b7c5b9 commit 9fae6c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/dnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ static int dnet_poll(struct napi_struct *napi, int budget)
* packets waiting
*/
if (!(dnet_readl(bp, RX_FIFO_WCNT) >> 16)) {
netif_rx_complete(napi);
napi_complete(napi);
int_enable = dnet_readl(bp, INTR_ENB);
int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF;
dnet_writel(bp, int_enable, INTR_ENB);
Expand Down Expand Up @@ -447,7 +447,7 @@ static int dnet_poll(struct napi_struct *napi, int budget)
if (npackets < budget) {
/* We processed all packets available. Tell NAPI it can
* stop polling then re-enable rx interrupts */
netif_rx_complete(napi);
napi_complete(napi);
int_enable = dnet_readl(bp, INTR_ENB);
int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF;
dnet_writel(bp, int_enable, INTR_ENB);
Expand Down Expand Up @@ -507,7 +507,7 @@ static irqreturn_t dnet_interrupt(int irq, void *dev_id)
}

if (int_current & DNET_INTR_SRC_RX_CMDFIFOAF) {
if (netif_rx_schedule_prep(&bp->napi)) {
if (napi_schedule_prep(&bp->napi)) {
/*
* There's no point taking any more interrupts
* until we have processed the buffers
Expand All @@ -516,7 +516,7 @@ static irqreturn_t dnet_interrupt(int irq, void *dev_id)
int_enable = dnet_readl(bp, INTR_ENB);
int_enable &= ~DNET_INTR_SRC_RX_CMDFIFOAF;
dnet_writel(bp, int_enable, INTR_ENB);
__netif_rx_schedule(&bp->napi);
__napi_schedule(&bp->napi);
}
handled = 1;
}
Expand Down

0 comments on commit 9fae6c3

Please sign in to comment.