/openbmc/linux/drivers/net/ethernet/freescale/dpaa2/ |
H A D | dpaa2-mac.c | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 5 #include <linux/pcs-lynx.h> 9 #include "dpaa2-eth.h" 10 #include "dpaa2-mac.h" 20 static int dpaa2_mac_cmp_ver(struct dpaa2_mac *mac, in dpaa2_mac_cmp_ver() argument 23 if (mac->ver_major == ver_major) in dpaa2_mac_cmp_ver() 24 return mac->ver_minor - ver_minor; in dpaa2_mac_cmp_ver() 25 return mac->ver_major - ver_major; in dpaa2_mac_cmp_ver() 28 static void dpaa2_mac_detect_features(struct dpaa2_mac *mac) in dpaa2_mac_detect_features() argument 30 mac->features = 0; in dpaa2_mac_detect_features() [all …]
|
/openbmc/linux/drivers/net/ethernet/chelsio/cxgb3/ |
H A D | xgmac.c | 2 * Copyright (c) 2005-2008 Chelsio, Inc. All rights reserved. 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 41 static inline int macidx(const struct cmac *mac) in macidx() argument 43 return mac->offset / (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR); in macidx() 46 static void xaui_serdes_reset(struct cmac *mac) in xaui_serdes_reset() argument 54 struct adapter *adap = mac->adapter; in xaui_serdes_reset() 55 u32 ctrl = A_XGM_SERDES_CTRL0 + mac->offset; in xaui_serdes_reset() 57 t3_write_reg(adap, ctrl, adap->params.vpd.xauicfg[macidx(mac)] | in xaui_serdes_reset() 70 void t3b_pcs_reset(struct cmac *mac) in t3b_pcs_reset() argument [all …]
|
/openbmc/linux/drivers/net/wireless/zydas/zd1211rw/ |
H A D | zd_mac.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* ZD1211 USB-WLAN driver for Linux 4 * Copyright (C) 2005-2007 Ulrich Kunitz <kune@deine-taler.de> 5 * Copyright (C) 2006-2007 Daniel Drake <dsd@gentoo.org> 6 * Copyright (C) 2006-2007 Michael Wu <flamingice@sourmilk.net> 7 * Copyright (C) 2007-2008 Luis R. Rodriguez <mcgrof@winlab.rutgers.edu> 86 * - packet is sent using 4 different rates 87 * - 1st rate is index 3 (ie 11 Mbits) 88 * - 2nd rate is index 2 (ie 5.5 Mbits) 89 * - 3rd rate is index 1 (ie 2 Mbits) [all …]
|
/openbmc/linux/drivers/net/ethernet/pasemi/ |
H A D | pasemi_mac.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2006-2007 PA Semi, Inc 17 #include <asm/dma-mapping.h> 40 * - Multicast support 41 * - Large MTU support 42 * - Multiqueue RX/TX 63 static int debug = -1; /* -1 == use DEFAULT_MSG_ENABLE as value */ 65 MODULE_PARM_DESC(debug, "PA Semi MAC bitmapped debugging message enable value"); 83 static unsigned int read_mac_reg(const struct pasemi_mac *mac, unsigned int reg) in read_mac_reg() argument 85 return pasemi_read_mac_reg(mac->dma_if, reg); in read_mac_reg() [all …]
|
/openbmc/linux/drivers/net/wireless/quantenna/qtnfmac/ |
H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ 42 struct qtnf_wmac *mac = NULL; in qtnf_core_get_mac() local 45 pr_err("invalid MAC index %u\n", macid); in qtnf_core_get_mac() 50 mac = bus->mac[macid]; in qtnf_core_get_mac() 52 if (unlikely(!mac)) { in qtnf_core_get_mac() 53 pr_err("MAC%u: not initialized\n", macid); in qtnf_core_get_mac() 57 return mac; in qtnf_core_get_mac() 81 struct qtnf_vif *vif = qtnf_netdev_get_priv(skb->dev); in qtnf_packet_send_hi_pri() 83 skb_queue_tail(&vif->high_pri_tx_queue, skb); in qtnf_packet_send_hi_pri() [all …]
|
H A D | cfg80211.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ 78 struct qtnf_wmac *mac; in qtnf_validate_iface_combinations() local 86 mac = wiphy_priv(wiphy); in qtnf_validate_iface_combinations() 87 if (!mac) in qtnf_validate_iface_combinations() 88 return -EFAULT; in qtnf_validate_iface_combinations() 91 vif = &mac->iflist[i]; in qtnf_validate_iface_combinations() 92 if (vif->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED) in qtnf_validate_iface_combinations() 93 params.iftype_num[vif->wdev.iftype]++; in qtnf_validate_iface_combinations() 98 params.iftype_num[change_vif->wdev.iftype]--; in qtnf_validate_iface_combinations() [all …]
|
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/ |
H A D | dwmac-ingenic.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * dwmac-ingenic.c - Ingenic SoCs DWMAC specific glue layer 75 struct ingenic_mac *mac = plat_dat->bsp_priv; in ingenic_mac_init() local 78 if (mac->soc_info->set_mode) { in ingenic_mac_init() 79 ret = mac->soc_info->set_mode(plat_dat); in ingenic_mac_init() 89 struct ingenic_mac *mac = plat_dat->bsp_priv; in jz4775_mac_set_mode() local 92 switch (plat_dat->mac_interface) { in jz4775_mac_set_mode() 96 dev_dbg(mac->dev, "MAC PHY Control Register: PHY_INTERFACE_MODE_MII\n"); in jz4775_mac_set_mode() 102 dev_dbg(mac->dev, "MAC PHY Control Register: PHY_INTERFACE_MODE_GMII\n"); in jz4775_mac_set_mode() 108 dev_dbg(mac->dev, "MAC PHY Control Register: PHY_INTERFACE_MODE_RMII\n"); in jz4775_mac_set_mode() [all …]
|
H A D | hwif.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 13 u32 reg = readl(priv->ioaddr + id_reg); in stmmac_get_id() 16 dev_info(priv->device, "Version ID not available\n"); in stmmac_get_id() 20 dev_info(priv->device, "User ID: 0x%x, Synopsys ID: 0x%x\n", in stmmac_get_id() 28 u32 reg = readl(priv->ioaddr + id_reg); in stmmac_get_dev_id() 31 dev_info(priv->device, "Version ID not available\n"); in stmmac_get_dev_id() 40 struct mac_device_info *mac = priv->hw; in stmmac_dwmac_mode_quirk() local 42 if (priv->chain_mode) { in stmmac_dwmac_mode_quirk() 43 dev_info(priv->device, "Chain mode enabled\n"); in stmmac_dwmac_mode_quirk() 44 priv->mode = STMMAC_CHAIN_MODE; in stmmac_dwmac_mode_quirk() [all …]
|
/openbmc/linux/drivers/net/wireless/purelifi/plfxlc/ |
H A D | mac.c | 1 // SPDX-License-Identifier: GPL-2.0-only 15 #include "mac.h" 88 struct plfxlc_mac *mac = plfxlc_hw_mac(hw); in plfxlc_mac_init_hw() local 89 struct plfxlc_chip *chip = &mac->chip; in plfxlc_mac_init_hw() 94 dev_warn(plfxlc_mac_dev(mac), "init hw failed (%d)\n", r); in plfxlc_mac_init_hw() 98 dev_dbg(plfxlc_mac_dev(mac), "irq_disabled (%d)\n", irqs_disabled()); in plfxlc_mac_init_hw() 99 regulatory_hint(hw->wiphy, "00"); in plfxlc_mac_init_hw() 103 void plfxlc_mac_release(struct plfxlc_mac *mac) in plfxlc_mac_release() argument 105 plfxlc_chip_release(&mac->chip); in plfxlc_mac_release() 106 lockdep_assert_held(&mac->lock); in plfxlc_mac_release() [all …]
|
/openbmc/openbmc-test-automation/redfish/managers/ |
H A D | test_bmc_network_mac.robot | 16 # AA:AA:AA:AA:AA:AA series is a valid MAC and does not exist in 17 # our network, so this is chosen to avoid MAC conflict. 23 # There will be 6 bytes in MAC address (e.g. xx.xx.xx.xx.xx.xx). 29 # MAC address with special characters. 34 Configure Valid MAC And Verify 35 [Documentation] Configure valid MAC via Redfish and verify. 38 Configure MAC Settings ${valid_mac} 40 # Verify whether new MAC is configured on BMC and FW_Env. 41 Validate MAC On BMC ${valid_mac} 42 Verify MAC Address Via FW_Env ${valid_mac} [all …]
|
/openbmc/linux/drivers/net/ethernet/microchip/lan966x/ |
H A D | lan966x_mdb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 16 unsigned char mac[ETH_ALEN]; member 25 INIT_LIST_HEAD(&lan966x->mdb_entries); in lan966x_mdb_init() 26 INIT_LIST_HEAD(&lan966x->pgid_entries); in lan966x_mdb_init() 33 list_for_each_entry_safe(mdb_entry, tmp, &lan966x->mdb_entries, list) { in lan966x_mdb_purge_mdb_entries() 34 list_del(&mdb_entry->list); in lan966x_mdb_purge_mdb_entries() 43 list_for_each_entry_safe(pgid_entry, tmp, &lan966x->pgid_entries, list) { in lan966x_mdb_purge_pgid_entries() 44 list_del(&pgid_entry->list); in lan966x_mdb_purge_pgid_entries() 57 const unsigned char *mac, in lan966x_mdb_entry_get() argument 62 list_for_each_entry(mdb_entry, &lan966x->mdb_entries, list) { in lan966x_mdb_entry_get() [all …]
|
H A D | lan966x_mac.c | 1 // SPDX-License-Identifier: GPL-2.0+ 17 #define LAN966X_MAC_INVALID_ROW -1 21 unsigned char mac[ETH_ALEN] __aligned(2); member 53 const unsigned char mac[ETH_ALEN], in lan966x_mac_select() 58 /* Set the MAC address to handle and the vlan associated in a format in lan966x_mac_select() 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() [all …]
|
/openbmc/linux/drivers/net/ethernet/chelsio/cxgb/ |
H A D | vsc7326.c | 1 // SPDX-License-Identifier: GPL-2.0 4 /* Driver for Vitesse VSC7326 (Schaumburg) MAC */ 16 * interface is down (MAC port disabled). This is a workaround 17 * for disabling the T2/MAC flow-control. When the interface is 40 spin_lock_bh(&adapter->mac_lock); in vsc_read() 50 pr_err("Invalid tpi read from MAC, breaking loop.\n"); in vsc_read() 60 spin_unlock_bh(&adapter->mac_lock); in vsc_read() 65 spin_lock_bh(&adapter->mac_lock); in vsc_write() 71 spin_unlock_bh(&adapter->mac_lock); in vsc_write() 74 /* Hard reset the MAC. This wipes out *all* configuration. */ [all …]
|
/openbmc/qemu/hw/net/ |
H A D | e1000x_common.c | 2 * QEMU e1000(e) emulation - shared code 37 bool e1000x_rx_ready(PCIDevice *d, uint32_t *mac) in e1000x_rx_ready() argument 39 bool link_up = mac[STATUS] & E1000_STATUS_LU; in e1000x_rx_ready() 40 bool rx_enabled = mac[RCTL] & E1000_RCTL_EN; in e1000x_rx_ready() 41 bool pci_master = d->config[PCI_COMMAND] & PCI_COMMAND_MASTER; in e1000x_rx_ready() 53 uint16_t eth_proto = lduw_be_p(&PKT_GET_ETH_HDR(buf)->h_proto); in e1000x_is_vlan_packet() 61 bool e1000x_rx_vlan_filter(uint32_t *mac, const struct vlan_header *vhdr) in e1000x_rx_vlan_filter() argument 63 if (e1000x_vlan_rx_filter_enabled(mac)) { in e1000x_rx_vlan_filter() 64 uint16_t vid = lduw_be_p(&vhdr->h_tci); in e1000x_rx_vlan_filter() 66 ldl_le_p((uint32_t *)(mac + VFTA) + in e1000x_rx_vlan_filter() [all …]
|
H A D | e1000x_common.h | 2 * QEMU e1000(e) emulation - shared code 29 e1000x_inc_reg_if_not_full(uint32_t *mac, int index) in e1000x_inc_reg_if_not_full() argument 31 if (mac[index] != UINT32_MAX) { in e1000x_inc_reg_if_not_full() 32 mac[index]++; in e1000x_inc_reg_if_not_full() 37 e1000x_grow_8reg_if_not_full(uint32_t *mac, int index, int size) in e1000x_grow_8reg_if_not_full() argument 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 53 return ((mac[CTRL] & E1000_CTRL_VME) != 0); in e1000x_vlan_enabled() [all …]
|
H A D | e1000e_core.c | 5 * http://www.intel.com/content/dam/doc/datasheet/82574l-gbe-controller-datasheet.pdf 77 if (le32_to_cpu(dp->upper.data) & E1000_TXD_EXTCMD_TSTAMP) { in e1000e_process_ts_option() 94 e1000x_inc_reg_if_not_full(core->mac, IAC); in e1000e_raise_legacy_irq() 95 pci_set_irq(core->owner, 1); in e1000e_raise_legacy_irq() 102 pci_set_irq(core->owner, 0); in e1000e_lower_legacy_irq() 108 int64_t delay_ns = (int64_t) timer->core->mac[timer->delay_reg] * in e1000e_intrmgr_rearm_timer() 109 timer->delay_resolution_ns; in e1000e_intrmgr_rearm_timer() 111 trace_e1000e_irq_rearm_timer(timer->delay_reg << 2, delay_ns); in e1000e_intrmgr_rearm_timer() 113 timer_mod(timer->timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + delay_ns); in e1000e_intrmgr_rearm_timer() 115 timer->running = true; in e1000e_intrmgr_rearm_timer() [all …]
|
/openbmc/linux/arch/m68k/include/uapi/asm/ |
H A D | bootinfo-mac.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 3 ** asm/bootinfo-mac.h -- Macintosh-specific boot information definitions 11 * Macintosh-specific tags (all __be32) 14 #define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */ 15 #define BI_MAC_VADDR 0x8001 /* Mac video base address */ 16 #define BI_MAC_VDEPTH 0x8002 /* Mac video depth */ 17 #define BI_MAC_VROW 0x8003 /* Mac video rowbytes */ 18 #define BI_MAC_VDIM 0x8004 /* Mac video dimensions */ 19 #define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */ 20 #define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */ [all …]
|
/openbmc/qemu/include/standard-headers/asm-m68k/ |
H A D | bootinfo-mac.h | 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 3 ** asm/bootinfo-mac.h -- Macintosh-specific boot information definitions 11 * Macintosh-specific tags (all __be32) 14 #define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */ 15 #define BI_MAC_VADDR 0x8001 /* Mac video base address */ 16 #define BI_MAC_VDEPTH 0x8002 /* Mac video depth */ 17 #define BI_MAC_VROW 0x8003 /* Mac video rowbytes */ 18 #define BI_MAC_VDIM 0x8004 /* Mac video dimensions */ 19 #define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */ 20 #define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */ [all …]
|
/openbmc/linux/drivers/net/ethernet/sunplus/ |
H A D | spl2sw_driver.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include <linux/nvmem-consumer.h> 27 struct spl2sw_mac *mac = netdev_priv(ndev); in spl2sw_ethernet_open() local 28 struct spl2sw_common *comm = mac->comm; in spl2sw_ethernet_open() 31 netdev_dbg(ndev, "Open port = %x\n", mac->lan_port); in spl2sw_ethernet_open() 33 comm->enable |= mac->lan_port; in spl2sw_ethernet_open() 38 mask = readl(comm->l2sw_reg_base + L2SW_SW_INT_MASK_0); in spl2sw_ethernet_open() 40 writel(mask, comm->l2sw_reg_base + L2SW_SW_INT_MASK_0); in spl2sw_ethernet_open() 42 phy_start(ndev->phydev); in spl2sw_ethernet_open() 51 struct spl2sw_mac *mac = netdev_priv(ndev); in spl2sw_ethernet_stop() local [all …]
|
/openbmc/linux/drivers/net/ethernet/microchip/sparx5/ |
H A D | sparx5_mactable.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 /* Commands for Mac Table Command register */ 18 #define MAC_CMD_READ 3 /* Read entry at Mac Table Index */ 19 #define MAC_CMD_WRITE 4 /* Write entry at Mac Table Index */ 35 unsigned char mac[ETH_ALEN]; member 60 const unsigned char mac[ETH_ALEN], in sparx5_mact_select() 65 /* Set the MAC address to handle and the vlan associated in a format in sparx5_mact_select() 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() [all …]
|
/openbmc/u-boot/drivers/net/ |
H A D | ep93xx_eth.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Cirrus Logic EP93xx ethernet MAC / MII driver. 9 * Cory T. Tusar, Videon Central, Inc., <ctusar@videon-central.com> 28 #define GET_PRIV(eth_dev) ((struct ep93xx_priv *)(eth_dev)->priv) 29 #define GET_REGS(eth_dev) (GET_PRIV(eth_dev)->regs) 47 printf(" rx_dq.base %p\n", priv->rx_dq.base); in dump_dev() 48 printf(" rx_dq.current %p\n", priv->rx_dq.current); in dump_dev() 49 printf(" rx_dq.end %p\n", priv->rx_dq.end); in dump_dev() 50 printf(" rx_sq.base %p\n", priv->rx_sq.base); in dump_dev() 51 printf(" rx_sq.current %p\n", priv->rx_sq.current); in dump_dev() [all …]
|
/openbmc/linux/net/core/ |
H A D | of_net.c | 1 // SPDX-License-Identifier: GPL-2.0-only 15 #include <linux/nvmem-consumer.h> 18 * of_get_phy_mode - Get phy mode for given device_node 22 * The function gets phy interface string from property 'phy-mode' or 23 * 'phy-connection-type'. The index in phy_modes table is set in 25 * PHY_INTERFACE_MODE_NA and an errno is returned, e.g. -ENODEV. 34 err = of_property_read_string(np, "phy-mode", &pm); in of_get_phy_mode() 36 err = of_property_read_string(np, "phy-connection-type", &pm); in of_get_phy_mode() 46 return -ENODEV; in of_get_phy_mode() 54 if (pp && pp->length == ETH_ALEN && is_valid_ether_addr(pp->value)) { in of_get_mac_addr() [all …]
|
/openbmc/u-boot/drivers/net/fm/ |
H A D | tgec.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright 2009-2011 Freescale Semiconductor, Inc. 7 /* MAXFRM - maximum frame length */ 28 static void tgec_init_mac(struct fsl_enet_mac *mac) in tgec_init_mac() argument 30 struct tgec *regs = mac->base; in tgec_init_mac() 33 out_be32(®s->imask, IMASK_MASK_ALL); in tgec_init_mac() 36 out_be32(®s->ievent, IEVENT_CLEAR_ALL); in tgec_init_mac() 39 out_be32(®s->maxfrm, mac->max_rx_len & MAXFRM_MASK); in tgec_init_mac() 42 * 1588 disable, insert second mac disable payload length check in tgec_init_mac() 47 out_be32(®s->command_config, TGEC_CMD_CFG_INIT); in tgec_init_mac() [all …]
|
H A D | dtsec.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright 2009-2011 Freescale Semiconductor, Inc. 23 /* MAXFRM - maximum frame length register */ 26 static void dtsec_init_mac(struct fsl_enet_mac *mac) in dtsec_init_mac() argument 28 struct dtsec *regs = mac->base; in dtsec_init_mac() 31 out_be32(®s->maccfg1, MACCFG1_SOFT_RST); in dtsec_init_mac() 34 /* clear soft reset, Rx/Tx MAC disable */ in dtsec_init_mac() 35 out_be32(®s->maccfg1, 0); in dtsec_init_mac() 38 out_be32(®s->rctrl, RCTRL_INIT); in dtsec_init_mac() 42 out_be32(®s->tctrl, TCTRL_INIT); in dtsec_init_mac() [all …]
|
/openbmc/linux/drivers/net/ethernet/freescale/enetc/ |
H A D | enetc_hw.h | 1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 2 /* Copyright 2017-2019 NXP */ 46 /* VF-PF Message passing */ 109 /** SI BDR sub-blocks, n = 0..7 */ 303 /* Port MAC counters: Port MAC 0 corresponds to the eMAC and 304 * Port MAC 1 to the pMAC. 306 #define ENETC_PM_REOCT(mac) (0x8100 + ENETC_PMAC_OFFSET * (mac)) argument 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 [all …]
|