| /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 …]
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| H A D | event.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ 19 qtnf_event_handle_sta_assoc(struct qtnf_wmac *mac, struct qtnf_vif *vif, in qtnf_event_handle_sta_assoc() argument 34 mac->macid, vif->vifid, len, sizeof(*sta_assoc)); in qtnf_event_handle_sta_assoc() 35 return -EINVAL; in qtnf_event_handle_sta_assoc() 38 if (vif->wdev.iftype != NL80211_IFTYPE_AP) { in qtnf_event_handle_sta_assoc() 40 mac->macid, vif->vifid); in qtnf_event_handle_sta_assoc() 41 return -EPROTO; in qtnf_event_handle_sta_assoc() 46 return -ENOMEM; in qtnf_event_handle_sta_assoc() 48 sta_addr = sta_assoc->sta_addr; in qtnf_event_handle_sta_assoc() [all …]
|
| /linux/drivers/net/wireless/purelifi/plfxlc/ |
| H A D | mac.c | 1 // SPDX-License-Identifier: GPL-2.0-only 14 #include "mac.h" 87 struct plfxlc_mac *mac = plfxlc_hw_mac(hw); in plfxlc_mac_init_hw() local 88 struct plfxlc_chip *chip = &mac->chip; in plfxlc_mac_init_hw() 93 dev_warn(plfxlc_mac_dev(mac), "init hw failed (%d)\n", r); in plfxlc_mac_init_hw() 97 dev_dbg(plfxlc_mac_dev(mac), "irq_disabled (%d)\n", irqs_disabled()); in plfxlc_mac_init_hw() 98 regulatory_hint(hw->wiphy, "00"); in plfxlc_mac_init_hw() 104 plfxlc_hw_mac(hw)->chip.usb.initialized = 1; in plfxlc_op_start() 110 struct plfxlc_mac *mac = plfxlc_hw_mac(hw); in plfxlc_op_stop() local 112 clear_bit(PURELIFI_DEVICE_RUNNING, &mac->flags); in plfxlc_op_stop() [all …]
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| /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 …]
|
| /linux/drivers/net/wireless/realtek/rtlwifi/ |
| H A D | core.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2009-2012 Realtek Corporation.*/ 71 if (rtlpriv->cfg->alt_fw_name) { in rtl_fw_do_work() 73 rtlpriv->cfg->alt_fw_name, in rtl_fw_do_work() 74 rtlpriv->io.dev); in rtl_fw_do_work() 76 rtlpriv->cfg->alt_fw_name); in rtl_fw_do_work() 81 rtlpriv->max_fw_size = 0; in rtl_fw_do_work() 85 if (firmware->size > rtlpriv->max_fw_size) { in rtl_fw_do_work() 91 memcpy(rtlpriv->rtlhal.pfirmware, firmware->data, in rtl_fw_do_work() 92 firmware->size); in rtl_fw_do_work() [all …]
|
| /linux/drivers/net/ethernet/intel/e1000e/ |
| H A D | mac.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 9 * e1000e_get_bus_info_pcie - Get PCIe bus information 18 struct pci_dev *pdev = hw->adapter->pdev; in e1000e_get_bus_info_pcie() 19 struct e1000_mac_info *mac = &hw->mac; in e1000e_get_bus_info_pcie() local 20 struct e1000_bus_info *bus = &hw->bus; in e1000e_get_bus_info_pcie() 24 bus->width = e1000_bus_width_unknown; in e1000e_get_bus_info_pcie() 27 bus->width = (enum e1000_bus_width)FIELD_GET(PCI_EXP_LNKSTA_NLW, in e1000e_get_bus_info_pcie() 31 mac->ops.set_lan_id(hw); in e1000e_get_bus_info_pcie() 37 * e1000_set_lan_id_multi_port_pcie - Set LAN id for PCIe multiple port devices [all …]
|
| H A D | 82571.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 42 * e1000_init_phy_params_82571 - Init PHY func ptrs. 47 struct e1000_phy_info *phy = &hw->phy; in e1000_init_phy_params_82571() 50 if (hw->phy.media_type != e1000_media_type_copper) { in e1000_init_phy_params_82571() 51 phy->type = e1000_phy_none; in e1000_init_phy_params_82571() 55 phy->addr = 1; in e1000_init_phy_params_82571() 56 phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT; in e1000_init_phy_params_82571() 57 phy->reset_delay_us = 100; in e1000_init_phy_params_82571() 59 phy->ops.power_up = e1000_power_up_phy_copper; in e1000_init_phy_params_82571() [all …]
|
| /linux/Documentation/admin-guide/perf/ |
| H A D | fujitsu_uncore_pmu.rst | 1 .. SPDX-License-Identifier: GPL-2.0-only 7 This driver supports the Uncore MAC PMUs and the Uncore PCI PMUs found 9 Each MAC PMU on these chips is exposed as a uncore perf PMU with device name 10 mac_iod<iod>_mac<mac>_ch<ch>. 15 options in sysfs, see /sys/bus/event_sources/devices/mac_iod<iod>_mac<mac>_ch<ch>/ 19 - formats, used by perf user space and other tools to configure events 20 - events, used by perf user space and other tools to create events 23 perf stat -a -e mac_iod0_mac0_ch0/event=0x21/ ls 24 perf stat -a -e pci_iod0_pci0/event=0x24/ ls 26 - cpumask, used by perf user space and other tools to know on which CPUs [all …]
|
| /linux/drivers/net/ethernet/sunplus/ |
| H A D | spl2sw_mac.c | 1 // SPDX-License-Identifier: GPL-2.0 20 if (comm->enable == 0) { in spl2sw_mac_hw_stop() 22 writel(0xffffffff, comm->l2sw_reg_base + L2SW_SW_INT_MASK_0); in spl2sw_mac_hw_stop() 23 writel(0xffffffff, comm->l2sw_reg_base + L2SW_SW_INT_STATUS_0); in spl2sw_mac_hw_stop() 26 reg = readl(comm->l2sw_reg_base + L2SW_CPU_CNTL); in spl2sw_mac_hw_stop() 28 writel(reg, comm->l2sw_reg_base + L2SW_CPU_CNTL); in spl2sw_mac_hw_stop() 32 reg = readl(comm->l2sw_reg_base + L2SW_PORT_CNTL0); in spl2sw_mac_hw_stop() 33 reg |= FIELD_PREP(MAC_DIS_PORT, ~comm->enable); in spl2sw_mac_hw_stop() 34 writel(reg, comm->l2sw_reg_base + L2SW_PORT_CNTL0); in spl2sw_mac_hw_stop() 42 reg = readl(comm->l2sw_reg_base + L2SW_CPU_CNTL); in spl2sw_mac_hw_start() [all …]
|
| H A D | spl2sw_phy.c | 1 // SPDX-License-Identifier: GPL-2.0 16 struct spl2sw_mac *mac = netdev_priv(ndev); in spl2sw_mii_link_change() local 17 struct phy_device *phydev = ndev->phydev; in spl2sw_mii_link_change() 18 struct spl2sw_common *comm = mac->comm; in spl2sw_mii_link_change() 21 reg = readl(comm->l2sw_reg_base + L2SW_MAC_FORCE_MODE); in spl2sw_mii_link_change() 23 if (phydev->link) { in spl2sw_mii_link_change() 24 reg |= FIELD_PREP(MAC_FORCE_RMII_LINK, mac->lan_port); in spl2sw_mii_link_change() 26 if (phydev->speed == 100) { 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() [all …]
|
| /linux/drivers/net/ethernet/mediatek/ |
| H A D | mtk_eth_soc.c | 1 // SPDX-License-Identifier: GPL-2.0-only 4 * Copyright (C) 2009-2016 John Crispin <blogic@openwrt.org> 5 * Copyright (C) 2009-2016 Felix Fietkau <nbd@openwrt.org> 6 * Copyright (C) 2013-2016 Michael Lee <igvtee@gmail.com> 24 #include <linux/pcs/pcs-mtk-lynxi.h> 35 static int mtk_msg_level = -1; 37 MODULE_PARM_DESC(msg_level, "Message level (-1=defaults,0=none,...,16=all)"); 291 __raw_writel(val, eth->base + reg); in mtk_w32() 296 return __raw_readl(eth->base + reg); in mtk_r32() 322 dev_err(eth->dev, "mdio: MDIO timeout\n"); in mtk_mdio_busy_wait() [all …]
|
| /linux/drivers/net/ethernet/intel/ice/ |
| H A D | ice_fltr.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (C) 2018-2020, Intel Corporation. */ 8 * ice_fltr_free_list - free filter lists helper 20 list_del(&e->list_entry); in ice_fltr_free_list() 26 * ice_fltr_add_entry_to_list - allocate and add filter entry to list 29 * @list: pointer to the list which contains MAC filters entry 39 return -ENOMEM; in ice_fltr_add_entry_to_list() 41 entry->fltr_info = *info; in ice_fltr_add_entry_to_list() 43 INIT_LIST_HEAD(&entry->list_entry); in ice_fltr_add_entry_to_list() 44 list_add(&entry->list_entry, list); in ice_fltr_add_entry_to_list() [all …]
|
| /linux/tools/testing/selftests/net/forwarding/ |
| H A D | bridge_fdb_learning_limit.sh | 2 # SPDX-License-Identifier: GPL-2.0 27 mac() function 32 H1_DEFAULT_MAC=$(mac 42) 42 # swp2 is only used for replying when learning on swp1, its MAC should not be learned. 105 ip -d -j link show dev br0 type bridge | \ 111 local mac=${1} 113 bridge -j fdb show br br0 | \ 114 jq "map(select(.mac == \"${mac}\" and (has(\"vlan\") | not))) | length" 122 fdb_add learned "$(mac "$i")" 130 # Keep the default MAC address of h1 in the table. We set it to a different one when [all …]
|
| /linux/drivers/net/ethernet/oki-semi/pch_gbe/ |
| H A D | pch_gbe_param.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 1999 - 2010 Intel Corporation. 12 #define OPTION_UNSET -1 17 * TxDescriptors - Transmit Descriptor Count 18 * @Valid Range: PCH_GBE_MIN_TXD - PCH_GBE_MAX_TXD 26 * RxDescriptors -Receive Descriptor Count 27 * @Valid Range: PCH_GBE_MIN_RXD - PCH_GBE_MAX_RXD 35 * Speed - User Specified Speed Override 37 * - 0: auto-negotiate at all supported speeds 38 * - 10: only link at 10 Mbps [all …]
|
| /linux/Documentation/networking/ |
| H A D | oa-tc6-framework.rst | 1 .. SPDX-License-Identifier: GPL-2.0+ 4 OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface (TC6) Framework Support 8 ------------ 11 single pair of conductors. The 10BASE-T1L (Clause 146) is a long reach 12 PHY supporting full duplex point-to-point operation over 1 km of single 13 balanced pair of conductors. The 10BASE-T1S (Clause 147) is a short reach 14 PHY supporting full / half duplex point-to-point operation over 15 m of 21 works in conjunction with the 10BASE-T1S PHY operating in multidrop mode. 23 The aforementioned PHYs are intended to cover the low-speed / low-cost 29 The MAC-PHY solution integrates an IEEE Clause 4 MAC and a 10BASE-T1x PHY [all …]
|
| /linux/drivers/net/ethernet/intel/igbvf/ |
| H A D | vf.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 2009 - 2018 Intel Corporation. */ 22 * e1000_init_mac_params_vf - Inits MAC params 27 struct e1000_mac_info *mac = &hw->mac; in e1000_init_mac_params_vf() local 29 /* VF's have no MTA Registers - PF feature only */ in e1000_init_mac_params_vf() 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() 40 mac->ops.check_for_link = e1000_check_for_link_vf; in e1000_init_mac_params_vf() [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | test_tc_tunnel.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # In-place tunneling 10 readonly ns_prefix="ns-$$-" 35 ip netns exec "${ns1}" ethtool -K veth1 tso off 37 ip -netns "${ns1}" link set veth1 up 38 ip -netns "${ns2}" link set veth2 up 40 ip -netns "${ns1}" -4 addr add "${ns1_v4}/24" dev veth1 41 ip -netns "${ns2}" -4 addr add "${ns2_v4}/24" dev veth2 42 ip -netns "${ns1}" -6 addr add "${ns1_v6}/64" dev veth1 nodad 43 ip -netns "${ns2}" -6 addr add "${ns2_v6}/64" dev veth2 nodad [all …]
|