diff options
| author | kaliu <kaliu@qti.qualcomm.com> | 2015-12-21 13:17:35 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-12-21 15:21:18 +0530 |
| commit | 2b0bb2b91cc80abc935d96c8a5a30084015cb670 (patch) | |
| tree | f1e7d8d9f3fff981fcaf14dbee53039c32600dbb | |
| parent | de38cd14420f9595afe9bd6ac235855093f529af (diff) | |
qcacld-2.0: Store tx desc id in sk_buff instead of skb head
In MDM ap+ap case, sometimes kernel issues two skb but has same mem
address of skb head and driver tx desc id is stored in skb head, so the
first id will be overwrote by the second one. Will hit crash when handle
the tx_desc.
The solution is storing tx desc id in sk_buff to avoid the case that two
skb has same tx desc id.
Change-Id: I2186a06ad3ec929683292c4c052904a18427cc64
CRs-Fixed: 951208
| -rw-r--r-- | CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h | 9 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/ol_txrx_htt_api.h | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h b/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h index d376f41ee903..33e09f2b2043 100644 --- a/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h +++ b/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h @@ -125,7 +125,11 @@ struct cvg_nbuf_cb { unsigned char tx_htt2_frm: 1; unsigned char tx_htt2_reserved: 7; #endif /* QCA_TX_HTT2_SUPPORT */ +#ifdef CONFIG_HL_SUPPORT + uint16_t tx_desc_id; +#endif }; + #ifdef QCA_ARP_SPOOFING_WAR #define NBUF_CB_PTR(skb) \ (((struct cvg_nbuf_cb *)((skb)->cb))->txrx_field.ptr) @@ -181,6 +185,11 @@ struct cvg_nbuf_cb { #define NBUF_GET_TX_HTT2_FRM(skb) 0 #endif /* QCA_TX_HTT2_SUPPORT */ +#ifdef CONFIG_HL_SUPPORT +#define NBUF_CB_ID(skb) \ + (&((struct cvg_nbuf_cb *)((skb)->cb))->tx_desc_id) +#endif + #define __adf_nbuf_get_num_frags(skb) \ /* assume the OS provides a single fragment */ \ (NBUF_NUM_EXTRA_FRAGS(skb) + 1) diff --git a/CORE/SERVICES/COMMON/ol_txrx_htt_api.h b/CORE/SERVICES/COMMON/ol_txrx_htt_api.h index 6f95a94f87d9..0baafe0f6bde 100644 --- a/CORE/SERVICES/COMMON/ol_txrx_htt_api.h +++ b/CORE/SERVICES/COMMON/ol_txrx_htt_api.h @@ -38,14 +38,20 @@ #include <ol_txrx_api.h> /* ol_txrx_pdev_handle */ - +#ifdef CONFIG_HL_SUPPORT +static inline u_int16_t * +ol_tx_msdu_id_storage(adf_nbuf_t msdu) +{ + return NBUF_CB_ID(msdu); +} +#else static inline u_int16_t * ol_tx_msdu_id_storage(adf_nbuf_t msdu) { adf_os_assert(adf_nbuf_headroom(msdu) >= (sizeof(u_int16_t) * 2 - 1)); return (u_int16_t *) (((adf_os_size_t) (adf_nbuf_head(msdu) + 1)) & ~0x1); } - +#endif /** * @brief Tx MSDU download completion for a LL system |
