Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mac80211: mesh: fix some kdoc warnings

These were mostly missing or incorrectly tagged return values.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230928172905.33fea2968c62.I41d197b570370ab7cad1405518512fdd36e08717@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Benjamin Berg and committed by
Johannes Berg
c00de1c4 256caff2

+34 -12
+6 -2
net/mac80211/mesh.c
··· 56 56 * 57 57 * This function checks if the mesh configuration of a mesh point matches the 58 58 * local mesh configuration, i.e. if both nodes belong to the same mesh network. 59 + * 60 + * Returns: %true if both nodes belong to the same mesh 59 61 */ 60 62 bool mesh_matches_local(struct ieee80211_sub_if_data *sdata, 61 63 struct ieee802_11_elems *ie) ··· 121 119 * mesh_peer_accepts_plinks - check if an mp is willing to establish peer links 122 120 * 123 121 * @ie: information elements of a management frame from the mesh peer 122 + * 123 + * Returns: %true if the mesh peer is willing to establish peer links 124 124 */ 125 125 bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie) 126 126 { ··· 862 858 * @meshsa: source address in the mesh. Same as TA, as frame is 863 859 * locally originated. 864 860 * 865 - * Return the length of the 802.11 (does not include a mesh control header) 861 + * Returns: the length of the 802.11 frame header (excludes mesh control header) 866 862 */ 867 863 int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc, 868 864 const u8 *meshda, const u8 *meshsa) ··· 895 891 * @addr6: 2nd address in the ae header, which corresponds to addr6 of the 896 892 * mesh frame 897 893 * 898 - * Return the header length. 894 + * Returns: the header length 899 895 */ 900 896 unsigned int ieee80211_new_mesh_header(struct ieee80211_sub_if_data *sdata, 901 897 struct ieee80211s_hdr *meshhdr,
+2
net/mac80211/mesh_hwmp.c
··· 230 230 * Note: This function may be called with driver locks taken that the driver 231 231 * also acquires in the TX path. To avoid a deadlock we don't transmit the 232 232 * frame directly but add it to the pending queue instead. 233 + * 234 + * Returns: 0 on success 233 235 */ 234 236 int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata, 235 237 u8 ttl, const u8 *target, u32 target_sn,
+13 -7
net/mac80211/mesh_pathtbl.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 /* 3 3 * Copyright (c) 2008, 2009 open80211s Ltd. 4 + * Copyright (C) 2023 Intel Corporation 4 5 * Author: Luis Carlos Cobo <luisca@cozybit.com> 5 6 */ 6 7 ··· 174 173 /** 175 174 * mesh_path_move_to_queue - Move or copy frames from one mpath queue to another 176 175 * 176 + * @gate_mpath: An active mpath the frames will be sent to (i.e. the gate) 177 + * @from_mpath: The failed mpath 178 + * @copy: When true, copy all the frames to the new mpath queue. When false, 179 + * move them. 180 + * 177 181 * This function is used to transfer or copy frames from an unresolved mpath to 178 182 * a gate mpath. The function also adds the Address Extension field and 179 183 * updates the next hop. ··· 187 181 * destination addresses are updated. 188 182 * 189 183 * The gate mpath must be an active mpath with a valid mpath->next_hop. 190 - * 191 - * @gate_mpath: An active mpath the frames will be sent to (i.e. the gate) 192 - * @from_mpath: The failed mpath 193 - * @copy: When true, copy all the frames to the new mpath queue. When false, 194 - * move them. 195 184 */ 196 185 static void mesh_path_move_to_queue(struct mesh_path *gate_mpath, 197 186 struct mesh_path *from_mpath, ··· 331 330 /** 332 331 * mesh_path_add_gate - add the given mpath to a mesh gate to our path table 333 332 * @mpath: gate path to add to table 333 + * 334 + * Returns: 0 on success, -EEXIST 334 335 */ 335 336 int mesh_path_add_gate(struct mesh_path *mpath) 336 337 { ··· 391 388 /** 392 389 * mesh_gate_num - number of gates known to this interface 393 390 * @sdata: subif data 391 + * 392 + * Returns: The number of gates 394 393 */ 395 394 int mesh_gate_num(struct ieee80211_sub_if_data *sdata) 396 395 { ··· 866 861 /** 867 862 * mesh_path_flush_by_iface - Deletes all mesh paths associated with a given iface 868 863 * 869 - * This function deletes both mesh paths as well as mesh portal paths. 870 - * 871 864 * @sdata: interface data to match 872 865 * 866 + * This function deletes both mesh paths as well as mesh portal paths. 873 867 */ 874 868 void mesh_path_flush_by_iface(struct ieee80211_sub_if_data *sdata) 875 869 { ··· 948 944 * queue to that gate's queue. If there are more than one gates, the frames 949 945 * are copied from each gate to the next. After frames are copied, the 950 946 * mpath queues are emptied onto the transmission queue. 947 + * 948 + * Returns: 0 on success, -EHOSTUNREACH 951 949 */ 952 950 int mesh_path_send_to_gates(struct mesh_path *mpath) 953 951 {
+5 -1
net/mac80211/mesh_plink.c
··· 153 153 * selected if any non-HT peers are present in our MBSS. 20MHz-protection mode 154 154 * is selected if all peers in our 20/40MHz MBSS support HT and at least one 155 155 * HT20 peer is present. Otherwise no-protection mode is selected. 156 + * 157 + * Returns: BSS_CHANGED_HT or 0 for no change 156 158 */ 157 159 static u64 mesh_set_ht_prot_mode(struct ieee80211_sub_if_data *sdata) 158 160 { ··· 364 362 * Mesh paths with this peer as next hop should be flushed 365 363 * by the caller outside of plink_lock. 366 364 * 367 - * Returns beacon changed flag if the beacon content changed. 365 + * Returns: beacon changed flag if the beacon content changed. 368 366 * 369 367 * Locking: the caller must hold sta->mesh->plink_lock 370 368 */ ··· 392 390 * @sta: mesh peer link to deactivate 393 391 * 394 392 * All mesh paths with this peer as next hop will be flushed 393 + * 394 + * Returns: beacon changed flag if the beacon content changed. 395 395 */ 396 396 u64 mesh_plink_deactivate(struct sta_info *sta) 397 397 {
+5 -1
net/mac80211/mesh_ps.c
··· 15 15 /** 16 16 * mps_qos_null_get - create pre-addressed QoS Null frame for mesh powersave 17 17 * @sta: the station to get the frame for 18 + * 19 + * Returns: A newly allocated SKB 18 20 */ 19 21 static struct sk_buff *mps_qos_null_get(struct sta_info *sta) 20 22 { ··· 79 77 * 80 78 * sets the non-peer power mode and triggers the driver PS (re-)configuration 81 79 * Return BSS_CHANGED_BEACON if a beacon update is necessary. 80 + * 81 + * Returns: BSS_CHANGED_BEACON if a beacon update is in order. 82 82 */ 83 83 u64 ieee80211_mps_local_status_update(struct ieee80211_sub_if_data *sdata) 84 84 { ··· 151 147 * 152 148 * @sta: mesh STA 153 149 * @pm: the power mode to set 154 - * Return BSS_CHANGED_BEACON if a beacon update is in order. 150 + * Returns: BSS_CHANGED_BEACON if a beacon update is in order. 155 151 */ 156 152 u64 ieee80211_mps_set_sta_local_pm(struct sta_info *sta, 157 153 enum nl80211_mesh_power_mode pm)
+3 -1
net/mac80211/mesh_sync.c
··· 3 3 * Copyright 2011-2012, Pavel Zubarev <pavel.zubarev@gmail.com> 4 4 * Copyright 2011-2012, Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> 5 5 * Copyright 2011-2012, cozybit Inc. 6 - * Copyright (C) 2021 Intel Corporation 6 + * Copyright (C) 2021,2023 Intel Corporation 7 7 */ 8 8 9 9 #include "ieee80211_i.h" ··· 37 37 * mesh_peer_tbtt_adjusting - check if an mp is currently adjusting its TBTT 38 38 * 39 39 * @cfg: mesh config element from the mesh peer (or %NULL) 40 + * 41 + * Returns: If the mesh peer is currently adjusting its TBTT 40 42 */ 41 43 static bool mesh_peer_tbtt_adjusting(const struct ieee80211_meshconf_ie *cfg) 42 44 {