qcacmn: Add bi-direction dma map flag to qdf_nbuf_cb

In case of 11w PMF tx frame, some target would dma write to this tx
buffer, it may cause smmu check fault.

Add a bi-direction map flag to mcl skb.cb[] for this special case.

Change-Id: I72a2c11abb9f3e7e8fb9c6f5290cd4f8d209b19a
CRs-Fixed: 2337204
This commit is contained in:
Will Huang 2018-10-19 13:49:56 +08:00 • committed by nshrivas
commit 0f5ddf9578
2 changed files with 10 additions and 1 deletions

View file

@ -148,6 +148,8 @@ typedef union {
* @tx.dev.priv_cb_m.ipa.priv: private data, used by IPA
* @tx.dev.priv_cb_m.desc_id: tx desc id, used to sync between host and fw
* @tx.dev.priv_cb_m.mgmt_desc_id: mgmt descriptor for tx completion cb
* @tx.dev.priv_cb_m.dma_option.bi_map: flag to do bi-direction dma map
* @tx.dev.priv_cb_m.dma_option.reserved: reserved bits for future use
* @tx.dev.priv_cb_m.reserved: reserved
*
* @tx.ftype: mcast2ucast, TSO, SG, MESH
@ -244,7 +246,11 @@ struct qdf_nbuf_cb {
} ipa;
uint16_t desc_id;
uint16_t mgmt_desc_id;
uint32_t reserved;
struct {
uint8_t bi_map:1,
reserved:7;
} dma_option;
uint8_t reserved[3];
} priv_cb_m;
} dev;
uint8_t ftype;

View file

@ -45,6 +45,9 @@
(((struct qdf_nbuf_cb *)((skb)->cb))->u.tx.dev.priv_cb_m.desc_id)
#define QDF_NBUF_CB_MGMT_TXRX_DESC_ID(skb)\
(((struct qdf_nbuf_cb *)((skb)->cb))->u.tx.dev.priv_cb_m.mgmt_desc_id)
#define QDF_NBUF_CB_TX_DMA_BI_MAP(skb) \
(((struct qdf_nbuf_cb *)((skb)->cb))->u.tx.dev.priv_cb_m. \
dma_option.bi_map)
#define __qdf_nbuf_ipa_owned_get(skb) \
QDF_NBUF_CB_TX_IPA_OWNED(skb)