History

Merge tag 'batadv-next-pullrequest-20260605' of https://git.open-mesh.org/batadv

Simon Wunderlich says: ==================== This cleanup patchset includes the following patches, all by Sven Eckelmann: - tp_meter: initialize last_recv_time during init - convert cancellation of work items to disable helper - clean up wifi detection cache (3 patches) - clean up kernel-doc: corrections, reword, typos (6 patches) * tag 'batadv-next-pullrequest-20260605' of https://git.open-mesh.org/batadv: batman-adv: fix kernel-doc typos and grammar errors batman-adv: fix batadv_v_ogm_packet_recv error handling kernel-doc batman-adv: uapi: keep kernel-doc in struct member order batman-adv: bla: update stale kernel-doc batman-adv: tp_meter: update stale kernel-doc after refactoring batman-adv: correct batadv_wifi_* kernel-doc batman-adv: document cleanup of batadv_wifi_net_devices entries batman-adv: use GFP_KERNEL allocations for the wifi detection cache batman-adv: drop duplicated wifi_flags assignments batman-adv: convert cancellation of work items to disable helper batman-adv: tp_meter: initialize last_recv_time during init ====================

Jakub Kicinski committed 5 months ago

Commit 4ed4f602 parents d337bc6 1e2fa2b23 files · +85 −67Browse files

Unified · Split

23 files
  1. include/uapi/linux/batadv_packet.h +3 −3
  2. net/batman-adv/bat_iv_ogm.c +1 −1
  3. net/batman-adv/bat_v.c +3 −1
  4. net/batman-adv/bat_v_elp.c +3 −3
  5. net/batman-adv/bat_v_ogm.c +9 −7
  6. net/batman-adv/bitarray.c +1 −1
  7. net/batman-adv/bitarray.h +1 −1
  8. net/batman-adv/bridge_loop_avoidance.c +3 −3
  9. net/batman-adv/bridge_loop_avoidance.h +1 −1
  10. net/batman-adv/distributed-arp-table.c +1 −1
  11. net/batman-adv/fragmentation.c +2 −1
  12. net/batman-adv/hard-interface.c +9 −6
  13. net/batman-adv/hard-interface.h +2 −2
  14. net/batman-adv/hash.h +2 −2
  15. net/batman-adv/mesh-interface.c +3 −3
  16. net/batman-adv/multicast.c +1 −1
  17. net/batman-adv/netlink.c +2 −2
  18. net/batman-adv/originator.c +3 −3
  19. net/batman-adv/send.c +1 −1
  20. net/batman-adv/tp_meter.c +16 −12
  21. net/batman-adv/translation-table.c +1 −1
  22. net/batman-adv/tvlv.c +2 −2
  23. net/batman-adv/types.h +15 −9
