|
37 | 37 | #include <linux/workqueue.h>
|
38 | 38 |
|
39 | 39 | #include "bat_algo.h"
|
| 40 | +#include "bat_v_ogm.h" |
40 | 41 | #include "hard-interface.h"
|
41 |
| -#include "hash.h" |
42 | 42 | #include "originator.h"
|
43 | 43 | #include "packet.h"
|
44 | 44 | #include "routing.h"
|
@@ -195,45 +195,6 @@ void batadv_v_elp_primary_iface_set(struct batadv_hard_iface *primary_iface)
|
195 | 195 | rcu_read_unlock();
|
196 | 196 | }
|
197 | 197 |
|
198 |
| -/** |
199 |
| - * batadv_v_ogm_orig_get - retrieve and possibly create an originator node |
200 |
| - * @bat_priv: the bat priv with all the soft interface information |
201 |
| - * @addr: the address of the originator |
202 |
| - * |
203 |
| - * Return: the orig_node corresponding to the specified address. If such object |
204 |
| - * does not exist it is allocated here. In case of allocation failure returns |
205 |
| - * NULL. |
206 |
| - */ |
207 |
| -static struct batadv_orig_node * |
208 |
| -batadv_v_ogm_orig_get(struct batadv_priv *bat_priv, |
209 |
| - const u8 *addr) |
210 |
| -{ |
211 |
| - struct batadv_orig_node *orig_node; |
212 |
| - int hash_added; |
213 |
| - |
214 |
| - orig_node = batadv_orig_hash_find(bat_priv, addr); |
215 |
| - if (orig_node) |
216 |
| - return orig_node; |
217 |
| - |
218 |
| - orig_node = batadv_orig_node_new(bat_priv, addr); |
219 |
| - if (!orig_node) |
220 |
| - return NULL; |
221 |
| - |
222 |
| - hash_added = batadv_hash_add(bat_priv->orig_hash, batadv_compare_orig, |
223 |
| - batadv_choose_orig, orig_node, |
224 |
| - &orig_node->hash_entry); |
225 |
| - if (hash_added != 0) { |
226 |
| - /* orig_node->refcounter is initialised to 2 by |
227 |
| - * batadv_orig_node_new() |
228 |
| - */ |
229 |
| - batadv_orig_node_put(orig_node); |
230 |
| - batadv_orig_node_put(orig_node); |
231 |
| - orig_node = NULL; |
232 |
| - } |
233 |
| - |
234 |
| - return orig_node; |
235 |
| -} |
236 |
| - |
237 | 198 | /**
|
238 | 199 | * batadv_v_elp_neigh_update - update an ELP neighbour node
|
239 | 200 | * @bat_priv: the bat priv with all the soft interface information
|
|
0 commit comments