sdr.h (1895c3ae46eb883dce1c95b38f9f0d5e9f803dca) sdr.h (342bd25a0b694da0d4c4212b7bc83eff93377c29)
1// Author: Xianjun Jiao, Michael Mehari, Wei Liu
2// SPDX-FileCopyrightText: 2019 UGent
3// SPDX-License-Identifier: AGPL-3.0-or-later
4
5#ifndef OPENWIFI_SDR
6#define OPENWIFI_SDR
7
8#include "pre_def.h"

--- 115 unchanged lines hidden (view full) ---

124// ------end of dmesg printk control flag------------------
125
126#define MAX_NUM_VIF 4
127
128//#define LEN_PHY_HEADER 16
129#define LEN_PHY_CRC 4
130#define LEN_MPDU_DELIM 4
131
1// Author: Xianjun Jiao, Michael Mehari, Wei Liu
2// SPDX-FileCopyrightText: 2019 UGent
3// SPDX-License-Identifier: AGPL-3.0-or-later
4
5#ifndef OPENWIFI_SDR
6#define OPENWIFI_SDR
7
8#include "pre_def.h"

--- 115 unchanged lines hidden (view full) ---

124// ------end of dmesg printk control flag------------------
125
126#define MAX_NUM_VIF 4
127
128//#define LEN_PHY_HEADER 16
129#define LEN_PHY_CRC 4
130#define LEN_MPDU_DELIM 4
131
132#define RING_ROOM_THRESHOLD 2
132#define MAX_NUM_HW_QUEUE 4 // number of queue in FPGA
133#define MAX_NUM_SW_QUEUE 4 // number of queue in Linux, depends on the number we report by dev->queues in openwifi_dev_probe
134
135#define RING_ROOM_THRESHOLD (2+MAX_NUM_SW_QUEUE) // MAX_NUM_SW_QUEUE is for the room of MAX_NUM_SW_QUEUE last packets from MAX_NUM_SW_QUEUE queue before stop
133#define NUM_BIT_NUM_TX_BD 6
134#define NUM_TX_BD (1<<NUM_BIT_NUM_TX_BD) // !!! should align to the fifo size in tx_bit_intf.v
135
136#ifdef USE_NEW_RX_INTERRUPT
137#define NUM_RX_BD 64
138#else
139#define NUM_RX_BD 16
140#endif
141
142#define TX_BD_BUF_SIZE (8192)
143#define RX_BD_BUF_SIZE (2048)
144
145#define NUM_BIT_MAX_NUM_HW_QUEUE 2
136#define NUM_BIT_NUM_TX_BD 6
137#define NUM_TX_BD (1<<NUM_BIT_NUM_TX_BD) // !!! should align to the fifo size in tx_bit_intf.v
138
139#ifdef USE_NEW_RX_INTERRUPT
140#define NUM_RX_BD 64
141#else
142#define NUM_RX_BD 16
143#endif
144
145#define TX_BD_BUF_SIZE (8192)
146#define RX_BD_BUF_SIZE (2048)
147
148#define NUM_BIT_MAX_NUM_HW_QUEUE 2
146#define MAX_NUM_HW_QUEUE 4 // number of queue in FPGA
147#define MAX_NUM_SW_QUEUE 4 // number of queue in Linux, depends on the number we report by dev->queues in openwifi_dev_probe
148#define NUM_BIT_MAX_PHY_TX_SN 10 // decrease 12 to 10 to reserve 2 bits storing related linux prio idx
149#define MAX_PHY_TX_SN ((1<<NUM_BIT_MAX_PHY_TX_SN)-1)
150
151#define AD9361_RADIO_OFF_TX_ATT 89750 //please align with ad9361.c
152#define AD9361_RADIO_ON_TX_ATT 000 //please align with rf_init.sh
153#define AD9361_CTRL_OUT_EN_MASK (0xFF)
154#define AD9361_CTRL_OUT_INDEX_ANT0 (0x16)
155#define AD9361_CTRL_OUT_INDEX_ANT1 (0x17)

--- 378 unchanged lines hidden ---
149#define NUM_BIT_MAX_PHY_TX_SN 10 // decrease 12 to 10 to reserve 2 bits storing related linux prio idx
150#define MAX_PHY_TX_SN ((1<<NUM_BIT_MAX_PHY_TX_SN)-1)
151
152#define AD9361_RADIO_OFF_TX_ATT 89750 //please align with ad9361.c
153#define AD9361_RADIO_ON_TX_ATT 000 //please align with rf_init.sh
154#define AD9361_CTRL_OUT_EN_MASK (0xFF)
155#define AD9361_CTRL_OUT_INDEX_ANT0 (0x16)
156#define AD9361_CTRL_OUT_INDEX_ANT1 (0x17)

--- 378 unchanged lines hidden ---