11#ifndef __FMAC_UTIL_H__
12#define __FMAC_UTIL_H__
14#ifndef CONFIG_NRF700X_RADIO_TEST
15#include "fmac_structs.h"
19#define NRF_WIFI_FMAC_ETH_ADDR_LEN 6
20#define NRF_WIFI_FMAC_ETH_HDR_LEN 14
22#define NRF_WIFI_FMAC_FTYPE_DATA 0x0008
23#define NRF_WIFI_FMAC_STYPE_DATA 0x0000
24#define NRF_WIFI_FMAC_STYPE_QOS_DATA 0x0080
26#define NRF_WIFI_FMAC_FCTL_FTYPE 0x000c
27#define NRF_WIFI_FMAC_FCTL_PROTECTED 0x4000
28#define NRF_WIFI_FMAC_FCTL_TODS 0x0100
29#define NRF_WIFI_FMAC_FCTL_FROMDS 0x0200
31#define NRF_WIFI_FMAC_CIPHER_SUITE_WEP40 0x000FAC01
32#define NRF_WIFI_FMAC_CIPHER_SUITE_WEP104 0x000FAC05
33#define NRF_WIFI_FMAC_CIPHER_SUITE_TKIP 0x000FAC02
34#define NRF_WIFI_FMAC_CIPHER_SUITE_CCMP 0x000FAC04
35#define NRF_WIFI_FMAC_CIPHER_SUITE_CCMP_256 0x000FAC0A
36#define NRF_WIFI_FMAC_CIPHER_SUITE_OPEN 0x0
37#define NRF_WIFI_FMAC_CIPHER_SUITE_SMS4 0x00147201
39#define NRF_WIFI_FMAC_CCMP_HDR_LEN 8
40#define NRF_WIFI_FMAC_CCMP_256_HDR_LEN 8
41#define NRF_WIFI_FMAC_SMS4_HDR_LEN 18
43#define NRF_WIFI_FMAC_WEP_IV_LEN 4
44#define NRF_WIFI_FMAC_TKIP_IV_LEN 8
46#define NRF_WIFI_FCTL_TODS 0x0100
47#define NRF_WIFI_FCTL_FROMDS 0x0200
48#define NRF_WIFI_FMAC_ETH_P_8021Q 0x8100
49#define NRF_WIFI_FMAC_ETH_P_8021AD 0x88A8
50#define NRF_WIFI_FMAC_ETH_P_MPLS_UC 0x8847
51#define NRF_WIFI_FMAC_ETH_P_MPLS_MC 0x8848
52#define NRF_WIFI_FMAC_ETH_P_IP 0x0800
53#define NRF_WIFI_FMAC_ETH_P_IPV6 0x86DD
54#define NRF_WIFI_FMAC_ETH_P_80221 0x8917
55#define NRF_WIFI_FMAC_ETH_P_AARP 0x80F3
56#define NRF_WIFI_FMAC_ETH_P_IPX 0x8137
57#define NRF_WIFI_FMAC_ETH_P_802_3_MIN 0x0600
61#define NRF_WIFI_FMAC_VLAN_PRIO_SHIFT 0x0D
62#define NRF_WIFI_FMAC_VLAN_PRIO_MASK 0xE000
63#define NRF_WIFI_FMAC_MPLS_LS_TC_MASK 0x00000E00
64#define NRF_WIFI_FMAC_MPLS_LS_TC_SHIFT 0x09
65#define NRF_WIFI_FMAC_IPV6_TOS_MASK 0x0FF0
66#define NRF_WIFI_FMAC_IPV6_TOS_SHIFT 0x04
67#define NRF_WIFI_FMAC_ETH_TYPE_MASK 0xFFFF
98 const unsigned char *addr_2);
104 const unsigned char *mac_addr);
126 unsigned short eth_type);
132 unsigned int arr_sz);
unsigned char * nrf_wifi_util_get_ra(struct nrf_wifi_fmac_vif_ctx *vif, void *nwb)
bool nrf_wifi_util_ether_addr_equal(const unsigned char *addr_1, const unsigned char *addr_2)
unsigned char * nrf_wifi_util_get_dest(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, void *nwb)
bool nrf_wifi_util_is_unicast_addr(const unsigned char *addr)
unsigned char * nrf_wifi_util_get_src(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, void *nwb)
int nrf_wifi_util_get_tid(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, void *nwb)
bool nrf_wifi_util_is_multicast_addr(const unsigned char *addr)
unsigned short nrf_wifi_util_tx_get_eth_type(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, void *nwb)
#define NRF_WIFI_FMAC_ETH_ADDR_LEN
Header containing utility declarations for the FMAC IF Layer of the Wi-Fi driver.
Definition: fmac_util.h:19
void * wifi_dev_priv(struct nrf_wifi_fmac_dev_ctx *def)
bool nrf_wifi_util_is_arr_zero(unsigned char *arr, unsigned int arr_sz)
int nrf_wifi_util_get_skip_header_bytes(unsigned short eth_type)
int nrf_wifi_util_get_vif_indx(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, const unsigned char *mac_addr)
void nrf_wifi_util_convert_to_eth(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, void *nwb, struct nrf_wifi_fmac_ieee80211_hdr *hdr, unsigned short eth_type)
void * wifi_fmac_priv(struct nrf_wifi_fmac_priv *def)
void nrf_wifi_util_rx_convert_amsdu_to_eth(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, void *nwb)
unsigned short nrf_wifi_util_rx_get_eth_type(struct nrf_wifi_fmac_dev_ctx *fmac_dev_ctx, void *nwb)
unsigned short length
Definition: fmac_util.h:87
unsigned char src[6]
Definition: fmac_util.h:86
unsigned char dst[6]
Definition: fmac_util.h:85
Definition: fmac_util.h:84
Structure to hold common fmac dev context parameter data.
Definition: fmac_structs_common.h:146
unsigned char src[6]
Definition: fmac_util.h:79
unsigned char dst[6]
Definition: fmac_util.h:78
unsigned short proto
Definition: fmac_util.h:80
Definition: fmac_util.h:77
unsigned char addr_1[6]
Definition: fmac_util.h:69
unsigned short seq_ctrl
Definition: fmac_util.h:72
unsigned char addr_4[6]
Definition: fmac_util.h:73
unsigned short fc
Definition: fmac_util.h:67
unsigned char addr_2[6]
Definition: fmac_util.h:70
unsigned short dur_id
Definition: fmac_util.h:68
unsigned char addr_3[6]
Definition: fmac_util.h:71
Definition: fmac_util.h:66
Structure to hold common fmac priv parameter data.
Definition: fmac_structs_common.h:135
Structure to hold per VIF context information for the UMAC IF layer.
Definition: fmac_structs.h:497