nrfxlib API 0.1.0
Loading...
Searching...
No Matches
lmac_if_common.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
14#ifndef __LMAC_IF_COMMON__
15#define __LMAC_IF_COMMON__
16
17#include "rpu_if.h"
18#include "phy_rf_params.h"
19#include "pack_def.h"
20
21#define RPU_MEM_LMAC_BOOT_SIG 0xB7000D50
22#define RPU_MEM_LMAC_VER 0xB7000D54
23
24#define RPU_MEM_LMAC_PATCH_BIN 0x80044000
25#define RPU_MEM_LMAC_PATCH_BIMG 0x8004B400
26
27#define NRF_WIFI_LMAC_VER(ver) ((ver & 0xFF000000) >> 24)
28#define NRF_WIFI_LMAC_VER_MAJ(ver) ((ver & 0x00FF0000) >> 16)
29#define NRF_WIFI_LMAC_VER_MIN(ver) ((ver & 0x0000FF00) >> 8)
30#define NRF_WIFI_LMAC_VER_EXTRA(ver) (ver & 0x000000FF)
31
32#define NRF_WIFI_LMAC_BOOT_SIG 0x5A5A5A5A
33#define NRF_WIFI_LMAC_ROM_PATCH_OFFSET (RPU_MEM_LMAC_PATCH_BIMG - RPU_ADDR_LMAC_CORE_RET_START)
34#define NRF_WIFI_LMAC_BOOT_EXCP_VECT_0 0x3c1a8000
35#define NRF_WIFI_LMAC_BOOT_EXCP_VECT_1 0x275a0000
36#define NRF_WIFI_LMAC_BOOT_EXCP_VECT_2 0x03400008
37#define NRF_WIFI_LMAC_BOOT_EXCP_VECT_3 0x00000000
38
39#define NRF_WIFI_LMAC_MAX_RX_BUFS 256
40
41#define HW_SLEEP_ENABLE 2
42#define SW_SLEEP_ENABLE 1
43#define SLEEP_DISABLE 0
44#define HW_DELAY 7300
45#define SW_DELAY 5000
46#define BCN_TIMEOUT 20000
47#define CALIB_SLEEP_CLOCK_ENABLE 1
48
49#define ACTIVE_SCAN_DURATION 50
50#define PASSIVE_SCAN_DURATION 130
51#define WORKING_CH_SCAN_DURATION 50
52#define CHNL_PROBE_CNT 2
53
54#define PKT_TYPE_MPDU 0
55#define PKT_TYPE_MSDU_WITH_MAC 1
56#define PKT_TYPE_MSDU 2
57
58#define NRF_WIFI_RPU_PWR_STATUS_SUCCESS 0
59#define NRF_WIFI_RPU_PWR_STATUS_FAIL -1
60
65/* Events */
66#define MAX_RSSI_SAMPLES 10
68 /*Structure that holds all the debug information in LMAC*/
69 unsigned int reset_cmd_cnt;
71 unsigned int unable_gen_event;
72 unsigned int ch_prog_cmd_cnt;
73 unsigned int channel_prog_done;
74 unsigned int tx_pkt_cnt;
75 unsigned int tx_pkt_done_cnt;
76 unsigned int scan_pkt_cnt;
77 unsigned int internal_pkt_cnt;
79 unsigned int ack_resp_cnt;
80 unsigned int tx_timeout;
81 unsigned int deagg_isr;
84 unsigned int lmac_rxisr_cnt;
85 unsigned int rx_decryptcnt;
87 unsigned int prepa_rx_event_fail;
93 unsigned int rxDSSSCrcSuccessCnt;
94 unsigned int rxDSSSCrcFailCnt;
95 unsigned int rx_crypto_start_cnt;
96 unsigned int rx_crypto_done_cnt;
97 unsigned int rx_event_buf_full;
98 unsigned int rx_extram_buf_full;
99 unsigned int scan_req;
100 unsigned int scan_complete;
101 unsigned int scan_abort_req;
104};
105
115};
116
120};
121
123 unsigned int pop_addr;
124 unsigned int push_addr;
125 unsigned int id_num;
126 unsigned int status_addr;
127 unsigned int status_mask;
128} __NRF_WIFI_PKD;
129
130struct INT_HPQ {
131 unsigned int id;
132 /* The head and tail values are relative
133 * to the start of the
134 * HWQM register block.
135 */
136 unsigned int head;
137 unsigned int tail;
138} __NRF_WIFI_PKD;
139
146 unsigned int boot_status;
148 unsigned int version;
154 unsigned int lmac_rx_desc_size;
156 unsigned char rpu_config_name[16];
158 unsigned char rpu_config_number[8];
160 unsigned int numRX;
162 unsigned int numTX;
163#define FREQ_2_4_GHZ 1
164#define FREQ_5_GHZ 2
166 unsigned int bands;
192 unsigned int HP_set_lmac_isr;
193
194#define NUM_32_QUEUES 4
197
198} __NRF_WIFI_PKD;
199
200#define MAX_NUM_OF_RX_QUEUES 3
201
204 unsigned short buf_sz;
206 unsigned short num_bufs;
207} __NRF_WIFI_PKD;
208
211 unsigned int temp_calib_bitmap;
212 unsigned int vbat_calibp_bitmap;
219} __NRF_WIFI_PKD;
223#endif
#define NUM_32_QUEUES
Definition: lmac_if_common.h:194
Common structures and definitions for RPU interface.
unsigned int head
Definition: lmac_if_common.h:136
unsigned int tail
Definition: lmac_if_common.h:137
unsigned int id
Definition: lmac_if_common.h:131
Definition: lmac_if_common.h:130
unsigned int pop_addr
Definition: lmac_if_common.h:123
unsigned int status_mask
Definition: lmac_if_common.h:127
unsigned int id_num
Definition: lmac_if_common.h:125
unsigned int push_addr
Definition: lmac_if_common.h:124
unsigned int status_addr
Definition: lmac_if_common.h:126
Definition: lmac_if_common.h:122
unsigned int numRX
Definition: lmac_if_common.h:160
unsigned int lmac_rx_desc_size
Definition: lmac_if_common.h:154
struct hpqm_queue freeEventPtrQ
Definition: lmac_if_common.h:180
unsigned int HP_lmac_to_host_isr_en
Definition: lmac_if_common.h:188
unsigned char rpu_config_name[16]
Definition: lmac_if_common.h:156
unsigned int boot_status
Definition: lmac_if_common.h:146
unsigned int bands
Definition: lmac_if_common.h:166
struct hpqm_queue SKBGramPtrQ_2
Definition: lmac_if_common.h:184
struct INT_HPQ hpq32[4]
Definition: lmac_if_common.h:196
unsigned int HP_set_lmac_isr
Definition: lmac_if_common.h:192
unsigned char rpu_config_number[8]
Definition: lmac_if_common.h:158
unsigned int sys_frequency_in_mhz
Definition: lmac_if_common.h:168
unsigned int HP_lmac_to_host_isr_clear
Definition: lmac_if_common.h:190
struct hpqm_queue eventPtrQ
Definition: lmac_if_common.h:176
unsigned int numTX
Definition: lmac_if_common.h:162
struct hpqm_queue FreeCmdPtrQ
Definition: lmac_if_common.h:170
struct hpqm_queue SKBGramPtrQ_3
Definition: lmac_if_common.h:186
struct hpqm_queue SKBGramPtrQ_1
Definition: lmac_if_common.h:182
struct hpqm_queue cmdPtrQ
Definition: lmac_if_common.h:174
unsigned int lmac_rx_buffer_addr
Definition: lmac_if_common.h:150
unsigned int lmac_rx_max_desc_cnt
Definition: lmac_if_common.h:152
unsigned int version
Definition: lmac_if_common.h:148
LMAC firmware config params.
Definition: lmac_if_common.h:144
unsigned int internal_buf_pool_null
Definition: lmac_if_common.h:103
unsigned int prepa_rx_event_fail
Definition: lmac_if_common.h:87
unsigned int channel_prog_done
Definition: lmac_if_common.h:73
unsigned int scan_complete
Definition: lmac_if_common.h:100
unsigned int rx_mpdu_crc_fail_cnt
Definition: lmac_if_common.h:90
unsigned int rx_event_buf_full
Definition: lmac_if_common.h:97
unsigned int reset_complete_event_cnt
Definition: lmac_if_common.h:70
unsigned int scan_pkt_cnt
Definition: lmac_if_common.h:76
unsigned int rx_mpdu_crc_success_cnt
Definition: lmac_if_common.h:89
unsigned int deagg_isr
Definition: lmac_if_common.h:81
unsigned int tx_timeout
Definition: lmac_if_common.h:80
unsigned int deagg_inptr_desc_empty
Definition: lmac_if_common.h:82
unsigned int scan_abort_complete
Definition: lmac_if_common.h:102
unsigned int scan_abort_req
Definition: lmac_if_common.h:101
unsigned int rx_core_pool_full_cnt
Definition: lmac_if_common.h:88
unsigned int internal_pkt_cnt
Definition: lmac_if_common.h:77
unsigned int reset_cmd_cnt
Definition: lmac_if_common.h:69
unsigned int ch_prog_cmd_cnt
Definition: lmac_if_common.h:72
unsigned int rxDSSSCrcSuccessCnt
Definition: lmac_if_common.h:93
unsigned int rx_ofdm_crc_success_cnt
Definition: lmac_if_common.h:91
unsigned int unable_gen_event
Definition: lmac_if_common.h:71
unsigned int lmac_rxisr_cnt
Definition: lmac_if_common.h:84
unsigned int rx_ofdm_crc_fail_cnt
Definition: lmac_if_common.h:92
unsigned int rx_crypto_start_cnt
Definition: lmac_if_common.h:95
unsigned int ack_resp_cnt
Definition: lmac_if_common.h:79
unsigned int process_decrypt_fail
Definition: lmac_if_common.h:86
unsigned int rx_crypto_done_cnt
Definition: lmac_if_common.h:96
unsigned int deagg_circular_buffer_full
Definition: lmac_if_common.h:83
unsigned int tx_pkt_done_cnt
Definition: lmac_if_common.h:75
unsigned int rx_decryptcnt
Definition: lmac_if_common.h:85
unsigned int internal_pkt_done_cnt
Definition: lmac_if_common.h:78
unsigned int tx_pkt_cnt
Definition: lmac_if_common.h:74
unsigned int rxDSSSCrcFailCnt
Definition: lmac_if_common.h:94
unsigned int scan_req
Definition: lmac_if_common.h:99
unsigned int rx_extram_buf_full
Definition: lmac_if_common.h:98
Definition: lmac_if_common.h:67
unsigned int ofdm_crc32_pass_cnt
Definition: lmac_if_common.h:110
unsigned int dsss_crc32_fail_cnt
Definition: lmac_if_common.h:113
unsigned int dsss_crc32_pass_cnt
Definition: lmac_if_common.h:112
char averageRSSI
Definition: lmac_if_common.h:114
unsigned int ofdm_crc32_fail_cnt
Definition: lmac_if_common.h:111
Definition: lmac_if_common.h:109
unsigned short num_bufs
Definition: lmac_if_common.h:206
unsigned short buf_sz
Definition: lmac_if_common.h:204
Definition: lmac_if_common.h:202
int temp_threshold
Definition: lmac_if_common.h:217
unsigned int temp_based_calib_en
Definition: lmac_if_common.h:210
int vbat_threshold
Definition: lmac_if_common.h:218
int vth_hi
Definition: lmac_if_common.h:216
int vth_low
Definition: lmac_if_common.h:215
unsigned int vbat_calibp_bitmap
Definition: lmac_if_common.h:212
unsigned int temp_vbat_mon_period
Definition: lmac_if_common.h:213
unsigned int temp_calib_bitmap
Definition: lmac_if_common.h:211
int vth_very_low
Definition: lmac_if_common.h:214
Definition: lmac_if_common.h:209
struct lmac_prod_stats lmac_stats
Definition: lmac_if_common.h:118
struct phy_prod_stats phy_stats
Definition: lmac_if_common.h:119
Definition: lmac_if_common.h:117