Skip to content

Commit

Permalink
r8169: napi config
Browse files Browse the repository at this point in the history
Don't call napi_disable if not configured and make sure that any
misuse of napi_xxx in future fails with a compile error.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
  • Loading branch information
Stephen Hemminger authored and Francois Romieu committed Oct 28, 2007
1 parent 96fd4cd commit 7fab06c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,9 @@ struct rtl8169_private {
void __iomem *mmio_addr; /* memory map physical address */
struct pci_dev *pci_dev; /* Index of PCI device */
struct net_device *dev;
#ifdef CONFIG_R8169_NAPI
struct napi_struct napi;
#endif
spinlock_t lock; /* spin lock flag */
u32 msg_enable;
int chipset;
Expand Down Expand Up @@ -3010,7 +3012,9 @@ static void rtl8169_down(struct net_device *dev)
synchronize_irq(dev->irq);

if (!poll_locked) {
#ifdef CONFIG_R8169_NAPI
napi_disable(&tp->napi);
#endif
poll_locked++;
}

Expand Down

0 comments on commit 7fab06c

Please sign in to comment.