[PATCHv2 2/2] ath10k: Allow setting coverage class

Michal Kazior michal.kazior at tieto.com
Wed Aug 3 22:28:08 PDT 2016


On 3 August 2016 at 17:37, Sebastian Gottschall <s.gottschall at dd-wrt.com> wrote:
>
>>> +       if (value < 0)
>>> +               value = ar->fw_coverage.coverage_class;
>>> +
>>> +       /* Break out if the coverage class and registers have the
>>> expected
>>> +        * value.
>>> +        */
>>> +       if (value == ar->fw_coverage.coverage_class &&
>>> +           slottime_reg == ar->fw_coverage.reg_slottime_conf &&
>>> +           timeout_reg == ar->fw_coverage.reg_ack_cts_timeout_conf)
>>> +               goto unlock;
>>
>> I would move this part to the caller and keep the hardware-specific
>> function just compute and set registers, e.g. have
>> ath10k_mac_set_coverage_class (as opposed to
>> ath10k_mac_op_set_coverage_class). It should also reduce some code
>> duplication.
>
> doesnt make sense. i already enhanced this code to support beeliner (99xx)
> and newers.
> the code is that much different that this check need to be treaded in a
> indivudual way
> reg_slottime_conf is hardware defacto specific since the value is taken from
> a hardware specific register.
> you cannot handle this outside this function since other chips have
> different registers.

Ah, you're right, my bad :)


Michał



More information about the ath10k mailing list