blob: 8773db61a6640e13e0f1ab40c1cb8372f27c94ae [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/**
2 ****************************************************************************************
3 *
4 * @file rwnx_mesh.c
5 *
6 * Copyright (C) RivieraWaves 2016-2019
7 *
8 ****************************************************************************************
9 */
10
11/**
12 * INCLUDE FILES
13 ****************************************************************************************
14 */
15
16#include "rwnx_mesh.h"
17
18/**
19 * FUNCTION DEFINITIONS
20 ****************************************************************************************
21 */
22
23struct rwnx_mesh_proxy *rwnx_get_mesh_proxy_info(struct rwnx_vif *p_rwnx_vif, u8 *p_sta_addr, bool local)
24{
25 struct rwnx_mesh_proxy *p_mesh_proxy = NULL;
26 struct rwnx_mesh_proxy *p_cur_proxy;
27
28 /* Look for proxied devices with provided address */
29 list_for_each_entry(p_cur_proxy, &p_rwnx_vif->ap.proxy_list, list) {
30 if (p_cur_proxy->local != local) {
31 continue;
32 }
33
34 if (!memcmp(&p_cur_proxy->ext_sta_addr, p_sta_addr, ETH_ALEN)) {
35 p_mesh_proxy = p_cur_proxy;
36 break;
37 }
38 }
39
40 /* Return the found information */
41 return p_mesh_proxy;
42}