| /kernel/linux/linux-6.6/drivers/net/ethernet/freescale/dpaa2/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/chelsio/cxgb3/ |
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/cxgb3/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/wireless/zydas/zd1211rw/ |
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/net/wireless/zydas/zd1211rw/ |
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/net/ethernet/freescale/dpaa2/ |
| D | dpaa2-mac.c | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 4 #include "dpaa2-eth.h" 5 #include "dpaa2-mac.h" 31 return -EINVAL; in phy_mode() 78 static bool dpaa2_mac_phy_mode_mismatch(struct dpaa2_mac *mac, in dpaa2_mac_phy_mode_mismatch() argument 90 return (interface != mac->if_mode); in dpaa2_mac_phy_mode_mismatch() 100 struct dpaa2_mac *mac = phylink_to_dpaa2_mac(config); in dpaa2_mac_validate() local 103 if (state->interface != PHY_INTERFACE_MODE_NA && in dpaa2_mac_validate() 104 dpaa2_mac_phy_mode_mismatch(mac, state->interface)) { in dpaa2_mac_validate() 113 switch (state->interface) { in dpaa2_mac_validate() [all …]
|
| /kernel/linux/linux-5.10/drivers/net/ethernet/pasemi/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/pasemi/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/wireless/quantenna/qtnfmac/ |
| 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 …]
|
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/stmicro/stmmac/ |
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/net/wireless/quantenna/qtnfmac/ |
| 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 …]
|
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/wireless/purelifi/plfxlc/ |
| 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() 110 plfxlc_hw_mac(hw)->chip.usb.initialized = 1; in plfxlc_op_start() [all …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/microchip/lan966x/ |
| 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 …]
|
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/cxgb/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/chelsio/cxgb/ |
| 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 …]
|
| /kernel/linux/linux-5.10/arch/m68k/include/uapi/asm/ |
| 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 …]
|
| /kernel/linux/linux-6.6/arch/m68k/include/uapi/asm/ |
| 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 …]
|
| /kernel/linux/linux-5.10/drivers/staging/netlogic/ |
| D | platform_net.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 * Copyright (c) 2003-2012 Broadcom Corporation 21 #include <asm/netlogic/psb-bootinfo.h> 52 res->name = "gmac"; in xlr_resource_init() 54 res->start = CPHYSADDR(nlm_mmio_base(offset)); in xlr_resource_init() 55 res->end = res->start + 0xfff; in xlr_resource_init() 56 res->flags = IORESOURCE_MEM; in xlr_resource_init() 59 res->name = "gmac"; in xlr_resource_init() 60 res->start = irq; in xlr_resource_init() 61 res->end = irq; in xlr_resource_init() [all …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/sunplus/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/microchip/sparx5/ |
| 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 …]
|
| /kernel/linux/linux-6.6/net/core/ |
| 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 …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/freescale/enetc/ |
| 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 …]
|