Commit ea99d832 authored by Joe Perches's avatar Joe Perches Committed by Jeff Kirsher

intel: Convert <FOO>_LENGTH_OF_ADDRESS to ETH_ALEN

Use the normal #defines not module specific ones.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Tested-by: default avatarStephen Ko <stephen.s.ko@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 82bbcdeb
...@@ -448,7 +448,6 @@ void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value); ...@@ -448,7 +448,6 @@ void e1000_io_write(struct e1000_hw *hw, unsigned long port, u32 value);
#define E1000_DEV_ID_INTEL_CE4100_GBE 0x2E6E #define E1000_DEV_ID_INTEL_CE4100_GBE 0x2E6E
#define NODE_ADDRESS_SIZE 6 #define NODE_ADDRESS_SIZE 6
#define ETH_LENGTH_OF_ADDRESS 6
/* MAC decode size is 128K - This is the size of BAR0 */ /* MAC decode size is 128K - This is the size of BAR0 */
#define MAC_DECODE_SIZE (128 * 1024) #define MAC_DECODE_SIZE (128 * 1024)
......
...@@ -572,7 +572,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) ...@@ -572,7 +572,7 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
/* reply to reset with ack and vf mac address */ /* reply to reset with ack and vf mac address */
msgbuf[0] = IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK; msgbuf[0] = IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK;
memcpy(new_mac, vf_mac, IXGBE_ETH_LENGTH_OF_ADDRESS); memcpy(new_mac, vf_mac, ETH_ALEN);
/* /*
* Piggyback the multicast filter type so VF can compute the * Piggyback the multicast filter type so VF can compute the
* correct vectors * correct vectors
......
...@@ -1710,8 +1710,6 @@ enum { ...@@ -1710,8 +1710,6 @@ enum {
#define IXGBE_NVM_POLL_WRITE 1 /* Flag for polling for write complete */ #define IXGBE_NVM_POLL_WRITE 1 /* Flag for polling for write complete */
#define IXGBE_NVM_POLL_READ 0 /* Flag for polling for read complete */ #define IXGBE_NVM_POLL_READ 0 /* Flag for polling for read complete */
#define IXGBE_ETH_LENGTH_OF_ADDRESS 6
#define IXGBE_EEPROM_PAGE_SIZE_MAX 128 #define IXGBE_EEPROM_PAGE_SIZE_MAX 128
#define IXGBE_EEPROM_RD_BUFFER_MAX_COUNT 512 /* EEPROM words # read in burst */ #define IXGBE_EEPROM_RD_BUFFER_MAX_COUNT 512 /* EEPROM words # read in burst */
#define IXGBE_EEPROM_WR_BUFFER_MAX_COUNT 256 /* EEPROM words # wr in burst */ #define IXGBE_EEPROM_WR_BUFFER_MAX_COUNT 256 /* EEPROM words # wr in burst */
...@@ -2802,9 +2800,9 @@ struct ixgbe_eeprom_info { ...@@ -2802,9 +2800,9 @@ struct ixgbe_eeprom_info {
struct ixgbe_mac_info { struct ixgbe_mac_info {
struct ixgbe_mac_operations ops; struct ixgbe_mac_operations ops;
enum ixgbe_mac_type type; enum ixgbe_mac_type type;
u8 addr[IXGBE_ETH_LENGTH_OF_ADDRESS]; u8 addr[ETH_ALEN];
u8 perm_addr[IXGBE_ETH_LENGTH_OF_ADDRESS]; u8 perm_addr[ETH_ALEN];
u8 san_addr[IXGBE_ETH_LENGTH_OF_ADDRESS]; u8 san_addr[ETH_ALEN];
/* prefix for World Wide Node Name (WWNN) */ /* prefix for World Wide Node Name (WWNN) */
u16 wwnn_prefix; u16 wwnn_prefix;
/* prefix for World Wide Port Name (WWPN) */ /* prefix for World Wide Port Name (WWPN) */
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#define IXGBE_VF_IRQ_CLEAR_MASK 7 #define IXGBE_VF_IRQ_CLEAR_MASK 7
#define IXGBE_VF_MAX_TX_QUEUES 1 #define IXGBE_VF_MAX_TX_QUEUES 1
#define IXGBE_VF_MAX_RX_QUEUES 1 #define IXGBE_VF_MAX_RX_QUEUES 1
#define IXGBE_ETH_LENGTH_OF_ADDRESS 6
/* Link speed */ /* Link speed */
typedef u32 ixgbe_link_speed; typedef u32 ixgbe_link_speed;
......
...@@ -108,7 +108,7 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw) ...@@ -108,7 +108,7 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK)) if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK))
return IXGBE_ERR_INVALID_MAC_ADDR; return IXGBE_ERR_INVALID_MAC_ADDR;
memcpy(hw->mac.perm_addr, addr, IXGBE_ETH_LENGTH_OF_ADDRESS); memcpy(hw->mac.perm_addr, addr, ETH_ALEN);
hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD]; hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD];
return 0; return 0;
...@@ -211,7 +211,7 @@ static s32 ixgbevf_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr) ...@@ -211,7 +211,7 @@ static s32 ixgbevf_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr)
**/ **/
static s32 ixgbevf_get_mac_addr_vf(struct ixgbe_hw *hw, u8 *mac_addr) static s32 ixgbevf_get_mac_addr_vf(struct ixgbe_hw *hw, u8 *mac_addr)
{ {
memcpy(mac_addr, hw->mac.perm_addr, IXGBE_ETH_LENGTH_OF_ADDRESS); memcpy(mac_addr, hw->mac.perm_addr, ETH_ALEN);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment