From 342bd25a0b694da0d4c4212b7bc83eff93377c29 Mon Sep 17 00:00:00 2001 From: Xianjun Jiao Date: Tue, 17 Jan 2023 13:23:20 +0100 Subject: [PATCH] Refactor a bit RING_ROOM_THRESHOLD/MAX_NUM_HW_QUEUE/MAX_NUM_SW_QUEUE --- driver/sdr.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/driver/sdr.h b/driver/sdr.h index 3923ebd..462b66e 100644 --- a/driver/sdr.h +++ b/driver/sdr.h @@ -129,7 +129,10 @@ enum sdrctl_reg_cat { #define LEN_PHY_CRC 4 #define LEN_MPDU_DELIM 4 -#define RING_ROOM_THRESHOLD 2 +#define MAX_NUM_HW_QUEUE 4 // number of queue in FPGA +#define MAX_NUM_SW_QUEUE 4 // number of queue in Linux, depends on the number we report by dev->queues in openwifi_dev_probe + +#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 #define NUM_BIT_NUM_TX_BD 6 #define NUM_TX_BD (1<queues in openwifi_dev_probe #define NUM_BIT_MAX_PHY_TX_SN 10 // decrease 12 to 10 to reserve 2 bits storing related linux prio idx #define MAX_PHY_TX_SN ((1<