/openbmc/linux/drivers/net/wireless/zydas/zd1211rw/ |
H A D | zd_mac.c | 249 r = zd_write_mac_addr(&mac->chip, mac->vif->addr); in set_mac_and_bssid() 259 return zd_write_bssid(&mac->chip, mac->vif->addr); in set_mac_and_bssid() 401 beacon = ieee80211_beacon_get(mac->hw, mac->vif, 0); in zd_restore_settings() 547 mac->ack_pending ? mac->ack_signal : 0, in zd_mac_tx_failed() 587 mac->ack_pending ? mac->ack_signal : 0, in zd_mac_tx_to_dev() 995 mac->ack_pending ? mac->ack_signal : 0, in filter_ack() 1161 skb = ieee80211_get_buffered_bc(mac->hw, mac->vif); in zd_beacon_done() 1372 memset(mac, 0, sizeof(*mac)); in zd_mac_alloc_hw() 1381 mac->band.bitrates = mac->rates; in zd_mac_alloc_hw() 1383 mac->band.channels = mac->channels; in zd_mac_alloc_hw() [all …]
|
/openbmc/linux/drivers/net/ethernet/chelsio/cxgb3/ |
H A D | xgmac.c | 72 t3_set_reg_field(mac->adapter, A_XGM_RESET_CTRL + mac->offset, in t3b_pcs_reset() 75 t3_set_reg_field(mac->adapter, A_XGM_RESET_CTRL + mac->offset, 0, in t3b_pcs_reset() 146 memset(&mac->stats, 0, sizeof(mac->stats)); in t3_mac_reset() 157 if (!macidx(mac)) in t3b2_mac_reset() 260 mac->nucast = n; in t3_mac_set_num_ucast() 512 mac->txen = 0; in t3_mac_disable() 560 if ((tx_tcnt != mac->tx_tcnt) && (mac->tx_xcnt == 0)) { in t3b2_mac_watchdog_task() 581 t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, mac->txen); in t3b2_mac_watchdog_task() 600 #define RMON_READ(mac, addr) t3_read_reg(mac->adapter, addr + mac->offset) in t3_mac_update_stats() argument 602 (mac)->stats.name += (u64)RMON_READ(mac, A_XGM_STAT_##reg) in t3_mac_update_stats() [all …]
|
/openbmc/linux/drivers/net/ethernet/freescale/dpaa2/ |
H A D | dpaa2-mac.c | 30 mac->features = 0; in dpaa2_mac_detect_features() 157 return mac->pcs; in dpaa2_mac_select_pcs() 183 err = dpmac_set_protocol(mac->mc_io, 0, mac->mc_dev->mc_handle, in dpaa2_mac_config() 284 mac->pcs = pcs; in dpaa2_pcs_create() 295 mac->pcs = NULL; in dpaa2_pcs_destroy() 308 if (mac->pcs) { in dpaa2_mac_set_supported_interfaces() 370 mac->if_link_type = mac->attr.link_type; in dpaa2_mac_connect() 412 err = dpaa2_pcs_create(mac, dpmac_node, mac->attr.id); in dpaa2_mac_connect() 417 memset(&mac->phylink_config, 0, sizeof(mac->phylink_config)); in dpaa2_mac_connect() 487 err = dpmac_get_api_version(mac->mc_io, 0, &mac->ver_major, &mac->ver_minor); in dpaa2_mac_open() [all …]
|
/openbmc/linux/drivers/net/ethernet/pasemi/ |
H A D | pasemi_mac.c | 432 ring->mac = mac; in pasemi_mac_setup_rx_resources() 496 ring->mac = mac; in pasemi_mac_setup_tx_resources() 696 struct pasemi_mac *mac = rx->mac; in pasemi_mac_clean_rx() local 817 struct pasemi_mac *mac = txring->mac; in pasemi_mac_clean_tx() local 909 struct pasemi_mac *mac = rxring->mac; in pasemi_mac_rx_intr() local 938 struct pasemi_mac *mac = txring->mac; in pasemi_mac_tx_timer() local 951 struct pasemi_mac *mac = txring->mac; in pasemi_mac_tx_intr() local 1174 mac->tx_irq_name, mac->tx); in pasemi_mac_open() 1185 mac->rx_irq_name, mac->rx); in pasemi_mac_open() 1498 csring = mac->cs[mac->last_cs]; in pasemi_mac_start_tx() [all …]
|
/openbmc/linux/drivers/net/wireless/purelifi/plfxlc/ |
H A D | mac.c | 135 if (mac->vif) { in plfxlc_restore_settings() 136 beacon = ieee80211_beacon_get(mac->hw, mac->vif, 0); in plfxlc_restore_settings() 414 if (!mac->vif) in plfxlc_mac_rx() 437 !mac->pass_ctrl) in plfxlc_mac_rx() 520 mac->vif = vif; in plfxlc_op_add_interface() 533 mac->vif = NULL; in plfxlc_op_remove_interface() 678 data[0] = mac->rssi; in plfxlc_get_et_stats() 717 memset(mac, 0, sizeof(*mac)); in plfxlc_mac_alloc_hw() 719 mac->hw = hw; in plfxlc_mac_alloc_hw() 726 mac->band.bitrates = mac->rates; in plfxlc_mac_alloc_hw() [all …]
|
/openbmc/linux/drivers/net/wireless/quantenna/qtnfmac/ |
H A D | core.c | 50 mac = bus->mac[macid]; in qtnf_core_get_mac() 57 return mac; in qtnf_core_get_mac() 109 mac = vif->mac; in qtnf_netdev_hard_start_xmit() 144 if (unlikely(!vif || !vif->mac || !vif->mac->bus)) in qtnf_netdev_tx_timeout() 147 mac = vif->mac; in qtnf_netdev_tx_timeout() 445 vif->mac = mac; in qtnf_core_mac_alloc() 453 bus->mac[macid] = mac; in qtnf_core_mac_alloc() 512 mac = bus->mac[macid]; in qtnf_core_mac_detach() 597 ether_addr_copy(mac->bus->hw_id, mac->macaddr); in qtnf_core_mac_attach() 862 mac = bus->mac[meta->macid]; in qtnf_classify_skb() [all …]
|
H A D | cfg80211.c | 78 struct qtnf_wmac *mac; in qtnf_validate_iface_combinations() local 87 if (!mac) in qtnf_validate_iface_combinations() 91 vif = &mac->iflist[i]; in qtnf_validate_iface_combinations() 117 mac->macid); in qtnf_validate_iface_combinations() 202 struct qtnf_wmac *mac; in qtnf_add_virtual_intf() local 210 if (!mac) in qtnf_add_virtual_intf() 613 vif->mac->macid, vif->vifid, mac); in qtnf_change_station() 625 if (params->mac && in qtnf_del_station() 634 vif->mac->macid, vif->vifid, params->mac); in qtnf_del_station() 657 queue_delayed_work(mac->bus->workqueue, &mac->scan_timeout, in qtnf_scan() [all …]
|
/openbmc/qemu/hw/net/ |
H A D | e1000x_common.h | 31 if (mac[index] != UINT32_MAX) { in e1000x_inc_reg_if_not_full() 32 mac[index]++; in e1000x_inc_reg_if_not_full() 39 uint64_t sum = mac[index] | (uint64_t)mac[index + 1] << 32; in e1000x_grow_8reg_if_not_full() 46 mac[index] = sum; in e1000x_grow_8reg_if_not_full() 47 mac[index + 1] = sum >> 32; in e1000x_grow_8reg_if_not_full() 51 e1000x_vlan_enabled(uint32_t *mac) in e1000x_vlan_enabled() argument 63 e1000x_vlan_rx_filter_enabled(uint32_t *mac) in e1000x_vlan_rx_filter_enabled() argument 69 e1000x_fcs_len(uint32_t *mac) in e1000x_fcs_len() argument 80 mac[STATUS] &= ~E1000_STATUS_LU; in e1000x_update_regs_on_link_down() 89 mac[STATUS] |= E1000_STATUS_LU; in e1000x_update_regs_on_link_up() [all …]
|
H A D | e1000x_common.c | 63 if (e1000x_vlan_rx_filter_enabled(mac)) { in e1000x_rx_vlan_filter() 98 for (rp = mac + RA; rp < mac + RA + 32; rp += 2) { in e1000x_rx_group_filter() 126 bool e1000x_hw_rx_enabled(uint32_t *mac) in e1000x_hw_rx_enabled() argument 128 if (!(mac[STATUS] & E1000_STATUS_LU)) { in e1000x_hw_rx_enabled() 133 if (!(mac[RCTL] & E1000_RCTL_EN)) { in e1000x_hw_rx_enabled() 254 e1000x_inc_reg_if_not_full(mac, TPR); in e1000x_update_rx_total_stats() 319 uint32_t timinca = mac[TIMINCA]; in e1000x_timestamp() 324 mac[lo] = timestamp & 0xffffffff; in e1000x_timestamp() 325 mac[hi] = timestamp >> 32; in e1000x_timestamp() 331 uint32_t old_val = mac[TIMINCA]; in e1000x_set_timinca() [all …]
|
/openbmc/linux/drivers/net/ethernet/chelsio/cxgb/ |
H A D | vsc7326.c | 551 mac_reset(mac); in mac_disable() 625 rmon_update(mac, REG_TX_OK_BYTES(port), &mac->stats.TxOctetsOK); in port_stats_update() 626 rmon_update(mac, REG_RX_OK_BYTES(port), &mac->stats.RxOctetsOK); in port_stats_update() 627 rmon_update(mac, REG_RX_BAD_BYTES(port), &mac->stats.RxOctetsBad); in port_stats_update() 657 return &mac->stats; in mac_update_statistics() 662 kfree(mac); in mac_destroy() 684 struct cmac *mac; in vsc7326_mac_create() local 688 mac = kzalloc(sizeof(*mac) + sizeof(cmac_instance), GFP_KERNEL); in vsc7326_mac_create() 689 if (!mac) in vsc7326_mac_create() 693 mac->instance = (cmac_instance *)(mac + 1); in vsc7326_mac_create() [all …]
|
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/ |
H A D | dwmac-ingenic.c | 126 return regmap_update_bits(mac->regmap, 0, mac->soc_info->mask, val); in jz4775_mac_set_mode() 144 return regmap_update_bits(mac->regmap, 0, mac->soc_info->mask, 0); in x1000_mac_set_mode() 164 return regmap_update_bits(mac->regmap, 0, mac->soc_info->mask, val); in x1600_mac_set_mode() 185 return regmap_update_bits(mac->regmap, 0, mac->soc_info->mask, val); in x1830_mac_set_mode() 207 if (mac->tx_delay == 0) in x2000_mac_set_mode() 213 if (mac->rx_delay == 0) in x2000_mac_set_mode() 228 return regmap_update_bits(mac->regmap, 0, mac->soc_info->mask, val); in x2000_mac_set_mode() 248 mac = devm_kzalloc(&pdev->dev, sizeof(*mac), GFP_KERNEL); in ingenic_mac_probe() 249 if (!mac) { in ingenic_mac_probe() 291 mac->soc_info = data; in ingenic_mac_probe() [all …]
|
H A D | hwif.c | 112 const void *mac; member 305 mac = devm_kzalloc(priv->device, sizeof(*mac), GFP_KERNEL); in stmmac_hwif_init() 308 if (!mac) in stmmac_hwif_init() 328 mac->desc = mac->desc ? : entry->desc; in stmmac_hwif_init() 329 mac->dma = mac->dma ? : entry->dma; in stmmac_hwif_init() 330 mac->mac = mac->mac ? : entry->mac; in stmmac_hwif_init() 331 mac->ptp = mac->ptp ? : entry->hwtimestamp; in stmmac_hwif_init() 332 mac->mode = mac->mode ? : entry->mode; in stmmac_hwif_init() 333 mac->tc = mac->tc ? : entry->tc; in stmmac_hwif_init() 334 mac->mmc = mac->mmc ? : entry->mmc; in stmmac_hwif_init() [all …]
|
/openbmc/linux/drivers/net/ethernet/intel/e1000e/ |
H A D | mac.c | 16 struct e1000_mac_info *mac = &hw->mac; in e1000e_get_bus_info_pcie() local 120 hw->mac.ops.rar_set(hw, hw->mac.addr, 0); in e1000e_init_rx_addrs() 398 struct e1000_mac_info *mac = &hw->mac; in e1000e_check_for_copper_link() local 461 struct e1000_mac_info *mac = &hw->mac; in e1000e_check_for_fiber_link() local 526 struct e1000_mac_info *mac = &hw->mac; in e1000e_check_for_serdes_link() local 723 struct e1000_mac_info *mac = &hw->mac; in e1000_commit_fc_settings_generic() local 789 struct e1000_mac_info *mac = &hw->mac; in e1000_poll_fiber_serdes_link_generic() local 1003 struct e1000_mac_info *mac = &hw->mac; in e1000e_config_fc_after_link_up() local 1468 struct e1000_mac_info *mac = &hw->mac; in e1000e_id_led_init_generic() local 1729 struct e1000_mac_info *mac = &hw->mac; in e1000e_reset_adaptive() local [all …]
|
H A D | 82571.c | 62 switch (hw->mac.type) { in e1000_init_phy_params_82571() 90 switch (hw->mac.type) { in e1000_init_phy_params_82571() 143 switch (hw->mac.type) { in e1000_init_nvm_params_82571() 193 struct e1000_mac_info *mac = &hw->mac; in e1000_init_mac_params_82571() local 246 mac->has_fwsm = true; in e1000_init_mac_params_82571() 1067 struct e1000_mac_info *mac = &hw->mac; in e1000_init_hw_82571() local 1108 switch (mac->type) { in e1000_init_hw_82571() 1227 if ((hw->mac.type == e1000_82571) || (hw->mac.type == e1000_82572)) { in e1000_initialize_hw_bits_82571() 1497 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_serdes_link_82571() local 1713 hw->mac.ops.rar_set(hw, hw->mac.addr, in e1000e_set_laa_state_82571() [all …]
|
/openbmc/u-boot/drivers/net/fm/ |
H A D | tgec.c | 30 struct tgec *regs = mac->base; in tgec_init_mac() 57 struct tgec *regs = mac->base; in tgec_enable_mac() 64 struct tgec *regs = mac->base; in tgec_disable_mac() 71 struct tgec *regs = mac->base; in tgec_set_mac_addr() 96 mac->base = base; in init_tgec() 97 mac->phyregs = phyregs; in init_tgec() 98 mac->max_rx_len = max_rx_len; in init_tgec() 99 mac->init_mac = tgec_init_mac; in init_tgec() 100 mac->enable_mac = tgec_enable_mac; in init_tgec() 101 mac->disable_mac = tgec_disable_mac; in init_tgec() [all …]
|
H A D | memac.c | 20 struct memac *regs = mac->base; in memac_init_mac() 37 struct memac *regs = mac->base; in memac_enable_mac() 45 struct memac *regs = mac->base; in memac_disable_mac() 52 struct memac *regs = mac->base; in memac_set_mac_addr() 72 struct memac *regs = mac->base; in memac_set_interface_mode() 136 mac->base = base; in init_memac() 137 mac->phyregs = phyregs; in init_memac() 138 mac->max_rx_len = max_rx_len; in init_memac() 139 mac->init_mac = memac_init_mac; in init_memac() 140 mac->enable_mac = memac_enable_mac; in init_memac() [all …]
|
H A D | dtsec.c | 28 struct dtsec *regs = mac->base; in dtsec_init_mac() 66 struct dtsec *regs = mac->base; in dtsec_enable_mac() 80 struct dtsec *regs = mac->base; in dtsec_disable_mac() 94 struct dtsec *regs = mac->base; in dtsec_set_mac_addr() 112 struct dtsec *regs = mac->base; in dtsec_set_interface_mode() 158 mac->base = base; in init_dtsec() 159 mac->phyregs = phyregs; in init_dtsec() 160 mac->max_rx_len = max_rx_len; in init_dtsec() 161 mac->init_mac = dtsec_init_mac; in init_dtsec() 162 mac->enable_mac = dtsec_enable_mac; in init_dtsec() [all …]
|
/openbmc/linux/drivers/net/ethernet/freescale/enetc/ |
H A D | enetc_hw.h | 307 #define ENETC_PM_RALN(mac) (0x8110 + ENETC_PMAC_OFFSET * (mac)) argument 308 #define ENETC_PM_RXPF(mac) (0x8118 + ENETC_PMAC_OFFSET * (mac)) argument 309 #define ENETC_PM_RFRM(mac) (0x8120 + ENETC_PMAC_OFFSET * (mac)) argument 310 #define ENETC_PM_RFCS(mac) (0x8128 + ENETC_PMAC_OFFSET * (mac)) argument 312 #define ENETC_PM_RERR(mac) (0x8138 + ENETC_PMAC_OFFSET * (mac)) argument 313 #define ENETC_PM_RUCA(mac) (0x8140 + ENETC_PMAC_OFFSET * (mac)) argument 314 #define ENETC_PM_RMCA(mac) (0x8148 + ENETC_PMAC_OFFSET * (mac)) argument 315 #define ENETC_PM_RBCA(mac) (0x8150 + ENETC_PMAC_OFFSET * (mac)) argument 316 #define ENETC_PM_RDRP(mac) (0x8158 + ENETC_PMAC_OFFSET * (mac)) argument 319 #define ENETC_PM_R64(mac) (0x8170 + ENETC_PMAC_OFFSET * (mac)) argument [all …]
|
/openbmc/linux/drivers/net/ethernet/microchip/lan966x/ |
H A D | lan966x_mdb.c | 16 unsigned char mac[ETH_ALEN]; member 63 if (ether_addr_equal(mdb_entry->mac, mac) && in lan966x_mdb_entry_get() 93 ether_addr_copy(mac, mdb_entry->mac); in lan966x_mdb_encode_mac() 96 mac[0] = 0; in lan966x_mdb_encode_mac() 112 unsigned char mac[ETH_ALEN]; in lan966x_mdb_ip_add() local 147 unsigned char mac[ETH_ALEN]; in lan966x_mdb_ip_del() local 256 unsigned char mac[ETH_ALEN]; in lan966x_mdb_l2_add() local 305 unsigned char mac[ETH_ALEN]; in lan966x_mdb_l2_del() local 357 if (mac[0] == 0x01 && mac[1] == 0x00 && mac[2] == 0x5e) in lan966x_mdb_classify() 359 if (mac[0] == 0x33 && mac[1] == 0x33) in lan966x_mdb_classify() [all …]
|
H A D | lan966x_mac.c | 62 mach |= mac[0] << 8; in lan966x_mac_select() 63 mach |= mac[1] << 0; in lan966x_mac_select() 64 macl |= mac[2] << 24; in lan966x_mac_select() 65 macl |= mac[3] << 16; in lan966x_mac_select() 66 macl |= mac[4] << 8; in lan966x_mac_select() 67 macl |= mac[5] << 0; in lan966x_mac_select() 213 memcpy(mac_entry->mac, mac, ETH_ALEN); in lan966x_mac_alloc_entry() 222 const unsigned char *mac, in lan966x_mac_find_entry() argument 230 ether_addr_equal(mac, mac_entry->mac) && in lan966x_mac_find_entry() 267 info.addr = mac; in lan966x_fdb_call_notifiers() [all …]
|
/openbmc/u-boot/drivers/net/ |
H A D | ep93xx_eth.c | 154 value = readl(&mac->selfctl); in ep93xx_mac_reset() 156 writel(value, &mac->selfctl); in ep93xx_mac_reset() 207 writel(BMCTL_TXEN, &mac->bmctl); in ep93xx_eth_open() 224 writel(BMCTL_RXEN, &mac->bmctl); in ep93xx_eth_open() 259 &mac->indad); in ep93xx_eth_open() 289 writel(0x00000000, &mac->rxctl); in ep93xx_eth_close() 355 writel(1, &mac->rxdqenq); in ep93xx_eth_rcv_packet() 356 writel(1, &mac->rxstsqenq); in ep93xx_eth_rcv_packet() 396 writel(1, &mac->txdqenq); in ep93xx_eth_send_packet() 587 &mac->miicmd); in ep93xx_miiphy_read() [all …]
|
/openbmc/linux/drivers/net/ethernet/oki-semi/pch_gbe/ |
H A D | pch_gbe_param.c | 324 hw->mac.autoneg = hw->mac.fc_autoneg = 1; in pch_gbe_check_copper_options() 336 hw->mac.autoneg = hw->mac.fc_autoneg = 1; in pch_gbe_check_copper_options() 347 hw->mac.autoneg = hw->mac.fc_autoneg = 1; in pch_gbe_check_copper_options() 359 hw->mac.autoneg = hw->mac.fc_autoneg = 1; in pch_gbe_check_copper_options() 367 hw->mac.autoneg = hw->mac.fc_autoneg = 0; in pch_gbe_check_copper_options() 374 hw->mac.autoneg = hw->mac.fc_autoneg = 0; in pch_gbe_check_copper_options() 384 hw->mac.autoneg = hw->mac.fc_autoneg = 1; in pch_gbe_check_copper_options() 393 hw->mac.autoneg = hw->mac.fc_autoneg = 0; in pch_gbe_check_copper_options() 401 hw->mac.autoneg = hw->mac.fc_autoneg = 0; in pch_gbe_check_copper_options() 418 hw->mac.autoneg = hw->mac.fc_autoneg = 1; in pch_gbe_check_copper_options() [all …]
|
/openbmc/u-boot/arch/arm/mach-imx/ |
H A D | mac.c | 39 mac[0] = value >> 24; in imx_get_mac_from_fuse() 40 mac[1] = value >> 16; in imx_get_mac_from_fuse() 41 mac[2] = value >> 8; in imx_get_mac_from_fuse() 42 mac[3] = value; in imx_get_mac_from_fuse() 45 mac[4] = value >> 24; in imx_get_mac_from_fuse() 46 mac[5] = value >> 16; in imx_get_mac_from_fuse() 51 mac[0] = value >> 8; in imx_get_mac_from_fuse() 52 mac[1] = value; in imx_get_mac_from_fuse() 55 mac[2] = value >> 24; in imx_get_mac_from_fuse() 57 mac[4] = value >> 8; in imx_get_mac_from_fuse() [all …]
|
/openbmc/linux/drivers/net/ethernet/sunplus/ |
H A D | spl2sw_driver.c | 226 u8 *mac; in spl2sw_nvmem_get_mac_address() local 236 if (IS_ERR(mac)) in spl2sw_nvmem_get_mac_address() 237 return PTR_ERR(mac); in spl2sw_nvmem_get_mac_address() 240 kfree(mac); in spl2sw_nvmem_get_mac_address() 253 kfree(mac); in spl2sw_nvmem_get_mac_address() 258 kfree(mac); in spl2sw_nvmem_get_mac_address() 266 struct spl2sw_mac *mac; in spl2sw_init_netdev() local 279 mac = netdev_priv(ndev); in spl2sw_init_netdev() 280 mac->ndev = ndev; in spl2sw_init_netdev() 328 struct spl2sw_mac *mac; in spl2sw_probe() local [all …]
|
/openbmc/linux/drivers/net/wireless/realtek/rtlwifi/ |
H A D | core.c | 218 if (mac->vif) { in rtl_op_add_interface() 297 if (mac->p2p) { in rtl_op_add_interface() 304 mac->vif = vif; in rtl_op_add_interface() 342 mac->p2p = 0; in rtl_op_remove_interface() 343 mac->vif = NULL; in rtl_op_remove_interface() 588 if (mac->skip_scan) in rtl_op_config() 663 mac->n_channels++; in rtl_op_config() 924 if (mac->p2p) in rtl_op_sta_add() 1198 mac->mode = 0; in rtl_op_bss_info_changed() 1379 mac->tsf = tsf; in rtl_op_set_tsf() [all …]
|