aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ef10_sriov.c
diff options
context:
space:
mode:
authorShradha Shah <sshah@solarflare.com>2015-06-02 11:38:16 +0100
committerDavid S. Miller <davem@davemloft.net>2015-06-02 12:57:26 -0700
commit1d051e009851334899e2041c3d8dcde36e2db1c2 (patch)
treea90a782f3b1da0db83b4064208c9d60b0dd8b23c /drivers/net/ethernet/sfc/ef10_sriov.c
parentsfc: Add sysfs entry for flags (link control and primary) (diff)
downloadlinux-dev-1d051e009851334899e2041c3d8dcde36e2db1c2.tar.xz
linux-dev-1d051e009851334899e2041c3d8dcde36e2db1c2.zip
sfc: Implement ndo_gets_phys_port_id() for EF10 VFs
Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10_sriov.c')
-rw-r--r--drivers/net/ethernet/sfc/ef10_sriov.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef10_sriov.c b/drivers/net/ethernet/sfc/ef10_sriov.c
index 3969b1bf7ef3..cd524543c363 100644
--- a/drivers/net/ethernet/sfc/ef10_sriov.c
+++ b/drivers/net/ethernet/sfc/ef10_sriov.c
@@ -736,3 +736,17 @@ int efx_ef10_sriov_get_vf_config(struct efx_nic *efx, int vf_i,
return 0;
}
+
+int efx_ef10_sriov_get_phys_port_id(struct efx_nic *efx,
+ struct netdev_phys_item_id *ppid)
+{
+ struct efx_ef10_nic_data *nic_data = efx->nic_data;
+
+ if (!is_valid_ether_addr(nic_data->port_id))
+ return -EOPNOTSUPP;
+
+ ppid->id_len = ETH_ALEN;
+ memcpy(ppid->id, nic_data->port_id, ppid->id_len);
+
+ return 0;
+}