Lines Matching full:lan966x
12 struct lan966x *lan966x; member
24 lan966x_fdb_find_entry(struct lan966x *lan966x, in lan966x_fdb_find_entry() argument
29 list_for_each_entry(fdb_entry, &lan966x->fdb_entries, list) { in lan966x_fdb_find_entry()
38 static void lan966x_fdb_add_entry(struct lan966x *lan966x, in lan966x_fdb_add_entry() argument
43 fdb_entry = lan966x_fdb_find_entry(lan966x, fdb_info); in lan966x_fdb_add_entry()
56 list_add_tail(&fdb_entry->list, &lan966x->fdb_entries); in lan966x_fdb_add_entry()
59 static bool lan966x_fdb_del_entry(struct lan966x *lan966x, in lan966x_fdb_del_entry() argument
64 list_for_each_entry_safe(fdb_entry, tmp, &lan966x->fdb_entries, in lan966x_fdb_del_entry()
81 void lan966x_fdb_write_entries(struct lan966x *lan966x, u16 vid) in lan966x_fdb_write_entries() argument
85 list_for_each_entry(fdb_entry, &lan966x->fdb_entries, list) { in lan966x_fdb_write_entries()
89 lan966x_mac_cpu_learn(lan966x, fdb_entry->mac, fdb_entry->vid); in lan966x_fdb_write_entries()
93 void lan966x_fdb_erase_entries(struct lan966x *lan966x, u16 vid) in lan966x_fdb_erase_entries() argument
97 list_for_each_entry(fdb_entry, &lan966x->fdb_entries, list) { in lan966x_fdb_erase_entries()
101 lan966x_mac_cpu_forget(lan966x, fdb_entry->mac, fdb_entry->vid); in lan966x_fdb_erase_entries()
105 static void lan966x_fdb_purge_entries(struct lan966x *lan966x) in lan966x_fdb_purge_entries() argument
109 list_for_each_entry_safe(fdb_entry, tmp, &lan966x->fdb_entries, list) { in lan966x_fdb_purge_entries()
115 int lan966x_fdb_init(struct lan966x *lan966x) in lan966x_fdb_init() argument
117 INIT_LIST_HEAD(&lan966x->fdb_entries); in lan966x_fdb_init()
118 lan966x->fdb_work = alloc_ordered_workqueue("lan966x_order", 0); in lan966x_fdb_init()
119 if (!lan966x->fdb_work) in lan966x_fdb_init()
125 void lan966x_fdb_deinit(struct lan966x *lan966x) in lan966x_fdb_deinit() argument
127 destroy_workqueue(lan966x->fdb_work); in lan966x_fdb_deinit()
128 lan966x_fdb_purge_entries(lan966x); in lan966x_fdb_deinit()
131 void lan966x_fdb_flush_workqueue(struct lan966x *lan966x) in lan966x_fdb_flush_workqueue() argument
133 flush_workqueue(lan966x->fdb_work); in lan966x_fdb_flush_workqueue()
140 struct lan966x *lan966x; in lan966x_fdb_port_event_work() local
142 lan966x = fdb_work->lan966x; in lan966x_fdb_port_event_work()
150 lan966x_mac_add_entry(lan966x, port, fdb_info->addr, in lan966x_fdb_port_event_work()
156 lan966x_mac_del_entry(lan966x, fdb_info->addr, in lan966x_fdb_port_event_work()
165 struct lan966x *lan966x; in lan966x_fdb_bridge_event_work() local
168 lan966x = fdb_work->lan966x; in lan966x_fdb_bridge_event_work()
181 lan966x_fdb_add_entry(lan966x, fdb_info); in lan966x_fdb_bridge_event_work()
182 if (!lan966x_vlan_cpu_member_cpu_vlan_mask(lan966x, in lan966x_fdb_bridge_event_work()
186 lan966x_mac_cpu_learn(lan966x, fdb_info->addr, in lan966x_fdb_bridge_event_work()
190 ret = lan966x_fdb_del_entry(lan966x, fdb_info); in lan966x_fdb_bridge_event_work()
191 if (!lan966x_vlan_cpu_member_cpu_vlan_mask(lan966x, in lan966x_fdb_bridge_event_work()
196 lan966x_mac_cpu_forget(lan966x, fdb_info->addr, in lan966x_fdb_bridge_event_work()
206 struct lan966x *lan966x; in lan966x_fdb_lag_event_work() local
211 lan966x = fdb_work->lan966x; in lan966x_fdb_lag_event_work()
219 lan966x_mac_add_entry(lan966x, port, fdb_info->addr, in lan966x_fdb_lag_event_work()
225 lan966x_mac_del_entry(lan966x, fdb_info->addr, fdb_info->vid); in lan966x_fdb_lag_event_work()
252 struct lan966x *lan966x = port->lan966x; in lan966x_handle_fdb() local
271 fdb_work->lan966x = lan966x; in lan966x_handle_fdb()
281 queue_work(lan966x->fdb_work, &fdb_work->work); in lan966x_handle_fdb()