Skip to content

Commit a60c040

Browse files
castiel652kvalo
authored andcommitted
wifi: ath10k: Use IEEE80211_SEQ_TO_SN() for seq_ctrl conversion
Use IEEE80211_SEQ_TO_SN() macro to convert seq_ctrl to sn for better readability. Signed-off-by: Zhi-Jun You <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent dc45398 commit a60c040

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/wireless/ath/ath10k/htt_rx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ static void ath10k_process_rx(struct ath10k *ar, struct sk_buff *skb)
13791379
ath10k_get_tid(hdr, tid, sizeof(tid)),
13801380
is_multicast_ether_addr(ieee80211_get_DA(hdr)) ?
13811381
"mcast" : "ucast",
1382-
(__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4,
1382+
IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl)),
13831383
(status->encoding == RX_ENC_LEGACY) ? "legacy" : "",
13841384
(status->encoding == RX_ENC_HT) ? "ht" : "",
13851385
(status->encoding == RX_ENC_VHT) ? "vht" : "",
@@ -1902,7 +1902,7 @@ static bool ath10k_htt_rx_h_frag_pn_check(struct ath10k *ar,
19021902
last_pn = &peer->frag_tids_last_pn[tid];
19031903
new_pn.pn48 = ath10k_htt_rx_h_get_pn(ar, skb, offset, enctype);
19041904
frag_number = le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG;
1905-
seq = (__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4;
1905+
seq = IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl));
19061906

19071907
if (frag_number == 0) {
19081908
last_pn->pn48 = new_pn.pn48;
@@ -2824,7 +2824,7 @@ static bool ath10k_htt_rx_proc_rx_frag_ind_hl(struct ath10k_htt *htt,
28242824

28252825
hdr_space = ieee80211_hdrlen(hdr->frame_control);
28262826
sc = __le16_to_cpu(hdr->seq_ctrl);
2827-
seq = (sc & IEEE80211_SCTL_SEQ) >> 4;
2827+
seq = IEEE80211_SEQ_TO_SN(sc);
28282828
frag = sc & IEEE80211_SCTL_FRAG;
28292829

28302830
sec_index = MS(rx_desc_info, HTT_RX_DESC_HL_INFO_MCAST_BCAST) ?

0 commit comments

Comments
 (0)