Lines Matching refs:bat_priv

179 						 struct batadv_priv *bat_priv)  in batadv_netlink_mesh_fill_ap_isolation()  argument
184 vlan = batadv_softif_vlan_get(bat_priv, BATADV_NO_FLAGS); in batadv_netlink_mesh_fill_ap_isolation()
203 struct batadv_priv *bat_priv) in batadv_netlink_set_mesh_ap_isolation() argument
207 vlan = batadv_softif_vlan_get(bat_priv, BATADV_NO_FLAGS); in batadv_netlink_set_mesh_ap_isolation()
229 struct batadv_priv *bat_priv, in batadv_netlink_mesh_fill() argument
233 struct net_device *soft_iface = bat_priv->soft_iface; in batadv_netlink_mesh_fill()
244 bat_priv->algo_ops->name) || in batadv_netlink_mesh_fill()
250 (u8)atomic_read(&bat_priv->tt.vn))) in batadv_netlink_mesh_fill()
255 ntohs(bat_priv->bla.claim_dest.group))) in batadv_netlink_mesh_fill()
259 if (batadv_mcast_mesh_info_put(msg, bat_priv)) in batadv_netlink_mesh_fill()
262 primary_if = batadv_primary_if_get_selected(bat_priv); in batadv_netlink_mesh_fill()
276 !!atomic_read(&bat_priv->aggregated_ogms))) in batadv_netlink_mesh_fill()
279 if (batadv_netlink_mesh_fill_ap_isolation(msg, bat_priv)) in batadv_netlink_mesh_fill()
283 bat_priv->isolation_mark)) in batadv_netlink_mesh_fill()
287 bat_priv->isolation_mark_mask)) in batadv_netlink_mesh_fill()
291 !!atomic_read(&bat_priv->bonding))) in batadv_netlink_mesh_fill()
296 !!atomic_read(&bat_priv->bridge_loop_avoidance))) in batadv_netlink_mesh_fill()
302 !!atomic_read(&bat_priv->distributed_arp_table))) in batadv_netlink_mesh_fill()
307 !!atomic_read(&bat_priv->fragmentation))) in batadv_netlink_mesh_fill()
311 atomic_read(&bat_priv->gw.bandwidth_down))) in batadv_netlink_mesh_fill()
315 atomic_read(&bat_priv->gw.bandwidth_up))) in batadv_netlink_mesh_fill()
319 atomic_read(&bat_priv->gw.mode))) in batadv_netlink_mesh_fill()
322 if (bat_priv->algo_ops->gw.get_best_gw_node && in batadv_netlink_mesh_fill()
323 bat_priv->algo_ops->gw.is_eligible) { in batadv_netlink_mesh_fill()
328 atomic_read(&bat_priv->gw.sel_class))) in batadv_netlink_mesh_fill()
333 atomic_read(&bat_priv->hop_penalty))) in batadv_netlink_mesh_fill()
338 atomic_read(&bat_priv->log_level))) in batadv_netlink_mesh_fill()
344 !atomic_read(&bat_priv->multicast_mode))) in batadv_netlink_mesh_fill()
348 atomic_read(&bat_priv->multicast_fanout))) in batadv_netlink_mesh_fill()
354 !!atomic_read(&bat_priv->network_coding))) in batadv_netlink_mesh_fill()
359 atomic_read(&bat_priv->orig_interval))) in batadv_netlink_mesh_fill()
380 int batadv_netlink_notify_mesh(struct batadv_priv *bat_priv) in batadv_netlink_notify_mesh() argument
389 ret = batadv_netlink_mesh_fill(msg, bat_priv, BATADV_CMD_SET_MESH, in batadv_netlink_notify_mesh()
397 dev_net(bat_priv->soft_iface), msg, 0, in batadv_netlink_notify_mesh()
412 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_get_mesh() local
420 ret = batadv_netlink_mesh_fill(msg, bat_priv, BATADV_CMD_GET_MESH, in batadv_netlink_get_mesh()
441 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_set_mesh() local
447 atomic_set(&bat_priv->aggregated_ogms, !!nla_get_u8(attr)); in batadv_netlink_set_mesh()
453 batadv_netlink_set_mesh_ap_isolation(attr, bat_priv); in batadv_netlink_set_mesh()
459 bat_priv->isolation_mark = nla_get_u32(attr); in batadv_netlink_set_mesh()
465 bat_priv->isolation_mark_mask = nla_get_u32(attr); in batadv_netlink_set_mesh()
471 atomic_set(&bat_priv->bonding, !!nla_get_u8(attr)); in batadv_netlink_set_mesh()
478 atomic_set(&bat_priv->bridge_loop_avoidance, in batadv_netlink_set_mesh()
480 batadv_bla_status_update(bat_priv->soft_iface); in batadv_netlink_set_mesh()
488 atomic_set(&bat_priv->distributed_arp_table, in batadv_netlink_set_mesh()
490 batadv_dat_status_update(bat_priv->soft_iface); in batadv_netlink_set_mesh()
497 atomic_set(&bat_priv->fragmentation, !!nla_get_u8(attr)); in batadv_netlink_set_mesh()
498 batadv_update_min_mtu(bat_priv->soft_iface); in batadv_netlink_set_mesh()
504 atomic_set(&bat_priv->gw.bandwidth_down, nla_get_u32(attr)); in batadv_netlink_set_mesh()
505 batadv_gw_tvlv_container_update(bat_priv); in batadv_netlink_set_mesh()
511 atomic_set(&bat_priv->gw.bandwidth_up, nla_get_u32(attr)); in batadv_netlink_set_mesh()
512 batadv_gw_tvlv_container_update(bat_priv); in batadv_netlink_set_mesh()
533 batadv_gw_reselect(bat_priv); in batadv_netlink_set_mesh()
538 batadv_gw_check_client_stop(bat_priv); in batadv_netlink_set_mesh()
539 atomic_set(&bat_priv->gw.mode, gw_mode); in batadv_netlink_set_mesh()
540 batadv_gw_tvlv_container_update(bat_priv); in batadv_netlink_set_mesh()
545 bat_priv->algo_ops->gw.get_best_gw_node && in batadv_netlink_set_mesh()
546 bat_priv->algo_ops->gw.is_eligible) { in batadv_netlink_set_mesh()
557 if (!bat_priv->algo_ops->gw.store_sel_class) in batadv_netlink_set_mesh()
561 atomic_set(&bat_priv->gw.sel_class, sel_class); in batadv_netlink_set_mesh()
562 batadv_gw_reselect(bat_priv); in batadv_netlink_set_mesh()
569 atomic_set(&bat_priv->hop_penalty, nla_get_u8(attr)); in batadv_netlink_set_mesh()
576 atomic_set(&bat_priv->log_level, in batadv_netlink_set_mesh()
585 atomic_set(&bat_priv->multicast_mode, !nla_get_u8(attr)); in batadv_netlink_set_mesh()
591 atomic_set(&bat_priv->multicast_fanout, nla_get_u32(attr)); in batadv_netlink_set_mesh()
599 atomic_set(&bat_priv->network_coding, !!nla_get_u8(attr)); in batadv_netlink_set_mesh()
600 batadv_nc_status_update(bat_priv->soft_iface); in batadv_netlink_set_mesh()
613 atomic_set(&bat_priv->orig_interval, orig_interval); in batadv_netlink_set_mesh()
616 batadv_netlink_notify_mesh(bat_priv); in batadv_netlink_set_mesh()
648 int batadv_netlink_tpmeter_notify(struct batadv_priv *bat_priv, const u8 *dst, in batadv_netlink_tpmeter_notify() argument
686 dev_net(bat_priv->soft_iface), msg, 0, in batadv_netlink_tpmeter_notify()
710 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_tp_meter_start() local
742 batadv_tp_start(bat_priv, dst, test_length, &cookie); in batadv_netlink_tp_meter_start()
767 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_tp_meter_cancel() local
776 batadv_tp_stop(bat_priv, dst, BATADV_TP_REASON_CANCEL); in batadv_netlink_tp_meter_cancel()
795 struct batadv_priv *bat_priv, in batadv_netlink_hardif_fill() argument
812 bat_priv->soft_iface->ifindex)) in batadv_netlink_hardif_fill()
816 bat_priv->soft_iface->name)) in batadv_netlink_hardif_fill()
861 int batadv_netlink_notify_hardif(struct batadv_priv *bat_priv, in batadv_netlink_notify_hardif() argument
871 ret = batadv_netlink_hardif_fill(msg, bat_priv, hard_iface, in batadv_netlink_notify_hardif()
879 dev_net(bat_priv->soft_iface), msg, 0, in batadv_netlink_notify_hardif()
896 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_get_hardif() local
904 ret = batadv_netlink_hardif_fill(msg, bat_priv, hard_iface, in batadv_netlink_get_hardif()
929 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_set_hardif() local
954 batadv_netlink_notify_hardif(bat_priv, hard_iface); in batadv_netlink_set_hardif()
972 struct batadv_priv *bat_priv; in batadv_netlink_dump_hardif() local
992 bat_priv = netdev_priv(soft_iface); in batadv_netlink_dump_hardif()
1004 if (batadv_netlink_hardif_fill(msg, bat_priv, hard_iface, in batadv_netlink_dump_hardif()
1035 struct batadv_priv *bat_priv, in batadv_netlink_vlan_fill() argument
1047 bat_priv->soft_iface->ifindex)) in batadv_netlink_vlan_fill()
1051 bat_priv->soft_iface->name)) in batadv_netlink_vlan_fill()
1076 int batadv_netlink_notify_vlan(struct batadv_priv *bat_priv, in batadv_netlink_notify_vlan() argument
1086 ret = batadv_netlink_vlan_fill(msg, bat_priv, vlan, in batadv_netlink_notify_vlan()
1094 dev_net(bat_priv->soft_iface), msg, 0, in batadv_netlink_notify_vlan()
1110 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_get_vlan() local
1118 ret = batadv_netlink_vlan_fill(msg, bat_priv, vlan, BATADV_CMD_GET_VLAN, in batadv_netlink_get_vlan()
1140 struct batadv_priv *bat_priv = info->user_ptr[0]; in batadv_netlink_set_vlan() local
1149 batadv_netlink_notify_vlan(bat_priv, vlan); in batadv_netlink_set_vlan()
1198 batadv_get_hardif_from_info(struct batadv_priv *bat_priv, struct net *net, in batadv_get_hardif_from_info() argument
1218 if (hard_iface->soft_iface != bat_priv->soft_iface) in batadv_get_hardif_from_info()
1244 batadv_get_vlan_from_info(struct batadv_priv *bat_priv, struct net *net, in batadv_get_vlan_from_info() argument
1255 vlan = batadv_softif_vlan_get(bat_priv, vid | BATADV_VLAN_HAS_TAG); in batadv_get_vlan_from_info()
1275 struct batadv_priv *bat_priv = NULL; in batadv_pre_doit() local
1296 bat_priv = netdev_priv(soft_iface); in batadv_pre_doit()
1297 info->user_ptr[0] = bat_priv; in batadv_pre_doit()
1301 hard_iface = batadv_get_hardif_from_info(bat_priv, net, info); in batadv_pre_doit()
1311 vlan = batadv_get_vlan_from_info(bat_priv, net, info); in batadv_pre_doit()
1323 if (bat_priv) in batadv_pre_doit()
1324 dev_put(bat_priv->soft_iface); in batadv_pre_doit()
1340 struct batadv_priv *bat_priv; in batadv_post_doit() local
1355 bat_priv = info->user_ptr[0]; in batadv_post_doit()
1356 dev_put(bat_priv->soft_iface); in batadv_post_doit()