diff options
author | Joe Perches <joe@perches.com> | 2012-10-24 13:19:02 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-12-07 00:31:06 -0500 |
commit | f8ebc68373a891310fe64726940e245cf307d172 (patch) | |
tree | 970b274c2bf7df824a08d76ae1e4bee613a88898 /drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | |
parent | b93196dc5af7729ff7cc50d3d322ab1a364aa14f (diff) |
ixgbe: Use is_valid_ether_addr
Use the normal kernel test instead of a module specific one.
Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_common.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 5af1eebc32f1..5e68afdd502a 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | |||
@@ -1783,29 +1783,6 @@ s32 ixgbe_update_eeprom_checksum_generic(struct ixgbe_hw *hw) | |||
1783 | } | 1783 | } |
1784 | 1784 | ||
1785 | /** | 1785 | /** |
1786 | * ixgbe_validate_mac_addr - Validate MAC address | ||
1787 | * @mac_addr: pointer to MAC address. | ||
1788 | * | ||
1789 | * Tests a MAC address to ensure it is a valid Individual Address | ||
1790 | **/ | ||
1791 | s32 ixgbe_validate_mac_addr(u8 *mac_addr) | ||
1792 | { | ||
1793 | s32 status = 0; | ||
1794 | |||
1795 | /* Make sure it is not a multicast address */ | ||
1796 | if (IXGBE_IS_MULTICAST(mac_addr)) | ||
1797 | status = IXGBE_ERR_INVALID_MAC_ADDR; | ||
1798 | /* Not a broadcast address */ | ||
1799 | else if (IXGBE_IS_BROADCAST(mac_addr)) | ||
1800 | status = IXGBE_ERR_INVALID_MAC_ADDR; | ||
1801 | /* Reject the zero address */ | ||
1802 | else if (is_zero_ether_addr(mac_addr)) | ||
1803 | status = IXGBE_ERR_INVALID_MAC_ADDR; | ||
1804 | |||
1805 | return status; | ||
1806 | } | ||
1807 | |||
1808 | /** | ||
1809 | * ixgbe_set_rar_generic - Set Rx address register | 1786 | * ixgbe_set_rar_generic - Set Rx address register |
1810 | * @hw: pointer to hardware structure | 1787 | * @hw: pointer to hardware structure |
1811 | * @index: Receive address register to write | 1788 | * @index: Receive address register to write |
@@ -1909,8 +1886,7 @@ s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw) | |||
1909 | * to the permanent address. | 1886 | * to the permanent address. |
1910 | * Otherwise, use the permanent address from the eeprom. | 1887 | * Otherwise, use the permanent address from the eeprom. |
1911 | */ | 1888 | */ |
1912 | if (ixgbe_validate_mac_addr(hw->mac.addr) == | 1889 | if (!is_valid_ether_addr(hw->mac.addr)) { |
1913 | IXGBE_ERR_INVALID_MAC_ADDR) { | ||
1914 | /* Get the MAC address from the RAR0 for later reference */ | 1890 | /* Get the MAC address from the RAR0 for later reference */ |
1915 | hw->mac.ops.get_mac_addr(hw, hw->mac.addr); | 1891 | hw->mac.ops.get_mac_addr(hw, hw->mac.addr); |
1916 | 1892 | ||