Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368213
b: refs/heads/master
c: 005a07b
h: refs/heads/master
i:
  368211: 74311d4
v: v3
  • Loading branch information
Ariel Elior authored and David S. Miller committed Mar 12, 2013
1 parent 08e399b commit b1e00eb
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07ef7bec683beed65ccef330df66d88738c50a4a
refs/heads/master: 005a07baa1713861a060fab66a3d7d91f8d759c6
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ static const u32 dmae_reg_go_c[] = {
DMAE_REG_GO_C12, DMAE_REG_GO_C13, DMAE_REG_GO_C14, DMAE_REG_GO_C15
};

void bnx2x_set_ethtool_ops(struct net_device *netdev);
void bnx2x_set_ethtool_ops(struct bnx2x *bp, struct net_device *netdev);
void bnx2x_notify_link_changed(struct bnx2x *bp);

#define BNX2X_MF_SD_PROTOCOL(bp) \
Expand Down
29 changes: 27 additions & 2 deletions trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -3232,7 +3232,32 @@ static const struct ethtool_ops bnx2x_ethtool_ops = {
.get_ts_info = ethtool_op_get_ts_info,
};

void bnx2x_set_ethtool_ops(struct net_device *netdev)
static const struct ethtool_ops bnx2x_vf_ethtool_ops = {
.get_settings = bnx2x_get_settings,
.set_settings = bnx2x_set_settings,
.get_drvinfo = bnx2x_get_drvinfo,
.get_msglevel = bnx2x_get_msglevel,
.set_msglevel = bnx2x_set_msglevel,
.get_link = bnx2x_get_link,
.get_coalesce = bnx2x_get_coalesce,
.get_ringparam = bnx2x_get_ringparam,
.set_ringparam = bnx2x_set_ringparam,
.get_sset_count = bnx2x_get_sset_count,
.get_strings = bnx2x_get_strings,
.get_ethtool_stats = bnx2x_get_ethtool_stats,
.get_rxnfc = bnx2x_get_rxnfc,
.set_rxnfc = bnx2x_set_rxnfc,
.get_rxfh_indir_size = bnx2x_get_rxfh_indir_size,
.get_rxfh_indir = bnx2x_get_rxfh_indir,
.set_rxfh_indir = bnx2x_set_rxfh_indir,
.get_channels = bnx2x_get_channels,
.set_channels = bnx2x_set_channels,
};

void bnx2x_set_ethtool_ops(struct bnx2x *bp, struct net_device *netdev)
{
SET_ETHTOOL_OPS(netdev, &bnx2x_ethtool_ops);
if (IS_PF(bp))
SET_ETHTOOL_OPS(netdev, &bnx2x_ethtool_ops);
else /* vf */
SET_ETHTOOL_OPS(netdev, &bnx2x_vf_ethtool_ops);
}
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11953,7 +11953,7 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
dev->watchdog_timeo = TX_TIMEOUT;

dev->netdev_ops = &bnx2x_netdev_ops;
bnx2x_set_ethtool_ops(dev);
bnx2x_set_ethtool_ops(bp, dev);

dev->priv_flags |= IFF_UNICAST_FLT;

Expand Down

0 comments on commit b1e00eb

Please sign in to comment.