diff options
author | Rakesh Pillai <pillair@codeaurora.org> | 2017-01-26 18:34:06 +0530 |
---|---|---|
committer | Rakesh Pillai <pillair@codeaurora.org> | 2017-02-02 13:09:41 +0530 |
commit | 9cd9125bc4e231953ab320c7345163556513dd67 (patch) | |
tree | a9c94e5110c280ac45ab71cb7647a5f60bce44e3 /drivers/net/wireless | |
parent | af883d4db0b398542bb561808a11019f0998d129 (diff) |
ath10k: Refactor HTT RX datapath for WCN3990
WCN3990 is a 37 bit target and needs DMA_MAP of 37 bits.
The HTT RX datapath currently uses 32-bit address.
Refactor the HTT RX datapath to enable DMA MAP of 37 bits for WCN3990.
Fix ath10k_htt_rx_h_ppdu API usage.
CRs-Fixed: 2000491
Change-Id: I3d1505202a899796b0bfa7975844e3700326bfdf
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/htt_rx.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 78df1d1ad67c..42e97d99a3d1 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -37,7 +37,7 @@ static int ath10k_htt_rx_get_csum_state(struct sk_buff *skb); static struct sk_buff * -ath10k_htt_rx_find_skb_paddr(struct ath10k *ar, u32 paddr) +ath10k_htt_rx_find_skb_paddr(struct ath10k *ar, u64 paddr) { struct ath10k_skb_rxcb *rxcb; @@ -130,13 +130,16 @@ static int __ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num) rxcb = ATH10K_SKB_RXCB(skb); rxcb->paddr = paddr; htt->rx_ring.netbufs_ring[idx] = skb; - htt->rx_ring.paddrs_ring[idx] = __cpu_to_le32(paddr); + if (QCA_REV_WCN3990(htt->ar)) + htt->rx_ring.paddrs_ring[idx] = __cpu_to_le64(paddr); + else + htt->rx_ring.paddrs_ring[idx] = __cpu_to_le32(paddr); htt->rx_ring.fill_cnt++; if (htt->rx_ring.in_ord_rx) { hash_add(htt->rx_ring.skb_table, &ATH10K_SKB_RXCB(skb)->hlist, - (u32)paddr); + paddr); } num--; @@ -382,7 +385,7 @@ static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt, } static struct sk_buff *ath10k_htt_rx_pop_paddr(struct ath10k_htt *htt, - u32 paddr) + u64 paddr) { struct ath10k *ar = htt->ar; struct ath10k_skb_rxcb *rxcb; @@ -417,7 +420,7 @@ static int ath10k_htt_rx_pop_paddr_list(struct ath10k_htt *htt, struct sk_buff *msdu; int msdu_count; bool is_offload; - u32 paddr; + u64 paddr; lockdep_assert_held(&htt->rx_ring.lock); @@ -427,6 +430,8 @@ static int ath10k_htt_rx_pop_paddr_list(struct ath10k_htt *htt, while (msdu_count--) { #ifdef CONFIG_ATH10K_SNOC paddr = __le32_to_cpu(msdu_desc->msdu_paddr_lo); + paddr |= ((u64)(msdu_desc->msdu_paddr_hi & + HTT_WCN3990_PADDR_MASK) << 32); #else paddr = __le32_to_cpu(msdu_desc->msdu_paddr); #endif @@ -938,7 +943,7 @@ static void ath10k_process_rx(struct ath10k *ar, *status = *rx_status; ath10k_dbg(ar, ATH10K_DBG_DATA, - "rx skb %pK len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%llx fcs-err %i mic-err %i amsdu-more %i\n", + "rx skb %pK len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n", skb, skb->len, ieee80211_get_SA(hdr), @@ -1566,7 +1571,7 @@ static int ath10k_htt_rx_handle_amsdu(struct ath10k_htt *htt) } num_msdus = skb_queue_len(&amsdu); - ath10k_htt_rx_h_ppdu(ar, &amsdu, &rx_status, 0xffff); + ath10k_htt_rx_h_ppdu(ar, &amsdu, rx_status, 0xffff); ath10k_htt_rx_h_unchain(ar, &amsdu, ret > 0); ath10k_htt_rx_h_filter(ar, &amsdu, rx_status); ath10k_htt_rx_h_mpdu(ar, &amsdu, rx_status); |