[PATCH v4 04/11] wifi: ath12k: propagate EHT capabilities to userspace
Aloka Dixit
quic_alokad at quicinc.com
Mon Jul 24 11:11:53 PDT 2023
On 6/15/2023 4:51 AM, Kalle Valo wrote:
> Aloka Dixit <quic_alokad at quicinc.com> writes:
>
>> Propagate EHT capabilities to the userspace using a new member
>> 'eht_cap' in structure ieee80211_sband_iftype_data.
>>
>> MCS-NSS capabilities are copied depending on the supported bandwidths
>> for the given band.
>>
>> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
>> Signed-off-by: Aloka Dixit <quic_alokad at quicinc.com>
>> Signed-off-by: Pradeep Kumar Chitrapu<quic_pradeepc at quicinc.com>
>
> [...]
>
>> +static void ath12k_mac_copy_eht_ppet_ru(u32 ppet, u8 ppe_thres[], int ru)
>> +{
>> + int i;
>> + u32 val = 0;
>> + u8 ppet_size_ru = IEEE80211_EHT_PPE_THRES_INFO_PPET_SIZE * 2;
>> + u8 bit = IEEE80211_EHT_PPE_THRES_INFO_HEADER_SIZE;
>> +
>> + u32p_replace_bits(&val, ppet >> (ru * ppet_size_ru),
>> + GENMASK(ppet_size_ru - 1, 0));
>> +
>> + val = ((val >> IEEE80211_EHT_PPE_THRES_INFO_PPET_SIZE) & GENMASK(2, 0)) |
>> + ((val & GENMASK(2, 0)) << IEEE80211_EHT_PPE_THRES_INFO_PPET_SIZE);
>
> This shifting of val looks weird. I didn't check the spec, what does it
> do? Is there any cleaner way to do this? And should have a define for
> GENMASK(2, 0)?
>
I have a follow-up ready, based on top of the fixes you already made in
the master pending branch, which cleans this up.
Also noticed that need to use hweight16 instead of hweight8 for
IEEE80211_EHT_PPE_THRES_RU_INDEX_BITMASK_MASK. The new version fixes it
in this patch as well as in patch #6.
Should I send the next version?
More information about the ath12k
mailing list