/openbmc/linux/drivers/net/ethernet/microchip/sparx5/ |
H A D | sparx5_mactable.c | 69 mach |= mac[0] << 8; in sparx5_mact_select() 70 mach |= mac[1] << 0; in sparx5_mact_select() 71 macl |= mac[2] << 24; in sparx5_mact_select() 72 macl |= mac[3] << 16; in sparx5_mact_select() 73 macl |= mac[4] << 8; in sparx5_mact_select() 74 macl |= mac[5] << 0; in sparx5_mact_select() 250 memcpy(mact_entry->mac, mac, ETH_ALEN); in alloc_mact_entry() 266 ether_addr_equal(mac, mact_entry->mac) && in find_mact_entry() 283 info.addr = mac; in sparx5_fdb_call_notifiers() 383 ether_addr_equal(mac, mact_entry->mac)) { in sparx5_mact_handle_entry() [all …]
|
/openbmc/qemu/hw/net/ |
H A D | e1000e_core.c | 160 if (timer->core->mac[IMS] & timer->core->mac[ICR]) { in e1000e_intrmgr_on_throttling_timer() 798 return core->mac[r->dh] == core->mac[r->dt] || in e1000e_ring_empty() 833 if (core->mac[r->dh] <= core->mac[r->dt]) { in e1000e_ring_free_descr_num() 834 return core->mac[r->dt] - core->mac[r->dh]; in e1000e_ring_free_descr_num() 837 if (core->mac[r->dh] > core->mac[r->dt]) { in e1000e_ring_free_descr_num() 839 core->mac[r->dt] - core->mac[r->dh]; in e1000e_ring_free_descr_num() 1822 core->mac[CTRL_DUP] = core->mac[CTRL]; in e1000e_set_ctrl() 2127 core->mac[ICS] = core->mac[ICR]; in e1000e_raise_interrupts() 2165 core->mac[ICS] = core->mac[ICR]; in e1000e_lower_interrupts() 2170 if (!(core->mac[IMS] & core->mac[ICR]) && in e1000e_lower_interrupts() [all …]
|
H A D | igb_core.c | 137 trace_e1000e_irq_icr_clear_eiac(core->mac[EICR], core->mac[EIAC]); in igb_msix_notify() 704 return core->mac[r->dh] == core->mac[r->dt] || in igb_ring_empty() 737 core->mac[r->dh], core->mac[r->dt]); in igb_ring_free_descr_num() 739 if (core->mac[r->dh] <= core->mac[r->dt]) { in igb_ring_free_descr_num() 740 return core->mac[r->dt] - core->mac[r->dh]; in igb_ring_free_descr_num() 743 if (core->mac[r->dh] > core->mac[r->dt]) { in igb_ring_free_descr_num() 745 core->mac[r->dt] - core->mac[r->dh]; in igb_ring_free_descr_num() 2171 core->mac[CTRL_DUP] = core->mac[CTRL]; in igb_set_ctrl() 2288 uint32_t old_causes = core->mac[ICR] & core->mac[IMS]; in igb_raise_interrupts() 2289 uint32_t old_ecauses = core->mac[EICR] & core->mac[EIMS]; in igb_raise_interrupts() [all …]
|
/openbmc/linux/drivers/net/ethernet/sunplus/ |
H A D | spl2sw_phy.c | 16 struct spl2sw_mac *mac = netdev_priv(ndev); in spl2sw_mii_link_change() local 18 struct spl2sw_common *comm = mac->comm; in spl2sw_mii_link_change() 24 reg |= FIELD_PREP(MAC_FORCE_RMII_LINK, mac->lan_port); in spl2sw_mii_link_change() 27 reg |= FIELD_PREP(MAC_FORCE_RMII_SPD, mac->lan_port); in spl2sw_mii_link_change() 29 reg &= FIELD_PREP(MAC_FORCE_RMII_SPD, ~mac->lan_port) | in spl2sw_mii_link_change() 34 reg |= FIELD_PREP(MAC_FORCE_RMII_DPX, mac->lan_port); in spl2sw_mii_link_change() 41 reg |= FIELD_PREP(MAC_FORCE_RMII_FC, mac->lan_port); in spl2sw_mii_link_change() 43 reg &= FIELD_PREP(MAC_FORCE_RMII_FC, ~mac->lan_port) | in spl2sw_mii_link_change() 60 struct spl2sw_mac *mac; in spl2sw_phy_connect() local 66 mac = netdev_priv(ndev); in spl2sw_phy_connect() [all …]
|
H A D | spl2sw_mac.c | 53 int spl2sw_mac_addr_add(struct spl2sw_mac *mac) in spl2sw_mac_addr_add() argument 55 struct spl2sw_common *comm = mac->comm; in spl2sw_mac_addr_add() 60 writel((mac->mac_addr[0] << 0) + (mac->mac_addr[1] << 8), in spl2sw_mac_addr_add() 62 writel((mac->mac_addr[2] << 0) + (mac->mac_addr[3] << 8) + in spl2sw_mac_addr_add() 63 (mac->mac_addr[4] << 16) + (mac->mac_addr[5] << 24), in spl2sw_mac_addr_add() 90 struct spl2sw_common *comm = mac->comm; in spl2sw_mac_addr_del() 95 writel((mac->mac_addr[0] << 0) + (mac->mac_addr[1] << 8), in spl2sw_mac_addr_del() 97 writel((mac->mac_addr[2] << 0) + (mac->mac_addr[3] << 8) + in spl2sw_mac_addr_del() 98 (mac->mac_addr[4] << 16) + (mac->mac_addr[5] << 24), in spl2sw_mac_addr_del() 220 struct spl2sw_common *comm = mac->comm; in spl2sw_mac_rx_mode_set() [all …]
|
/openbmc/linux/drivers/net/ethernet/freescale/dpaa2/ |
H A D | dpaa2-mac.h | 33 static inline bool dpaa2_mac_is_type_phy(struct dpaa2_mac *mac) in dpaa2_mac_is_type_phy() argument 35 if (!mac) in dpaa2_mac_is_type_phy() 38 return mac->attr.link_type == DPMAC_LINK_TYPE_PHY || in dpaa2_mac_is_type_phy() 39 mac->attr.link_type == DPMAC_LINK_TYPE_BACKPLANE; in dpaa2_mac_is_type_phy() 42 int dpaa2_mac_open(struct dpaa2_mac *mac); 44 void dpaa2_mac_close(struct dpaa2_mac *mac); 46 int dpaa2_mac_connect(struct dpaa2_mac *mac); 48 void dpaa2_mac_disconnect(struct dpaa2_mac *mac); 54 void dpaa2_mac_get_ethtool_stats(struct dpaa2_mac *mac, u64 *data); 56 void dpaa2_mac_start(struct dpaa2_mac *mac); [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/ixgbevf/ |
H A D | vf.c | 52 hw->mac.ops.get_mac_addr(hw, hw->mac.addr); in ixgbevf_init_hw_vf() 73 hw->mac.ops.stop_adapter(hw); in ixgbevf_reset_hw_vf() 706 struct ixgbe_mac_info *mac = &hw->mac; in ixgbevf_check_mac_link_vf() local 715 if (!mac->get_link_status) in ixgbevf_check_mac_link_vf() 797 struct ixgbe_mac_info *mac = &hw->mac; in ixgbevf_hv_check_mac_link_vf() local 804 if (!mac->get_link_status) in ixgbevf_hv_check_mac_link_vf() 1036 .mac = ixgbe_mac_82599_vf, 1046 .mac = ixgbe_mac_X540_vf, 1051 .mac = ixgbe_mac_X540_vf, 1056 .mac = ixgbe_mac_X550_vf, [all …]
|
/openbmc/linux/arch/arm64/crypto/ |
H A D | sm4-ce-ccm-glue.c | 109 sm4_ce_crypt_block(ctx->rkey_enc, mac, mac); in ccm_calculate_auth_mac() 133 mac, mac); in ccm_calculate_auth_mac() 139 mac, ptr, nblocks); in ccm_calculate_auth_mac() 150 crypto_xor(mac + len, ptr, l); in ccm_calculate_auth_mac() 163 u32 *rkey_enc, u8 mac[], in ccm_crypt() argument 166 unsigned int nbytes, u8 *mac)) in ccm_crypt() argument 178 ccm_calculate_auth_mac(req, mac); in ccm_crypt() 185 walk->nbytes - tail, mac); in ccm_crypt() 197 walk->nbytes, mac); in ccm_crypt() 217 u8 __aligned(8) mac[SM4_BLOCK_SIZE]; in ccm_encrypt() [all …]
|
/openbmc/linux/tools/testing/selftests/bpf/ |
H A D | test_tc_tunnel.sh | 128 echo "ip gre $mac" 129 $0 ipv4 gre $mac 100 131 echo "ip6 gre $mac" 134 echo "ip gre $mac gso" 135 $0 ipv4 gre $mac 2000 140 echo "ip udp $mac" 141 $0 ipv4 udp $mac 100 143 echo "ip6 udp $mac" 146 echo "ip udp $mac gso" 147 $0 ipv4 udp $mac 2000 [all …]
|
/openbmc/linux/drivers/net/wireless/quantenna/qtnfmac/ |
H A D | commands.c | 1034 mac->rd = kzalloc(struct_size(mac->rd, reg_rules, resp->n_reg_rules), in qtnf_parse_variable_mac_info() 1036 if (!mac->rd) in qtnf_parse_variable_mac_info() 1067 mac->macid); in qtnf_parse_variable_mac_info() 1073 mac->macid); in qtnf_parse_variable_mac_info() 1130 mac->macid); in qtnf_parse_variable_mac_info() 1137 mac->macid); in qtnf_parse_variable_mac_info() 1176 mac->macid, mac->macinfo.n_if_comb, n_comb); in qtnf_parse_variable_mac_info() 1932 if (params->mac) in qtnf_cmd_send_del_sta() 2054 mac->macid, in qtnf_cmd_send_scan() 2061 mac->macid, in qtnf_cmd_send_scan() [all …]
|
H A D | event.c | 40 mac->macid, vif->vifid); in qtnf_event_handle_sta_assoc() 118 mac->macid, vif->vifid); in qtnf_event_handle_sta_deauth() 175 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join() 189 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join() 194 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join() 203 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join() 468 vif = &mac->iflist[i]; in qtnf_event_handle_freq_change() 507 vif->mac->macid, in qtnf_event_handle_radar() 696 vif = &mac->iflist[vifid]; in qtnf_event_parse() 760 struct qtnf_wmac *mac; in qtnf_event_process_skb() local [all …]
|
/openbmc/linux/drivers/net/ethernet/ti/ |
H A D | cpsw.h | 13 #define mac_hi(mac) (((mac)[0] << 0) | ((mac)[1] << 8) | \ argument 14 ((mac)[2] << 16) | ((mac)[3] << 24)) 15 #define mac_lo(mac) (((mac)[4] << 0) | ((mac)[5] << 8)) argument
|
/openbmc/linux/drivers/net/ethernet/intel/igb/ |
H A D | e1000_mac.c | 115 hw->mac.ops.rar_set(hw, hw->mac.addr, 0); in igb_init_rx_addrs() 531 memset(&hw->mac.mta_shadow, 0, sizeof(hw->mac.mta_shadow)); in igb_update_mc_addr_list() 548 if (hw->mac.type == e1000_i210 || hw->mac.type == e1000_i211) in igb_update_mc_addr_list() 609 struct e1000_mac_info *mac = &hw->mac; in igb_check_for_copper_link() local 644 if (!mac->autoneg) { in igb_check_for_copper_link() 902 struct e1000_mac_info *mac = &hw->mac; in igb_config_fc_after_link_up() local 912 if (mac->autoneg_failed) { in igb_config_fc_after_link_up() 1099 && mac->autoneg) { in igb_config_fc_after_link_up() 1397 struct e1000_mac_info *mac = &hw->mac; in igb_id_led_init() local 1416 mac->ledctl_mode1 = mac->ledctl_default; in igb_id_led_init() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/igbvf/ |
H A D | vf.c | 27 struct e1000_mac_info *mac = &hw->mac; in e1000_init_mac_params_vf() local 30 mac->mta_reg_count = 128; in e1000_init_mac_params_vf() 32 mac->rar_entry_count = 1; in e1000_init_mac_params_vf() 36 mac->ops.reset_hw = e1000_reset_hw_vf; in e1000_init_mac_params_vf() 38 mac->ops.init_hw = e1000_init_hw_vf; in e1000_init_mac_params_vf() 46 mac->ops.rar_set = e1000_rar_set_vf; in e1000_init_mac_params_vf() 328 memcpy(hw->mac.addr, hw->mac.perm_addr, ETH_ALEN); in e1000_read_mac_addr_vf() 382 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_link_vf() local 393 mac->get_link_status = true; in e1000_check_for_link_vf() 395 if (!mac->get_link_status) in e1000_check_for_link_vf() [all …]
|
/openbmc/google-misc/subprojects/nemora-postd/src/ |
H A D | nemora.cpp | 41 bool Nemora::ParseMac(const std::string& mac_addr, MacAddr* mac) in ParseMac() argument 43 int ret = sscanf(mac_addr.c_str(), MAC_FORMAT, mac->octet, mac->octet + 1, in ParseMac() 44 mac->octet + 2, mac->octet + 3, mac->octet + 4, in ParseMac() 45 mac->octet + 5); in ParseMac() 49 bool Nemora::GetMacAddr(MacAddr* mac, const std::string& iface_path) in GetMacAddr() argument 51 if (mac == nullptr) in GetMacAddr() 77 if (!ParseMac(mac_addr, mac)) in GetMacAddr() 138 MacAddr mac; in UpdateEventData() local 139 GetMacAddr(&mac, iface_path_); in UpdateEventData() 143 memcpy(event_data_.mac, mac.octet, sizeof(MacAddr)); in UpdateEventData()
|
/openbmc/linux/drivers/net/ethernet/intel/fm10k/ |
H A D | fm10k_vf.c | 14 u8 *perm_addr = hw->mac.perm_addr; in fm10k_stop_hw_vf() 41 for (i = 0; i < hw->mac.max_queues; i++) { in fm10k_stop_hw_vf() 71 hw->mac.reset_while_pending++; in fm10k_reset_hw_vf() 127 hw->mac.max_queues = i; in fm10k_init_hw_vf() 142 hw->mac.max_queues = 0; in fm10k_init_hw_vf() 272 const u8 *mac, u16 vid, bool add, in fm10k_update_uc_addr_vf() argument 283 if (!is_valid_ether_addr(mac)) in fm10k_update_uc_addr_vf() 288 !ether_addr_equal(hw->mac.perm_addr, mac)) in fm10k_update_uc_addr_vf() 326 if (!is_multicast_ether_addr(mac)) in fm10k_update_mc_addr_vf() 336 mac, vid); in fm10k_update_mc_addr_vf() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/ixgbe/ |
H A D | ixgbe_x540.c | 31 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_get_invariants_X540() local 76 status = hw->mac.ops.stop_adapter(hw); in ixgbe_reset_hw_X540() 125 hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); in ixgbe_reset_hw_X540() 133 hw->mac.ops.init_rx_addrs(hw); in ixgbe_reset_hw_X540() 136 hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr); in ixgbe_reset_hw_X540() 141 hw->mac.san_mac_rar_index = hw->mac.num_rar_entries - 1; in ixgbe_reset_hw_X540() 143 hw->mac.ops.set_rar(hw, hw->mac.san_mac_rar_index, in ixgbe_reset_hw_X540() 147 hw->mac.ops.clear_vmdq(hw, hw->mac.san_mac_rar_index, in ixgbe_reset_hw_X540() 151 hw->mac.num_rar_entries--; in ixgbe_reset_hw_X540() 155 hw->mac.ops.get_wwn_prefix(hw, &hw->mac.wwnn_prefix, in ixgbe_reset_hw_X540() [all …]
|
H A D | ixgbe_82599.c | 65 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_mac_link_ops_82599() local 74 mac->ops.enable_tx_laser = in ixgbe_init_mac_link_ops_82599() 242 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_get_invariants_82599() local 268 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_init_phy_ops_82599() local 1021 hw->mac.orig_autoc = in ixgbe_reset_hw_82599() 1043 hw->mac.ops.get_mac_addr(hw, hw->mac.perm_addr); in ixgbe_reset_hw_82599() 1054 hw->mac.ops.get_san_mac_addr(hw, hw->mac.san_addr); in ixgbe_reset_hw_82599() 1059 hw->mac.san_mac_rar_index = hw->mac.num_rar_entries - 1; in ixgbe_reset_hw_82599() 1061 hw->mac.ops.set_rar(hw, hw->mac.san_mac_rar_index, in ixgbe_reset_hw_82599() 1065 hw->mac.ops.clear_vmdq(hw, hw->mac.san_mac_rar_index, in ixgbe_reset_hw_82599() [all …]
|
/openbmc/google-misc/subprojects/ncsid/src/ |
H A D | net_config.cpp | 57 std::string format_mac(const mac_addr_t& mac) in format_mac() argument 61 snprintf(mac_str, sizeof(mac_str), MAC_FORMAT, mac.octet[0], mac.octet[1], in format_mac() 62 mac.octet[2], mac.octet[3], mac.octet[4], mac.octet[5]); in format_mac() 75 int PhosphorConfig::get_mac_addr(mac_addr_t* mac) in get_mac_addr() argument 77 if (mac == nullptr) in get_mac_addr() 86 *mac = shared_host_mac_.value(); in get_mac_addr() 106 std::copy_n(ifr.ifr_addr.sa_data, sizeof(*mac), mac->octet); in get_mac_addr() 107 shared_host_mac_ = *mac; in get_mac_addr() 118 int PhosphorConfig::set_mac_addr(const mac_addr_t& mac) in set_mac_addr() argument 120 std::string mac_value = format_mac(mac); in set_mac_addr() [all …]
|
H A D | update_ra_gw.sh | 27 local mac="$2" 36 [ "$rtr" != "$old_rtr" -a "$mac" != "$old_mac" ] || return 38 echo "Setting default router: $rtr at $mac" >&2 58 "$rtr" "$mac" "$rtr" >$net_file.d/10-gateway.conf 60 apply_rtr "$rtr" "$mac" 63 old_mac="$mac" 92 mac= 96 mac="${BASH_REMATCH[1]}" 103 rtrs["$rtr"]="$mac $dl" 112 mac= [all …]
|
/openbmc/linux/drivers/net/ethernet/pasemi/ |
H A D | pasemi_mac_ethtool.c | 57 struct pasemi_mac *mac = netdev_priv(netdev); in pasemi_mac_ethtool_get_msglevel() local 58 return mac->msg_enable; in pasemi_mac_ethtool_get_msglevel() 65 struct pasemi_mac *mac = netdev_priv(netdev); in pasemi_mac_ethtool_set_msglevel() local 66 mac->msg_enable = level; in pasemi_mac_ethtool_set_msglevel() 76 struct pasemi_mac *mac = netdev_priv(netdev); in pasemi_mac_ethtool_get_ringparam() local 79 ering->tx_pending = RING_USED(mac->tx)/2; in pasemi_mac_ethtool_get_ringparam() 81 ering->rx_pending = RING_USED(mac->rx)/4; in pasemi_mac_ethtool_get_ringparam() 97 struct pasemi_mac *mac = netdev_priv(netdev); in pasemi_mac_get_ethtool_stats() local 100 data[0] = pasemi_read_dma_reg(PAS_DMA_RXINT_RCMDSTA(mac->dma_if)) in pasemi_mac_get_ethtool_stats() 103 data[1+i] = pasemi_read_mac_reg(mac->dma_if, PAS_MAC_RMON(i)); in pasemi_mac_get_ethtool_stats()
|
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/ |
H A D | dwmac100_core.c | 177 mac->pcsr = priv->ioaddr; in dwmac100_setup() 181 mac->link.speed10 = 0; in dwmac100_setup() 182 mac->link.speed100 = 0; in dwmac100_setup() 183 mac->link.speed1000 = 0; in dwmac100_setup() 185 mac->mii.addr = MAC_MII_ADDR; in dwmac100_setup() 186 mac->mii.data = MAC_MII_DATA; in dwmac100_setup() 187 mac->mii.addr_shift = 11; in dwmac100_setup() 188 mac->mii.addr_mask = 0x0000F800; in dwmac100_setup() 189 mac->mii.reg_shift = 6; in dwmac100_setup() 190 mac->mii.reg_mask = 0x000007C0; in dwmac100_setup() [all …]
|
/openbmc/linux/drivers/media/common/b2c2/ |
H A D | flexcop-eeprom.c | 67 tmp[0] = mac[0]; 68 tmp[1] = mac[1]; 69 tmp[2] = mac[2]; 70 tmp[3] = mac[5]; 71 tmp[4] = mac[6]; 72 tmp[5] = mac[7]; 74 tmp[0] = mac[0]; 75 tmp[1] = mac[1]; 76 tmp[2] = mac[2]; 77 tmp[3] = mac[3]; [all …]
|
/openbmc/u-boot/arch/arm/cpu/arm926ejs/mxs/ |
H A D | mxs.c | 225 mac[0] = 0x00; in mx28_adjust_mac() 229 mac[5] += 1; in mx28_adjust_mac() 235 void imx_get_mac_from_fuse(int dev_id, unsigned char *mac) in imx_get_mac_from_fuse() argument 241 memset(mac, 0, 6); in imx_get_mac_from_fuse() 253 mac[2] = (data >> 24) & 0xff; in imx_get_mac_from_fuse() 254 mac[3] = (data >> 16) & 0xff; in imx_get_mac_from_fuse() 255 mac[4] = (data >> 8) & 0xff; in imx_get_mac_from_fuse() 256 mac[5] = data & 0xff; in imx_get_mac_from_fuse() 257 mx28_adjust_mac(dev_id, mac); in imx_get_mac_from_fuse() 260 void imx_get_mac_from_fuse(int dev_id, unsigned char *mac) in imx_get_mac_from_fuse() argument [all …]
|
/openbmc/openbmc/meta-google/recipes-google/networking/files/ |
H A D | gbmc-mac-config.sh.in | 44 mac=("${internal[@]:3:6}") 63 lower=$(((mac[3] << 16) | (mac[4] << 8) | mac[5])) 71 mac[3]=$(((lower >> 16) & 0xff)) 72 mac[4]=$(((lower >> 8) & 0xff)) 73 mac[5]=$(((lower >> 0) & 0xff)) 78 printf '[Link]\nMACAddress=%s\n' "$macstr" >"$override"/50-mac.conf 82 printf '[NetDev]\nMACAddress=%s\n' "$macstr" >"$override"/50-mac.conf
|