/linux-6.1.9/net/batman-adv/ |
D | soft-interface.c | 100 static u64 batadv_sum_counter(struct batadv_priv *bat_priv, size_t idx) in batadv_sum_counter() argument 106 counters = per_cpu_ptr(bat_priv->bat_counters, cpu); in batadv_sum_counter() 115 struct batadv_priv *bat_priv = netdev_priv(dev); in batadv_interface_stats() local 118 stats->tx_packets = batadv_sum_counter(bat_priv, BATADV_CNT_TX); in batadv_interface_stats() 119 stats->tx_bytes = batadv_sum_counter(bat_priv, BATADV_CNT_TX_BYTES); in batadv_interface_stats() 120 stats->tx_dropped = batadv_sum_counter(bat_priv, BATADV_CNT_TX_DROPPED); in batadv_interface_stats() 121 stats->rx_packets = batadv_sum_counter(bat_priv, BATADV_CNT_RX); in batadv_interface_stats() 122 stats->rx_bytes = batadv_sum_counter(bat_priv, BATADV_CNT_RX_BYTES); in batadv_interface_stats() 128 struct batadv_priv *bat_priv = netdev_priv(dev); in batadv_interface_set_mac_addr() local 140 if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE) in batadv_interface_set_mac_addr() [all …]
|
D | multicast.c | 70 static void batadv_mcast_start_timer(struct batadv_priv *bat_priv) in batadv_mcast_start_timer() argument 72 queue_delayed_work(batadv_event_workqueue, &bat_priv->mcast.work, in batadv_mcast_start_timer() 166 static u8 batadv_mcast_mla_rtr_flags_softif_get(struct batadv_priv *bat_priv, in batadv_mcast_mla_rtr_flags_softif_get() argument 169 struct net_device *dev = bridge ? bridge : bat_priv->soft_iface; in batadv_mcast_mla_rtr_flags_softif_get() 196 static u8 batadv_mcast_mla_rtr_flags_bridge_get(struct batadv_priv *bat_priv, in batadv_mcast_mla_rtr_flags_bridge_get() argument 199 struct net_device *dev = bat_priv->soft_iface; in batadv_mcast_mla_rtr_flags_bridge_get() 228 static u8 batadv_mcast_mla_rtr_flags_get(struct batadv_priv *bat_priv, in batadv_mcast_mla_rtr_flags_get() argument 233 flags &= batadv_mcast_mla_rtr_flags_softif_get(bat_priv, bridge); in batadv_mcast_mla_rtr_flags_get() 234 flags &= batadv_mcast_mla_rtr_flags_bridge_get(bat_priv, bridge); in batadv_mcast_mla_rtr_flags_get() 247 batadv_mcast_mla_flags_get(struct batadv_priv *bat_priv) in batadv_mcast_mla_flags_get() argument [all …]
|
D | main.c | 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() [all …]
|
D | bridge_loop_avoidance.c | 56 batadv_bla_send_announce(struct batadv_priv *bat_priv, 218 batadv_claim_hash_find(struct batadv_priv *bat_priv, in batadv_claim_hash_find() argument 221 struct batadv_hashtable *hash = bat_priv->bla.claim_hash; in batadv_claim_hash_find() 258 batadv_backbone_hash_find(struct batadv_priv *bat_priv, const u8 *addr, in batadv_backbone_hash_find() argument 261 struct batadv_hashtable *hash = bat_priv->bla.backbone_hash; in batadv_backbone_hash_find() 307 hash = backbone_gw->bat_priv->bla.claim_hash; in batadv_bla_del_backbone_claims() 340 static void batadv_bla_send_claim(struct batadv_priv *bat_priv, const u8 *mac, in batadv_bla_send_claim() argument 351 primary_if = batadv_primary_if_get_selected(bat_priv); in batadv_bla_send_claim() 355 memcpy(&local_claim_dest, &bat_priv->bla.claim_dest, in batadv_bla_send_claim() 390 batadv_dbg(BATADV_DBG_BLA, bat_priv, in batadv_bla_send_claim() [all …]
|
D | gateway_client.c | 80 batadv_gw_get_selected_gw_node(struct batadv_priv *bat_priv) in batadv_gw_get_selected_gw_node() argument 85 gw_node = rcu_dereference(bat_priv->gw.curr_gw); in batadv_gw_get_selected_gw_node() 104 batadv_gw_get_selected_orig(struct batadv_priv *bat_priv) in batadv_gw_get_selected_orig() argument 109 gw_node = batadv_gw_get_selected_gw_node(bat_priv); in batadv_gw_get_selected_orig() 128 static void batadv_gw_select(struct batadv_priv *bat_priv, in batadv_gw_select() argument 133 spin_lock_bh(&bat_priv->gw.list_lock); in batadv_gw_select() 138 curr_gw_node = rcu_replace_pointer(bat_priv->gw.curr_gw, new_gw_node, in batadv_gw_select() 143 spin_unlock_bh(&bat_priv->gw.list_lock); in batadv_gw_select() 157 void batadv_gw_reselect(struct batadv_priv *bat_priv) in batadv_gw_reselect() argument 159 atomic_set(&bat_priv->gw.reselect, 1); in batadv_gw_reselect() [all …]
|
D | network-coding.c | 70 static void batadv_nc_start_timer(struct batadv_priv *bat_priv) in batadv_nc_start_timer() argument 72 queue_delayed_work(batadv_event_workqueue, &bat_priv->nc.work, in batadv_nc_start_timer() 81 static void batadv_nc_tvlv_container_update(struct batadv_priv *bat_priv) in batadv_nc_tvlv_container_update() argument 85 nc_mode = atomic_read(&bat_priv->network_coding); in batadv_nc_tvlv_container_update() 89 batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_NC, 1); in batadv_nc_tvlv_container_update() 92 batadv_tvlv_container_register(bat_priv, BATADV_TVLV_NC, 1, in batadv_nc_tvlv_container_update() 105 struct batadv_priv *bat_priv = netdev_priv(net_dev); in batadv_nc_status_update() local 107 batadv_nc_tvlv_container_update(bat_priv); in batadv_nc_status_update() 118 static void batadv_nc_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, in batadv_nc_tvlv_ogm_handler_v1() argument 135 int batadv_nc_mesh_init(struct batadv_priv *bat_priv) in batadv_nc_mesh_init() argument [all …]
|
D | translation-table.c | 65 static void batadv_send_roam_adv(struct batadv_priv *bat_priv, u8 *client, 71 static void batadv_tt_global_del(struct batadv_priv *bat_priv, 171 batadv_tt_local_hash_find(struct batadv_priv *bat_priv, const u8 *addr, in batadv_tt_local_hash_find() argument 177 tt_common_entry = batadv_tt_hash_find(bat_priv->tt.local_hash, addr, in batadv_tt_local_hash_find() 196 batadv_tt_global_hash_find(struct batadv_priv *bat_priv, const u8 *addr, in batadv_tt_global_hash_find() argument 202 tt_common_entry = batadv_tt_hash_find(bat_priv->tt.global_hash, addr, in batadv_tt_global_hash_find() 297 int batadv_tt_global_hash_count(struct batadv_priv *bat_priv, in batadv_tt_global_hash_count() argument 303 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid); in batadv_tt_global_hash_count() 320 static void batadv_tt_local_size_mod(struct batadv_priv *bat_priv, in batadv_tt_local_size_mod() argument 325 vlan = batadv_softif_vlan_get(bat_priv, vid); in batadv_tt_local_size_mod() [all …]
|
D | distributed-arp-table.h | 27 bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv, 29 bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv, 31 void batadv_dat_snoop_outgoing_arp_reply(struct batadv_priv *bat_priv, 33 bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv, 35 void batadv_dat_snoop_outgoing_dhcp_ack(struct batadv_priv *bat_priv, 39 void batadv_dat_snoop_incoming_dhcp_ack(struct batadv_priv *bat_priv, 41 bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv, 63 batadv_dat_init_own_addr(struct batadv_priv *bat_priv, in batadv_dat_init_own_addr() argument 71 bat_priv->dat.addr = (batadv_dat_addr_t)addr; in batadv_dat_init_own_addr() 74 int batadv_dat_init(struct batadv_priv *bat_priv); [all …]
|
D | distributed-arp-table.c | 102 static void batadv_dat_start_timer(struct batadv_priv *bat_priv) in batadv_dat_start_timer() argument 104 INIT_DELAYED_WORK(&bat_priv->dat.work, batadv_dat_purge); in batadv_dat_start_timer() 105 queue_delayed_work(batadv_event_workqueue, &bat_priv->dat.work, in batadv_dat_start_timer() 159 static void __batadv_dat_purge(struct batadv_priv *bat_priv, in __batadv_dat_purge() argument 168 if (!bat_priv->dat.hash) in __batadv_dat_purge() 171 for (i = 0; i < bat_priv->dat.hash->size; i++) { in __batadv_dat_purge() 172 head = &bat_priv->dat.hash->table[i]; in __batadv_dat_purge() 173 list_lock = &bat_priv->dat.hash->list_locks[i]; in __batadv_dat_purge() 200 struct batadv_priv *bat_priv; in batadv_dat_purge() local 204 bat_priv = container_of(priv_dat, struct batadv_priv, dat); in batadv_dat_purge() [all …]
|
D | bat_v_ogm.c | 56 struct batadv_orig_node *batadv_v_ogm_orig_get(struct batadv_priv *bat_priv, in batadv_v_ogm_orig_get() argument 62 orig_node = batadv_orig_hash_find(bat_priv, addr); in batadv_v_ogm_orig_get() 66 orig_node = batadv_orig_node_new(bat_priv, addr); in batadv_v_ogm_orig_get() 71 hash_added = batadv_hash_add(bat_priv->orig_hash, batadv_compare_orig, in batadv_v_ogm_orig_get() 102 static void batadv_v_ogm_start_timer(struct batadv_priv *bat_priv) in batadv_v_ogm_start_timer() argument 108 if (delayed_work_pending(&bat_priv->bat_v.ogm_wq)) in batadv_v_ogm_start_timer() 111 msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER; in batadv_v_ogm_start_timer() 113 queue_delayed_work(batadv_event_workqueue, &bat_priv->bat_v.ogm_wq, in batadv_v_ogm_start_timer() 125 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_v_ogm_send_to_if() local 130 batadv_inc_counter(bat_priv, BATADV_CNT_MGMT_TX); in batadv_v_ogm_send_to_if() [all …]
|
D | tvlv.c | 69 batadv_tvlv_handler_get(struct batadv_priv *bat_priv, u8 type, u8 version) in batadv_tvlv_handler_get() argument 75 &bat_priv->tvlv.handler_list, list) { in batadv_tvlv_handler_get() 131 batadv_tvlv_container_get(struct batadv_priv *bat_priv, u8 type, u8 version) in batadv_tvlv_container_get() argument 135 lockdep_assert_held(&bat_priv->tvlv.container_list_lock); in batadv_tvlv_container_get() 137 hlist_for_each_entry(tvlv_tmp, &bat_priv->tvlv.container_list, list) { in batadv_tvlv_container_get() 162 static u16 batadv_tvlv_container_list_size(struct batadv_priv *bat_priv) in batadv_tvlv_container_list_size() argument 167 lockdep_assert_held(&bat_priv->tvlv.container_list_lock); in batadv_tvlv_container_list_size() 169 hlist_for_each_entry(tvlv, &bat_priv->tvlv.container_list, list) { in batadv_tvlv_container_list_size() 186 static void batadv_tvlv_container_remove(struct batadv_priv *bat_priv, in batadv_tvlv_container_remove() argument 189 lockdep_assert_held(&bat_priv->tvlv.container_list_lock); in batadv_tvlv_container_remove() [all …]
|
D | gateway_common.c | 134 void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv) in batadv_gw_tvlv_container_update() argument 140 gw_mode = atomic_read(&bat_priv->gw.mode); in batadv_gw_tvlv_container_update() 145 batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_GW, 1); in batadv_gw_tvlv_container_update() 148 down = atomic_read(&bat_priv->gw.bandwidth_down); in batadv_gw_tvlv_container_update() 149 up = atomic_read(&bat_priv->gw.bandwidth_up); in batadv_gw_tvlv_container_update() 152 batadv_tvlv_container_register(bat_priv, BATADV_TVLV_GW, 1, in batadv_gw_tvlv_container_update() 170 struct batadv_priv *bat_priv = netdev_priv(net_dev); in batadv_gw_bandwidth_set() local 177 down_curr = (unsigned int)atomic_read(&bat_priv->gw.bandwidth_down); in batadv_gw_bandwidth_set() 178 up_curr = (unsigned int)atomic_read(&bat_priv->gw.bandwidth_up); in batadv_gw_bandwidth_set() 196 batadv_gw_reselect(bat_priv); in batadv_gw_bandwidth_set() [all …]
|
D | netlink.c | 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() [all …]
|
D | send.c | 67 struct batadv_priv *bat_priv; in batadv_send_skb_packet() local 71 bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_send_skb_packet() 102 batadv_nc_skb_store_for_decoding(bat_priv, skb); in batadv_send_skb_packet() 180 struct batadv_priv *bat_priv = orig_node->bat_priv; in batadv_send_skb_to_orig() local 185 neigh_node = batadv_find_router(bat_priv, orig_node, recv_if); in batadv_send_skb_to_orig() 194 if (atomic_read(&bat_priv->fragmentation) && in batadv_send_skb_to_orig() 282 bool batadv_send_skb_prepare_unicast_4addr(struct batadv_priv *bat_priv, in batadv_send_skb_prepare_unicast_4addr() argument 291 primary_if = batadv_primary_if_get_selected(bat_priv); in batadv_send_skb_prepare_unicast_4addr() 331 int batadv_send_skb_unicast(struct batadv_priv *bat_priv, in batadv_send_skb_unicast() argument 350 if (!batadv_send_skb_prepare_unicast_4addr(bat_priv, skb, in batadv_send_skb_unicast() [all …]
|
D | routing.c | 53 static void _batadv_update_route(struct batadv_priv *bat_priv, in _batadv_update_route() argument 85 batadv_dbg(BATADV_DBG_ROUTES, bat_priv, in _batadv_update_route() 87 batadv_tt_global_del_orig(bat_priv, orig_node, -1, in _batadv_update_route() 92 batadv_dbg(BATADV_DBG_ROUTES, bat_priv, in _batadv_update_route() 97 batadv_dbg(BATADV_DBG_ROUTES, bat_priv, in _batadv_update_route() 114 void batadv_update_route(struct batadv_priv *bat_priv, in batadv_update_route() argument 127 _batadv_update_route(bat_priv, orig_node, recv_if, neigh_node); in batadv_update_route() 149 bool batadv_window_protected(struct batadv_priv *bat_priv, s32 seq_num_diff, in batadv_window_protected() argument 162 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_window_protected() 216 static int batadv_recv_my_icmp_packet(struct batadv_priv *bat_priv, in batadv_recv_my_icmp_packet() argument [all …]
|
D | bridge_loop_avoidance.h | 36 bool batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb, 38 bool batadv_bla_tx(struct batadv_priv *bat_priv, struct sk_buff *skb, 45 bool batadv_bla_is_backbone_gw_orig(struct batadv_priv *bat_priv, u8 *orig, 47 bool batadv_bla_check_bcast_duplist(struct batadv_priv *bat_priv, 49 void batadv_bla_update_orig_address(struct batadv_priv *bat_priv, 53 int batadv_bla_init(struct batadv_priv *bat_priv); 54 void batadv_bla_free(struct batadv_priv *bat_priv); 56 bool batadv_bla_check_claim(struct batadv_priv *bat_priv, u8 *addr, 62 static inline bool batadv_bla_rx(struct batadv_priv *bat_priv, in batadv_bla_rx() argument 69 static inline bool batadv_bla_tx(struct batadv_priv *bat_priv, in batadv_bla_tx() argument [all …]
|
D | network-coding.h | 21 int batadv_nc_mesh_init(struct batadv_priv *bat_priv); 22 void batadv_nc_mesh_free(struct batadv_priv *bat_priv); 23 void batadv_nc_update_nc_node(struct batadv_priv *bat_priv, 28 void batadv_nc_purge_orig(struct batadv_priv *bat_priv, 32 void batadv_nc_init_bat_priv(struct batadv_priv *bat_priv); 36 void batadv_nc_skb_store_for_decoding(struct batadv_priv *bat_priv, 38 void batadv_nc_skb_store_sniffed_unicast(struct batadv_priv *bat_priv, 52 static inline int batadv_nc_mesh_init(struct batadv_priv *bat_priv) in batadv_nc_mesh_init() argument 57 static inline void batadv_nc_mesh_free(struct batadv_priv *bat_priv) in batadv_nc_mesh_free() argument 62 batadv_nc_update_nc_node(struct batadv_priv *bat_priv, in batadv_nc_update_nc_node() argument [all …]
|
D | tp_meter.c | 215 const u8 *dst, struct batadv_priv *bat_priv, in batadv_tp_batctl_notify() argument 233 batadv_netlink_tpmeter_notify(bat_priv, dst, result, test_time, in batadv_tp_batctl_notify() 246 struct batadv_priv *bat_priv, in batadv_tp_batctl_error_notify() argument 249 batadv_tp_batctl_notify(reason, dst, bat_priv, 0, 0, cookie); in batadv_tp_batctl_error_notify() 262 static struct batadv_tp_vars *batadv_tp_list_find(struct batadv_priv *bat_priv, in batadv_tp_list_find() argument 268 hlist_for_each_entry_rcu(pos, &bat_priv->tp_list, list) { in batadv_tp_list_find() 301 batadv_tp_list_find_session(struct batadv_priv *bat_priv, const u8 *dst, in batadv_tp_list_find_session() argument 307 hlist_for_each_entry_rcu(pos, &bat_priv->tp_list, list) { in batadv_tp_list_find_session() 372 static void batadv_tp_sender_cleanup(struct batadv_priv *bat_priv, in batadv_tp_sender_cleanup() argument 377 spin_lock_bh(&tp_vars->bat_priv->tp_list_lock); in batadv_tp_sender_cleanup() [all …]
|
D | translation-table.h | 18 int batadv_tt_init(struct batadv_priv *bat_priv); 21 u16 batadv_tt_local_remove(struct batadv_priv *bat_priv, 26 void batadv_tt_global_del_orig(struct batadv_priv *bat_priv, 30 batadv_tt_global_hash_find(struct batadv_priv *bat_priv, const u8 *addr, 33 int batadv_tt_global_hash_count(struct batadv_priv *bat_priv, 35 struct batadv_orig_node *batadv_transtable_search(struct batadv_priv *bat_priv, 38 void batadv_tt_free(struct batadv_priv *bat_priv); 39 bool batadv_is_my_client(struct batadv_priv *bat_priv, const u8 *addr, 41 bool batadv_is_ap_isolated(struct batadv_priv *bat_priv, u8 *src, u8 *dst, 43 void batadv_tt_local_commit_changes(struct batadv_priv *bat_priv); [all …]
|
D | multicast.h | 45 batadv_mcast_forw_mode(struct batadv_priv *bat_priv, struct sk_buff *skb, 49 int batadv_mcast_forw_send_orig(struct batadv_priv *bat_priv, 54 int batadv_mcast_forw_send(struct batadv_priv *bat_priv, struct sk_buff *skb, 57 void batadv_mcast_init(struct batadv_priv *bat_priv); 60 struct batadv_priv *bat_priv); 64 void batadv_mcast_free(struct batadv_priv *bat_priv); 71 batadv_mcast_forw_mode(struct batadv_priv *bat_priv, struct sk_buff *skb, in batadv_mcast_forw_mode() argument 79 batadv_mcast_forw_send_orig(struct batadv_priv *bat_priv, in batadv_mcast_forw_send_orig() argument 89 batadv_mcast_forw_send(struct batadv_priv *bat_priv, struct sk_buff *skb, in batadv_mcast_forw_send() argument 96 static inline int batadv_mcast_init(struct batadv_priv *bat_priv) in batadv_mcast_init() argument [all …]
|
D | gateway_client.h | 18 void batadv_gw_check_client_stop(struct batadv_priv *bat_priv); 19 void batadv_gw_reselect(struct batadv_priv *bat_priv); 20 void batadv_gw_election(struct batadv_priv *bat_priv); 22 batadv_gw_get_selected_orig(struct batadv_priv *bat_priv); 23 void batadv_gw_check_election(struct batadv_priv *bat_priv, 25 void batadv_gw_node_update(struct batadv_priv *bat_priv, 28 void batadv_gw_node_delete(struct batadv_priv *bat_priv, 30 void batadv_gw_node_free(struct batadv_priv *bat_priv); 33 batadv_gw_get_selected_gw_node(struct batadv_priv *bat_priv); 35 bool batadv_gw_out_of_range(struct batadv_priv *bat_priv, struct sk_buff *skb); [all …]
|
D | send.h | 24 struct batadv_priv *bat_priv, 27 void batadv_forw_packet_ogmv1_queue(struct batadv_priv *bat_priv, 42 int batadv_forw_bcast_packet(struct batadv_priv *bat_priv, 46 void batadv_send_bcast_packet(struct batadv_priv *bat_priv, 51 batadv_purge_outstanding_packets(struct batadv_priv *bat_priv, 53 bool batadv_send_skb_prepare_unicast_4addr(struct batadv_priv *bat_priv, 57 int batadv_send_skb_unicast(struct batadv_priv *bat_priv, 62 int batadv_send_skb_via_tt_generic(struct batadv_priv *bat_priv, 66 int batadv_send_skb_via_gw(struct batadv_priv *bat_priv, struct sk_buff *skb, 82 static inline int batadv_send_skb_via_tt(struct batadv_priv *bat_priv, in batadv_send_skb_via_tt() argument [all …]
|
D | originator.c | 57 batadv_orig_hash_find(struct batadv_priv *bat_priv, const void *data) in batadv_orig_hash_find() argument 59 struct batadv_hashtable *hash = bat_priv->orig_hash; in batadv_orig_hash_find() 195 int batadv_originator_init(struct batadv_priv *bat_priv) in batadv_originator_init() argument 197 if (bat_priv->orig_hash) in batadv_originator_init() 200 bat_priv->orig_hash = batadv_hash_new(1024); in batadv_originator_init() 202 if (!bat_priv->orig_hash) in batadv_originator_init() 205 batadv_hash_set_lock_class(bat_priv->orig_hash, in batadv_originator_init() 208 INIT_DELAYED_WORK(&bat_priv->orig_work, batadv_purge_orig); in batadv_originator_init() 210 &bat_priv->orig_work, in batadv_originator_init() 518 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_hardif_neigh_create() local [all …]
|
D | bat_iv_ogm.c | 140 batadv_iv_ogm_orig_get(struct batadv_priv *bat_priv, const u8 *addr) in batadv_iv_ogm_orig_get() argument 145 orig_node = batadv_orig_hash_find(bat_priv, addr); in batadv_iv_ogm_orig_get() 149 orig_node = batadv_orig_node_new(bat_priv, addr); in batadv_iv_ogm_orig_get() 156 hash_added = batadv_hash_add(bat_priv->orig_hash, batadv_compare_orig, in batadv_iv_ogm_orig_get() 278 batadv_iv_ogm_emit_send_time(const struct batadv_priv *bat_priv) in batadv_iv_ogm_emit_send_time() argument 282 msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER; in batadv_iv_ogm_emit_send_time() 295 static u8 batadv_hop_penalty(u8 tq, const struct batadv_priv *bat_priv) in batadv_hop_penalty() argument 297 int hop_penalty = atomic_read(&bat_priv->hop_penalty); in batadv_hop_penalty() 336 struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); in batadv_iv_ogm_send_to_if() local 369 batadv_dbg(BATADV_DBG_BATMAN, bat_priv, in batadv_iv_ogm_send_to_if() [all …]
|
D | log.h | 19 int batadv_debug_log_setup(struct batadv_priv *bat_priv); 20 void batadv_debug_log_cleanup(struct batadv_priv *bat_priv); 24 static inline int batadv_debug_log_setup(struct batadv_priv *bat_priv) in batadv_debug_log_setup() argument 29 static inline void batadv_debug_log_cleanup(struct batadv_priv *bat_priv) in batadv_debug_log_cleanup() argument 68 int batadv_debug_log(struct batadv_priv *bat_priv, const char *fmt, ...) 79 #define _batadv_dbg(type, bat_priv, ratelimited, fmt, arg...) \ argument 81 struct batadv_priv *__batpriv = (bat_priv); \ 90 struct batadv_priv *bat_priv __always_unused, in _batadv_dbg() 103 #define batadv_dbg(type, bat_priv, arg...) \ argument 104 _batadv_dbg(type, bat_priv, 0, ## arg) [all …]
|