Lines Matching full:mac

16 	unsigned char mac[ETH_ALEN];  member
57 const unsigned char *mac, in lan966x_mdb_entry_get() argument
63 if (ether_addr_equal(mdb_entry->mac, mac) && in lan966x_mdb_entry_get()
81 ether_addr_copy(mdb_entry->mac, mdb->addr); in lan966x_mdb_entry_add()
89 static void lan966x_mdb_encode_mac(unsigned char *mac, in lan966x_mdb_encode_mac() argument
93 ether_addr_copy(mac, mdb_entry->mac); in lan966x_mdb_encode_mac()
96 mac[0] = 0; in lan966x_mdb_encode_mac()
97 mac[1] = mdb_entry->ports >> 8; in lan966x_mdb_encode_mac()
98 mac[2] = mdb_entry->ports & 0xff; in lan966x_mdb_encode_mac()
100 mac[0] = mdb_entry->ports >> 8; in lan966x_mdb_encode_mac()
101 mac[1] = mdb_entry->ports & 0xff; in lan966x_mdb_encode_mac()
112 unsigned char mac[ETH_ALEN]; in lan966x_mdb_ip_add() local
121 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_ip_add()
122 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_ip_add()
135 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_ip_add()
137 mac, mdb_entry->vid, type); in lan966x_mdb_ip_add()
147 unsigned char mac[ETH_ALEN]; in lan966x_mdb_ip_del() local
166 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_ip_del()
167 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_ip_del()
177 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_ip_del()
179 mac, mdb_entry->vid, type); in lan966x_mdb_ip_del()
256 unsigned char mac[ETH_ALEN]; in lan966x_mdb_l2_add() local
265 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_l2_add()
266 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_l2_add()
293 return lan966x_mac_learn(lan966x, pgid_entry->index, mdb_entry->mac, in lan966x_mdb_l2_add()
305 unsigned char mac[ETH_ALEN]; in lan966x_mdb_l2_del() local
326 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_l2_del()
327 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_l2_del()
350 return lan966x_mac_learn(lan966x, pgid_entry->index, mdb_entry->mac, in lan966x_mdb_l2_del()
355 lan966x_mdb_classify(const unsigned char *mac) in lan966x_mdb_classify() argument
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()
402 unsigned char mac[ETH_ALEN]; in lan966x_mdb_ip_cpu_copy() local
404 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_ip_cpu_copy()
405 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_ip_cpu_copy()
406 lan966x_mac_ip_learn(lan966x, true, mac, mdb_entry->vid, type); in lan966x_mdb_ip_cpu_copy()
414 unsigned char mac[ETH_ALEN]; in lan966x_mdb_l2_cpu_copy() local
417 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_l2_cpu_copy()
418 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_l2_cpu_copy()
432 lan966x_mac_learn(lan966x, pgid_entry->index, mdb_entry->mac, in lan966x_mdb_l2_cpu_copy()
445 type = lan966x_mdb_classify(mdb_entry->mac); in lan966x_mdb_write_entries()
457 unsigned char mac[ETH_ALEN]; in lan966x_mdb_ip_cpu_remove() local
459 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_ip_cpu_remove()
460 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_ip_cpu_remove()
461 lan966x_mac_ip_learn(lan966x, false, mac, mdb_entry->vid, type); in lan966x_mdb_ip_cpu_remove()
469 unsigned char mac[ETH_ALEN]; in lan966x_mdb_l2_cpu_remove() local
472 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_l2_cpu_remove()
473 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_l2_cpu_remove()
487 lan966x_mac_learn(lan966x, pgid_entry->index, mdb_entry->mac, in lan966x_mdb_l2_cpu_remove()
500 type = lan966x_mdb_classify(mdb_entry->mac); in lan966x_mdb_erase_entries()
512 unsigned char mac[ETH_ALEN]; in lan966x_mdb_clear_entries() local
515 type = lan966x_mdb_classify(mdb_entry->mac); in lan966x_mdb_clear_entries()
517 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_clear_entries()
518 /* Remove just the MAC entry, still keep the PGID in case of L2 in lan966x_mdb_clear_entries()
521 lan966x_mac_forget(lan966x, mac, mdb_entry->vid, type); in lan966x_mdb_clear_entries()
529 unsigned char mac[ETH_ALEN]; in lan966x_mdb_restore_entries() local
533 type = lan966x_mdb_classify(mdb_entry->mac); in lan966x_mdb_restore_entries()
535 lan966x_mdb_encode_mac(mac, mdb_entry, type); in lan966x_mdb_restore_entries()
543 lan966x_mac_ip_learn(lan966x, cpu_copy, mac, in lan966x_mdb_restore_entries()
547 mdb_entry->mac, in lan966x_mdb_restore_entries()