[PATCH ath-next 08/15] wifi: ath12k: add Wi-Fi 8 HAL ops and descriptor definitions for QCN9575

Praneesh P praneesh.p at oss.qualcomm.com
Wed Nov 18 21:59:54 PST 2026


On 11/17/2026 11:35 PM, Praneesh P wrote:
>
>> diff --git a/drivers/net/wireless/ath/ath12k/wifi8/hal.h 
>> b/drivers/net/wireless/ath/ath12k/wifi8/hal.h
>> index 311fc5b8015c..c99521abdcb3 100644
>> --- a/drivers/net/wireless/ath/ath12k/wifi8/hal.h
>> +++ b/drivers/net/wireless/ath/ath12k/wifi8/hal.h
>> @@ -7,7 +7,164 @@
>>   #define ATH12K_WIFI8_HAL_H
>>     #include "../core.h"
>> +#include "../hal.h"
>> +#include "hal_desc.h"
>> +
>> +/* WCSS Relative address */
>> +#define HAL_SEQ_WCSS_UMAC_CE0_SRC_REG(hal) \
>> +    ((hal)->regs->umac_ce0_src_reg_base)
>> +#define HAL_SEQ_WCSS_UMAC_CE0_DST_REG(hal) \
>> +    ((hal)->regs->umac_ce0_dest_reg_base)
>> +#define HAL_SEQ_WCSS_UMAC_CE1_SRC_REG(hal) \
>> +    ((hal)->regs->umac_ce1_src_reg_base)
>> +#define HAL_SEQ_WCSS_UMAC_CE1_DST_REG(hal) \
>> +    ((hal)->regs->umac_ce1_dest_reg_base)
>> +
>> +#define HAL_TCL1_RING_BASE_LSB(hal) \
>> +    ((hal)->regs->tcl1_ring_base_lsb)
>> +#define HAL_TCL1_RING_BASE_MSB(hal) \
>> +    ((hal)->regs->tcl1_ring_base_msb)
>> +#define HAL_TCL1_RING_ID(hal) ((hal)->regs->tcl1_ring_id)
>> +#define HAL_TCL1_RING_MISC(hal) \
>> +    ((hal)->regs->tcl1_ring_misc)
>> +#define HAL_TCL1_RING_TP_ADDR_LSB(hal) \
>> +    ((hal)->regs->tcl1_ring_tp_addr_lsb)
>> +#define HAL_TCL1_RING_TP_ADDR_MSB(hal) \
>> +    ((hal)->regs->tcl1_ring_tp_addr_msb)
>> +#define HAL_TCL1_RING_CONSUMER_INT_SETUP_IX0(hal) \
>> +    ((hal)->regs->tcl1_ring_consumer_int_setup_ix0)
>> +#define HAL_TCL1_RING_CONSUMER_INT_SETUP_IX1(hal) \
>> +    ((hal)->regs->tcl1_ring_consumer_int_setup_ix1)
>> +#define HAL_TCL1_RING_MSI1_BASE_LSB(hal) \
>> +    ((hal)->regs->tcl1_ring_msi1_base_lsb)
>> +#define HAL_TCL1_RING_MSI1_BASE_MSB(hal) \
>> +    ((hal)->regs->tcl1_ring_msi1_base_msb)
>> +#define HAL_TCL1_RING_MSI1_DATA(hal) \
>> +    ((hal)->regs->tcl1_ring_msi1_data)
>> +
>> +#define HAL_TCL1_RING_MSI1_BASE_LSB_OFFSET(hal) ({ typeof(hal) _hal 
>> = (hal); \
>> +    (HAL_TCL1_RING_MSI1_BASE_LSB(_hal) - 
>> HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_MSI1_BASE_MSB_OFFSET(hal)    ({ typeof(hal) 
>> _hal = (hal); \
>> +    (HAL_TCL1_RING_MSI1_BASE_MSB(_hal) - 
>> HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_MSI1_DATA_OFFSET(hal) ({ typeof(hal) _hal = 
>> (hal); \
>> +    (HAL_TCL1_RING_MSI1_DATA(_hal) - HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_BASE_MSB_OFFSET(hal) ({ typeof(hal) _hal = 
>> (hal); \
>> +    (HAL_TCL1_RING_BASE_MSB(_hal) - HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_ID_OFFSET(hal) ({ typeof(hal) _hal = (hal); \
>> +    (HAL_TCL1_RING_ID(_hal) - HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_CONSR_INT_SETUP_IX0_OFFSET(hal) ({ typeof(hal) 
>> _hal = (hal); \
>> +    (HAL_TCL1_RING_CONSUMER_INT_SETUP_IX0(_hal) - 
>> HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_CONSR_INT_SETUP_IX1_OFFSET(hal) ({ typeof(hal) 
>> _hal = (hal); \
>> +    (HAL_TCL1_RING_CONSUMER_INT_SETUP_IX1(_hal) - 
>> HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_TP_ADDR_LSB_OFFSET(hal) ({ typeof(hal) _hal = 
>> (hal); \
>> +    (HAL_TCL1_RING_TP_ADDR_LSB(_hal) - 
>> HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_TP_ADDR_MSB_OFFSET(hal) ({ typeof(hal) _hal = 
>> (hal); \
>> +    (HAL_TCL1_RING_TP_ADDR_MSB(_hal) - 
>> HAL_TCL1_RING_BASE_LSB(_hal)); })
>> +#define HAL_TCL1_RING_MISC_OFFSET(hal) ({ typeof(hal) _hal = (hal); \
>> +    (HAL_TCL1_RING_MISC(_hal) - HAL_TCL1_RING_BASE_LSB(_hal)); })
> [snipped]
>> +/* REO2SW(x) R0 ring configuration address */
>> +#define HAL_REO1_RING_BASE_LSB(hal) ((hal)->regs->reo1_ring_base_lsb)
>> +#define HAL_REO1_RING_BASE_MSB(hal) ((hal)->regs->reo1_ring_base_msb)
>> +#define HAL_REO1_RING_ID(hal) ((hal)->regs->reo1_ring_id)
>> +#define HAL_REO1_RING_MISC(hal) ((hal)->regs->reo1_ring_misc)
>> +#define HAL_REO1_RING_HP_ADDR_LSB(hal) 
>> ((hal)->regs->reo1_ring_hp_addr_lsb)
>> +#define HAL_REO1_RING_HP_ADDR_MSB(hal) 
>> ((hal)->regs->reo1_ring_hp_addr_msb)
>> +#define HAL_REO1_RING_PRODUCER_INT_SETUP(hal) \
>> +    ((hal)->regs->reo1_ring_producer_int_setup)
>> +#define HAL_REO1_RING_MSI1_BASE_LSB(hal)    \
>> +    ((hal)->regs->reo1_ring_msi1_base_lsb)
>> +#define HAL_REO1_RING_MSI1_BASE_MSB(hal)    \
>> +    ((hal)->regs->reo1_ring_msi1_base_msb)
>> +#define HAL_REO1_RING_MSI1_DATA(hal) ((hal)->regs->reo1_ring_msi1_data)
>> +
> These accessors obtain register addresses from the runtime selected 
> hal->regs table,
> and their definitions are identical to the wifi7 accessors. Please 
> define them once in
> common hal.h, including the identical offset helpers, and reuse those 
> definitions here.
You can ignore this for now. I have a separate patch to address this 
issue and will post it soon.



More information about the ath12k mailing list