Lines Matching defs:bat_priv

62  * @bat_priv: the bat priv with all the soft interface information
69 batadv_tvlv_handler_get(struct batadv_priv *bat_priv, u8 type, u8 version)
75 &bat_priv->tvlv.handler_list, list) {
121 * @bat_priv: the bat priv with all the soft interface information
131 batadv_tvlv_container_get(struct batadv_priv *bat_priv, u8 type, u8 version)
135 lockdep_assert_held(&bat_priv->tvlv.container_list_lock);
137 hlist_for_each_entry(tvlv_tmp, &bat_priv->tvlv.container_list, list) {
155 * @bat_priv: the bat priv with all the soft interface information
162 static u16 batadv_tvlv_container_list_size(struct batadv_priv *bat_priv)
167 lockdep_assert_held(&bat_priv->tvlv.container_list_lock);
169 hlist_for_each_entry(tvlv, &bat_priv->tvlv.container_list, list) {
180 * @bat_priv: the bat priv with all the soft interface information
186 static void batadv_tvlv_container_remove(struct batadv_priv *bat_priv,
189 lockdep_assert_held(&bat_priv->tvlv.container_list_lock);
204 * @bat_priv: the bat priv with all the soft interface information
208 void batadv_tvlv_container_unregister(struct batadv_priv *bat_priv,
213 spin_lock_bh(&bat_priv->tvlv.container_list_lock);
214 tvlv = batadv_tvlv_container_get(bat_priv, type, version);
215 batadv_tvlv_container_remove(bat_priv, tvlv);
216 spin_unlock_bh(&bat_priv->tvlv.container_list_lock);
222 * @bat_priv: the bat priv with all the soft interface information
231 void batadv_tvlv_container_register(struct batadv_priv *bat_priv,
252 spin_lock_bh(&bat_priv->tvlv.container_list_lock);
253 tvlv_old = batadv_tvlv_container_get(bat_priv, type, version);
254 batadv_tvlv_container_remove(bat_priv, tvlv_old);
257 hlist_add_head(&tvlv_new->list, &bat_priv->tvlv.container_list);
258 spin_unlock_bh(&bat_priv->tvlv.container_list_lock);
300 * @bat_priv: the bat priv with all the soft interface information
311 u16 batadv_tvlv_container_ogm_append(struct batadv_priv *bat_priv,
321 spin_lock_bh(&bat_priv->tvlv.container_list_lock);
322 tvlv_value_len = batadv_tvlv_container_list_size(bat_priv);
335 hlist_for_each_entry(tvlv, &bat_priv->tvlv.container_list, list) {
346 spin_unlock_bh(&bat_priv->tvlv.container_list_lock);
353 * @bat_priv: the bat priv with all the soft interface information
364 static int batadv_tvlv_call_handler(struct batadv_priv *bat_priv,
386 tvlv_handler->ogm_handler(bat_priv, orig_node,
401 return tvlv_handler->unicast_handler(bat_priv, src,
415 return tvlv_handler->mcast_handler(bat_priv, skb);
424 * @bat_priv: the bat priv with all the soft interface information
434 int batadv_tvlv_containers_process(struct batadv_priv *bat_priv,
455 tvlv_handler = batadv_tvlv_handler_get(bat_priv,
459 ret |= batadv_tvlv_call_handler(bat_priv, tvlv_handler,
474 &bat_priv->tvlv.handler_list, list) {
480 tvlv_handler->ogm_handler(bat_priv, orig_node,
493 * @bat_priv: the bat priv with all the soft interface information
497 void batadv_tvlv_ogm_receive(struct batadv_priv *bat_priv,
513 batadv_tvlv_containers_process(bat_priv, BATADV_IV_OGM, orig_node, NULL,
521 * @bat_priv: the bat priv with all the soft interface information
535 void batadv_tvlv_handler_register(struct batadv_priv *bat_priv,
536 void (*optr)(struct batadv_priv *bat_priv,
541 int (*uptr)(struct batadv_priv *bat_priv,
545 int (*mptr)(struct batadv_priv *bat_priv,
551 spin_lock_bh(&bat_priv->tvlv.handler_list_lock);
553 tvlv_handler = batadv_tvlv_handler_get(bat_priv, type, version);
555 spin_unlock_bh(&bat_priv->tvlv.handler_list_lock);
562 spin_unlock_bh(&bat_priv->tvlv.handler_list_lock);
576 hlist_add_head_rcu(&tvlv_handler->list, &bat_priv->tvlv.handler_list);
577 spin_unlock_bh(&bat_priv->tvlv.handler_list_lock);
586 * @bat_priv: the bat priv with all the soft interface information
590 void batadv_tvlv_handler_unregister(struct batadv_priv *bat_priv,
595 tvlv_handler = batadv_tvlv_handler_get(bat_priv, type, version);
600 spin_lock_bh(&bat_priv->tvlv.handler_list_lock);
602 spin_unlock_bh(&bat_priv->tvlv.handler_list_lock);
609 * @bat_priv: the bat priv with all the soft interface information
617 void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, const u8 *src,
629 orig_node = batadv_orig_hash_find(bat_priv, dst);