Lines Matching refs:bat_priv

152 	struct batadv_priv *bat_priv = netdev_priv(soft_iface);  in batadv_mesh_init()  local
155 spin_lock_init(&bat_priv->forw_bat_list_lock); in batadv_mesh_init()
156 spin_lock_init(&bat_priv->forw_bcast_list_lock); in batadv_mesh_init()
157 spin_lock_init(&bat_priv->tt.changes_list_lock); in batadv_mesh_init()
158 spin_lock_init(&bat_priv->tt.req_list_lock); in batadv_mesh_init()
159 spin_lock_init(&bat_priv->tt.roam_list_lock); in batadv_mesh_init()
160 spin_lock_init(&bat_priv->tt.last_changeset_lock); in batadv_mesh_init()
161 spin_lock_init(&bat_priv->tt.commit_lock); in batadv_mesh_init()
162 spin_lock_init(&bat_priv->gw.list_lock); in batadv_mesh_init()
164 spin_lock_init(&bat_priv->mcast.mla_lock); in batadv_mesh_init()
165 spin_lock_init(&bat_priv->mcast.want_lists_lock); in batadv_mesh_init()
167 spin_lock_init(&bat_priv->tvlv.container_list_lock); in batadv_mesh_init()
168 spin_lock_init(&bat_priv->tvlv.handler_list_lock); in batadv_mesh_init()
169 spin_lock_init(&bat_priv->softif_vlan_list_lock); in batadv_mesh_init()
170 spin_lock_init(&bat_priv->tp_list_lock); in batadv_mesh_init()
172 INIT_HLIST_HEAD(&bat_priv->forw_bat_list); in batadv_mesh_init()
173 INIT_HLIST_HEAD(&bat_priv->forw_bcast_list); in batadv_mesh_init()
174 INIT_HLIST_HEAD(&bat_priv->gw.gateway_list); in batadv_mesh_init()
176 INIT_HLIST_HEAD(&bat_priv->mcast.want_all_unsnoopables_list); in batadv_mesh_init()
177 INIT_HLIST_HEAD(&bat_priv->mcast.want_all_ipv4_list); in batadv_mesh_init()
178 INIT_HLIST_HEAD(&bat_priv->mcast.want_all_ipv6_list); in batadv_mesh_init()
180 INIT_LIST_HEAD(&bat_priv->tt.changes_list); in batadv_mesh_init()
181 INIT_HLIST_HEAD(&bat_priv->tt.req_list); in batadv_mesh_init()
182 INIT_LIST_HEAD(&bat_priv->tt.roam_list); in batadv_mesh_init()
184 INIT_HLIST_HEAD(&bat_priv->mcast.mla_list); in batadv_mesh_init()
186 INIT_HLIST_HEAD(&bat_priv->tvlv.container_list); in batadv_mesh_init()
187 INIT_HLIST_HEAD(&bat_priv->tvlv.handler_list); in batadv_mesh_init()
188 INIT_HLIST_HEAD(&bat_priv->softif_vlan_list); in batadv_mesh_init()
189 INIT_HLIST_HEAD(&bat_priv->tp_list); in batadv_mesh_init()
191 bat_priv->gw.generation = 0; in batadv_mesh_init()
193 ret = batadv_originator_init(bat_priv); in batadv_mesh_init()
195 atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING); in batadv_mesh_init()
199 ret = batadv_tt_init(bat_priv); in batadv_mesh_init()
201 atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING); in batadv_mesh_init()
205 ret = batadv_v_mesh_init(bat_priv); in batadv_mesh_init()
207 atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING); in batadv_mesh_init()
211 ret = batadv_bla_init(bat_priv); in batadv_mesh_init()
213 atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING); in batadv_mesh_init()
217 ret = batadv_dat_init(bat_priv); in batadv_mesh_init()
219 atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING); in batadv_mesh_init()
223 ret = batadv_nc_mesh_init(bat_priv); in batadv_mesh_init()
225 atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING); in batadv_mesh_init()
229 batadv_gw_init(bat_priv); in batadv_mesh_init()
230 batadv_mcast_init(bat_priv); in batadv_mesh_init()
232 atomic_set(&bat_priv->gw.reselect, 0); in batadv_mesh_init()
233 atomic_set(&bat_priv->mesh_state, BATADV_MESH_ACTIVE); in batadv_mesh_init()
238 batadv_dat_free(bat_priv); in batadv_mesh_init()
240 batadv_bla_free(bat_priv); in batadv_mesh_init()
242 batadv_v_mesh_free(bat_priv); in batadv_mesh_init()
244 batadv_tt_free(bat_priv); in batadv_mesh_init()
246 batadv_originator_free(bat_priv); in batadv_mesh_init()
248 batadv_purge_outstanding_packets(bat_priv, NULL); in batadv_mesh_init()
249 atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE); in batadv_mesh_init()
260 struct batadv_priv *bat_priv = netdev_priv(soft_iface); in batadv_mesh_free() local
262 atomic_set(&bat_priv->mesh_state, BATADV_MESH_DEACTIVATING); in batadv_mesh_free()
264 batadv_purge_outstanding_packets(bat_priv, NULL); in batadv_mesh_free()
266 batadv_gw_node_free(bat_priv); in batadv_mesh_free()
268 batadv_v_mesh_free(bat_priv); in batadv_mesh_free()
269 batadv_nc_mesh_free(bat_priv); in batadv_mesh_free()
270 batadv_dat_free(bat_priv); in batadv_mesh_free()
271 batadv_bla_free(bat_priv); in batadv_mesh_free()
273 batadv_mcast_free(bat_priv); in batadv_mesh_free()
279 batadv_tt_free(bat_priv); in batadv_mesh_free()
286 batadv_originator_free(bat_priv); in batadv_mesh_free()
288 batadv_gw_free(bat_priv); in batadv_mesh_free()
290 free_percpu(bat_priv->bat_counters); in batadv_mesh_free()
291 bat_priv->bat_counters = NULL; in batadv_mesh_free()
293 atomic_set(&bat_priv->mesh_state, BATADV_MESH_INACTIVE); in batadv_mesh_free()
304 bool batadv_is_my_mac(struct batadv_priv *bat_priv, const u8 *addr) in batadv_is_my_mac() argument
314 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_is_my_mac()
430 struct batadv_priv *bat_priv; in batadv_batman_skb_recv() local
462 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_batman_skb_recv()
464 if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE) in batadv_batman_skb_recv()
474 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_batman_skb_recv()
651 bool batadv_vlan_ap_isola_get(struct batadv_priv *bat_priv, unsigned short vid) in batadv_vlan_ap_isola_get() argument
659 vlan = batadv_softif_vlan_get(bat_priv, vid); in batadv_vlan_ap_isola_get()
678 int batadv_throw_uevent(struct batadv_priv *bat_priv, enum batadv_uev_type type, in batadv_throw_uevent() argument
685 bat_kobj = &bat_priv->soft_iface->dev.kobj; in batadv_throw_uevent()
714 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_throw_uevent()