hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/net/mac80211/mesh.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2008, 2009 open80211s Ltd.
34 * Authors: Luis Carlos Cobo <luisca@cozybit.com>
45 * Javier Cardona <javier@cozybit.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107
118 #ifndef IEEE80211S_H
....@@ -95,6 +92,7 @@
9592 * @last_preq_to_root: Timestamp of last PREQ sent to root
9693 * @is_root: the destination station of this path is a root node
9794 * @is_gate: the destination station of this path is a mesh gate
95
+ * @path_change_count: the number of path changes to destination
9896 *
9997 *
10098 * The dst address is unique in the mesh path table. Since the mesh_path is
....@@ -126,26 +124,7 @@
126124 unsigned long last_preq_to_root;
127125 bool is_root;
128126 bool is_gate;
129
-};
130
-
131
-/**
132
- * struct mesh_table
133
- *
134
- * @known_gates: list of known mesh gates and their mpaths by the station. The
135
- * gate's mpath may or may not be resolved and active.
136
- * @gates_lock: protects updates to known_gates
137
- * @rhead: the rhashtable containing struct mesh_paths, keyed by dest addr
138
- * @walk_head: linked list containging all mesh_path objects
139
- * @walk_lock: lock protecting walk_head
140
- * @entries: number of entries in the table
141
- */
142
-struct mesh_table {
143
- struct hlist_head known_gates;
144
- spinlock_t gates_lock;
145
- struct rhashtable rhead;
146
- struct hlist_head walk_head;
147
- spinlock_t walk_lock;
148
- atomic_t entries; /* Up to MAX_MESH_NEIGHBOURS */
127
+ u32 path_change_count;
149128 };
150129
151130 /* Recent multicast cache */
....@@ -219,6 +198,12 @@
219198 struct sk_buff *skb);
220199 int mesh_add_vht_oper_ie(struct ieee80211_sub_if_data *sdata,
221200 struct sk_buff *skb);
201
+int mesh_add_he_cap_ie(struct ieee80211_sub_if_data *sdata,
202
+ struct sk_buff *skb, u8 ie_len);
203
+int mesh_add_he_oper_ie(struct ieee80211_sub_if_data *sdata,
204
+ struct sk_buff *skb);
205
+int mesh_add_he_6ghz_cap_ie(struct ieee80211_sub_if_data *sdata,
206
+ struct sk_buff *skb);
222207 void mesh_rmc_free(struct ieee80211_sub_if_data *sdata);
223208 int mesh_rmc_init(struct ieee80211_sub_if_data *sdata);
224209 void ieee80211s_init(void);
....@@ -276,10 +261,13 @@
276261 int mesh_path_add_gate(struct mesh_path *mpath);
277262 int mesh_path_send_to_gates(struct mesh_path *mpath);
278263 int mesh_gate_num(struct ieee80211_sub_if_data *sdata);
264
+u32 airtime_link_metric_get(struct ieee80211_local *local,
265
+ struct sta_info *sta);
279266
280267 /* Mesh plinks */
281268 void mesh_neighbour_update(struct ieee80211_sub_if_data *sdata,
282
- u8 *hw_addr, struct ieee802_11_elems *ie);
269
+ u8 *hw_addr, struct ieee802_11_elems *ie,
270
+ struct ieee80211_rx_status *rx_status);
283271 bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie);
284272 u32 mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata);
285273 void mesh_plink_timer(struct timer_list *t);
....@@ -300,7 +288,7 @@
300288 void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta);
301289 void mesh_path_flush_pending(struct mesh_path *mpath);
302290 void mesh_path_tx_pending(struct mesh_path *mpath);
303
-int mesh_pathtbl_init(struct ieee80211_sub_if_data *sdata);
291
+void mesh_pathtbl_init(struct ieee80211_sub_if_data *sdata);
304292 void mesh_pathtbl_unregister(struct ieee80211_sub_if_data *sdata);
305293 int mesh_path_del(struct ieee80211_sub_if_data *sdata, const u8 *addr);
306294 void mesh_path_timer(struct timer_list *t);