Skip to content

Commit d9e3835

Browse files
castiel652kvalo
authored andcommitted
wifi: ath10k: Remove redundant argument offset
This argument of ath10k_htt_rx_h_frag_pn_check() is always set to 0 so drop this. 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 2af7749 commit d9e3835

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

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

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,15 +1844,14 @@ static void ath10k_htt_rx_h_csum_offload(struct ath10k_hw_params *hw,
18441844
}
18451845

18461846
static u64 ath10k_htt_rx_h_get_pn(struct ath10k *ar, struct sk_buff *skb,
1847-
u16 offset,
18481847
enum htt_rx_mpdu_encrypt_type enctype)
18491848
{
18501849
struct ieee80211_hdr *hdr;
18511850
u64 pn = 0;
18521851
u8 *ehdr;
18531852

1854-
hdr = (struct ieee80211_hdr *)(skb->data + offset);
1855-
ehdr = skb->data + offset + ieee80211_hdrlen(hdr->frame_control);
1853+
hdr = (struct ieee80211_hdr *)skb->data;
1854+
ehdr = skb->data + ieee80211_hdrlen(hdr->frame_control);
18561855

18571856
if (enctype == HTT_RX_MPDU_ENCRYPT_AES_CCM_WPA2) {
18581857
pn = ehdr[0];
@@ -1866,19 +1865,17 @@ static u64 ath10k_htt_rx_h_get_pn(struct ath10k *ar, struct sk_buff *skb,
18661865
}
18671866

18681867
static bool ath10k_htt_rx_h_frag_multicast_check(struct ath10k *ar,
1869-
struct sk_buff *skb,
1870-
u16 offset)
1868+
struct sk_buff *skb)
18711869
{
18721870
struct ieee80211_hdr *hdr;
18731871

1874-
hdr = (struct ieee80211_hdr *)(skb->data + offset);
1872+
hdr = (struct ieee80211_hdr *)skb->data;
18751873
return !is_multicast_ether_addr(hdr->addr1);
18761874
}
18771875

18781876
static bool ath10k_htt_rx_h_frag_pn_check(struct ath10k *ar,
18791877
struct sk_buff *skb,
18801878
u16 peer_id,
1881-
u16 offset,
18821879
enum htt_rx_mpdu_encrypt_type enctype)
18831880
{
18841881
struct ath10k_peer *peer;
@@ -1893,14 +1890,14 @@ static bool ath10k_htt_rx_h_frag_pn_check(struct ath10k *ar,
18931890
return false;
18941891
}
18951892

1896-
hdr = (struct ieee80211_hdr *)(skb->data + offset);
1893+
hdr = (struct ieee80211_hdr *)skb->data;
18971894
if (ieee80211_is_data_qos(hdr->frame_control))
18981895
tid = ieee80211_get_tid(hdr);
18991896
else
19001897
tid = ATH10K_TXRX_NON_QOS_TID;
19011898

19021899
last_pn = &peer->frag_tids_last_pn[tid];
1903-
new_pn.pn48 = ath10k_htt_rx_h_get_pn(ar, skb, offset, enctype);
1900+
new_pn.pn48 = ath10k_htt_rx_h_get_pn(ar, skb, enctype);
19041901
frag_number = le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG;
19051902
seq = IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl));
19061903

@@ -2059,13 +2056,11 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
20592056
frag_pn_check = ath10k_htt_rx_h_frag_pn_check(ar,
20602057
msdu,
20612058
peer_id,
2062-
0,
20632059
enctype);
20642060

20652061
if (frag)
20662062
multicast_check = ath10k_htt_rx_h_frag_multicast_check(ar,
2067-
msdu,
2068-
0);
2063+
msdu);
20692064

20702065
if (!frag_pn_check || !multicast_check) {
20712066
/* Discard the fragment with invalid PN or multicast DA

0 commit comments

Comments
 (0)