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 ====================
Unified · Split
| @@ -518,16 +518,16 @@ struct batadv_mcast_packet { · 517 unmodified lines | ||
| 518 | 518 | * @packet_type: batman-adv packet type, part of the general header |
| 519 | 519 | * @version: batman-adv protocol version, part of the general header |
| 520 | 520 | * @ttl: time to live for this packet, part of the general header |
| 521 | + * @first_ttvn: tt-version number of first included packet | |
| 521 | 522 | * @first_source: original source of first included packet |
| 522 | 523 | * @first_orig_dest: original destination of first included packet |
| 523 | 524 | * @first_crc: checksum of first included packet |
| 524 | − * @first_ttvn: tt-version number of first included packet | |
| 525 | 525 | * @second_ttl: ttl of second packet |
| 526 | + * @second_ttvn: tt version number of second included packet | |
| 526 | 527 | * @second_dest: second receiver of this coded packet |
| 527 | 528 | * @second_source: original source of second included packet |
| 528 | 529 | * @second_orig_dest: original destination of second included packet |
| 529 | 530 | * @second_crc: checksum of second included packet |
| 530 | − * @second_ttvn: tt version number of second included packet | |
| 531 | 531 | * @coded_len: length of network coded part of the payload |
| 532 | 532 | */ |
| 533 | 533 | struct batadv_coded_packet { |
| @@ -554,8 +554,8 @@ struct batadv_coded_packet { · 20 unmodified lines | ||
| 554 | 554 | * @version: batman-adv protocol version, part of the general header |
| 555 | 555 | * @ttl: time to live for this packet, part of the general header |
| 556 | 556 | * @reserved: reserved field (for packet alignment) |
| 557 | − * @src: address of the source | |
| 558 | 557 | * @dst: address of the destination |
| 558 | + * @src: address of the source | |
| 559 | 559 | * @tvlv_len: length of tvlv data following the unicast tvlv header |
| 560 | 560 | * @align: 2 bytes to align the header to a 4 byte boundary |
| 561 | 561 | */ |
| @@ -230,7 +230,7 @@ static void batadv_iv_ogm_iface_disable(struct batadv_hard_iface *hard_iface) · 229 unmodified lines | ||
| 230 | 230 | |
| 231 | 231 | mutex_unlock(&hard_iface->bat_iv.ogm_buff_mutex); |
| 232 | 232 | |
| 233 | − cancel_delayed_work_sync(&hard_iface->bat_iv.reschedule_work); | |
| 233 | + disable_delayed_work_sync(&hard_iface->bat_iv.reschedule_work); | |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | static void batadv_iv_ogm_iface_update_mac(struct batadv_hard_iface *hard_iface) |
| @@ -587,7 +587,7 @@ next: · 586 unmodified lines | ||
| 587 | 587 | } |
| 588 | 588 | |
| 589 | 589 | /** |
| 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 | |
| 591 | 591 | * @bat_priv: the bat priv with all the mesh interface information |
| 592 | 592 | * @curr_gw_orig: originator representing the currently selected GW |
| 593 | 593 | * @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 | ||
| 819 | 819 | skb_queue_head_init(&hard_iface->bat_v.aggr_list); |
| 820 | 820 | INIT_DELAYED_WORK(&hard_iface->bat_v.aggr_wq, |
| 821 | 821 | 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); | |
| 822 | 824 | } |
| 823 | 825 | |
| 824 | 826 | /** |
| @@ -115,7 +115,7 @@ static bool batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh, · 114 unmodified lines | ||
| 115 | 115 | goto default_throughput; |
| 116 | 116 | |
| 117 | 117 | /* 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 | |
| 119 | 119 | * wait forever when the elp work_item was started and it is then also |
| 120 | 120 | * trying to rtnl_lock |
| 121 | 121 | */ |
| @@ -162,7 +162,7 @@ static bool batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh, · 40 unmodified lines | ||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /* 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 | |
| 166 | 166 | * wait forever when the elp work_item was started and it is then also |
| 167 | 167 | * trying to rtnl_lock |
| 168 | 168 | */ |
| @@ -447,7 +447,7 @@ out: · 278 unmodified lines | ||
| 447 | 447 | */ |
| 448 | 448 | void batadv_v_elp_iface_disable(struct batadv_hard_iface *hard_iface) |
| 449 | 449 | { |
| 450 | − cancel_delayed_work_sync(&hard_iface->bat_v.elp_wq); | |
| 450 | + disable_delayed_work_sync(&hard_iface->bat_v.elp_wq); | |
| 451 | 451 | |
| 452 | 452 | dev_kfree_skb(hard_iface->bat_v.elp_skb); |
| 453 | 453 | hard_iface->bat_v.elp_skb = NULL; |
| @@ -415,6 +415,8 @@ int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface) · 414 unmodified lines | ||
| 415 | 415 | { |
| 416 | 416 | struct batadv_priv *bat_priv = netdev_priv(hard_iface->mesh_iface); |
| 417 | 417 | |
| 418 | + enable_delayed_work(&hard_iface->bat_v.aggr_wq); | |
| 419 | + | |
| 418 | 420 | batadv_v_ogm_start_queue_timer(hard_iface); |
| 419 | 421 | batadv_v_ogm_start_timer(bat_priv); |
| 420 | 422 | |
| @@ -427,7 +429,7 @@ int batadv_v_ogm_iface_enable(struct batadv_hard_iface *hard_iface) · 6 unmodified lines | ||
| 427 | 429 | */ |
| 428 | 430 | void batadv_v_ogm_iface_disable(struct batadv_hard_iface *hard_iface) |
| 429 | 431 | { |
| 430 | − cancel_delayed_work_sync(&hard_iface->bat_v.aggr_wq); | |
| 432 | + disable_delayed_work_sync(&hard_iface->bat_v.aggr_wq); | |
| 431 | 433 | |
| 432 | 434 | spin_lock_bh(&hard_iface->bat_v.aggr_list.lock); |
| 433 | 435 | 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 | ||
| 513 | 515 | * @bat_priv: the bat priv with all the mesh interface information |
| 514 | 516 | * @ogm_received: previously received OGM to be forwarded |
| 515 | 517 | * @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 | |
| 517 | 519 | * @if_incoming: the interface on which this OGM was received on |
| 518 | 520 | * @if_outgoing: the interface to which the OGM has to be forwarded to |
| 519 | 521 | * |
| @@ -600,7 +602,7 @@ out: · 80 unmodified lines | ||
| 600 | 602 | * @bat_priv: the bat priv with all the mesh interface information |
| 601 | 603 | * @ogm2: OGM2 structure |
| 602 | 604 | * @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 | |
| 604 | 606 | * @if_incoming: the interface where this packet was received |
| 605 | 607 | * @if_outgoing: the interface for which the packet should be considered |
| 606 | 608 | * |
| @@ -684,7 +686,7 @@ out: · 77 unmodified lines | ||
| 684 | 686 | * @ethhdr: the Ethernet header of the OGM2 |
| 685 | 687 | * @ogm2: OGM2 structure |
| 686 | 688 | * @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 | |
| 688 | 690 | * @if_incoming: the interface where this packet was received |
| 689 | 691 | * @if_outgoing: the interface for which the packet should be considered |
| 690 | 692 | * |
| @@ -779,7 +781,7 @@ out: · 88 unmodified lines | ||
| 779 | 781 | * @ethhdr: the Ethernet header of the OGM2 |
| 780 | 782 | * @ogm2: OGM2 structure |
| 781 | 783 | * @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 | |
| 783 | 785 | * @if_incoming: the interface where this packet was received |
| 784 | 786 | * @if_outgoing: the interface for which the packet should be considered |
| 785 | 787 | */ |
| @@ -982,7 +984,7 @@ out: · 196 unmodified lines | ||
| 982 | 984 | * @if_incoming: the interface where this OGM has been received |
| 983 | 985 | * |
| 984 | 986 | * 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 | |
| 986 | 988 | */ |
| 987 | 989 | int batadv_v_ogm_packet_recv(struct sk_buff *skb, |
| 988 | 990 | struct batadv_hard_iface *if_incoming) |
| @@ -1080,7 +1082,7 @@ int batadv_v_ogm_init(struct batadv_priv *bat_priv) · 91 unmodified lines | ||
| 1080 | 1082 | */ |
| 1081 | 1083 | void batadv_v_ogm_free(struct batadv_priv *bat_priv) |
| 1082 | 1084 | { |
| 1083 | − cancel_delayed_work_sync(&bat_priv->bat_v.ogm_wq); | |
| 1085 | + disable_delayed_work_sync(&bat_priv->bat_v.ogm_wq); | |
| 1084 | 1086 | |
| 1085 | 1087 | mutex_lock(&bat_priv->bat_v.ogm_buff_mutex); |
| 1086 | 1088 | |
| @@ -24,7 +24,7 @@ static void batadv_bitmap_shift_left(unsigned long *seq_bits, s32 n) · 23 unmodified lines | ||
| 24 | 24 | * batadv_bit_get_packet() - receive and process one packet within the sequence |
| 25 | 25 | * number window |
| 26 | 26 | * @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 | |
| 28 | 28 | * @seq_num_diff: difference between the current/received sequence number and |
| 29 | 29 | * the last sequence number |
| 30 | 30 | * @set_mark: whether this packet should be marked in seq_bits |
| @@ -17,7 +17,7 @@ · 16 unmodified lines | ||
| 17 | 17 | /** |
| 18 | 18 | * batadv_test_bit() - check if bit is set in the current window |
| 19 | 19 | * |
| 20 | − * @seq_bits: pointer to the sequence number receive packet | |
| 20 | + * @seq_bits: pointer to the sequence number bitmap of received packets | |
| 21 | 21 | * @last_seqno: latest sequence number in seq_bits |
| 22 | 22 | * @curr_seqno: sequence number to test for |
| 23 | 23 | * |
| @@ -123,7 +123,7 @@ static bool batadv_compare_backbone_gw(const struct hlist_node *node, · 122 unmodified lines | ||
| 123 | 123 | * @node: list node of the first entry to compare |
| 124 | 124 | * @data2: pointer to the second claims |
| 125 | 125 | * |
| 126 | − * Return: true if the claim have the same data, 0 otherwise | |
| 126 | + * Return: true if the claims have the same data, false otherwise | |
| 127 | 127 | */ |
| 128 | 128 | static bool batadv_compare_claim(const struct hlist_node *node, |
| 129 | 129 | const void *data2) |
| @@ -1282,7 +1282,7 @@ purge_now: · 1152 unmodified lines | ||
| 1282 | 1282 | |
| 1283 | 1283 | if (purged) { |
| 1284 | 1284 | /* reference for pending report_work */ |
| 1285 | − if (cancel_work_sync(&backbone_gw->report_work)) | |
| 1285 | + if (disable_work_sync(&backbone_gw->report_work)) | |
| 1286 | 1286 | batadv_backbone_gw_put(backbone_gw); |
| 1287 | 1287 | |
| 1288 | 1288 | /* reference for hash_entry */ |
| @@ -1850,7 +1850,7 @@ void batadv_bla_free(struct batadv_priv *bat_priv) · 561 unmodified lines | ||
| 1850 | 1850 | { |
| 1851 | 1851 | struct batadv_hard_iface *primary_if; |
| 1852 | 1852 | |
| 1853 | − cancel_delayed_work_sync(&bat_priv->bla.work); | |
| 1853 | + disable_delayed_work_sync(&bat_priv->bla.work); | |
| 1854 | 1854 | primary_if = batadv_primary_if_get_selected(bat_priv); |
| 1855 | 1855 | |
| 1856 | 1856 | if (bat_priv->bla.claim_hash) { |
| @@ -21,7 +21,7 @@ · 20 unmodified lines | ||
| 21 | 21 | * detect frame sent by bridge loop avoidance |
| 22 | 22 | * @mac: mac address to check |
| 23 | 23 | * |
| 24 | − * Return: true if the it looks like a loop detect frame | |
| 24 | + * Return: true if it looks like a loop detect frame | |
| 25 | 25 | * (mac starts with BA:BE), false otherwise |
| 26 | 26 | */ |
| 27 | 27 | static inline bool batadv_bla_is_loopdetect_mac(const uint8_t *mac) |
| @@ -838,7 +838,7 @@ void batadv_dat_free(struct batadv_priv *bat_priv) · 837 unmodified lines | ||
| 838 | 838 | batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_DAT, 1); |
| 839 | 839 | batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_DAT, 1); |
| 840 | 840 | |
| 841 | − cancel_delayed_work_sync(&bat_priv->dat.work); | |
| 841 | + disable_delayed_work_sync(&bat_priv->dat.work); | |
| 842 | 842 | |
| 843 | 843 | batadv_dat_hash_free(bat_priv); |
| 844 | 844 | } |
| @@ -309,7 +309,8 @@ free: · 308 unmodified lines | ||
| 309 | 309 | * batadv_skb_is_frag() - check if newly merged skb contains unicast fragment |
| 310 | 310 | * @skb: newly merged skb |
| 311 | 311 | * |
| 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 | |
| 313 | 314 | */ |
| 314 | 315 | static bool batadv_skb_is_frag(struct sk_buff *skb) |
| 315 | 316 | { |
| @@ -971,9 +971,9 @@ static int batadv_hard_if_event_meshif(unsigned long event, · 970 unmodified lines | ||
| 971 | 971 | /** |
| 972 | 972 | * batadv_wifi_net_device_insert() - save information about wifi net_device |
| 973 | 973 | * @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 | |
| 975 | 975 | * |
| 976 | − * Return: 0 on result, negative value on error | |
| 976 | + * Return: 0 on success, negative value on error | |
| 977 | 977 | */ |
| 978 | 978 | static int |
| 979 | 979 | 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 | ||
| 983 | 983 | |
| 984 | 984 | ASSERT_RTNL(); |
| 985 | 985 | |
| 986 | − device_state = kzalloc_obj(*device_state, GFP_ATOMIC); | |
| 986 | + device_state = kzalloc_obj(*device_state, GFP_KERNEL); | |
| 987 | 987 | if (!device_state) |
| 988 | 988 | return -ENOMEM; |
| 989 | 989 | |
| 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); | |
| 992 | 991 | device_state->netdev = net_dev; |
| 993 | 992 | WRITE_ONCE(device_state->wifi_flags, wifi_flags); |
| 994 | 993 | |
| @@ -1007,7 +1006,7 @@ err_free: · 12 unmodified lines | ||
| 1007 | 1006 | |
| 1008 | 1007 | /** |
| 1009 | 1008 | * 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 | |
| 1011 | 1010 | */ |
| 1012 | 1011 | static void |
| 1013 | 1012 | 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 | ||
| 1186 | 1185 | */ |
| 1187 | 1186 | void batadv_wifi_net_devices_deinit(void) |
| 1188 | 1187 | { |
| 1188 | + /* just destroy table. entries should have been removed by | |
| 1189 | + * unregister_netdevice_notifier() and the corresponding | |
| 1190 | + * NETDEV_UNREGISTER events | |
| 1191 | + */ | |
| 1189 | 1192 | rhashtable_destroy(&batadv_wifi_net_devices); |
| 1190 | 1193 | } |
| @@ -126,7 +126,7 @@ out: · 125 unmodified lines | ||
| 126 | 126 | /** |
| 127 | 127 | * batadv_is_cfg80211() - check if the given hardif is a cfg80211 |
| 128 | 128 | * 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 | |
| 130 | 130 | * |
| 131 | 131 | * Return: true if the net device is a cfg80211 wireless device, false |
| 132 | 132 | * otherwise. |
| @@ -143,7 +143,7 @@ static inline bool batadv_is_cfg80211(u32 wifi_flags) · 10 unmodified lines | ||
| 143 | 143 | |
| 144 | 144 | /** |
| 145 | 145 | * 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 | |
| 147 | 147 | * |
| 148 | 148 | * Return: true if the net device is a 802.11 wireless device, false otherwise. |
| 149 | 149 | */ |
| @@ -120,10 +120,10 @@ out: · 119 unmodified lines | ||
| 120 | 120 | * @choose: callback calculating the hash index |
| 121 | 121 | * @data: data passed to the aforementioned callbacks as argument |
| 122 | 122 | * |
| 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 | |
| 124 | 124 | * the key for comparing. |
| 125 | 125 | * |
| 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 | |
| 127 | 127 | * structure yourself, or NULL on error |
| 128 | 128 | */ |
| 129 | 129 | static inline void *batadv_hash_remove(struct batadv_hashtable *hash, |
| @@ -392,13 +392,13 @@ end: · 391 unmodified lines | ||
| 392 | 392 | * @orig_node: originator from which the batman-adv packet was sent |
| 393 | 393 | * |
| 394 | 394 | * 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. | |
| 396 | 396 | * The caller has to have parsed this header already and made sure that at least |
| 397 | 397 | * @hdr_size bytes are still available for pull in @skb. |
| 398 | 398 | * |
| 399 | 399 | * 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 | |
| 402 | 402 | * isolated clients. |
| 403 | 403 | */ |
| 404 | 404 | void batadv_interface_rx(struct net_device *mesh_iface, |
| @@ -2161,7 +2161,7 @@ int batadv_mcast_flags_dump(struct sk_buff *msg, struct netlink_callback *cb) · 2160 unmodified lines | ||
| 2161 | 2161 | */ |
| 2162 | 2162 | void batadv_mcast_free(struct batadv_priv *bat_priv) |
| 2163 | 2163 | { |
| 2164 | − cancel_delayed_work_sync(&bat_priv->mcast.work); | |
| 2164 | + disable_delayed_work_sync(&bat_priv->mcast.work); | |
| 2165 | 2165 | |
| 2166 | 2166 | batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_MCAST, 2); |
| 2167 | 2167 | batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_MCAST_TRACKER, 1); |
| @@ -944,7 +944,7 @@ static int batadv_netlink_set_hardif(struct sk_buff *skb, · 943 unmodified lines | ||
| 944 | 944 | } |
| 945 | 945 | |
| 946 | 946 | /** |
| 947 | − * batadv_netlink_dump_hardif() - Dump all hard interface into a messages | |
| 947 | + * batadv_netlink_dump_hardif() - Dump all hard interfaces into a message | |
| 948 | 948 | * @msg: Netlink message to dump into |
| 949 | 949 | * @cb: Parameters from query |
| 950 | 950 | * |
| @@ -1101,7 +1101,7 @@ static int batadv_netlink_get_vlan(struct sk_buff *skb, struct genl_info *info) · 150 unmodified lines | ||
| 1101 | 1101 | } |
| 1102 | 1102 | |
| 1103 | 1103 | /** |
| 1104 | − * batadv_netlink_set_vlan() - Get vlan attributes | |
| 1104 | + * batadv_netlink_set_vlan() - Set vlan attributes | |
| 1105 | 1105 | * @skb: Netlink message with request data |
| 1106 | 1106 | * @info: receiver information |
| 1107 | 1107 | * |
| @@ -439,7 +439,7 @@ out: · 438 unmodified lines | ||
| 439 | 439 | } |
| 440 | 440 | |
| 441 | 441 | /** |
| 442 | − * batadv_neigh_ifinfo_get() - find the ifinfo from an neigh_node | |
| 442 | + * batadv_neigh_ifinfo_get() - find the ifinfo from a neigh_node | |
| 443 | 443 | * @neigh: the neigh node to be queried |
| 444 | 444 | * @if_outgoing: the interface for which the ifinfo should be acquired |
| 445 | 445 | * |
| @@ -472,7 +472,7 @@ batadv_neigh_ifinfo_get(struct batadv_neigh_node *neigh, · 26 unmodified lines | ||
| 472 | 472 | } |
| 473 | 473 | |
| 474 | 474 | /** |
| 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 | |
| 476 | 476 | * @neigh: the neigh node to be queried |
| 477 | 477 | * @if_outgoing: the interface for which the ifinfo should be acquired |
| 478 | 478 | * |
| @@ -908,7 +908,7 @@ void batadv_originator_free(struct batadv_priv *bat_priv) · 429 unmodified lines | ||
| 908 | 908 | if (!hash) |
| 909 | 909 | return; |
| 910 | 910 | |
| 911 | − cancel_delayed_work_sync(&bat_priv->orig_work); | |
| 911 | + disable_delayed_work_sync(&bat_priv->orig_work); | |
| 912 | 912 | |
| 913 | 913 | bat_priv->orig_hash = NULL; |
| 914 | 914 | |
| @@ -629,7 +629,7 @@ static void batadv_forw_packet_list_free(struct hlist_head *head) · 628 unmodified lines | ||
| 629 | 629 | |
| 630 | 630 | hlist_for_each_entry_safe(forw_packet, safe_tmp_node, head, |
| 631 | 631 | cleanup_list) { |
| 632 | − cancel_delayed_work_sync(&forw_packet->delayed_work); | |
| 632 | + disable_delayed_work_sync(&forw_packet->delayed_work); | |
| 633 | 633 | |
| 634 | 634 | hlist_del(&forw_packet->cleanup_list); |
| 635 | 635 | batadv_forw_packet_free(forw_packet, true); |
| @@ -289,7 +289,7 @@ batadv_tp_list_find_sender(struct batadv_priv *bat_priv, const u8 *dst) · 288 unmodified lines | ||
| 289 | 289 | * @bat_priv: the bat priv with all the mesh interface information |
| 290 | 290 | * @dst: the other endpoint MAC address to look for |
| 291 | 291 | * |
| 292 | − * Return: if matching session with @dst was found | |
| 292 | + * Return: true if a matching session with @dst was found, false otherwise | |
| 293 | 293 | */ |
| 294 | 294 | static bool batadv_tp_list_active(struct batadv_priv *bat_priv, const u8 *dst) |
| 295 | 295 | __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 | ||
| 355 | 355 | /** |
| 356 | 356 | * batadv_tp_vars_common_release() - release batadv_tp_vars_common from lists |
| 357 | 357 | * 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 | |
| 359 | 359 | */ |
| 360 | 360 | static void batadv_tp_vars_common_release(struct kref *ref) |
| 361 | 361 | { |
| @@ -391,7 +391,7 @@ static void batadv_tp_sender_put(struct batadv_tp_sender *tp_vars) · 29 unmodified lines | ||
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | /** |
| 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 | |
| 395 | 395 | * @tp_vars: the private data of the current TP meter session |
| 396 | 396 | * |
| 397 | 397 | * 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 | ||
| 421 | 421 | */ |
| 422 | 422 | static void batadv_tp_sender_cleanup(struct batadv_tp_sender *tp_vars) |
| 423 | 423 | { |
| 424 | − cancel_delayed_work_sync(&tp_vars->finish_work); | |
| 424 | + disable_delayed_work_sync(&tp_vars->finish_work); | |
| 425 | 425 | |
| 426 | 426 | if (batadv_tp_list_detach(&tp_vars->common)) |
| 427 | 427 | batadv_tp_sender_put(tp_vars); |
| @@ -509,7 +509,7 @@ static void batadv_tp_sender_finish(struct work_struct *work) · 81 unmodified lines | ||
| 509 | 509 | * batadv_tp_reset_sender_timer() - reschedule the sender timer |
| 510 | 510 | * @tp_vars: the private TP meter data for this session |
| 511 | 511 | * |
| 512 | − * Reschedule the timer using tp_vars->rto as delay | |
| 512 | + * Reschedule the timer using tp_vars->cc.rto as delay | |
| 513 | 513 | */ |
| 514 | 514 | static void batadv_tp_reset_sender_timer(struct batadv_tp_sender *tp_vars) |
| 515 | 515 | { |
| @@ -621,9 +621,9 @@ static void batadv_tp_fill_prerandom(struct batadv_tp_sender *tp_vars, · 105 unmodified lines | ||
| 621 | 621 | * |
| 622 | 622 | * Create and send a single TP Meter message. |
| 623 | 623 | * |
| 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 | |
| 627 | 627 | */ |
| 628 | 628 | static int batadv_tp_send_msg(struct batadv_tp_sender *tp_vars, const u8 *src, |
| 629 | 629 | 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 | ||
| 913 | 913 | * batadv_tp_send() - main sending thread of a tp meter session |
| 914 | 914 | * @arg: address of the related tp_vars |
| 915 | 915 | * |
| 916 | − * Return: nothing, this function never returns | |
| 916 | + * Return: 0 | |
| 917 | 917 | */ |
| 918 | 918 | static int batadv_tp_send(void *arg) |
| 919 | 919 | { |
| @@ -1511,8 +1511,10 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv, · 591 unmodified lines | ||
| 1511 | 1511 | |
| 1512 | 1512 | tp_vars = batadv_tp_list_find_receiver_session(bat_priv, icmp->orig, |
| 1513 | 1513 | icmp->session); |
| 1514 | − if (tp_vars) | |
| 1514 | + if (tp_vars) { | |
| 1515 | + tp_vars->last_recv_time = jiffies; | |
| 1515 | 1516 | goto out_unlock; |
| 1517 | + } | |
| 1516 | 1518 | |
| 1517 | 1519 | if (!atomic_add_unless(&bat_priv->tp_num, 1, BATADV_TP_MAX_NUM)) { |
| 1518 | 1520 | batadv_dbg(BATADV_DBG_TP_METER, bat_priv, |
| @@ -1539,6 +1541,8 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv, · 20 unmodified lines | ||
| 1539 | 1541 | kref_get(&tp_vars->common.refcount); |
| 1540 | 1542 | timer_setup(&tp_vars->common.timer, batadv_tp_receiver_shutdown, 0); |
| 1541 | 1543 | |
| 1544 | + tp_vars->last_recv_time = jiffies; | |
| 1545 | + | |
| 1542 | 1546 | kref_get(&tp_vars->common.refcount); |
| 1543 | 1547 | hlist_add_head_rcu(&tp_vars->common.list, &bat_priv->tp_receiver_list); |
| 1544 | 1548 | |
| @@ -1587,9 +1591,9 @@ static void batadv_tp_recv_msg(struct batadv_priv *bat_priv, · 42 unmodified lines | ||
| 1587 | 1591 | icmp->orig); |
| 1588 | 1592 | goto out; |
| 1589 | 1593 | } |
| 1590 | − } | |
| 1591 | 1594 | |
| 1592 | − tp_vars->last_recv_time = jiffies; | |
| 1595 | + tp_vars->last_recv_time = jiffies; | |
| 1596 | + } | |
| 1593 | 1597 | |
| 1594 | 1598 | /* if the packet is a duplicate, it may be the case that an ACK has been |
| 1595 | 1599 | * lost. Resend the ACK |
| @@ -3574,7 +3574,7 @@ void batadv_tt_free(struct batadv_priv *bat_priv) · 3573 unmodified lines | ||
| 3574 | 3574 | batadv_tvlv_container_unregister(bat_priv, BATADV_TVLV_TT, 1); |
| 3575 | 3575 | batadv_tvlv_handler_unregister(bat_priv, BATADV_TVLV_TT, 1); |
| 3576 | 3576 | |
| 3577 | − cancel_delayed_work_sync(&bat_priv->tt.work); | |
| 3577 | + disable_delayed_work_sync(&bat_priv->tt.work); | |
| 3578 | 3578 | |
| 3579 | 3579 | batadv_tt_local_table_free(bat_priv); |
| 3580 | 3580 | batadv_tt_global_table_free(bat_priv); |
| @@ -48,7 +48,7 @@ static void batadv_tvlv_handler_release(struct kref *ref) · 47 unmodified lines | ||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | − * batadv_tvlv_handler_put() - decrement the tvlv container refcounter and | |
| 51 | + * batadv_tvlv_handler_put() - decrement the tvlv handler refcounter and | |
| 52 | 52 | * possibly release it |
| 53 | 53 | * @tvlv_handler: the tvlv handler to free |
| 54 | 54 | */ |
| @@ -272,7 +272,7 @@ void batadv_tvlv_container_register(struct batadv_priv *bat_priv, · 217 unmodified lines | ||
| 272 | 272 | * @additional_packet_len: requested additional packet size on top of minimum |
| 273 | 273 | * size |
| 274 | 274 | * |
| 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, | |
| 276 | 276 | * false otherwise. |
| 277 | 277 | */ |
| 278 | 278 | static bool batadv_tvlv_realloc_packet_buff(struct batadv_ogm_buf *ogm_buff, |
| @@ -1331,7 +1331,7 @@ struct batadv_tp_unacked { · 1330 unmodified lines | ||
| 1331 | 1331 | /** @len: length of the packet */ |
| 1332 | 1332 | u16 len; |
| 1333 | 1333 | |
| 1334 | − /** @list: list node for &batadv_tp_vars.unacked_list */ | |
| 1334 | + /** @list: list node for &batadv_tp_vars_common.unacked_list */ | |
| 1335 | 1335 | struct list_head list; |
| 1336 | 1336 | }; |
| 1337 | 1337 | |
| @@ -1367,7 +1367,9 @@ struct batadv_tp_vars_common { · 29 unmodified lines | ||
| 1367 | 1367 | struct rcu_head rcu; |
| 1368 | 1368 | }; |
| 1369 | 1369 | |
| 1370 | −/** struct batadv_tp_sender_cc - congestion control variables */ | |
| 1370 | +/** | |
| 1371 | + * struct batadv_tp_sender_cc - congestion control variables | |
| 1372 | + */ | |
| 1371 | 1373 | struct batadv_tp_sender_cc { |
| 1372 | 1374 | /** @fast_recovery: true if in Fast Recovery mode */ |
| 1373 | 1375 | bool fast_recovery:1; |
| @@ -1410,7 +1412,7 @@ struct batadv_tp_sender_cc { · 36 unmodified lines | ||
| 1410 | 1412 | * struct batadv_tp_sender - sender tp meter private variables per session |
| 1411 | 1413 | */ |
| 1412 | 1414 | 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) */ | |
| 1414 | 1416 | struct batadv_tp_vars_common common; |
| 1415 | 1417 | |
| 1416 | 1418 | /** @start_time: start time in jiffies */ |
| @@ -1437,7 +1439,7 @@ struct batadv_tp_sender { · 20 unmodified lines | ||
| 1437 | 1439 | /** @cc: congestion control variables */ |
| 1438 | 1440 | struct batadv_tp_sender_cc cc; |
| 1439 | 1441 | |
| 1440 | − /** @cc_lock: lock do protect @cc */ | |
| 1442 | + /** @cc_lock: lock to protect @cc */ | |
| 1441 | 1443 | spinlock_t cc_lock; |
| 1442 | 1444 | |
| 1443 | 1445 | /** @tot_sent: amount of data sent/ACKed so far */ |
| @@ -1460,7 +1462,7 @@ struct batadv_tp_sender { · 16 unmodified lines | ||
| 1460 | 1462 | * struct batadv_tp_receiver - receiver tp meter private variables per session |
| 1461 | 1463 | */ |
| 1462 | 1464 | 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) */ | |
| 1464 | 1466 | struct batadv_tp_vars_common common; |
| 1465 | 1467 | |
| 1466 | 1468 | /** @receiving: receiving binary semaphore: 1 if receiving, 0 is not */ |
| @@ -1662,7 +1664,7 @@ struct batadv_priv { · 195 unmodified lines | ||
| 1662 | 1664 | /** @forw_bcast_list_lock: lock protecting forw_bcast_list */ |
| 1663 | 1665 | spinlock_t forw_bcast_list_lock; |
| 1664 | 1666 | |
| 1665 | − /** @tp_list_lock: spinlock protecting @tp_list */ | |
| 1667 | + /** @tp_list_lock: spinlock protecting @tp_sender_list + @tp_receiver_list */ | |
| 1666 | 1668 | spinlock_t tp_list_lock; |
| 1667 | 1669 | |
| 1668 | 1670 | /** @tp_num: number of currently active tp sessions */ |
| @@ -1721,22 +1723,26 @@ struct batadv_priv { · 52 unmodified lines | ||
| 1721 | 1723 | |
| 1722 | 1724 | #ifdef CONFIG_BATMAN_ADV_BLA |
| 1723 | 1725 | |
| 1726 | +/** | |
| 1727 | + * enum batadv_bla_backbone_gw_state - state of a bridge loop avoidance | |
| 1728 | + * backbone gateway | |
| 1729 | + */ | |
| 1724 | 1730 | enum batadv_bla_backbone_gw_state { |
| 1725 | 1731 | /** |
| 1726 | 1732 | * @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 | |
| 1728 | 1734 | */ |
| 1729 | 1735 | BATADV_BLA_BACKBONE_GW_STOPPED, |
| 1730 | 1736 | |
| 1731 | 1737 | /** |
| 1732 | 1738 | * @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 | |
| 1734 | 1740 | * situation is resolved |
| 1735 | 1741 | */ |
| 1736 | 1742 | BATADV_BLA_BACKBONE_GW_UNSYNCED, |
| 1737 | 1743 | |
| 1738 | 1744 | /** |
| 1739 | − * @BATADV_BLA_BACKBONE_GW_SYNCED: backbone is consider to be in | |
| 1745 | + * @BATADV_BLA_BACKBONE_GW_SYNCED: backbone is considered to be in | |
| 1740 | 1746 | * sync. traffic can be forwarded |
| 1741 | 1747 | */ |
| 1742 | 1748 | BATADV_BLA_BACKBONE_GW_SYNCED, |