mirror of https://lore.kernel.org/ath12k/
 help / color / mirror / Atom feed
* [PATCH] wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he()
@ 2024-07-10  2:18 Baochen Qiang
  2024-07-15 17:31 ` Jeff Johnson
  2024-08-07  8:14 ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Baochen Qiang @ 2024-07-10  2:18 UTC (permalink / raw)
  To: ath12k; +Cc: linux-wireless, quic_bqiang

Currently ampdu_factor is wrongly calculated in
ath12k_peer_assoc_h_he(), fix it.

This is found during code review.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 8106297f0bc1..a7b86e6a2655 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -2196,9 +2196,8 @@ static void ath12k_peer_assoc_h_he(struct ath12k *ar,
 	 * request, then use MAX_AMPDU_LEN_FACTOR as 16 to calculate max_ampdu
 	 * length.
 	 */
-	ampdu_factor = (he_cap->he_cap_elem.mac_cap_info[3] &
-			IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) >>
-			IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK;
+	ampdu_factor = u8_get_bits(he_cap->he_cap_elem.mac_cap_info[3],
+				   IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK);
 
 	if (ampdu_factor) {
 		if (sta->deflink.vht_cap.vht_supported)

base-commit: 9fddbf081f2da3a20fecda0b58adacbf1379e304
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he()
  2024-07-10  2:18 [PATCH] wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he() Baochen Qiang
@ 2024-07-15 17:31 ` Jeff Johnson
  2024-07-16  1:50   ` Baochen Qiang
  2024-08-07  8:14 ` Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff Johnson @ 2024-07-15 17:31 UTC (permalink / raw)
  To: Baochen Qiang, ath12k; +Cc: linux-wireless

On 7/9/2024 7:18 PM, Baochen Qiang wrote:
> Currently ampdu_factor is wrongly calculated in
> ath12k_peer_assoc_h_he(), fix it.

You have 70+ columns for commit text, use them

What are the user-visible ramifications of this error? Just curious if this
needs to go into 6.11 via ath-current or can wait for 6.12.

/jeff


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he()
  2024-07-15 17:31 ` Jeff Johnson
@ 2024-07-16  1:50   ` Baochen Qiang
  2024-08-07  8:15     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Baochen Qiang @ 2024-07-16  1:50 UTC (permalink / raw)
  To: Jeff Johnson, ath12k; +Cc: linux-wireless



On 7/16/2024 1:31 AM, Jeff Johnson wrote:
> On 7/9/2024 7:18 PM, Baochen Qiang wrote:
>> Currently ampdu_factor is wrongly calculated in
>> ath12k_peer_assoc_h_he(), fix it.
> 
> You have 70+ columns for commit text, use them
Thank you Jeff for pointing this, do I need to respin for it?

> 
> What are the user-visible ramifications of this error? Just curious if this
> needs to go into 6.11 via ath-current or can wait for 6.12.
not sure of userspace ramifications. I think we can wait for 6.12.

> 
> /jeff


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he()
  2024-07-10  2:18 [PATCH] wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he() Baochen Qiang
  2024-07-15 17:31 ` Jeff Johnson
@ 2024-08-07  8:14 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2024-08-07  8:14 UTC (permalink / raw)
  To: Baochen Qiang; +Cc: ath12k, linux-wireless, quic_bqiang

Baochen Qiang <quic_bqiang@quicinc.com> wrote:

> Currently ampdu_factor is wrongly calculated in ath12k_peer_assoc_h_he(), fix it.
> 
> This is found during code review.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
> 
> Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

a66de2d0f22b wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20240710021819.87216-1-quic_bqiang@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he()
  2024-07-16  1:50   ` Baochen Qiang
@ 2024-08-07  8:15     ` Kalle Valo
  0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2024-08-07  8:15 UTC (permalink / raw)
  To: Baochen Qiang; +Cc: Jeff Johnson, ath12k, linux-wireless

Baochen Qiang <quic_bqiang@quicinc.com> writes:

> On 7/16/2024 1:31 AM, Jeff Johnson wrote:
>> On 7/9/2024 7:18 PM, Baochen Qiang wrote:
>>> Currently ampdu_factor is wrongly calculated in
>>> ath12k_peer_assoc_h_he(), fix it.
>> 
>> You have 70+ columns for commit text, use them
>
> Thank you Jeff for pointing this, do I need to respin for it?

No need to respin, I can edit commit messages and fixed it in my pending
branch.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-07  8:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10  2:18 [PATCH] wifi: ath12k: fix invalid AMPDU factor calculation in ath12k_peer_assoc_h_he() Baochen Qiang
2024-07-15 17:31 ` Jeff Johnson
2024-07-16  1:50   ` Baochen Qiang
2024-08-07  8:15     ` Kalle Valo
2024-08-07  8:14 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox