]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
qlcnic: Implement ndo_get_phys_port_id for 82xx adapter
[karo-tx-linux.git] / drivers / net / ethernet / qlogic / qlcnic / qlcnic_hw.c
index 9e49c15ef84f2ed55ab0a6362521489cf5720e65..f8adc7b01f1f5ef9e62899a9c68c5eea9d2e2cba 100644 (file)
@@ -740,6 +740,22 @@ int qlcnic_82xx_clear_lb_mode(struct qlcnic_adapter *adapter, u8 mode)
        return 0;
 }
 
+int qlcnic_82xx_read_phys_port_id(struct qlcnic_adapter *adapter)
+{
+       u8 mac[ETH_ALEN];
+       int ret;
+
+       ret = qlcnic_get_mac_address(adapter, mac,
+                                    adapter->ahw->physical_port);
+       if (ret)
+               return ret;
+
+       memcpy(adapter->ahw->phys_port_id, mac, ETH_ALEN);
+       adapter->flags |= QLCNIC_HAS_PHYS_PORT_ID;
+
+       return 0;
+}
+
 /*
  * Send the interrupt coalescing parameter set by ethtool to the card.
  */