ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: ath10k: Use macro for seq_ctrl conversion
@ 2022-11-06 16:22 Zhi-Jun You
  2022-11-09  7:05 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Zhi-Jun You @ 2022-11-06 16:22 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Zhi-Jun You

Use IEEE80211_SEQ_TO_SN macro to convert seq_ctrl to sn for better
readability.

Signed-off-by: Zhi-Jun You <hujy652@gmail.com>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index e76aab973320..3df52906b356 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -1379,7 +1379,7 @@ static void ath10k_process_rx(struct ath10k *ar, struct sk_buff *skb)
 		   ath10k_get_tid(hdr, tid, sizeof(tid)),
 		   is_multicast_ether_addr(ieee80211_get_DA(hdr)) ?
 							"mcast" : "ucast",
-		   (__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4,
+		   IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl)),
 		   (status->encoding == RX_ENC_LEGACY) ? "legacy" : "",
 		   (status->encoding == RX_ENC_HT) ? "ht" : "",
 		   (status->encoding == RX_ENC_VHT) ? "vht" : "",
@@ -1902,7 +1902,7 @@ static bool ath10k_htt_rx_h_frag_pn_check(struct ath10k *ar,
 	last_pn = &peer->frag_tids_last_pn[tid];
 	new_pn.pn48 = ath10k_htt_rx_h_get_pn(ar, skb, offset, enctype);
 	frag_number = le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG;
-	seq = (__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
+	seq = IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl));
 
 	if (frag_number == 0) {
 		last_pn->pn48 = new_pn.pn48;
@@ -2824,7 +2824,7 @@ static bool ath10k_htt_rx_proc_rx_frag_ind_hl(struct ath10k_htt *htt,
 
 	hdr_space = ieee80211_hdrlen(hdr->frame_control);
 	sc = __le16_to_cpu(hdr->seq_ctrl);
-	seq = (sc & IEEE80211_SCTL_SEQ) >> 4;
+	seq = IEEE80211_SEQ_TO_SN(sc);
 	frag = sc & IEEE80211_SCTL_FRAG;
 
 	sec_index = MS(rx_desc_info, HTT_RX_DESC_HL_INFO_MCAST_BCAST) ?
-- 
2.34.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

* Re: [PATCH] wifi: ath10k: Use macro for seq_ctrl conversion
  2022-11-06 16:22 [PATCH] wifi: ath10k: Use macro for seq_ctrl conversion Zhi-Jun You
@ 2022-11-09  7:05 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2022-11-09  7:05 UTC (permalink / raw)
  To: Zhi-Jun You; +Cc: ath10k, linux-wireless, Zhi-Jun You

Zhi-Jun You <hujy652@gmail.com> wrote:

> Use IEEE80211_SEQ_TO_SN() macro to convert seq_ctrl to sn for better
> readability.
> 
> Signed-off-by: Zhi-Jun You <hujy652@gmail.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

a60c04017298 wifi: ath10k: Use IEEE80211_SEQ_TO_SN() for seq_ctrl conversion

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20221106162227.1119-1-hujy652@gmail.com/

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


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

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

end of thread, other threads:[~2022-11-09  7:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-06 16:22 [PATCH] wifi: ath10k: Use macro for seq_ctrl conversion Zhi-Jun You
2022-11-09  7:05 ` Kalle Valo

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