Search Linux Wireless

Re: [PATCH 7/8] ath11k: add ce services for IPQ6018

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Julian Calaby <julian.calaby@xxxxxxxxx> writes:

> On Tue, Jun 9, 2020 at 3:07 PM Anilkumar Kolli <akolli@xxxxxxxxxxxxxx> wrote:
>>
>> IPQ6018 does not support mac2, add a new ce service map.
>>
>> Signed-off-by: Anilkumar Kolli <akolli@xxxxxxxxxxxxxx>
>> ---
>>  drivers/net/wireless/ath/ath11k/ahb.c | 122 ++++++++++++++++++++++++++++++++--
>>  1 file changed, 117 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
>> index b080ad8fab0a..25764f719db0 100644
>> --- a/drivers/net/wireless/ath/ath11k/ahb.c
>> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
>> @@ -647,8 +749,15 @@ static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *ab)
>>
>>         cfg->tgt_ce_len = ARRAY_SIZE(target_ce_config_wlan) - 1;
>>         cfg->tgt_ce = target_ce_config_wlan;
>> -       cfg->svc_to_ce_map_len = ARRAY_SIZE(target_service_to_ce_map_wlan);
>> -       cfg->svc_to_ce_map = target_service_to_ce_map_wlan;
>> +       if (ab->hw_params.dev_id == ATH11K_HW_IPQ6018) {
>> +               cfg->svc_to_ce_map_len =
>> +                       ARRAY_SIZE(target_service_to_ce_map_wlan_ipq6018);
>> +               cfg->svc_to_ce_map = target_service_to_ce_map_wlan_ipq6018;
>> +       } else {
>> +               cfg->svc_to_ce_map_len =
>> +                       ARRAY_SIZE(target_service_to_ce_map_wlan_ipq8074);
>> +               cfg->svc_to_ce_map = target_service_to_ce_map_wlan_ipq8074;
>> +       }
>
> You could just have a pointer to this array in the "hw_params"
> structure which would reduce this to something like:
>
> cfg->svc_to_ce_map_len = ARRAY_SIZE(ab->hw_params.service_to_ce_map);
> cfg->svc_to_ce_map = ab->hw_params.service_to_ce_map;
>
> and make adding future hardware easier.

Yeah, that's a good idea.

-- 
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux