Skip to content

Commit d878baa

Browse files
committed
Move nrf_wifi_util_get_ra to utils lib
Move nrf_wifi_util_get_ra to fmac_utils lib to make it accessible across other files. Signed-off-by: Ravi Dondaputi <[email protected]>
1 parent 8f3f18a commit d878baa

File tree

3 files changed

+30
-19
lines changed

3 files changed

+30
-19
lines changed

fw_if/umac_if/inc/common/fmac_util.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
#include "fmac_structs_common.h"
1515

1616
#include "fmac_structs_common.h"
17+
#ifdef NRF70_SYSTEM_MODE
18+
#include "system/fmac_structs.h"
19+
#endif /* NRF70_SYSTEM_MODE */
1720
#include "common/pack_def.h"
1821

1922

@@ -107,4 +110,8 @@ bool nrf_wifi_util_is_arr_zero(unsigned char *arr,
107110
void *wifi_fmac_priv(struct nrf_wifi_fmac_priv *def);
108111
void *wifi_dev_priv(struct nrf_wifi_fmac_dev_ctx *def);
109112

113+
#ifdef NRF70_SYSTEM_MODE
114+
unsigned char *nrf_wifi_util_get_ra(struct nrf_wifi_fmac_vif_ctx *vif, void *nwb);
115+
#endif /* NRF70_SYSTEM_MODE */
116+
110117
#endif /* __FMAC_UTIL_H__ */

fw_if/umac_if/src/common/fmac_util.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
#else
1919
#include "host_rpu_umac_if.h"
2020
#endif
21+
#ifdef NRF70_SYSTEM_MODE
22+
#include <system/fmac_structs.h>
23+
#endif /* NRF70_SYSTEM_MODE */
2124

2225
bool nrf_wifi_util_is_multicast_addr(const unsigned char *addr)
2326
{
@@ -91,6 +94,26 @@ bool nrf_wifi_util_is_arr_zero(unsigned char *arr,
9194
return true;
9295
}
9396

97+
#ifdef NRF70_SYSTEM_MODE
98+
unsigned char *nrf_wifi_util_get_ra(struct nrf_wifi_fmac_vif_ctx *vif,
99+
void *nwb)
100+
{
101+
if ((vif->if_type == NRF_WIFI_IFTYPE_STATION)
102+
#ifdef NRF70_RAW_DATA_TX
103+
|| (vif->if_type == NRF_WIFI_STA_TX_INJECTOR)
104+
#endif /* NRF70_RAW_DATA_TX */
105+
#ifdef NRF70_PROMISC_DATA_RX
106+
|| (vif->if_type == NRF_WIFI_STA_PROMISC)
107+
|| (vif->if_type == NRF_WIFI_STA_PROMISC_TX_INJECTOR)
108+
#endif
109+
) {
110+
return vif->bssid;
111+
}
112+
113+
return nrf_wifi_osal_nbuf_data_get(nwb);
114+
}
115+
#endif /* NRF70_SYSTEM_MODE */
116+
94117
void *wifi_fmac_priv(struct nrf_wifi_fmac_priv *def)
95118
{
96119
return &def->priv;

fw_if/umac_if/src/system/tx.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,25 +1864,6 @@ static int get_ac(unsigned int tid,
18641864
}
18651865

18661866

1867-
unsigned char *nrf_wifi_util_get_ra(struct nrf_wifi_fmac_vif_ctx *vif,
1868-
void *nwb)
1869-
{
1870-
if ((vif->if_type == NRF_WIFI_IFTYPE_STATION)
1871-
#ifdef NRF70_RAW_DATA_TX
1872-
|| (vif->if_type == NRF_WIFI_STA_TX_INJECTOR)
1873-
#endif /* NRF70_RAW_DATA_TX */
1874-
#ifdef NRF70_PROMISC_DATA_RX
1875-
|| (vif->if_type == NRF_WIFI_STA_PROMISC)
1876-
|| (vif->if_type == NRF_WIFI_STA_PROMISC_TX_INJECTOR)
1877-
#endif
1878-
) {
1879-
return vif->bssid;
1880-
}
1881-
1882-
return nrf_wifi_osal_nbuf_data_get(nwb);
1883-
}
1884-
1885-
18861867
#ifdef NRF70_RAW_DATA_TX
18871868
static bool nrf_wifi_raw_pkt_mode_enabled(struct nrf_wifi_fmac_vif_ctx *vif)
18881869
{

0 commit comments

Comments
 (0)