ath12k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
To: Jeff Johnson <quic_jjohnson@quicinc.com>,
	Sriram R <quic_srirrama@quicinc.com>,
	<ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 01/12] wifi: ath12k: add multiple radio support in a single MAC HW un/register
Date: Tue, 16 Jan 2024 10:15:52 +0530	[thread overview]
Message-ID: <de5a4bbc-3533-7666-c079-9164ea98dd27@quicinc.com> (raw)
In-Reply-To: <aee0419e-c443-4b5d-957c-6c88dd3d4a71@quicinc.com>


On 1/12/2024 10:33 PM, Jeff Johnson wrote:
> On 1/10/2024 8:50 PM, Sriram R wrote:
> ...
>
>> @@ -7553,10 +7553,12 @@ static int ath12k_mac_setup_channels_rates(struct ath12k *ar,
>>   
>>   static u16 ath12k_mac_get_ifmodes(struct ath12k_hw *ah)
>>   {
>> -	struct ath12k *ar = ath12k_ah_to_ar(ah);
>> +	struct ath12k *ar;
>> +	int i;
>>   	u16 interface_modes = U16_MAX;
>>   
>> -	interface_modes &= ar->ab->hw_params->interface_modes;
>> +	for_each_ar(i, ah, ar)
>> +		interface_modes &= ar->ab->hw_params->interface_modes;
> This logic sets interface_modes to be the modes that are supported on
> every radio (starts with all modes supported and then masks off the ones
> that are not supported on a given radio). That means that if radio 0
> supports a mode that radio 1 does not support, then we don't advertise
> support for that mode. Just want to verify that is the correct logic,
> and that instead we don't want to start with no modes supported and then
> OR in the ones that are supported so that we get the list of modes that
> are supported on ANY radio instead of ALL radios.


Yes, interface_modes to be the modes that are supported on every radio 
not any radio.

Any radio support can be add in the future ath12k driver once the hw 
specific interface mode support is added in mac80211/cfg80211.


>>   
>>   	return interface_modes == U16_MAX ? 0 : interface_modes;
>>   }
>> @@ -7564,15 +7566,19 @@ static u16 ath12k_mac_get_ifmodes(struct ath12k_hw *ah)
>>   static bool ath12k_mac_is_iface_mode_enable(struct ath12k_hw *ah,
>>   					    enum nl80211_iftype type)
>>   {
>> -	struct ath12k *ar = ath12k_ah_to_ar(ah);
>> +	struct ath12k *ar;
>> +	int i;
>>   	u16 interface_modes, mode;
>>   	bool is_enable = true;
>>   
>>   	mode = BIT(type);
>> -
>> -	interface_modes = ar->ab->hw_params->interface_modes;
>> -	if (!(interface_modes & mode))
>> -		is_enable = false;
>> +	for_each_ar(i, ah, ar) {
>> +		interface_modes = ar->ab->hw_params->interface_modes;
>> +		if (!(interface_modes & mode)) {
>> +			is_enable = false;
> note that in the example I mentioned above, this logic could say a given
> mode is enabled even though the bit isn't set in the interface_modes
> listed above


The condition check "if (!(interface_modes & mode))" become true when 
the the bit isn't set in the interface_modes. So no issues.


Thanks,

Karthikeyan



  reply	other threads:[~2024-01-16  4:46 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  4:50 [PATCH 00/12] wifi: ath12k: Add single wiphy support Sriram R
2024-01-11  4:50 ` [PATCH 01/12] wifi: ath12k: add multiple radio support in a single MAC HW un/register Sriram R
2024-01-12 15:11   ` Jeff Johnson
2024-01-12 17:03   ` Jeff Johnson
2024-01-16  4:45     ` Karthikeyan Periyasamy [this message]
2024-01-11  4:50 ` [PATCH 02/12] wifi: ath12k: Modify add and remove chanctx ops for single wiphy support Sriram R
2024-01-12 17:05   ` Jeff Johnson
2024-01-11  4:50 ` [PATCH 03/12] wifi: ath12k: modify ath12k mac start/stop ops for single wiphy Sriram R
2024-01-12 17:07   ` Jeff Johnson
2024-01-11  4:50 ` [PATCH 04/12] wifi: ath12k: vdev statemachine changes " Sriram R
2024-01-12 17:10   ` Jeff Johnson
2024-01-11  4:50 ` [PATCH 05/12] wifi: ath12k: scan " Sriram R
2024-01-12 17:13   ` Jeff Johnson
2024-01-11  4:50 ` [PATCH 06/12] wifi: ath12k: fetch correct radio based on vdev status Sriram R
2024-01-12 17:15   ` Jeff Johnson
2024-01-11  4:50 ` [PATCH 07/12] wifi: ath12k: Cache vdev configs before vdev create Sriram R
2024-01-12 17:23   ` Jeff Johnson
2024-01-13  9:44     ` Kalle Valo
2024-01-11  4:50 ` [PATCH 08/12] wifi: ath12k: Add additional checks for vif and sta iterators Sriram R
2024-01-12 17:26   ` Jeff Johnson
2024-01-11  4:50 ` [PATCH 09/12] wifi: ath12k: modify regulatory support for single wiphy architecture Sriram R
2024-01-12 18:15   ` Jeff Johnson
2024-01-15  7:53     ` Sriram R (QUIC)
2024-01-11  4:50 ` [PATCH 10/12] wifi: ath12k: Modify set and get antenna mac ops for single wiphy Sriram R
2024-01-12 18:25   ` Jeff Johnson
2024-01-11  4:50 ` [PATCH 11/12] wifi: ath12k: Modify rts threshold mac op " Sriram R
2024-01-12 18:26   ` Jeff Johnson
2024-01-11  4:50 ` [PATCH 12/12] wifi: ath12k: support get_survey " Sriram R
2024-01-12 18:26   ` Jeff Johnson
2024-01-11 20:16 ` [PATCH 00/12] wifi: ath12k: Add single wiphy support Jeff Johnson
2024-01-12  4:34   ` Sriram R (QUIC)
2024-01-12 16:44     ` Jeff Johnson
2024-01-12 18:30       ` Jeff Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de5a4bbc-3533-7666-c079-9164ea98dd27@quicinc.com \
    --to=quic_periyasa@quicinc.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_jjohnson@quicinc.com \
    --cc=quic_srirrama@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).