include/uapi/linux/batadv_packet.h+3−3
@@ -518,16 +518,16 @@ struct batadv_mcast_packet { · 517 unmodified lines
518518 * @packet_type: batman-adv packet type, part of the general header
519519 * @version: batman-adv protocol version, part of the general header
520520 * @ttl: time to live for this packet, part of the general header
521+ * @first_ttvn: tt-version number of first included packet
521522 * @first_source: original source of first included packet
522523 * @first_orig_dest: original destination of first included packet
523524 * @first_crc: checksum of first included packet
524− * @first_ttvn: tt-version number of first included packet
525525 * @second_ttl: ttl of second packet
526+ * @second_ttvn: tt version number of second included packet
526527 * @second_dest: second receiver of this coded packet
527528 * @second_source: original source of second included packet
528529 * @second_orig_dest: original destination of second included packet
529530 * @second_crc: checksum of second included packet
530− * @second_ttvn: tt version number of second included packet
531531 * @coded_len: length of network coded part of the payload
532532 */
533533 struct batadv_coded_packet {
@@ -554,8 +554,8 @@ struct batadv_coded_packet { · 20 unmodified lines
554554 * @version: batman-adv protocol version, part of the general header
555555 * @ttl: time to live for this packet, part of the general header
556556 * @reserved: reserved field (for packet alignment)
557− * @src: address of the source
558557 * @dst: address of the destination
558+ * @src: address of the source
559559 * @tvlv_len: length of tvlv data following the unicast tvlv header
560560 * @align: 2 bytes to align the header to a 4 byte boundary
561561 */
net/batman-adv/bat_iv_ogm.c+1−1
@@ -230,7 +230,7 @@ static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface) · 229 unmodified lines
230230
231231 mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex);
232232
233− cancel_delayed_work_sync(&hard_iface->bat_iv.reschedule_work);
233+ disable_delayed_work_sync(&hard_iface->bat_iv.reschedule_work);
234234 }
235235
236236 static void batadv_iv_ogm_iface_update_mac(struct batadv_hard_iface *hard_iface)
net/batman-adv/bat_v.c+3−1
@@ -587,7 +587,7 @@ next: · 586 unmodified lines
587587 }
588588
589589 /**
590− * batadv_v_gw_is_eligible() - check if a originator would be selected as GW
590+ * batadv_v_gw_is_eligible() - check if an originator would be selected as GW
591591 * @bat_priv: the bat priv with all the mesh interface information
592592 * @curr_gw_orig: originator representing the currently selected GW
593593 * @orig_node: the originator representing the new candidate
@@ -819,6 +819,8 @@ void batadv_v_hardif_init(struct batadv_hard_iface *hard_iface) · 225 unmodified lines
819819 skb_queue_head_init(&hard_iface->bat_v.aggr_list);
820820 INIT_DELAYED_WORK(&hard_iface->bat_v.aggr_wq,
821821 batadv_v_ogm_aggr_work);
822+ /* make sure it doesn't run until interface gets enabled */
823+ disable_delayed_work(&hard_iface->bat_v.aggr_wq);
822824 }
823825
824826 /**
net/batman-adv/bat_v_elp.c+3−3
@@ -115,7 +115,7 @@ static bool batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh, · 114 unmodified lines
115115 goto default_throughput;
116116
117117 /* only use rtnl_trylock because the elp worker will be cancelled while
118− * the rntl_lock is held. the cancel_delayed_work_sync() would otherwise
118+ * the rntl_lock is held. the disable_delayed_work_sync() would otherwise
119119 * wait forever when the elp work_item was started and it is then also
120120 * trying to rtnl_lock
121121 */
@@ -162,7 +162,7 @@ static bool batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh, · 40 unmodified lines
162162 }
163163
164164 /* only use rtnl_trylock because the elp worker will be cancelled while
165− * the rntl_lock is held. the cancel_delayed_work_sync() would otherwise
165+ * the rntl_lock is held. the disable_delayed_work_sync() would otherwise
166166 * wait forever when the elp work_item was started and it is then also
167167 * trying to rtnl_lock
168168 */
@@ -447,7 +447,7 @@ out: · 278 unmodified lines
447447 */
448448 void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface)
449449 {
450− cancel_delayed_work_sync(&hard_iface->bat_v.elp_wq);
450+ disable_delayed_work_sync(&hard_iface->bat_v.elp_wq);
451451
452452 dev_kfree_skb(hard_iface->bat_v.elp_skb);
453453 hard_iface->bat_v.elp_skb = NULL;
net/batman-adv/bat_v_ogm.c+9−7
@@ -415,6 +415,8 @@ int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface) · 414 unmodified lines
415415 {
416416 struct batadv_priv *bat_priv = netdev_priv(hard_iface->mesh_iface);
417417
418+ enable_delayed_work(&hard_iface->bat_v.aggr_wq);
419+
418420 batadv_v_ogm_start_queue_timer(hard_iface);
419421 batadv_v_ogm_start_timer(bat_priv);
420422
@@ -427,7 +429,7 @@ int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface) · 6 unmodified lines
427429 */
428430 void batadv_v_ogm_iface_disable(struct batadv_hard_iface *hard_iface)
429431 {
430− cancel_delayed_work_sync(&hard_iface->bat_v.aggr_wq);
432+ disable_delayed_work_sync(&hard_iface->bat_v.aggr_wq);
431433
432434 spin_lock_bh(&hard_iface->bat_v.aggr_list.lock);
433435 batadv_v_ogm_aggr_list_free(hard_iface);
@@ -513,7 +515,7 @@ static u32 batadv_v_forward_penalty(struct batadv_priv *bat_priv, · 79 unmodified lines
513515 * @bat_priv: the bat priv with all the mesh interface information
514516 * @ogm_received: previously received OGM to be forwarded
515517 * @orig_node: the originator which has been updated
516− * @neigh_node: the neigh_node through with the OGM has been received
518+ * @neigh_node: the neigh_node through which the OGM has been received
517519 * @if_incoming: the interface on which this OGM was received on
518520 * @if_outgoing: the interface to which the OGM has to be forwarded to
519521 *
@@ -600,7 +602,7 @@ out: · 80 unmodified lines
600602 * @bat_priv: the bat priv with all the mesh interface information
601603 * @ogm2: OGM2 structure
602604 * @orig_node: Originator structure for which the OGM has been received
603− * @neigh_node: the neigh_node through with the OGM has been received
605+ * @neigh_node: the neigh_node through which the OGM has been received
604606 * @if_incoming: the interface where this packet was received
605607 * @if_outgoing: the interface for which the packet should be considered
606608 *
@@ -684,7 +686,7 @@ out: · 77 unmodified lines
684686 * @ethhdr: the Ethernet header of the OGM2
685687 * @ogm2: OGM2 structure
686688 * @orig_node: Originator structure for which the OGM has been received
687− * @neigh_node: the neigh_node through with the OGM has been received
689+ * @neigh_node: the neigh_node through which the OGM has been received
688690 * @if_incoming: the interface where this packet was received
689691 * @if_outgoing: the interface for which the packet should be considered
690692 *
@@ -779,7 +781,7 @@ out: · 88 unmodified lines
779781 * @ethhdr: the Ethernet header of the OGM2
780782 * @ogm2: OGM2 structure
781783 * @orig_node: Originator structure for which the OGM has been received
782− * @neigh_node: the neigh_node through with the OGM has been received
784+ * @neigh_node: the neigh_node through which the OGM has been received
783785 * @if_incoming: the interface where this packet was received
784786 * @if_outgoing: the interface for which the packet should be considered
785787 */
@@ -982,7 +984,7 @@ out: · 196 unmodified lines
982984 * @if_incoming: the interface where this OGM has been received
983985 *
984986 * Return: NET_RX_SUCCESS and consume the skb on success or returns NET_RX_DROP
985− * (without freeing the skb) on failure
987+ * (freeing the skb) on failure
986988 */
987989 int batadv_v_ogm_packet_recv(struct sk_buff *skb,
988990 struct batadv_hard_iface *if_incoming)
@@ -1080,7 +1082,7 @@ int batadv_v_ogm_init(struct batadv_priv *bat_priv) · 91 unmodified lines
10801082 */
10811083 void batadv_v_ogm_free(struct batadv_priv *bat_priv)
10821084 {
1083− cancel_delayed_work_sync(&bat_priv->bat_v.ogm_wq);
1085+ disable_delayed_work_sync(&bat_priv->bat_v.ogm_wq);
10841086
10851087 mutex_lock(&bat_priv->bat_v.ogm_buff_mutex);
10861088
net/batman-adv/bitarray.c+1−1
@@ -24,7 +24,7 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, s32 n) · 23 unmodified lines
2424 * batadv_bit_get_packet() - receive and process one packet within the sequence
2525 * number window
2626 * @priv: the bat priv with all the mesh interface information
27− * @seq_bits: pointer to the sequence number receive packet
27+ * @seq_bits: pointer to the sequence number bitmap of received packets
2828 * @seq_num_diff: difference between the current/received sequence number and
2929 * the last sequence number
3030 * @set_mark: whether this packet should be marked in seq_bits
net/batman-adv/bitarray.h+1−1
@@ -17,7 +17,7 @@ · 16 unmodified lines
1717 /**
1818 * batadv_test_bit() - check if bit is set in the current window
1919 *
20− * @seq_bits: pointer to the sequence number receive packet
20+ * @seq_bits: pointer to the sequence number bitmap of received packets
2121 * @last_seqno: latest sequence number in seq_bits
2222 * @curr_seqno: sequence number to test for
2323 *
net/batman-adv/bridge_loop_avoidance.c+3−3
@@ -123,7 +123,7 @@ static bool batadv_compare_backbone_gw(const struct hlist_node *node, · 122 unmodified lines
123123 * @node: list node of the first entry to compare
124124 * @data2: pointer to the second claims
125125 *
126− * Return: true if the claim have the same data, 0 otherwise
126+ * Return: true if the claims have the same data, false otherwise
127127 */
128128 static bool batadv_compare_claim(const struct hlist_node *node,
129129 const void *data2)
@@ -1282,7 +1282,7 @@ purge_now: · 1152 unmodified lines
12821282
12831283 if (purged) {
12841284 /* reference for pending report_work */
1285− if (cancel_work_sync(&backbone_gw->report_work))
1285+ if (disable_work_sync(&backbone_gw->report_work))
12861286 batadv_backbone_gw_put(backbone_gw);
12871287
12881288 /* reference for hash_entry */
@@ -1850,7 +1850,7 @@ void batadv_bla_free(struct batadv_priv *bat_priv) · 561 unmodified lines
18501850 {
18511851 struct batadv_hard_iface *primary_if;
18521852
1853− cancel_delayed_work_sync(&bat_priv->bla.work);
1853+ disable_delayed_work_sync(&bat_priv->bla.work);
18541854 primary_if = batadv_primary_if_get_selected(bat_priv);
18551855
18561856 if (bat_priv->bla.claim_hash) {
net/batman-adv/bridge_loop_avoidance.h+1−1
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 * detect frame sent by bridge loop avoidance
2222 * @mac: mac address to check
2323 *
24− * Return: true if the it looks like a loop detect frame
24+ * Return: true if it looks like a loop detect frame
2525 * (mac starts with BA:BE), false otherwise
2626 */
2727 static inline bool batadv_bla_is_loopdetect_mac(const uint8_t *mac)
net/batman-adv/distributed-arp-table.c+1−1
@@ -838,7 +838,7 @@ void batadv_dat_free(struct batadv_priv *bat_priv) · 837 unmodified lines
838838 batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_DAT, 1);
839839 batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_DAT, 1);
840840
841− cancel_delayed_work_sync(&bat_priv->dat.work);
841+ disable_delayed_work_sync(&bat_priv->dat.work);
842842
843843 batadv_dat_hash_free(bat_priv);
844844 }
net/batman-adv/fragmentation.c+2−1
@@ -309,7 +309,8 @@ free: · 308 unmodified lines
309309 * batadv_skb_is_frag() - check if newly merged skb contains unicast fragment
310310 * @skb: newly merged skb
311311 *
312− * Return: if newly merged skb is of type BATADV_UNICAST_FRAG
312+ * Return: true if the newly merged skb is of type BATADV_UNICAST_FRAG, false
313+ * otherwise
313314 */
314315 static bool batadv_skb_is_frag(struct sk_buff *skb)
315316 {
net/batman-adv/hard-interface.c+9−6
@@ -971,9 +971,9 @@ static int batadv_hard_if_event_meshif(unsigned long event, · 970 unmodified lines
971971 /**
972972 * batadv_wifi_net_device_insert() - save information about wifi net_device
973973 * @net_dev: net_device to add to batadv_wifi_net_devices
974− * @wifi_flags: net_device which generated an event
974+ * @wifi_flags: extracted batadv_hard_iface_wifi_flags of a net_device
975975 *
976− * Return: 0 on result, negative value on error
976+ * Return: 0 on success, negative value on error
977977 */
978978 static int
979979 batadv_wifi_net_device_insert(struct net_device *net_dev, u32 wifi_flags)
@@ -983,12 +983,11 @@ batadv_wifi_net_device_insert(struct net_device *net_dev, u32 wifi_flags) · 3 unmodified lines
983983
984984 ASSERT_RTNL();
985985
986− device_state = kzalloc_obj(*device_state, GFP_ATOMIC);
986+ device_state = kzalloc_obj(*device_state, GFP_KERNEL);
987987 if (!device_state)
988988 return -ENOMEM;
989989
990− device_state->wifi_flags = wifi_flags;
991− netdev_hold(net_dev, &device_state->dev_tracker, GFP_ATOMIC);
990+ netdev_hold(net_dev, &device_state->dev_tracker, GFP_KERNEL);
992991 device_state->netdev = net_dev;
993992 WRITE_ONCE(device_state->wifi_flags, wifi_flags);
994993
@@ -1007,7 +1006,7 @@ err_free: · 12 unmodified lines
10071006
10081007 /**
10091008 * batadv_wifi_net_device_remove() - remove information about wifi net_device
1010− * @device_state: wifi net_device state to remove from batadv_wifi_net_device_state
1009+ * @device_state: wifi net_device state to remove from batadv_wifi_net_devices
10111010 */
10121011 static void
10131012 batadv_wifi_net_device_remove(struct batadv_wifi_net_device_state *device_state)
@@ -1186,5 +1185,9 @@ int __init batadv_wifi_net_devices_init(void) · 172 unmodified lines
11861185 */
11871186 void batadv_wifi_net_devices_deinit(void)
11881187 {
1188+ /* just destroy table. entries should have been removed by
1189+ * unregister_netdevice_notifier() and the corresponding
1190+ * NETDEV_UNREGISTER events
1191+ */
11891192 rhashtable_destroy(&batadv_wifi_net_devices);
11901193 }
net/batman-adv/hard-interface.h+2−2
@@ -126,7 +126,7 @@ out: · 125 unmodified lines
126126 /**
127127 * batadv_is_cfg80211() - check if the given hardif is a cfg80211
128128 * wifi interface
129− * @wifi_flags: extracted batadv_hard_iface_wifi_flagss of an net_device
129+ * @wifi_flags: extracted batadv_hard_iface_wifi_flags of a net_device
130130 *
131131 * Return: true if the net device is a cfg80211 wireless device, false
132132 * otherwise.
@@ -143,7 +143,7 @@ static inline bool batadv_is_cfg80211(u32 wifi_flags) · 10 unmodified lines
143143
144144 /**
145145 * batadv_is_wifi() - check if flags belong to wifi interface
146− * @wifi_flags: extracted batadv_hard_iface_wifi_flagss of an net_device
146+ * @wifi_flags: extracted batadv_hard_iface_wifi_flags of a net_device
147147 *
148148 * Return: true if the net device is a 802.11 wireless device, false otherwise.
149149 */
net/batman-adv/hash.h+2−2
@@ -120,10 +120,10 @@ out: · 119 unmodified lines
120120 * @choose: callback calculating the hash index
121121 * @data: data passed to the aforementioned callbacks as argument
122122 *
123− * ata could be the structure you use with just the key filled, we just need
123+ * data could be the structure you use with just the key filled, we just need
124124 * the key for comparing.
125125 *
126− * Return: returns pointer do data on success, so you can remove the used
126+ * Return: returns pointer to data on success, so you can remove the used
127127 * structure yourself, or NULL on error
128128 */
129129 static inline void *batadv_hash_remove(struct batadv_hashtable *hash,
net/batman-adv/mesh-interface.c+3−3
@@ -392,13 +392,13 @@ end: · 391 unmodified lines
392392 * @orig_node: originator from which the batman-adv packet was sent
393393 *
394394 * Sends an ethernet frame to the receive path of the local @mesh_iface.
395− * skb->data has still point to the batman-adv header with the size @hdr_size.
395+ * skb->data must still point to the batman-adv header with the size @hdr_size.
396396 * The caller has to have parsed this header already and made sure that at least
397397 * @hdr_size bytes are still available for pull in @skb.
398398 *
399399 * The packet may still get dropped. This can happen when the encapsulated
400− * ethernet frame is invalid or contains again an batman-adv packet. Also
401− * unicast packets will be dropped directly when it was sent between two
400+ * ethernet frame is invalid or contains again a batman-adv packet. Also
401+ * unicast packets will be dropped directly when they were sent between two
402402 * isolated clients.
403403 */
404404 void batadv_interface_rx(struct net_device *mesh_iface,
net/batman-adv/multicast.c+1−1
@@ -2161,7 +2161,7 @@ int batadv_mcast_flags_dump(struct sk_buff *msg, struct netlink_callback *cb) · 2160 unmodified lines
21612161 */
21622162 void batadv_mcast_free(struct batadv_priv *bat_priv)
21632163 {
2164− cancel_delayed_work_sync(&bat_priv->mcast.work);
2164+ disable_delayed_work_sync(&bat_priv->mcast.work);
21652165
21662166 batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_MCAST, 2);
21672167 batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_MCAST_TRACKER, 1);
net/batman-adv/netlink.c+2−2
@@ -944,7 +944,7 @@ static int batadv_netlink_set_hardif(struct sk_buff *skb, · 943 unmodified lines
944944 }
945945
946946 /**
947− * batadv_netlink_dump_hardif() - Dump all hard interface into a messages
947+ * batadv_netlink_dump_hardif() - Dump all hard interfaces into a message
948948 * @msg: Netlink message to dump into
949949 * @cb: Parameters from query
950950 *
@@ -1101,7 +1101,7 @@ static int batadv_netlink_get_vlan(struct sk_buff *skb, struct genl_info *info) · 150 unmodified lines
11011101 }
11021102
11031103 /**
1104− * batadv_netlink_set_vlan() - Get vlan attributes
1104+ * batadv_netlink_set_vlan() - Set vlan attributes
11051105 * @skb: Netlink message with request data
11061106 * @info: receiver information
11071107 *
net/batman-adv/originator.c+3−3
@@ -439,7 +439,7 @@ out: · 438 unmodified lines
439439 }
440440
441441 /**
442− * batadv_neigh_ifinfo_get() - find the ifinfo from an neigh_node
442+ * batadv_neigh_ifinfo_get() - find the ifinfo from a neigh_node
443443 * @neigh: the neigh node to be queried
444444 * @if_outgoing: the interface for which the ifinfo should be acquired
445445 *
@@ -472,7 +472,7 @@ batadv_neigh_ifinfo_get(struct batadv_neigh_node *neigh, · 26 unmodified lines
472472 }
473473
474474 /**
475− * batadv_neigh_ifinfo_new() - search and possibly create an neigh_ifinfo object
475+ * batadv_neigh_ifinfo_new() - search and possibly create a neigh_ifinfo object
476476 * @neigh: the neigh node to be queried
477477 * @if_outgoing: the interface for which the ifinfo should be acquired
478478 *
@@ -908,7 +908,7 @@ void batadv_originator_free(struct batadv_priv *bat_priv) · 429 unmodified lines
908908 if (!hash)
909909 return;
910910
911− cancel_delayed_work_sync(&bat_priv->orig_work);
911+ disable_delayed_work_sync(&bat_priv->orig_work);
912912
913913 bat_priv->orig_hash = NULL;
914914
net/batman-adv/send.c+1−1
@@ -629,7 +629,7 @@ static void batadv_forw_packet_list_free(struct hlist_head *head) · 628 unmodified lines
629629
630630 hlist_for_each_entry_safe(forw_packet, safe_tmp_node, head,
631631 cleanup_list) {
632− cancel_delayed_work_sync(&forw_packet->delayed_work);
632+ disable_delayed_work_sync(&forw_packet->delayed_work);
633633
634634 hlist_del(&forw_packet->cleanup_list);
635635 batadv_forw_packet_free(forw_packet, true);
net/batman-adv/tp_meter.c+16−12
@@ -289,7 +289,7 @@ batadv_tp_list_find_sender(struct batadv_priv *bat_priv, const u8 *dst) · 288 unmodified lines
289289 * @bat_priv: the bat priv with all the mesh interface information
290290 * @dst: the other endpoint MAC address to look for
291291 *
292− * Return: if matching session with @dst was found
292+ * Return: true if a matching session with @dst was found, false otherwise
293293 */
294294 static bool batadv_tp_list_active(struct batadv_priv *bat_priv, const u8 *dst)
295295 __must_hold(&bat_priv->tp_list_lock)
@@ -355,7 +355,7 @@ batadv_tp_list_find_sender_session(struct batadv_priv *bat_priv, const u8 *dst, · 59 unmodified lines
355355 /**
356356 * batadv_tp_vars_common_release() - release batadv_tp_vars_common from lists
357357 * and queue for free after rcu grace period
358− * @ref: kref pointer of the batadv_tp_vars
358+ * @ref: kref pointer of the batadv_tp_vars_common
359359 */
360360 static void batadv_tp_vars_common_release(struct kref *ref)
361361 {
@@ -391,7 +391,7 @@ static void batadv_tp_sender_put(struct batadv_tp_sender *tp_vars) · 29 unmodified lines
391391 }
392392
393393 /**
394− * batadv_tp_list_detach() - remove tp receiver session from mesh session list once
394+ * batadv_tp_list_detach() - remove tp session from mesh session list once
395395 * @tp_vars: the private data of the current TP meter session
396396 *
397397 * Return: whether tp_vars was detached from list and reference must be freed
@@ -421,7 +421,7 @@ static bool batadv_tp_list_detach(struct batadv_tp_vars_common *tp_vars) · 23 unmodified lines
421421 */
422422 static void batadv_tp_sender_cleanup(struct batadv_tp_sender *tp_vars)
423423 {
424− cancel_delayed_work_sync(&tp_vars->finish_work);
424+ disable_delayed_work_sync(&tp_vars->finish_work);
425425
426426 if (batadv_tp_list_detach(&tp_vars->common))
427427 batadv_tp_sender_put(tp_vars);
@@ -509,7 +509,7 @@ static void batadv_tp_sender_finish(struct work_struct *work) · 81 unmodified lines
509509 * batadv_tp_reset_sender_timer() - reschedule the sender timer
510510 * @tp_vars: the private TP meter data for this session
511511 *
512− * Reschedule the timer using tp_vars->rto as delay
512+ * Reschedule the timer using tp_vars->cc.rto as delay
513513 */
514514 static void batadv_tp_reset_sender_timer(struct batadv_tp_sender *tp_vars)
515515 {
@@ -621,9 +621,9 @@ static void batadv_tp_fill_prerandom(struct batadv_tp_sender *tp_vars, · 105 unmodified lines
621621 *
622622 * Create and send a single TP Meter message.
623623 *
624− * Return: 0 on success, BATADV_TP_REASON_DST_UNREACHABLE if the destination is
625− * not reachable, BATADV_TP_REASON_MEMORY_ERROR if the packet couldn't be
626− * allocated
624+ * Return: 0 on success, BATADV_TP_REASON_MEMORY_ERROR if the packet couldn't
625+ * be allocated, BATADV_TP_REASON_CANT_SEND if the packet could not be
626+ * transmitted
627627 */
628628 static int batadv_tp_send_msg(struct batadv_tp_sender *tp_vars, const u8 *src,
629629 struct batadv_orig_node *orig_node,
@@ -913,7 +913,7 @@ static int batadv_tp_wait_available(struct batadv_tp_sender *tp_vars, size_t ple · 283 unmodified lines
913913 * batadv_tp_send() - main sending thread of a tp meter session
914914 * @arg: address of the related tp_vars
915915 *
916− * Return: nothing, this function never returns
916+ * Return: 0
917917 */
918918 static int batadv_tp_send(void *arg)
919919 {
@@ -1511,8 +1511,10 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv, · 591 unmodified lines
15111511
15121512 tp_vars = batadv_tp_list_find_receiver_session(bat_priv, icmp->orig,
15131513 icmp->session);
1514− if (tp_vars)
1514+ if (tp_vars) {
1515+ tp_vars->last_recv_time = jiffies;
15151516 goto out_unlock;
1517+ }
15161518
15171519 if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM)) {
15181520 batadv_dbg(BATADV_DBG_TP_METER, bat_priv,
@@ -1539,6 +1541,8 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv, · 20 unmodified lines
15391541 kref_get(&tp_vars->common.refcount);
15401542 timer_setup(&tp_vars->common.timer, batadv_tp_receiver_shutdown, 0);
15411543
1544+ tp_vars->last_recv_time = jiffies;
1545+
15421546 kref_get(&tp_vars->common.refcount);
15431547 hlist_add_head_rcu(&tp_vars->common.list, &bat_priv->tp_receiver_list);
15441548
@@ -1587,9 +1591,9 @@ static void batadv_tp_recv_msg(struct batadv_priv *bat_priv, · 42 unmodified lines
15871591 icmp->orig);
15881592 goto out;
15891593 }
1590− }
15911594
1592− tp_vars->last_recv_time = jiffies;
1595+ tp_vars->last_recv_time = jiffies;
1596+ }
15931597
15941598 /* if the packet is a duplicate, it may be the case that an ACK has been
15951599 * lost. Resend the ACK
net/batman-adv/translation-table.c+1−1
@@ -3574,7 +3574,7 @@ void batadv_tt_free(struct batadv_priv *bat_priv) · 3573 unmodified lines
35743574 batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_TT, 1);
35753575 batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_TT, 1);
35763576
3577− cancel_delayed_work_sync(&bat_priv->tt.work);
3577+ disable_delayed_work_sync(&bat_priv->tt.work);
35783578
35793579 batadv_tt_local_table_free(bat_priv);
35803580 batadv_tt_global_table_free(bat_priv);
net/batman-adv/tvlv.c+2−2
@@ -48,7 +48,7 @@ static void batadv_tvlv_handler_release(struct kref *ref) · 47 unmodified lines
4848 }
4949
5050 /**
51− * batadv_tvlv_handler_put() - decrement the tvlv container refcounter and
51+ * batadv_tvlv_handler_put() - decrement the tvlv handler refcounter and
5252 * possibly release it
5353 * @tvlv_handler: the tvlv handler to free
5454 */
@@ -272,7 +272,7 @@ void batadv_tvlv_container_register(struct batadv_priv *bat_priv, · 217 unmodified lines
272272 * @additional_packet_len: requested additional packet size on top of minimum
273273 * size
274274 *
275− * Return: true of the packet buffer could be changed to the requested size,
275+ * Return: true if the packet buffer could be changed to the requested size,
276276 * false otherwise.
277277 */
278278 static bool batadv_tvlv_realloc_packet_buff(struct batadv_ogm_buf *ogm_buff,
net/batman-adv/types.h+15−9
@@ -1331,7 +1331,7 @@ struct batadv_tp_unacked { · 1330 unmodified lines
13311331 /** @len: length of the packet */
13321332 u16 len;
13331333
1334− /** @list: list node for &batadv_tp_vars.unacked_list */
1334+ /** @list: list node for &batadv_tp_vars_common.unacked_list */
13351335 struct list_head list;
13361336 };
13371337
@@ -1367,7 +1367,9 @@ struct batadv_tp_vars_common { · 29 unmodified lines
13671367 struct rcu_head rcu;
13681368 };
13691369
1370−/** struct batadv_tp_sender_cc - congestion control variables */
1370+/**
1371+ * struct batadv_tp_sender_cc - congestion control variables
1372+ */
13711373 struct batadv_tp_sender_cc {
13721374 /** @fast_recovery: true if in Fast Recovery mode */
13731375 bool fast_recovery:1;
@@ -1410,7 +1412,7 @@ struct batadv_tp_sender_cc { · 36 unmodified lines
14101412 * struct batadv_tp_sender - sender tp meter private variables per session
14111413 */
14121414 struct batadv_tp_sender {
1413− /** @common: common batadv_tp_vars (best be first member) */
1415+ /** @common: common batadv_tp_vars_common (must be first member) */
14141416 struct batadv_tp_vars_common common;
14151417
14161418 /** @start_time: start time in jiffies */
@@ -1437,7 +1439,7 @@ struct batadv_tp_sender { · 20 unmodified lines
14371439 /** @cc: congestion control variables */
14381440 struct batadv_tp_sender_cc cc;
14391441
1440− /** @cc_lock: lock do protect @cc */
1442+ /** @cc_lock: lock to protect @cc */
14411443 spinlock_t cc_lock;
14421444
14431445 /** @tot_sent: amount of data sent/ACKed so far */
@@ -1460,7 +1462,7 @@ struct batadv_tp_sender { · 16 unmodified lines
14601462 * struct batadv_tp_receiver - receiver tp meter private variables per session
14611463 */
14621464 struct batadv_tp_receiver {
1463− /** @common: common batadv_tp_vars (best be first member) */
1465+ /** @common: common batadv_tp_vars_common (must be first member) */
14641466 struct batadv_tp_vars_common common;
14651467
14661468 /** @receiving: receiving binary semaphore: 1 if receiving, 0 is not */
@@ -1662,7 +1664,7 @@ struct batadv_priv { · 195 unmodified lines
16621664 /** @forw_bcast_list_lock: lock protecting forw_bcast_list */
16631665 spinlock_t forw_bcast_list_lock;
16641666
1665− /** @tp_list_lock: spinlock protecting @tp_list */
1667+ /** @tp_list_lock: spinlock protecting @tp_sender_list + @tp_receiver_list */
16661668 spinlock_t tp_list_lock;
16671669
16681670 /** @tp_num: number of currently active tp sessions */
@@ -1721,22 +1723,26 @@ struct batadv_priv { · 52 unmodified lines
17211723
17221724 #ifdef CONFIG_BATMAN_ADV_BLA
17231725
1726+/**
1727+ * enum batadv_bla_backbone_gw_state - state of a bridge loop avoidance
1728+ * backbone gateway
1729+ */
17241730 enum batadv_bla_backbone_gw_state {
17251731 /**
17261732 * @BATADV_BLA_BACKBONE_GW_STOPPED: backbone gw is being removed
1727− * and it must not longer work on requests
1733+ * and it must no longer work on requests
17281734 */
17291735 BATADV_BLA_BACKBONE_GW_STOPPED,
17301736
17311737 /**
17321738 * @BATADV_BLA_BACKBONE_GW_UNSYNCED: backbone was detected out
1733− * of sync and a request was send. No traffic is forwarded until the
1739+ * of sync and a request was sent. No traffic is forwarded until the
17341740 * situation is resolved
17351741 */
17361742 BATADV_BLA_BACKBONE_GW_UNSYNCED,
17371743
17381744 /**
1739− * @BATADV_BLA_BACKBONE_GW_SYNCED: backbone is consider to be in
1745+ * @BATADV_BLA_BACKBONE_GW_SYNCED: backbone is considered to be in
17401746 * sync. traffic can be forwarded
17411747 */
17421748 BATADV_BLA_BACKBONE_GW_SYNCED,