summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-06-10 18:03:17 +0100
committerDavid S. Miller <davem@davemloft.net>2013-06-12 03:15:02 -0700
commit6602041b8343fcdb6433cc72ca6cb6c2e189da6d (patch)
treee926b1a9dcd555ed8703ac82c988f5345b4d437f /drivers/net/ethernet/sfc/net_driver.h
parent503b47eafc39cb28db7b694aa0bb9276adccb89c (diff)
sfc: Store port number in private data, not net_device::dev_id
We should not use net_device::dev_id to indicate the port number, as this affects the way the local part of IPv6 addresses is normally generated. This field was intended for use where multiple devices may share a single assigned MAC address and need to have different IPv6 addresses. Siena's two ports each have their own MAC addresses. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/net_driver.h')
-rw-r--r--drivers/net/ethernet/sfc/net_driver.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index 39d6bd77f015..9a2914cfd345 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -784,6 +784,7 @@ struct efx_nic {
char name[IFNAMSIZ];
struct pci_dev *pci_dev;
+ unsigned int port_num;
const struct efx_nic_type *type;
int legacy_irq;
bool legacy_irq_enabled;
@@ -916,7 +917,7 @@ static inline int efx_dev_registered(struct efx_nic *efx)
static inline unsigned int efx_port_num(struct efx_nic *efx)
{
- return efx->net_dev->dev_id;
+ return efx->port_num;
}
/**