[PATCH v3] ath10k: Override CE5 configuration for QCA6147 device

Kalle Valo kvalo at qca.qualcomm.com
Thu Nov 12 06:53:58 PST 2015


Julian Calaby <julian.calaby at gmail.com> writes:

>> +static void ath10k_pci_override_ce_config(struct ath10k *ar)
>> +{
>> +       struct ce_attr *attr;
>> +       struct ce_pipe_config *config;
>> +
>> +       /* For QCA6174 we're overriding the Copy Engine 5 configuration,
>> +        * since it is currently used for other feature.
>> +        */
>> +
>> +       /* Override Host's Copy Engine 5 configuration */
>> +       attr = &host_ce_config_wlan[5];
>> +       attr->src_sz_max = 0;
>> +       attr->dest_nentries = 0;
>> +
>> +       /* Override Target firmware's Copy Engine configuration */
>> +       config = &target_ce_config_wlan[5];
>> +       config->pipedir = __cpu_to_le32(PIPEDIR_OUT);
>> +       config->nbytes_max = __cpu_to_le32(2048);
>> +
>> +       /* Map from service/endpoint to Copy Engine */
>> +       target_service_to_ce_map_wlan[15].pipenum = __cpu_to_le32(1);
>> +}
>> +
>
> Stupid question: Why not have two different versions of each struct?
> One for QCA6174 and one for everyone else, and choose the appropriate
> one when they're uploaded to the firmware / used?

That's duplicate work when you change something in common CEs and
chances of missing something increases.

-- 
Kalle Valo



More information about the ath10k mailing list