From e7e784d1b422886308d1818796c643ab2e9ade38 Mon Sep 17 00:00:00 2001 From: Sathish Kumar Date: Thu, 4 May 2017 16:24:22 +0530 Subject: [PATCH] qcacmn: Adding SW workaround for raw mode AMSDU packets Due to HW limitation, WEP bit is expected to be set in AMSDU packets transmitted in raw mode. Set WEP bit if the QOS frame is AMSDU during the tx processing of the raw mode packet. Change-Id: Ibaa7d95f6ebcf9016e3c02355b5f0ce909eb9a93 CRs-Fixed: 2042666 --- dp/wifi3.0/dp_tx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 86585a1016..33ea638072 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -591,9 +591,16 @@ static qdf_nbuf_t dp_tx_prepare_raw(struct dp_vdev *vdev, qdf_nbuf_t nbuf, int32_t i; struct dp_tx_sg_info_s *sg_info = &msdu_info->u.sg_info; + qdf_dot3_qosframe_t *qos_wh = (qdf_dot3_qosframe_t *) nbuf->data; DP_STATS_INC_PKT(vdev, tx_i.raw.raw_pkt, 1, qdf_nbuf_len(nbuf)); + /* SWAR for HW: Enable WEP bit in the AMSDU frames for RAW mode */ + if ((qos_wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) + && (qos_wh->i_qos[0] & IEEE80211_QOS_AMSDU)) { + qos_wh->i_fc[1] |= IEEE80211_FC1_WEP; + } + if (QDF_STATUS_SUCCESS != qdf_nbuf_map(vdev->osdev, nbuf, QDF_DMA_TO_DEVICE)) { qdf_print("dma map error\n"); @@ -603,7 +610,7 @@ static qdf_nbuf_t dp_tx_prepare_raw(struct dp_vdev *vdev, qdf_nbuf_t nbuf, } for (curr_nbuf = nbuf, i = 0; curr_nbuf; - curr_nbuf = qdf_nbuf_next(nbuf), i++) { + curr_nbuf = qdf_nbuf_next(curr_nbuf), i++) { seg_info->frags[i].paddr_lo = qdf_nbuf_get_frag_paddr(curr_nbuf, 0); seg_info->frags[i].paddr_hi = 0x0;