Browse Source

bnxt_en: Assign netdev->dev_port with port ID.

This is useful for multi-function devices.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan 9 years ago
parent
commit
87027db19c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/net/ethernet/broadcom/bnxt/bnxt.c

+ 1 - 0
drivers/net/ethernet/broadcom/bnxt/bnxt.c

@@ -4026,6 +4026,7 @@ int bnxt_hwrm_func_qcaps(struct bnxt *bp)
 
 
 		pf->fw_fid = le16_to_cpu(resp->fid);
 		pf->fw_fid = le16_to_cpu(resp->fid);
 		pf->port_id = le16_to_cpu(resp->port_id);
 		pf->port_id = le16_to_cpu(resp->port_id);
+		bp->dev->dev_port = pf->port_id;
 		memcpy(pf->mac_addr, resp->mac_address, ETH_ALEN);
 		memcpy(pf->mac_addr, resp->mac_address, ETH_ALEN);
 		memcpy(bp->dev->dev_addr, pf->mac_addr, ETH_ALEN);
 		memcpy(bp->dev->dev_addr, pf->mac_addr, ETH_ALEN);
 		pf->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx);
 		pf->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx);