Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fab06c0 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Francois Romieu
Browse files

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: default avatarStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
parent 96fd4cd3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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++;
	}