summaryrefslogtreecommitdiff
path: root/drivers/net/benet/be.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/benet/be.h')
-rw-r--r--drivers/net/benet/be.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index d8a157f8caf4..beb131399231 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -213,7 +213,6 @@ struct be_adapter {
u8 __iomem *csr;
u8 __iomem *db; /* Door Bell */
u8 __iomem *pcicfg; /* PCI config space */
- int pci_func;
spinlock_t mbox_lock; /* For serializing mbox cmds to BE card */
struct be_dma_mem mbox_mem;
@@ -264,6 +263,11 @@ extern struct ethtool_ops be_ethtool_ops;
#define drvr_stats(adapter) (&adapter->stats.drvr_stats)
+static inline unsigned int be_pci_func(struct be_adapter *adapter)
+{
+ return PCI_FUNC(adapter->pdev->devfn);
+}
+
#define BE_SET_NETDEV_OPS(netdev, ops) (netdev->netdev_ops = ops)
#define PAGE_SHIFT_4K 12