ath10k: remove DMA mapping wrappers
[cascardo/linux.git] / drivers / net / wireless / ath / ath10k / txrx.c
index 74f45fa..fe69899 100644 (file)
@@ -51,7 +51,6 @@ void ath10k_txrx_tx_unref(struct ath10k_htt *htt,
        struct ieee80211_tx_info *info;
        struct ath10k_skb_cb *skb_cb;
        struct sk_buff *msdu;
-       int ret;
 
        ath10k_dbg(ATH10K_DBG_HTT, "htt tx completion msdu_id %u discard %d no_ack %d\n",
                   tx_done->msdu_id, !!tx_done->discard, !!tx_done->no_ack);
@@ -65,9 +64,7 @@ void ath10k_txrx_tx_unref(struct ath10k_htt *htt,
        msdu = htt->pending_tx[tx_done->msdu_id];
        skb_cb = ATH10K_SKB_CB(msdu);
 
-       ret = ath10k_skb_unmap(dev, msdu);
-       if (ret)
-               ath10k_warn("data skb unmap failed (%d)\n", ret);
+       dma_unmap_single(dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
 
        if (skb_cb->htt.frag_len)
                skb_pull(msdu, skb_cb->htt.frag_len + skb_cb->htt.pad_len);
@@ -204,7 +201,7 @@ static void process_rx_rates(struct ath10k *ar, struct htt_rx_info *info,
                        break;
                /* 80MHZ */
                case 2:
-                       status->flag |= RX_FLAG_80MHZ;
+                       status->vht_flag |= RX_VHT_FLAG_80MHZ;
                }
 
                status->flag |= RX_FLAG_VHT;
@@ -258,20 +255,26 @@ void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info)
        status->band = ch->band;
        status->freq = ch->center_freq;
 
+       if (info->rate.info0 & HTT_RX_INDICATION_INFO0_END_VALID) {
+               /* TSF available only in 32-bit */
+               status->mactime = info->tsf & 0xffffffff;
+               status->flag |= RX_FLAG_MACTIME_END;
+       }
+
        ath10k_dbg(ATH10K_DBG_DATA,
-                  "rx skb %p len %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u\n",
+                  "rx skb %p len %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i\n",
                   info->skb,
                   info->skb->len,
                   status->flag == 0 ? "legacy" : "",
                   status->flag & RX_FLAG_HT ? "ht" : "",
                   status->flag & RX_FLAG_VHT ? "vht" : "",
                   status->flag & RX_FLAG_40MHZ ? "40" : "",
-                  status->flag & RX_FLAG_80MHZ ? "80" : "",
+                  status->vht_flag & RX_VHT_FLAG_80MHZ ? "80" : "",
                   status->flag & RX_FLAG_SHORT_GI ? "sgi " : "",
                   status->rate_idx,
                   status->vht_nss,
                   status->freq,
-                  status->band);
+                  status->band, status->flag, info->fcs_err);
        ath10k_dbg_dump(ATH10K_DBG_HTT_DUMP, NULL, "rx skb: ",
                        info->skb->data, info->skb->len);
 
@@ -378,7 +381,8 @@ void ath10k_peer_unmap_event(struct ath10k_htt *htt,
        spin_lock_bh(&ar->data_lock);
        peer = ath10k_peer_find_by_id(ar, ev->peer_id);
        if (!peer) {
-               ath10k_warn("unknown peer id %d\n", ev->peer_id);
+               ath10k_warn("peer-unmap-event: unknown peer id %d\n",
+                           ev->peer_id);
                goto exit;
        }