/openbmc/linux/drivers/net/ethernet/ti/ |
H A D | cpsw-common.c | 15 int slave, u8 *mac_addr) in davinci_emac_3517_get_macid() argument 31 mac_addr[0] = (macid_msb >> 16) & 0xff; in davinci_emac_3517_get_macid() 32 mac_addr[1] = (macid_msb >> 8) & 0xff; in davinci_emac_3517_get_macid() 33 mac_addr[2] = macid_msb & 0xff; in davinci_emac_3517_get_macid() 34 mac_addr[3] = (macid_lsb >> 16) & 0xff; in davinci_emac_3517_get_macid() 35 mac_addr[4] = (macid_lsb >> 8) & 0xff; in davinci_emac_3517_get_macid() 36 mac_addr[5] = macid_lsb & 0xff; in davinci_emac_3517_get_macid() 42 u8 *mac_addr) in cpsw_am33xx_cm_get_macid() argument 58 mac_addr[5] = (macid_lo >> 8) & 0xff; in cpsw_am33xx_cm_get_macid() 59 mac_addr[4] = macid_lo & 0xff; in cpsw_am33xx_cm_get_macid() [all …]
|
H A D | davinci_emac.c | 313 char mac_addr[6]; member 608 * @mac_addr: mac address to delete from hash table 613 static int emac_hash_add(struct emac_priv *priv, u8 *mac_addr) in emac_hash_add() argument 618 u32 hash_value = hash_get(mac_addr); in emac_hash_add() 650 * @mac_addr: mac address to delete from hash table 655 static int emac_hash_del(struct emac_priv *priv, u8 *mac_addr) in emac_hash_del() argument 660 hash_value = hash_get(mac_addr); in emac_hash_del() 693 * @mac_addr: mac address to set 698 static void emac_add_mcast(struct emac_priv *priv, u32 action, u8 *mac_addr) in emac_add_mcast() argument 705 update = emac_hash_add(priv, mac_addr); in emac_add_mcast() [all …]
|
/openbmc/u-boot/drivers/net/ti/ |
H A D | cpsw-common.c | 20 int slave, u8 *mac_addr) in davinci_emac_3517_get_macid() argument 49 mac_addr[0] = (macid_msb >> 16) & 0xff; in davinci_emac_3517_get_macid() 50 mac_addr[1] = (macid_msb >> 8) & 0xff; in davinci_emac_3517_get_macid() 51 mac_addr[2] = macid_msb & 0xff; in davinci_emac_3517_get_macid() 52 mac_addr[3] = (macid_lsb >> 16) & 0xff; in davinci_emac_3517_get_macid() 53 mac_addr[4] = (macid_lsb >> 8) & 0xff; in davinci_emac_3517_get_macid() 54 mac_addr[5] = macid_lsb & 0xff; in davinci_emac_3517_get_macid() 60 u8 *mac_addr) in cpsw_am33xx_cm_get_macid() argument 89 mac_addr[5] = (macid_lo >> 8) & 0xff; in cpsw_am33xx_cm_get_macid() 90 mac_addr[4] = macid_lo & 0xff; in cpsw_am33xx_cm_get_macid() [all …]
|
/openbmc/u-boot/board/grinn/chiliboard/ |
H A D | board.c | 107 uint8_t mac_addr[6]; in board_late_init() local 113 mac_addr[0] = mac_hi & 0xFF; in board_late_init() 114 mac_addr[1] = (mac_hi & 0xFF00) >> 8; in board_late_init() 115 mac_addr[2] = (mac_hi & 0xFF0000) >> 16; in board_late_init() 116 mac_addr[3] = (mac_hi & 0xFF000000) >> 24; in board_late_init() 117 mac_addr[4] = mac_lo & 0xFF; in board_late_init() 118 mac_addr[5] = (mac_lo & 0xFF00) >> 8; in board_late_init() 123 if (is_valid_ethaddr(mac_addr)) in board_late_init() 124 eth_env_set_enetaddr("ethaddr", mac_addr); in board_late_init() 129 mac_addr[0] = mac_hi & 0xFF; in board_late_init() [all …]
|
/openbmc/u-boot/board/tcl/sl50/ |
H A D | board.c | 309 uint8_t mac_addr[6]; in board_eth_init() local 315 mac_addr[0] = mac_hi & 0xFF; in board_eth_init() 316 mac_addr[1] = (mac_hi & 0xFF00) >> 8; in board_eth_init() 317 mac_addr[2] = (mac_hi & 0xFF0000) >> 16; in board_eth_init() 318 mac_addr[3] = (mac_hi & 0xFF000000) >> 24; in board_eth_init() 319 mac_addr[4] = mac_lo & 0xFF; in board_eth_init() 320 mac_addr[5] = (mac_lo & 0xFF00) >> 8; in board_eth_init() 327 if (is_valid_ethaddr(mac_addr)) in board_eth_init() 328 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init() 335 mac_addr[0] = mac_hi & 0xFF; in board_eth_init() [all …]
|
/openbmc/u-boot/board/vscom/baltos/ |
H A D | board.c | 275 unsigned char mac_addr[6]; in ft_board_setup() local 283 mac_addr[0] = header.MAC1[0]; in ft_board_setup() 284 mac_addr[1] = header.MAC1[1]; in ft_board_setup() 285 mac_addr[2] = header.MAC1[2]; in ft_board_setup() 286 mac_addr[3] = header.MAC1[3]; in ft_board_setup() 287 mac_addr[4] = header.MAC1[4]; in ft_board_setup() 288 mac_addr[5] = header.MAC1[5]; in ft_board_setup() 297 ret = fdt_setprop(blob, node, "mac-address", &mac_addr, 6); in ft_board_setup() 304 mac_addr[0] = header.MAC2[0]; in ft_board_setup() 305 mac_addr[1] = header.MAC2[1]; in ft_board_setup() [all …]
|
/openbmc/linux/drivers/net/ethernet/sunplus/ |
H A D | spl2sw_driver.c | 156 netdev_dbg(ndev, "Old Ethernet (MAC) address = %pM\n", mac->mac_addr); in spl2sw_ethernet_set_mac_address() 157 if (is_valid_ether_addr(mac->mac_addr)) { in spl2sw_ethernet_set_mac_address() 164 ether_addr_copy(mac->mac_addr, ndev->dev_addr); in spl2sw_ethernet_set_mac_address() 206 static void spl2sw_check_mac_vendor_id_and_convert(u8 *mac_addr) in spl2sw_check_mac_vendor_id_and_convert() argument 212 if (mac_addr[5] == 0xfc && mac_addr[4] == 0x4b && mac_addr[3] == 0xbc && in spl2sw_check_mac_vendor_id_and_convert() 213 (mac_addr[0] != 0xfc || mac_addr[1] != 0x4b || mac_addr[2] != 0xbc)) { in spl2sw_check_mac_vendor_id_and_convert() 215 swap(mac_addr[0], mac_addr[5]); in spl2sw_check_mac_vendor_id_and_convert() 216 swap(mac_addr[1], mac_addr[4]); in spl2sw_check_mac_vendor_id_and_convert() 217 swap(mac_addr[2], mac_addr[3]); in spl2sw_check_mac_vendor_id_and_convert() 262 static u32 spl2sw_init_netdev(struct platform_device *pdev, u8 *mac_addr, in spl2sw_init_netdev() argument [all …]
|
/openbmc/linux/drivers/staging/vt6656/ |
H A D | key.c | 34 static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr, in vnt_set_keymode() argument 46 if (mac_addr) in vnt_set_keymode() 47 bssid = mac_addr; in vnt_set_keymode() 100 u8 *mac_addr = NULL; in vnt_set_keys() local 104 mac_addr = &sta->addr[0]; in vnt_set_keys() 109 vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY, in vnt_set_keys() 114 return vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY, in vnt_set_keys() 137 return vnt_set_keymode(hw, mac_addr, key, VNT_KEY_PAIRWISE, in vnt_set_keys() 140 return vnt_set_keymode(hw, mac_addr, key, in vnt_set_keys()
|
/openbmc/u-boot/board/ti/ti816x/ |
H A D | evm.c | 37 uint8_t mac_addr[6]; in board_eth_init() local 41 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in board_eth_init() 46 mac_addr[0] = mac_hi & 0xFF; in board_eth_init() 47 mac_addr[1] = (mac_hi & 0xFF00) >> 8; in board_eth_init() 48 mac_addr[2] = (mac_hi & 0xFF0000) >> 16; in board_eth_init() 49 mac_addr[3] = (mac_hi & 0xFF000000) >> 24; in board_eth_init() 50 mac_addr[4] = mac_lo & 0xFF; in board_eth_init() 51 mac_addr[5] = (mac_lo & 0xFF00) >> 8; in board_eth_init() 53 if (is_valid_ethaddr(mac_addr)) in board_eth_init() 54 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init()
|
/openbmc/linux/drivers/staging/vt6655/ |
H A D | key.c | 17 static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr, in vnt_set_keymode() argument 29 if (mac_addr) in vnt_set_keymode() 30 bssid = mac_addr; in vnt_set_keymode() 93 u8 *mac_addr = NULL; in vnt_set_keys() local 99 mac_addr = &sta->addr[0]; in vnt_set_keys() 112 vnt_set_keymode(hw, mac_addr, in vnt_set_keys() 132 vnt_set_keymode(hw, mac_addr, in vnt_set_keys() 135 vnt_set_keymode(hw, mac_addr, in vnt_set_keys()
|
/openbmc/u-boot/board/silica/pengwyn/ |
H A D | board.c | 171 uint8_t mac_addr[6]; in board_eth_init() local 174 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in board_eth_init() 179 mac_addr[0] = mac_hi & 0xFF; in board_eth_init() 180 mac_addr[1] = (mac_hi & 0xFF00) >> 8; in board_eth_init() 181 mac_addr[2] = (mac_hi & 0xFF0000) >> 16; in board_eth_init() 182 mac_addr[3] = (mac_hi & 0xFF000000) >> 24; in board_eth_init() 183 mac_addr[4] = mac_lo & 0xFF; in board_eth_init() 184 mac_addr[5] = (mac_lo & 0xFF00) >> 8; in board_eth_init() 186 if (is_valid_ethaddr(mac_addr)) in board_eth_init() 187 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init()
|
/openbmc/u-boot/board/ti/ti814x/ |
H A D | evm.c | 166 uint8_t mac_addr[6]; in board_eth_init() local 169 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in board_eth_init() 174 mac_addr[0] = mac_hi & 0xFF; in board_eth_init() 175 mac_addr[1] = (mac_hi & 0xFF00) >> 8; in board_eth_init() 176 mac_addr[2] = (mac_hi & 0xFF0000) >> 16; in board_eth_init() 177 mac_addr[3] = (mac_hi & 0xFF000000) >> 24; in board_eth_init() 178 mac_addr[4] = mac_lo & 0xFF; in board_eth_init() 179 mac_addr[5] = (mac_lo & 0xFF00) >> 8; in board_eth_init() 181 if (is_valid_ethaddr(mac_addr)) in board_eth_init() 182 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init()
|
/openbmc/openbmc/meta-openpower/recipes-phosphor/network/first-boot-set-mac/ |
H A D | first-boot-set-mac.sh | 59 MAC_ADDR=$(busctl get-property "${NETWORK_ITEM_SERVICE}" \ 64 MAC_ADDR=${MAC_ADDR#*\"} 65 MAC_ADDR=${MAC_ADDR%\"*} 67 if [ -n "${MAC_ADDR}" ]; then 71 MACAddress s "${MAC_ADDR}"
|
/openbmc/phosphor-misc/firstboot/ |
H A D | first-boot-set-mac.sh | 53 MAC_ADDR=$(busctl get-property "${NETWORK_ITEM_SERVICE}" \ 57 MAC_ADDR=${MAC_ADDR#*\"} 58 MAC_ADDR=${MAC_ADDR%\"*} 60 if [[ -n "${MAC_ADDR}" ]]; then 64 MACAddress s "${MAC_ADDR}"
|
H A D | first-boot-set-hostname.sh | 62 MAC_ADDR=$(busctl get-property "${NETWORK_ITEM_OBJ}" \ 66 MAC_ADDR=${MAC_ADDR#*\"} 67 MAC_ADDR=${MAC_ADDR%\"*} 69 hostnamectl set-hostname "$(hostname)-${MAC_ADDR}"
|
/openbmc/u-boot/board/phytec/pcm051/ |
H A D | board.c | 216 uint8_t mac_addr[6]; in board_eth_init() local 219 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in board_eth_init() 224 mac_addr[0] = mac_hi & 0xFF; in board_eth_init() 225 mac_addr[1] = (mac_hi & 0xFF00) >> 8; in board_eth_init() 226 mac_addr[2] = (mac_hi & 0xFF0000) >> 16; in board_eth_init() 227 mac_addr[3] = (mac_hi & 0xFF000000) >> 24; in board_eth_init() 228 mac_addr[4] = mac_lo & 0xFF; in board_eth_init() 229 mac_addr[5] = (mac_lo & 0xFF00) >> 8; in board_eth_init() 231 if (is_valid_ethaddr(mac_addr)) in board_eth_init() 232 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init()
|
/openbmc/u-boot/drivers/net/fm/ |
H A D | tgec.c | 69 static void tgec_set_mac_addr(struct fsl_enet_mac *mac, u8 *mac_addr) in tgec_set_mac_addr() argument 78 mac_addr0 = (mac_addr[3] << 24) | (mac_addr[2] << 16) | \ in tgec_set_mac_addr() 79 (mac_addr[1] << 8) | (mac_addr[0]); in tgec_set_mac_addr() 82 mac_addr1 = ((mac_addr[5] << 8) | mac_addr[4]) & 0x0000ffff; in tgec_set_mac_addr()
|
H A D | memac.c | 50 static void memac_set_mac_addr(struct fsl_enet_mac *mac, u8 *mac_addr) in memac_set_mac_addr() argument 59 mac_addr0 = (mac_addr[3] << 24) | (mac_addr[2] << 16) | \ in memac_set_mac_addr() 60 (mac_addr[1] << 8) | (mac_addr[0]); in memac_set_mac_addr() 63 mac_addr1 = ((mac_addr[5] << 8) | mac_addr[4]) & 0x0000ffff; in memac_set_mac_addr()
|
/openbmc/u-boot/board/amlogic/odroid-c2/ |
H A D | odroid-c2.c | 22 u8 mac_addr[EFUSE_MAC_SIZE]; in misc_init_r() local 28 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in misc_init_r() 30 mac_addr, EFUSE_MAC_SIZE); in misc_init_r() 31 if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr)) in misc_init_r() 32 eth_env_set_enetaddr("ethaddr", mac_addr); in misc_init_r()
|
/openbmc/u-boot/board/amlogic/p212/ |
H A D | p212.c | 23 u8 mac_addr[EFUSE_MAC_SIZE]; in misc_init_r() local 30 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in misc_init_r() 32 mac_addr, EFUSE_MAC_SIZE); in misc_init_r() 33 if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr)) in misc_init_r() 34 eth_env_set_enetaddr("ethaddr", mac_addr); in misc_init_r()
|
/openbmc/linux/drivers/infiniband/ulp/opa_vnic/ |
H A D | opa_vnic_encap.c | 178 memcpy(entry->mac_addr, nentry->mac_addr, in opa_vnic_query_mac_tbl() 179 ARRAY_SIZE(entry->mac_addr)); in opa_vnic_query_mac_tbl() 229 u8 *mac_addr = entry->mac_addr; in opa_vnic_update_mac_tbl() local 233 loffset + i, mac_addr[0], mac_addr[1], mac_addr[2], in opa_vnic_update_mac_tbl() 234 mac_addr[3], mac_addr[4], mac_addr[5], in opa_vnic_update_mac_tbl() 238 if (!memcmp(mac_addr, empty_mac, ARRAY_SIZE(empty_mac))) in opa_vnic_update_mac_tbl() 249 memcpy(nentry->mac_addr, entry->mac_addr, in opa_vnic_update_mac_tbl() 250 ARRAY_SIZE(nentry->mac_addr)); in opa_vnic_update_mac_tbl() 254 key = node->entry.mac_addr[OPA_VNIC_MAC_HASH_IDX]; in opa_vnic_update_mac_tbl() 276 key = new_node->entry.mac_addr[OPA_VNIC_MAC_HASH_IDX]; in opa_vnic_update_mac_tbl() [all …]
|
/openbmc/openbmc/meta-openpower/recipes-phosphor/network/first-boot-set-hostname/ |
H A D | first-boot-set-hostname.sh | 67 MAC_ADDR=$(busctl get-property "${NETWORK_ITEM_OBJ}" \ 72 MAC_ADDR=${MAC_ADDR#*\"} 73 MAC_ADDR=${MAC_ADDR%\"*} 75 hostnamectl set-hostname "$(hostname)-${MAC_ADDR}"
|
/openbmc/u-boot/board/amlogic/q200/ |
H A D | q200.c | 23 u8 mac_addr[EFUSE_MAC_SIZE]; in misc_init_r() local 35 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in misc_init_r() 37 mac_addr, EFUSE_MAC_SIZE); in misc_init_r() 38 if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr)) in misc_init_r() 39 eth_env_set_enetaddr("ethaddr", mac_addr); in misc_init_r()
|
/openbmc/u-boot/board/gumstix/pepper/ |
H A D | board.c | 237 uint8_t mac_addr[6]; in board_eth_init() local 241 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in board_eth_init() 245 mac_addr[0] = mac_hi & 0xFF; in board_eth_init() 246 mac_addr[1] = (mac_hi & 0xFF00) >> 8; in board_eth_init() 247 mac_addr[2] = (mac_hi & 0xFF0000) >> 16; in board_eth_init() 248 mac_addr[3] = (mac_hi & 0xFF000000) >> 24; in board_eth_init() 249 mac_addr[4] = mac_lo & 0xFF; in board_eth_init() 250 mac_addr[5] = (mac_lo & 0xFF00) >> 8; in board_eth_init() 251 if (is_valid_ethaddr(mac_addr)) in board_eth_init() 252 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init()
|
/openbmc/u-boot/board/isee/igep003x/ |
H A D | board.c | 263 uint8_t mac_addr[6]; in board_eth_init() local 266 if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { in board_eth_init() 270 mac_addr[0] = mac_hi & 0xFF; in board_eth_init() 271 mac_addr[1] = (mac_hi & 0xFF00) >> 8; in board_eth_init() 272 mac_addr[2] = (mac_hi & 0xFF0000) >> 16; in board_eth_init() 273 mac_addr[3] = (mac_hi & 0xFF000000) >> 24; in board_eth_init() 274 mac_addr[4] = mac_lo & 0xFF; in board_eth_init() 275 mac_addr[5] = (mac_lo & 0xFF00) >> 8; in board_eth_init() 276 if (is_valid_ethaddr(mac_addr)) in board_eth_init() 277 eth_env_set_enetaddr("ethaddr", mac_addr); in board_eth_init()
|