Skip to content

Commit

Permalink
enic: rename CMD_MAC_ADDR to CMD_GET_MAC_ADDR
Browse files Browse the repository at this point in the history
firmware devcmd CMD_MAC_ADDR gets the mac address of a vnic from adapter.
This patch renames it to CMD_GET_MAC_ADDR more appropriately.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Roopa Prabhu authored and David S. Miller committed Feb 20, 2012
1 parent 5277f7a commit b13423e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cisco/enic/enic_res.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int enic_get_vnic_config(struct enic *enic)
struct vnic_enet_config *c = &enic->config;
int err;

err = vnic_dev_mac_addr(enic->vdev, enic->mac_addr);
err = vnic_dev_get_mac_addr(enic->vdev, enic->mac_addr);
if (err) {
dev_err(enic_get_dev(enic),
"Error getting MAC addr, %d\n", err);
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ethernet/cisco/enic/vnic_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ int vnic_dev_hang_notify(struct vnic_dev *vdev)
return vnic_dev_cmd(vdev, CMD_HANG_NOTIFY, &a0, &a1, wait);
}

int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
int vnic_dev_get_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
{
u64 a0, a1;
int wait = 1000;
Expand All @@ -622,7 +622,7 @@ int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr)
for (i = 0; i < ETH_ALEN; i++)
mac_addr[i] = 0;

err = vnic_dev_cmd(vdev, CMD_MAC_ADDR, &a0, &a1, wait);
err = vnic_dev_cmd(vdev, CMD_GET_MAC_ADDR, &a0, &a1, wait);
if (err)
return err;

Expand Down Expand Up @@ -803,7 +803,7 @@ int vnic_dev_init(struct vnic_dev *vdev, int arg)
/* Emulate these for old CMD_INIT_v1 which
* didn't pass a0 so no CMD_INITF_*.
*/
vnic_dev_cmd(vdev, CMD_MAC_ADDR, &a0, &a1, wait);
vnic_dev_cmd(vdev, CMD_GET_MAC_ADDR, &a0, &a1, wait);
vnic_dev_cmd(vdev, CMD_ADDR_ADD, &a0, &a1, wait);
}
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cisco/enic/vnic_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ int vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast,
int broadcast, int promisc, int allmulti);
int vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr);
int vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr);
int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr);
int vnic_dev_get_mac_addr(struct vnic_dev *vdev, u8 *mac_addr);
int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr);
int vnic_dev_notify_unset(struct vnic_dev *vdev);
int vnic_dev_link_status(struct vnic_dev *vdev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cisco/enic/vnic_devcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ enum vnic_devcmd_cmd {
CMD_HANG_NOTIFY = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 8),

/* MAC address in (u48)a0 */
CMD_MAC_ADDR = _CMDC(_CMD_DIR_READ,
CMD_GET_MAC_ADDR = _CMDC(_CMD_DIR_READ,
_CMD_VTYPE_ENET | _CMD_VTYPE_FC, 9),

/* add addr from (u48)a0 */
Expand Down

0 comments on commit b13423e

Please sign in to comment.