Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions fw_if/umac_if/inc/system/fmac_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ struct peers_info {
unsigned int pairwise_cipher;
/** 802.11 power save token count. */
int ps_token_count;
/** Port authorized */
bool authorized;
};

/**
Expand Down
20 changes: 1 addition & 19 deletions fw_if/umac_if/src/system/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "list.h"
#include "queue.h"
#include "util.h"
#include "system/hal_api.h"
#include "system/fmac_tx.h"
#include "system/fmac_api.h"
Expand Down Expand Up @@ -1864,25 +1865,6 @@ static int get_ac(unsigned int tid,
}


unsigned char *nrf_wifi_util_get_ra(struct nrf_wifi_fmac_vif_ctx *vif,
void *nwb)
{
if ((vif->if_type == NRF_WIFI_IFTYPE_STATION)
#ifdef NRF70_RAW_DATA_TX
|| (vif->if_type == NRF_WIFI_STA_TX_INJECTOR)
#endif /* NRF70_RAW_DATA_TX */
#ifdef NRF70_PROMISC_DATA_RX
|| (vif->if_type == NRF_WIFI_STA_PROMISC)
|| (vif->if_type == NRF_WIFI_STA_PROMISC_TX_INJECTOR)
#endif
) {
return vif->bssid;
}

return nrf_wifi_osal_nbuf_data_get(nwb);
}


#ifdef NRF70_RAW_DATA_TX
static bool nrf_wifi_raw_pkt_mode_enabled(struct nrf_wifi_fmac_vif_ctx *vif)
{
Expand Down
4 changes: 4 additions & 0 deletions utils/inc/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#else
#include "host_rpu_umac_if.h"
#endif
#include <system/fmac_structs.h>

#ifndef ARRAY_SIZE
#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
Expand All @@ -35,4 +36,7 @@ bool nrf_wifi_utils_is_mac_addr_valid(const char *mac_addr);

int nrf_wifi_utils_chan_to_freq(enum nrf_wifi_band band,
unsigned short chan);

unsigned char *nrf_wifi_util_get_ra(struct nrf_wifi_fmac_vif_ctx *vif,
void *nwb);
#endif /* __UTIL_H__ */
19 changes: 19 additions & 0 deletions utils/src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <nrf71_wifi_ctrl.h>
#else
#include "host_rpu_data_if.h"
#include <system/fmac_structs.h>
#endif

int nrf_wifi_utils_hex_str_to_val(unsigned char *hex_arr,
Expand Down Expand Up @@ -131,3 +132,21 @@ int nrf_wifi_utils_chan_to_freq(enum nrf_wifi_band band,
return freq;

}

unsigned char *nrf_wifi_util_get_ra(struct nrf_wifi_fmac_vif_ctx *vif,
void *nwb)
{
if ((vif->if_type == NRF_WIFI_IFTYPE_STATION)
#ifdef NRF70_RAW_DATA_TX
|| (vif->if_type == NRF_WIFI_STA_TX_INJECTOR)
#endif /* NRF70_RAW_DATA_TX */
#ifdef NRF70_PROMISC_DATA_RX
|| (vif->if_type == NRF_WIFI_STA_PROMISC)
|| (vif->if_type == NRF_WIFI_STA_PROMISC_TX_INJECTOR)
#endif
) {
return vif->bssid;
}

return nrf_wifi_osal_nbuf_data_get(nwb);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is probably better placed in https://github.com/zephyrproject-rtos/nrf_wifi/blob/main/fw_if/umac_if/src/common/fmac_util.c and protect with #ifdef NRF70_SYSTEM_MODE