Lines Matching refs:bat_priv
178 struct batadv_priv *bat_priv) in batadv_netlink_mesh_fill_ap_isolation() argument
183 vlan = batadv_softif_vlan_get(bat_priv, BATADV_NO_FLAGS); in batadv_netlink_mesh_fill_ap_isolation()
202 struct batadv_priv *bat_priv) in batadv_netlink_set_mesh_ap_isolation() argument
206 vlan = batadv_softif_vlan_get(bat_priv, BATADV_NO_FLAGS); in batadv_netlink_set_mesh_ap_isolation()
228 struct batadv_priv *bat_priv, in batadv_netlink_mesh_fill() argument
232 struct net_device *soft_iface = bat_priv->soft_iface; in batadv_netlink_mesh_fill()
243 bat_priv->algo_ops->name) || in batadv_netlink_mesh_fill()
249 (u8)atomic_read(&bat_priv->tt.vn))) in batadv_netlink_mesh_fill()
254 ntohs(bat_priv->bla.claim_dest.group))) in batadv_netlink_mesh_fill()
258 if (batadv_mcast_mesh_info_put(msg, bat_priv)) in batadv_netlink_mesh_fill()
261 primary_if = batadv_primary_if_get_selected(bat_priv); in batadv_netlink_mesh_fill()
275 !!atomic_read(&bat_priv->aggregated_ogms))) in batadv_netlink_mesh_fill()
278 if (batadv_netlink_mesh_fill_ap_isolation(msg, bat_priv)) in batadv_netlink_mesh_fill()
282 bat_priv->isolation_mark)) in batadv_netlink_mesh_fill()
286 bat_priv->isolation_mark_mask)) in batadv_netlink_mesh_fill()
290 !!atomic_read(&bat_priv->bonding))) in batadv_netlink_mesh_fill()
295 !!atomic_read(&bat_priv->bridge_loop_avoidance))) in batadv_netlink_mesh_fill()
301 !!atomic_read(&bat_priv->distributed_arp_table))) in batadv_netlink_mesh_fill()
306 !!atomic_read(&bat_priv->fragmentation))) in batadv_netlink_mesh_fill()
310 atomic_read(&bat_priv->gw.bandwidth_down))) in batadv_netlink_mesh_fill()
314 atomic_read(&bat_priv->gw.bandwidth_up))) in batadv_netlink_mesh_fill()
318 atomic_read(&bat_priv->gw.mode))) in batadv_netlink_mesh_fill()
321 if (bat_priv->algo_ops->gw.get_best_gw_node && in batadv_netlink_mesh_fill()
322 bat_priv->algo_ops->gw.is_eligible) { in batadv_netlink_mesh_fill()
327 atomic_read(&bat_priv->gw.sel_class))) in batadv_netlink_mesh_fill()
332 atomic_read(&bat_priv->hop_penalty))) in batadv_netlink_mesh_fill()
337 atomic_read(&bat_priv->log_level))) in batadv_netlink_mesh_fill()
343 !atomic_read(&bat_priv->multicast_mode))) in batadv_netlink_mesh_fill()
347 atomic_read(&bat_priv->multicast_fanout))) in batadv_netlink_mesh_fill()
353 !!atomic_read(&bat_priv->network_coding))) in batadv_netlink_mesh_fill()
358 atomic_read(&bat_priv->orig_interval))) in batadv_netlink_mesh_fill()
381 int batadv_netlink_notify_mesh(struct batadv_priv *bat_priv) in batadv_netlink_notify_mesh() argument
390 ret = batadv_netlink_mesh_fill(msg, bat_priv, BATADV_CMD_SET_MESH, in batadv_netlink_notify_mesh()
398 dev_net(bat_priv->soft_iface), msg, 0, in batadv_netlink_notify_mesh()
413 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_get_mesh() local
421 ret = batadv_netlink_mesh_fill(msg, bat_priv, BATADV_CMD_GET_MESH, in batadv_netlink_get_mesh()
442 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_set_mesh() local
448 atomic_set(&bat_priv->aggregated_ogms, !!nla_get_u8(attr)); in batadv_netlink_set_mesh()
454 batadv_netlink_set_mesh_ap_isolation(attr, bat_priv); in batadv_netlink_set_mesh()
460 bat_priv->isolation_mark = nla_get_u32(attr); in batadv_netlink_set_mesh()
466 bat_priv->isolation_mark_mask = nla_get_u32(attr); in batadv_netlink_set_mesh()
472 atomic_set(&bat_priv->bonding, !!nla_get_u8(attr)); in batadv_netlink_set_mesh()
479 atomic_set(&bat_priv->bridge_loop_avoidance, in batadv_netlink_set_mesh()
481 batadv_bla_status_update(bat_priv->soft_iface); in batadv_netlink_set_mesh()
489 atomic_set(&bat_priv->distributed_arp_table, in batadv_netlink_set_mesh()
491 batadv_dat_status_update(bat_priv->soft_iface); in batadv_netlink_set_mesh()
498 atomic_set(&bat_priv->fragmentation, !!nla_get_u8(attr)); in batadv_netlink_set_mesh()
499 batadv_update_min_mtu(bat_priv->soft_iface); in batadv_netlink_set_mesh()
505 atomic_set(&bat_priv->gw.bandwidth_down, nla_get_u32(attr)); in batadv_netlink_set_mesh()
506 batadv_gw_tvlv_container_update(bat_priv); in batadv_netlink_set_mesh()
512 atomic_set(&bat_priv->gw.bandwidth_up, nla_get_u32(attr)); in batadv_netlink_set_mesh()
513 batadv_gw_tvlv_container_update(bat_priv); in batadv_netlink_set_mesh()
534 batadv_gw_reselect(bat_priv); in batadv_netlink_set_mesh()
539 batadv_gw_check_client_stop(bat_priv); in batadv_netlink_set_mesh()
540 atomic_set(&bat_priv->gw.mode, gw_mode); in batadv_netlink_set_mesh()
541 batadv_gw_tvlv_container_update(bat_priv); in batadv_netlink_set_mesh()
546 bat_priv->algo_ops->gw.get_best_gw_node && in batadv_netlink_set_mesh()
547 bat_priv->algo_ops->gw.is_eligible) { in batadv_netlink_set_mesh()
558 if (!bat_priv->algo_ops->gw.store_sel_class) in batadv_netlink_set_mesh()
562 atomic_set(&bat_priv->gw.sel_class, sel_class); in batadv_netlink_set_mesh()
563 batadv_gw_reselect(bat_priv); in batadv_netlink_set_mesh()
570 atomic_set(&bat_priv->hop_penalty, nla_get_u8(attr)); in batadv_netlink_set_mesh()
577 atomic_set(&bat_priv->log_level, in batadv_netlink_set_mesh()
586 atomic_set(&bat_priv->multicast_mode, !nla_get_u8(attr)); in batadv_netlink_set_mesh()
592 atomic_set(&bat_priv->multicast_fanout, nla_get_u32(attr)); in batadv_netlink_set_mesh()
600 atomic_set(&bat_priv->network_coding, !!nla_get_u8(attr)); in batadv_netlink_set_mesh()
601 batadv_nc_status_update(bat_priv->soft_iface); in batadv_netlink_set_mesh()
614 atomic_set(&bat_priv->orig_interval, orig_interval); in batadv_netlink_set_mesh()
617 batadv_netlink_notify_mesh(bat_priv); in batadv_netlink_set_mesh()
649 int batadv_netlink_tpmeter_notify(struct batadv_priv *bat_priv, const u8 *dst, in batadv_netlink_tpmeter_notify() argument
687 dev_net(bat_priv->soft_iface), msg, 0, in batadv_netlink_tpmeter_notify()
711 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_tp_meter_start() local
743 batadv_tp_start(bat_priv, dst, test_length, &cookie); in batadv_netlink_tp_meter_start()
768 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_tp_meter_cancel() local
777 batadv_tp_stop(bat_priv, dst, BATADV_TP_REASON_CANCEL); in batadv_netlink_tp_meter_cancel()
796 struct batadv_priv *bat_priv, in batadv_netlink_hardif_fill() argument
813 bat_priv->soft_iface->ifindex)) in batadv_netlink_hardif_fill()
858 int batadv_netlink_notify_hardif(struct batadv_priv *bat_priv, in batadv_netlink_notify_hardif() argument
868 ret = batadv_netlink_hardif_fill(msg, bat_priv, hard_iface, in batadv_netlink_notify_hardif()
876 dev_net(bat_priv->soft_iface), msg, 0, in batadv_netlink_notify_hardif()
893 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_get_hardif() local
901 ret = batadv_netlink_hardif_fill(msg, bat_priv, hard_iface, in batadv_netlink_get_hardif()
926 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_set_hardif() local
951 batadv_netlink_notify_hardif(bat_priv, hard_iface); in batadv_netlink_set_hardif()
969 struct batadv_priv *bat_priv; in batadv_netlink_dump_hardif() local
989 bat_priv = netdev_priv(soft_iface); in batadv_netlink_dump_hardif()
1001 if (batadv_netlink_hardif_fill(msg, bat_priv, hard_iface, in batadv_netlink_dump_hardif()
1032 struct batadv_priv *bat_priv, in batadv_netlink_vlan_fill() argument
1044 bat_priv->soft_iface->ifindex)) in batadv_netlink_vlan_fill()
1069 int batadv_netlink_notify_vlan(struct batadv_priv *bat_priv, in batadv_netlink_notify_vlan() argument
1079 ret = batadv_netlink_vlan_fill(msg, bat_priv, vlan, in batadv_netlink_notify_vlan()
1087 dev_net(bat_priv->soft_iface), msg, 0, in batadv_netlink_notify_vlan()
1103 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_get_vlan() local
1111 ret = batadv_netlink_vlan_fill(msg, bat_priv, vlan, BATADV_CMD_GET_VLAN, in batadv_netlink_get_vlan()
1133 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_set_vlan() local
1142 batadv_netlink_notify_vlan(bat_priv, vlan); in batadv_netlink_set_vlan()
1191 batadv_get_hardif_from_info(struct batadv_priv *bat_priv, struct net *net, in batadv_get_hardif_from_info() argument
1211 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_get_hardif_from_info()
1237 batadv_get_vlan_from_info(struct batadv_priv *bat_priv, struct net *net, in batadv_get_vlan_from_info() argument
1248 vlan = batadv_softif_vlan_get(bat_priv, vid | BATADV_VLAN_HAS_TAG); in batadv_get_vlan_from_info()
1268 struct batadv_priv *bat_priv = NULL; in batadv_pre_doit() local
1289 bat_priv = netdev_priv(soft_iface); in batadv_pre_doit()
1290 info->user_ptr[0] = bat_priv; in batadv_pre_doit()
1294 hard_iface = batadv_get_hardif_from_info(bat_priv, net, info); in batadv_pre_doit()
1304 vlan = batadv_get_vlan_from_info(bat_priv, net, info); in batadv_pre_doit()
1316 if (bat_priv) in batadv_pre_doit()
1317 dev_put(bat_priv->soft_iface); in batadv_pre_doit()
1333 struct batadv_priv *bat_priv; in batadv_post_doit() local
1348 bat_priv = info->user_ptr[0]; in batadv_post_doit()
1349 dev_put(bat_priv->soft_iface); in batadv_post_doit()