Search Linux Wireless

Re: [PATCH 7/8] wifi: ath12k: add helper to find multi-link station

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

 



Jeff Johnson <quic_jjohnson@xxxxxxxxxxx> 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




[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