Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/e1000/e1000_nvm.c
Show First 20 Lines • Show All 1,137 Lines • ▼ Show 20 Lines | s32 e1000_read_mac_addr_generic(struct e1000_hw *hw) | ||||
rar_low = E1000_READ_REG(hw, E1000_RAL(0)); | rar_low = E1000_READ_REG(hw, E1000_RAL(0)); | ||||
for (i = 0; i < E1000_RAL_MAC_ADDR_LEN; i++) | for (i = 0; i < E1000_RAL_MAC_ADDR_LEN; i++) | ||||
hw->mac.perm_addr[i] = (u8)(rar_low >> (i*8)); | hw->mac.perm_addr[i] = (u8)(rar_low >> (i*8)); | ||||
for (i = 0; i < E1000_RAH_MAC_ADDR_LEN; i++) | for (i = 0; i < E1000_RAH_MAC_ADDR_LEN; i++) | ||||
hw->mac.perm_addr[i+4] = (u8)(rar_high >> (i*8)); | hw->mac.perm_addr[i+4] = (u8)(rar_high >> (i*8)); | ||||
for (i = 0; i < ETH_ADDR_LEN; i++) | for (i = 0; i < ETHER_ADDR_LEN; i++) | ||||
hw->mac.addr[i] = hw->mac.perm_addr[i]; | hw->mac.addr[i] = hw->mac.perm_addr[i]; | ||||
return E1000_SUCCESS; | return E1000_SUCCESS; | ||||
} | } | ||||
/** | /** | ||||
* e1000_validate_nvm_checksum_generic - Validate EEPROM checksum | * e1000_validate_nvm_checksum_generic - Validate EEPROM checksum | ||||
* @hw: pointer to the HW structure | * @hw: pointer to the HW structure | ||||
▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines |