[PATCH 7/8] wifi: ath12k: add helper to find multi-link station
Kalle Valo
kvalo at kernel.org
Fri Nov 1 07:33:45 PDT 2024
Jeff Johnson <quic_jjohnson at quicinc.com> writes:
>> --- a/drivers/net/wireless/ath/ath12k/peer.c
>> +++ b/drivers/net/wireless/ath/ath12k/peer.c
>> @@ -80,6 +80,20 @@ struct ath12k_peer *ath12k_peer_find_by_addr(struct ath12k_base *ab,
>> return NULL;
>> }
>>
>> +static struct ath12k_peer *ath12k_peer_find_by_ml_id(struct ath12k_base *ab,
>> + int ml_peer_id)
>> +{
>> + struct ath12k_peer *peer;
>> +
>> + lockdep_assert_held(&ab->base_lock);
>> +
>> + list_for_each_entry(peer, &ab->peers, list)
>> + if (ml_peer_id == peer->ml_peer_id)
>> + return peer;
>> +
>> + return NULL;
>> +}
>> +
>> struct ath12k_peer *ath12k_peer_find_by_id(struct ath12k_base *ab,
>> int peer_id)
>> {
>> @@ -87,6 +101,9 @@ struct ath12k_peer *ath12k_peer_find_by_id(struct ath12k_base *ab,
>>
>> lockdep_assert_held(&ab->base_lock);
>>
>> + if (peer_id & ATH12K_ML_PEER_ID_VALID)
[...]
> does other code elsewhere need to mask this bit off to have the "true" peer_id?
Based on my investigation the peer id is stored with
ATH12K_ML_PEER_ID_VALID so it should not be masked (unless I'm missing
something). This is not pretty but I guess keeps the code simpler.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
More information about the ath12k
mailing list