summaryrefslogtreecommitdiffstats
path: root/drivers/net/r8169.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-10-28 17:10:08 +0100
committerFrancois Romieu <romieu@fr.zoreil.com>2007-10-28 18:21:01 +0100
commit7fab06c0ca89d99442a4baeddf417add585e2672 (patch)
tree792cca5fd8a5d023779ad84dad33b980c6618ee3 /drivers/net/r8169.c
parent96fd4cd3e40e240f0c385af87f58e74da8b7099a (diff)
r8169: napi config
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>
Diffstat (limited to 'drivers/net/r8169.c')
-rw-r--r--drivers/net/r8169.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index e8960f294a6..c5eaf4931a9 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -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;
@@ -3010,7 +3012,9 @@ core_down:
synchronize_irq(dev->irq);
if (!poll_locked) {
+#ifdef CONFIG_R8169_NAPI
napi_disable(&tp->napi);
+#endif
poll_locked++;
}