/linux-6.12.1/drivers/net/ethernet/meta/fbnic/ |
D | fbnic_rpc.c | 105 struct fbnic_mac_addr *mac_addr; in fbnic_bmc_rpc_all_multi_config() local 114 mac_addr = &fbd->mac_addr[fbd->mac_addr_boundary - 1]; in fbnic_bmc_rpc_all_multi_config() 116 if (mac_addr->state != FBNIC_TCAM_S_VALID) { in fbnic_bmc_rpc_all_multi_config() 117 eth_zero_addr(mac_addr->value.addr8); in fbnic_bmc_rpc_all_multi_config() 118 eth_broadcast_addr(mac_addr->mask.addr8); in fbnic_bmc_rpc_all_multi_config() 119 mac_addr->value.addr8[0] ^= 1; in fbnic_bmc_rpc_all_multi_config() 120 mac_addr->mask.addr8[0] ^= 1; in fbnic_bmc_rpc_all_multi_config() 121 set_bit(FBNIC_MAC_ADDR_T_BMC, mac_addr->act_tcam); in fbnic_bmc_rpc_all_multi_config() 122 mac_addr->state = FBNIC_TCAM_S_ADD; in fbnic_bmc_rpc_all_multi_config() 126 mac_addr->act_tcam); in fbnic_bmc_rpc_all_multi_config() [all …]
|
D | fbnic_netdev.c | 123 struct fbnic_mac_addr *mac_addr = &fbd->mac_addr[i]; in fbnic_uc_unsync() local 125 if (!ether_addr_equal(mac_addr->value.addr8, addr)) in fbnic_uc_unsync() 128 ret = __fbnic_uc_unsync(mac_addr); in fbnic_uc_unsync() 164 struct fbnic_mac_addr *mac_addr = &fbd->mac_addr[i]; in fbnic_mc_unsync() local 166 if (!ether_addr_equal(mac_addr->value.addr8, addr)) in fbnic_mc_unsync() 169 ret = __fbnic_mc_unsync(mac_addr); in fbnic_mc_unsync() 180 struct fbnic_mac_addr *mac_addr; in __fbnic_set_rx_mode() local 184 mac_addr = &fbd->mac_addr[FBNIC_RPC_TCAM_MACDA_HOST_ADDR_IDX]; in __fbnic_set_rx_mode() 185 if (!ether_addr_equal(mac_addr->value.addr8, netdev->dev_addr) || in __fbnic_set_rx_mode() 186 mac_addr->state != FBNIC_TCAM_S_VALID) { in __fbnic_set_rx_mode() [all …]
|
D | fbnic_rpc.h | 169 int __fbnic_xc_unsync(struct fbnic_mac_addr *mac_addr, unsigned int tcam_idx); 177 static inline int __fbnic_uc_unsync(struct fbnic_mac_addr *mac_addr) in __fbnic_uc_unsync() argument 179 return __fbnic_xc_unsync(mac_addr, FBNIC_MAC_ADDR_T_UNICAST); in __fbnic_uc_unsync() 182 static inline int __fbnic_mc_unsync(struct fbnic_mac_addr *mac_addr) in __fbnic_mc_unsync() argument 184 return __fbnic_xc_unsync(mac_addr, FBNIC_MAC_ADDR_T_MULTICAST); in __fbnic_mc_unsync()
|
/linux-6.12.1/drivers/net/ethernet/ti/ |
D | cpsw-common.c | 15 int slave, u8 *mac_addr) in davinci_emac_3517_get_macid() argument 31 mac_addr[0] = (macid_msb >> 16) & 0xff; in davinci_emac_3517_get_macid() 32 mac_addr[1] = (macid_msb >> 8) & 0xff; in davinci_emac_3517_get_macid() 33 mac_addr[2] = macid_msb & 0xff; in davinci_emac_3517_get_macid() 34 mac_addr[3] = (macid_lsb >> 16) & 0xff; in davinci_emac_3517_get_macid() 35 mac_addr[4] = (macid_lsb >> 8) & 0xff; in davinci_emac_3517_get_macid() 36 mac_addr[5] = macid_lsb & 0xff; in davinci_emac_3517_get_macid() 42 u8 *mac_addr) in cpsw_am33xx_cm_get_macid() argument 58 mac_addr[5] = (macid_lo >> 8) & 0xff; in cpsw_am33xx_cm_get_macid() 59 mac_addr[4] = macid_lo & 0xff; in cpsw_am33xx_cm_get_macid() [all …]
|
D | davinci_emac.c | 311 char mac_addr[6]; member 611 static int emac_hash_add(struct emac_priv *priv, u8 *mac_addr) in emac_hash_add() argument 616 u32 hash_value = hash_get(mac_addr); in emac_hash_add() 653 static int emac_hash_del(struct emac_priv *priv, u8 *mac_addr) in emac_hash_del() argument 658 hash_value = hash_get(mac_addr); in emac_hash_del() 696 static void emac_add_mcast(struct emac_priv *priv, u32 action, u8 *mac_addr) in emac_add_mcast() argument 703 update = emac_hash_add(priv, mac_addr); in emac_add_mcast() 706 update = emac_hash_del(priv, mac_addr); in emac_add_mcast() 1030 static void emac_set_type0addr(struct emac_priv *priv, u32 ch, char *mac_addr) in emac_set_type0addr() argument 1033 val = ((mac_addr[5] << 8) | (mac_addr[4])); in emac_set_type0addr() [all …]
|
/linux-6.12.1/drivers/net/ethernet/sunplus/ |
D | spl2sw_driver.c | 156 netdev_dbg(ndev, "Old Ethernet (MAC) address = %pM\n", mac->mac_addr); in spl2sw_ethernet_set_mac_address() 157 if (is_valid_ether_addr(mac->mac_addr)) { in spl2sw_ethernet_set_mac_address() 164 ether_addr_copy(mac->mac_addr, ndev->dev_addr); in spl2sw_ethernet_set_mac_address() 206 static void spl2sw_check_mac_vendor_id_and_convert(u8 *mac_addr) in spl2sw_check_mac_vendor_id_and_convert() argument 212 if (mac_addr[5] == 0xfc && mac_addr[4] == 0x4b && mac_addr[3] == 0xbc && in spl2sw_check_mac_vendor_id_and_convert() 213 (mac_addr[0] != 0xfc || mac_addr[1] != 0x4b || mac_addr[2] != 0xbc)) { in spl2sw_check_mac_vendor_id_and_convert() 215 swap(mac_addr[0], mac_addr[5]); in spl2sw_check_mac_vendor_id_and_convert() 216 swap(mac_addr[1], mac_addr[4]); in spl2sw_check_mac_vendor_id_and_convert() 217 swap(mac_addr[2], mac_addr[3]); in spl2sw_check_mac_vendor_id_and_convert() 262 static u32 spl2sw_init_netdev(struct platform_device *pdev, u8 *mac_addr, in spl2sw_init_netdev() argument [all …]
|
D | spl2sw_mac.c | 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() 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()
|
/linux-6.12.1/drivers/staging/vt6656/ |
D | key.c | 34 static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr, in vnt_set_keymode() argument 46 if (mac_addr) in vnt_set_keymode() 47 bssid = mac_addr; in vnt_set_keymode() 100 u8 *mac_addr = NULL; in vnt_set_keys() local 104 mac_addr = &sta->addr[0]; in vnt_set_keys() 109 vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY, in vnt_set_keys() 114 return vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY, in vnt_set_keys() 137 return vnt_set_keymode(hw, mac_addr, key, VNT_KEY_PAIRWISE, in vnt_set_keys() 140 return vnt_set_keymode(hw, mac_addr, key, in vnt_set_keys()
|
/linux-6.12.1/drivers/infiniband/ulp/opa_vnic/ |
D | opa_vnic_encap.c | 178 memcpy(entry->mac_addr, nentry->mac_addr, in opa_vnic_query_mac_tbl() 179 ARRAY_SIZE(entry->mac_addr)); in opa_vnic_query_mac_tbl() 229 u8 *mac_addr = entry->mac_addr; in opa_vnic_update_mac_tbl() local 233 loffset + i, mac_addr[0], mac_addr[1], mac_addr[2], in opa_vnic_update_mac_tbl() 234 mac_addr[3], mac_addr[4], mac_addr[5], in opa_vnic_update_mac_tbl() 238 if (!memcmp(mac_addr, empty_mac, ARRAY_SIZE(empty_mac))) in opa_vnic_update_mac_tbl() 249 memcpy(nentry->mac_addr, entry->mac_addr, in opa_vnic_update_mac_tbl() 250 ARRAY_SIZE(nentry->mac_addr)); in opa_vnic_update_mac_tbl() 254 key = node->entry.mac_addr[OPA_VNIC_MAC_HASH_IDX]; in opa_vnic_update_mac_tbl() 276 key = new_node->entry.mac_addr[OPA_VNIC_MAC_HASH_IDX]; in opa_vnic_update_mac_tbl() [all …]
|
/linux-6.12.1/drivers/staging/vt6655/ |
D | key.c | 17 static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr, in vnt_set_keymode() argument 29 if (mac_addr) in vnt_set_keymode() 30 bssid = mac_addr; in vnt_set_keymode() 93 u8 *mac_addr = NULL; in vnt_set_keys() local 99 mac_addr = &sta->addr[0]; in vnt_set_keys() 112 vnt_set_keymode(hw, mac_addr, in vnt_set_keys() 132 vnt_set_keymode(hw, mac_addr, in vnt_set_keys() 135 vnt_set_keymode(hw, mac_addr, in vnt_set_keys()
|
/linux-6.12.1/drivers/net/usb/ |
D | ch9200.c | 307 unsigned char mac_addr[0x06]; in get_mac_address() local 314 memset(mac_addr, 0, sizeof(mac_addr)); in get_mac_address() 316 MAC_REG_STATION_L, mac_addr, 0x02, in get_mac_address() 319 mac_addr + 2, 0x02, CONTROL_TIMEOUT_MS); in get_mac_address() 321 mac_addr + 4, 0x02, CONTROL_TIMEOUT_MS); in get_mac_address() 325 data[0] = mac_addr[5]; in get_mac_address() 326 data[1] = mac_addr[4]; in get_mac_address() 327 data[2] = mac_addr[3]; in get_mac_address() 328 data[3] = mac_addr[2]; in get_mac_address() 329 data[4] = mac_addr[1]; in get_mac_address() [all …]
|
/linux-6.12.1/include/net/ |
D | bond_3ad.h | 21 typedef struct mac_addr { struct 105 struct mac_addr actor_system; 114 struct mac_addr partner_system; 142 struct mac_addr requester_system; /* The requester's system id */ 181 struct mac_addr aggregator_mac_address; 186 struct mac_addr partner_system; 199 struct mac_addr system; 211 …struct mac_addr actor_system; /* This parameter is added here although it is not specified in the … 254 struct mac_addr sys_mac_addr;
|
/linux-6.12.1/drivers/net/wireless/realtek/rtlwifi/ |
D | cam.c | 21 const u8 *mac_addr, u8 *key_cont_128, in rtl_cam_program_entry() argument 39 target_content = (u32) (*(mac_addr + 0)) << 16 | in rtl_cam_program_entry() 40 (u32) (*(mac_addr + 1)) << 24 | (u32) us_config; in rtl_cam_program_entry() 58 target_content = (u32) (*(mac_addr + 5)) << 24 | in rtl_cam_program_entry() 59 (u32) (*(mac_addr + 4)) << 16 | in rtl_cam_program_entry() 60 (u32) (*(mac_addr + 3)) << 8 | in rtl_cam_program_entry() 61 (u32) (*(mac_addr + 2)); in rtl_cam_program_entry() 98 u8 rtl_cam_add_one_entry(struct ieee80211_hw *hw, const u8 *mac_addr, in rtl_cam_add_one_entry() argument 108 ul_default_key, mac_addr); in rtl_cam_add_one_entry() 121 rtl_cam_program_entry(hw, ul_entry_idx, mac_addr, in rtl_cam_add_one_entry() [all …]
|
/linux-6.12.1/drivers/net/ethernet/marvell/ |
D | pxa168_eth.c | 368 static void nibble_swap_every_byte(unsigned char *mac_addr) in nibble_swap_every_byte() argument 372 mac_addr[i] = ((mac_addr[i] & 0x0f) << 4) | in nibble_swap_every_byte() 373 ((mac_addr[i] & 0xf0) >> 4); in nibble_swap_every_byte() 377 static void inverse_every_nibble(unsigned char *mac_addr) in inverse_every_nibble() argument 381 mac_addr[i] = flip_8_bits(mac_addr[i]); in inverse_every_nibble() 399 unsigned char mac_addr[ETH_ALEN]; in hash_function() local 404 memcpy(mac_addr, mac_addr_orig, ETH_ALEN); in hash_function() 406 nibble_swap_every_byte(mac_addr); in hash_function() 407 inverse_every_nibble(mac_addr); in hash_function() 409 addr0 = (mac_addr[5] >> 2) & 0x3f; in hash_function() [all …]
|
/linux-6.12.1/net/atm/ |
D | lec.c | 68 const unsigned char *mac_addr); 89 static void lec_arp_update(struct lec_priv *priv, const unsigned char *mac_addr, 358 eth_hw_addr_set(dev, mesg->content.normal.mac_addr); in lec_atm_send() 375 entry = lec_arp_find(priv, mesg->content.normal.mac_addr); in lec_atm_send() 383 lec_arp_update(priv, mesg->content.normal.mac_addr, in lec_atm_send() 391 lane2_associate_ind(dev, mesg->content.normal.mac_addr, in lec_atm_send() 433 dev->name, mesg->content.proxy.mac_addr); in lec_atm_send() 438 if (br_fdb_test_addr_hook(dev, mesg->content.proxy.mac_addr)) { in lec_atm_send() 508 const unsigned char *mac_addr, const unsigned char *atm_addr, in send_to_lecd() argument 526 if (mac_addr) in send_to_lecd() [all …]
|
/linux-6.12.1/drivers/net/ethernet/marvell/octeontx2/af/ |
D | rvu_npc_hash.c | 588 u8 ctype, u16 chan, u8 *mac_addr) in rvu_exact_prepare_table_entry() argument 591 u64 ldata = ether_addr_to_u64(mac_addr); in rvu_exact_prepare_table_entry() 785 u32 index, u8 cgx_id, u8 lmac_id, u8 *mac_addr, u16 chan, in rvu_npc_exact_add_to_list() argument 837 ether_addr_copy(entry->mac, mac_addr); in rvu_npc_exact_add_to_list() 1576 dev_err(rvu->dev, "%s MAC (%pM) del PF=%d failed\n", __func__, pfvf->mac_addr, pf); in rvu_npc_exact_mac_addr_reset() 1581 __func__, pfvf->mac_addr, pf, seq_id); in rvu_npc_exact_mac_addr_reset() 1609 __func__, req->index, req->mac_addr); in rvu_npc_exact_mac_addr_update() 1632 req->mac_addr, &seq_id); in rvu_npc_exact_mac_addr_update() 1636 __func__, req->mac_addr, pfvf->mac_addr, pfvf->default_mac, pf); in rvu_npc_exact_mac_addr_update() 1637 ether_addr_copy(pfvf->mac_addr, req->mac_addr); in rvu_npc_exact_mac_addr_update() [all …]
|
/linux-6.12.1/drivers/net/ethernet/cisco/enic/ |
D | enic_pp.c | 82 if (!is_zero_ether_addr(pp->mac_addr)) { in enic_set_port_profile() 83 client_mac = pp->mac_addr; in enic_set_port_profile() 150 !ether_addr_equal(pp1->mac_addr, pp2->mac_addr); in enic_are_pp_different() 192 if (!is_zero_ether_addr(pp->mac_addr)) in enic_pp_disassociate() 194 pp->mac_addr); in enic_pp_disassociate() 279 if (!is_zero_ether_addr(pp->mac_addr)) in enic_pp_associate() 281 pp->mac_addr); in enic_pp_associate()
|
/linux-6.12.1/arch/powerpc/boot/ |
D | treeboot-akebono.c | 48 static long long unsigned mac_addr; variable 87 if (mac_addr) in ibm_akebono_fixups() 89 ((u8 *) &mac_addr) + 2 , 6); in ibm_akebono_fixups() 113 mac_addr = strtoull(&userdata[i + 15], &end, 16); in platform_init()
|
/linux-6.12.1/drivers/net/wireless/ti/wlcore/ |
D | testmode.c | 306 u8 mac_addr[ETH_ALEN]; in wl12xx_tm_cmd_get_mac() local 321 mac_addr[0] = (u8)(wl->fuse_oui_addr >> 16); in wl12xx_tm_cmd_get_mac() 322 mac_addr[1] = (u8)(wl->fuse_oui_addr >> 8); in wl12xx_tm_cmd_get_mac() 323 mac_addr[2] = (u8) wl->fuse_oui_addr; in wl12xx_tm_cmd_get_mac() 324 mac_addr[3] = (u8)(wl->fuse_nic_addr >> 16); in wl12xx_tm_cmd_get_mac() 325 mac_addr[4] = (u8)(wl->fuse_nic_addr >> 8); in wl12xx_tm_cmd_get_mac() 326 mac_addr[5] = (u8) wl->fuse_nic_addr; in wl12xx_tm_cmd_get_mac() 334 if (nla_put(skb, WL1271_TM_ATTR_DATA, ETH_ALEN, mac_addr)) { in wl12xx_tm_cmd_get_mac()
|
/linux-6.12.1/tools/testing/selftests/bpf/ |
D | xdp_redirect_multi.c | 45 static int get_mac_addr(unsigned int ifindex, void *mac_addr) in get_mac_addr() argument 63 memcpy(mac_addr, ifr.ifr_hwaddr.sa_data, 6 * sizeof(char)); in get_mac_addr() 90 unsigned char mac_addr[6]; in main() local 190 ret = get_mac_addr(ifindex, mac_addr); in main() 195 ret = bpf_map_update_elem(mac_map, &ifindex, mac_addr, 0); in main()
|
/linux-6.12.1/drivers/net/wireless/microchip/wilc1000/ |
D | hif.h | 157 const u8 *mac_addr, const u8 *rx_mic, const u8 *tx_mic, 160 const u8 *pn, u8 pn_len, const u8 *mac_addr, u8 mode, 169 int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr); 170 int wilc_set_mac_address(struct wilc_vif *vif, const u8 *mac_addr); 191 int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]); 192 int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr);
|
/linux-6.12.1/drivers/net/wireless/quantenna/qtnfmac/ |
D | commands.h | 17 int use4addr, u8 *mac_addr); 21 u8 *mac_addr); 39 const u8 *mac_addr, struct key_params *params); 41 const u8 *mac_addr);
|
/linux-6.12.1/drivers/net/fddi/skfp/ |
D | smtinit.c | 22 void init_fddi_driver(struct s_smc *smc, const u_char *mac_addr); 60 int init_smt(struct s_smc *smc, const u_char *mac_addr) in init_smt() argument 89 init_fddi_driver(smc,mac_addr) ; /* HW driver */ in init_smt()
|
/linux-6.12.1/arch/mips/ath25/ |
D | board.c | 111 u8 *mac_addr; in ath25_find_config() local 173 mac_addr = &radio_data[0x1d * 2]; in ath25_find_config() 174 if (is_broadcast_ether_addr(mac_addr)) { in ath25_find_config() 176 ether_addr_copy(mac_addr, ath25_board.config->wlan0_mac); in ath25_find_config()
|
/linux-6.12.1/drivers/net/ethernet/netronome/nfp/ |
D | nfp_netvf_main.c | 63 u8 mac_addr[ETH_ALEN]; in nfp_netvf_get_mac_addr() local 65 put_unaligned_be32(nn_readl(nn, NFP_NET_CFG_MACADDR + 0), &mac_addr[0]); in nfp_netvf_get_mac_addr() 66 put_unaligned_be16(nn_readw(nn, NFP_NET_CFG_MACADDR + 6), &mac_addr[4]); in nfp_netvf_get_mac_addr() 68 if (!is_valid_ether_addr(mac_addr)) { in nfp_netvf_get_mac_addr() 73 eth_hw_addr_set(nn->dp.netdev, mac_addr); in nfp_netvf_get_mac_addr() 74 ether_addr_copy(nn->dp.netdev->perm_addr, mac_addr); in nfp_netvf_get_mac_addr()
|