public inbox for ath12k@lists.infradead.org
 help / color / mirror / Atom feed
From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Balamurugan Mahalingam <quic_bmahalin@quicinc.com>,
	Nicolas Escande <nico.escande@gmail.com>,
	ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] wifi: ath12k: Add support for MLO Multicast handling in driver
Date: Sat, 25 Jan 2025 10:16:11 -0800	[thread overview]
Message-ID: <a39d5381-fd5f-4187-a715-0fedd010d03e@oss.qualcomm.com> (raw)
In-Reply-To: <0e2feb8f-79dd-19af-3ad9-e61d3f25e9a6@quicinc.com>

On 1/24/2025 1:59 PM, Balamurugan Mahalingam wrote:
> On 1/24/2025 3:45 AM, Nicolas Escande wrote:
>> On Thu Jan 9, 2025 at 7:49 PM CET, Balamurugan Mahalingam wrote:
>> [...]
>>> diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
>>> index 76626d925adf..9d05fe7a870c 100644
>>> --- a/drivers/net/wireless/ath/ath12k/dp_tx.c
>>> +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
>>> @@ -217,7 +217,7 @@ static int ath12k_dp_tx_align_payload(struct ath12k_base *ab,
>>>   }
>>>   
>>>   int ath12k_dp_tx(struct ath12k *ar, struct ath12k_link_vif *arvif,
>>> -		 struct sk_buff *skb)
>>> +		 struct sk_buff *skb, bool gsn_valid, int mcbc_gsn)
>>>   {
>>>   	struct ath12k_base *ab = ar->ab;
>>>   	struct ath12k_dp *dp = &ab->dp;
>>> @@ -290,13 +290,24 @@ int ath12k_dp_tx(struct ath12k *ar, struct ath12k_link_vif *arvif,
>>>   		msdu_ext_desc = true;
>>>   	}
>>>   
>>> +	if (gsn_valid) {
>>> +		ti.meta_data_flags =
>>> +			u32_encode_bits(HTT_TCL_META_DATA_TYPE_GLOBAL_SEQ_NUM,
>>> +					HTT_TCL_META_DATA_TYPE) |
>>> +			u32_encode_bits(mcbc_gsn, HTT_TCL_META_DATA_GLOBAL_SEQ_NUM);
>>> +	}
>>> +
>> Hello,
>>
>> As ti is zeroed initilised isn't safer to do 'ti.meta_data_flags |='
>> instead of 'ti.meta_data_flags ='. This way if we add another flag in
>> meta_data_flag in the same func for another reason, we will have less risk of
>> overriding the said flags ?
>>
> 
> Hello Nicolas,
> In this case, this is an intentional reset of any previous residual 
> value in ti.meta_data_flags field.
> The meta_data_flags bit definition is different depending upon the 
> META_DATA_TYPE bit's value.

So in this case there can never be any conflicting information that came from
the assignment:
	ti.meta_data_flags = arvif->tcl_metadata;
??

Perhaps add a comment that states you are intentionally overriding the
information that came from arvif->tcl_metadata?

/jeff

> 
>>>   	ti.encap_type = ath12k_dp_tx_get_encap_type(arvif, skb);
>>>   	ti.addr_search_flags = arvif->hal_addr_search_flags;
>>>   	ti.search_type = arvif->search_type;
>>>   	ti.type = HAL_TCL_DESC_TYPE_BUFFER;
>>>   	ti.pkt_offset = 0;
>>>   	ti.lmac_id = ar->lmac_id;
>>> -	ti.vdev_id = arvif->vdev_id;
>>> +	if (gsn_valid)
>>> +		ti.vdev_id = arvif->vdev_id +
>>> +			     HTT_TX_MLO_MCAST_HOST_REINJECT_BASE_VDEV_ID;
>>> +	else
>>> +		ti.vdev_id = arvif->vdev_id;
>>>   	ti.bss_ast_hash = arvif->ast_hash;
>>>   	ti.bss_ast_idx = arvif->ast_idx;
>>>   	ti.dscp_tid_tbl_idx = 0;
> 



  reply	other threads:[~2025-01-25 18:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 18:49 [PATCH 0/2] wifi: ath12k: Add support for MLO Multicast Handling Balamurugan Mahalingam
2025-01-09 18:49 ` [PATCH 1/2] wifi: ath12k: Update HTT_TCL_METADATA version and bit mask definitions Balamurugan Mahalingam
2025-01-13 19:28   ` Jeff Johnson
2025-01-09 18:49 ` [PATCH 2/2] wifi: ath12k: Add support for MLO Multicast handling in driver Balamurugan Mahalingam
2025-01-13 19:29   ` Jeff Johnson
2025-01-24 11:45   ` Nicolas Escande
2025-01-24 21:59     ` Balamurugan Mahalingam
2025-01-25 18:16       ` Jeff Johnson [this message]
2025-01-25 20:33   ` Nicolas Escande

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=a39d5381-fd5f-4187-a715-0fedd010d03e@oss.qualcomm.com \
    --to=jeff.johnson@oss.qualcomm.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nico.escande@gmail.com \
    --cc=quic_bmahalin@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