summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Qian <zhangq@codeaurora.org>2016-11-19 09:44:35 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-11-29 23:09:17 -0800
commit33c0a0ee06d349a98f1a7f4f71ace6e44788eaca (patch)
tree3fad533c1da7b06868ba9d047e41e5f1f3f55e95
parentd83167190384539393eaa46eed18cf60d277a33b (diff)
qcacld-2.0: Add tx failure indication to LL case
Some user layer APP wants to monitor TX status. This change propagates TX failure indication using QCA NL80211 vendor attribute to LL case. Change-Id: I3750a966d9647d20b4831dd3cdc588a7e549bb44 CRs-fixed: 1092282
-rw-r--r--CORE/CLD_TXRX/HTT/htt_t2h.c8
-rw-r--r--CORE/CLD_TXRX/HTT/htt_types.h4
-rw-r--r--CORE/CLD_TXRX/TLSHIM/tl_shim.c3
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx.c30
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_txrx_types.h6
-rw-r--r--CORE/SERVICES/COMMON/ol_txrx_api.h6
-rw-r--r--CORE/SERVICES/COMMON/ol_txrx_htt_api.h51
-rw-r--r--Kbuild2
8 files changed, 86 insertions, 24 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt_t2h.c b/CORE/CLD_TXRX/HTT/htt_t2h.c
index 2314f3dc58b6..7d161a3c9bba 100644
--- a/CORE/CLD_TXRX/HTT/htt_t2h.c
+++ b/CORE/CLD_TXRX/HTT/htt_t2h.c
@@ -655,11 +655,9 @@ if (adf_os_unlikely(pdev->rx_ring.rx_reset)) {
}
/* Indicate failure status to user space */
- if (pdev->tx_failure_cb && (status != htt_tx_status_ok)) {
- unsigned char tid = HTT_TX_COMPL_IND_TID_GET(*msg_word);
-
- pdev->tx_failure_cb(pdev, num_msdus, tid, status);
- }
+ ol_tx_failure_indication(pdev->txrx_pdev,
+ HTT_TX_COMPL_IND_TID_GET(*msg_word),
+ num_msdus, status);
if (pdev->cfg.is_high_latency) {
/*
diff --git a/CORE/CLD_TXRX/HTT/htt_types.h b/CORE/CLD_TXRX/HTT/htt_types.h
index ad3d1cae149f..94e5a8b85588 100644
--- a/CORE/CLD_TXRX/HTT/htt_types.h
+++ b/CORE/CLD_TXRX/HTT/htt_types.h
@@ -376,10 +376,6 @@ struct htt_pdev_t {
/* callback function for packetdump */
tp_rx_pkt_dump_cb rx_pkt_dump_cb;
-
- /* Callback to indicate failure to user space */
- void (*tx_failure_cb)(void *ctx, unsigned int num_msdu,
- unsigned char tid, unsigned int status);
};
#endif /* _HTT_TYPES__H_ */
diff --git a/CORE/CLD_TXRX/TLSHIM/tl_shim.c b/CORE/CLD_TXRX/TLSHIM/tl_shim.c
index fa1e5658614b..90e6c5bb12ac 100644
--- a/CORE/CLD_TXRX/TLSHIM/tl_shim.c
+++ b/CORE/CLD_TXRX/TLSHIM/tl_shim.c
@@ -2008,8 +2008,7 @@ VOS_STATUS WLANTL_Open(void *vos_ctx, WLANTL_ConfigInfoType *tl_cfg)
return VOS_STATUS_E_NOMEM;
}
- if (wdi_out_cfg_is_high_latency(txrx_pdev->ctrl_pdev))
- ol_tx_failure_cb_set(txrx_pdev, wma_tx_failure_cb);
+ ol_tx_failure_cb_set(txrx_pdev, wma_tx_failure_cb);
adf_os_spinlock_init(&tl_shim->bufq_lock);
adf_os_spinlock_init(&tl_shim->mgmt_lock);
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx.c b/CORE/CLD_TXRX/TXRX/ol_tx.c
index cc195c4e7066..70884624e30d 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx.c
+++ b/CORE/CLD_TXRX/TXRX/ol_tx.c
@@ -1287,18 +1287,34 @@ adf_nbuf_t ol_tx_reinject(
return NULL;
}
+#ifdef MAC_NOTIFICATION_FEATURE
/**
* ol_tx_failure_cb_set() - add TX failure callback
* @pdev: PDEV TXRX handle
* @tx_failure_cb: TX failure callback
*/
-void ol_tx_failure_cb_set(ol_txrx_pdev_handle pdev,
- void (*tx_failure_cb)(void *ctx,
- unsigned int num_msdu,
- unsigned char tid,
- unsigned int status))
+void
+ol_tx_failure_cb_set(struct ol_txrx_pdev_t *pdev,
+ void (*tx_failure_cb)(void *ctx,
+ unsigned int num_msdu,
+ unsigned char tid,
+ unsigned int status))
{
- struct htt_pdev_t *htt_pdev = pdev->htt_pdev;
+ pdev->tx_failure_cb = tx_failure_cb;
+}
- htt_pdev->tx_failure_cb = tx_failure_cb;
+/**
+ * ol_tx_failure_indication() - indicate TX failure to user layer
+ * @pdev: Pdev TXRX handle
+ * @tid: TID
+ * @msdu_num: number of MSDUs with the same failure status
+ * @status: failure status
+ */
+void
+ol_tx_failure_indication(struct ol_txrx_pdev_t *pdev, uint8_t tid,
+ uint32_t msdu_num, uint32_t status)
+{
+ if (pdev->tx_failure_cb && (status != htt_tx_status_ok))
+ pdev->tx_failure_cb(pdev, msdu_num, tid, status);
}
+#endif
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx_types.h b/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
index cd1d7a99e789..0cdf88fb5481 100644
--- a/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
+++ b/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
@@ -858,6 +858,12 @@ struct ol_txrx_pdev_t {
struct ol_txrx_peer_t *self_peer;
uint32_t total_bundle_queue_length;
+
+#ifdef MAC_NOTIFICATION_FEATURE
+ /* Callback to indicate failure to user space */
+ void (*tx_failure_cb)(void *ctx, unsigned int num_msdu,
+ unsigned char tid, unsigned int status);
+#endif
};
struct ol_txrx_ocb_chan_info {
diff --git a/CORE/SERVICES/COMMON/ol_txrx_api.h b/CORE/SERVICES/COMMON/ol_txrx_api.h
index d78be2235a45..c4e0bf401895 100644
--- a/CORE/SERVICES/COMMON/ol_txrx_api.h
+++ b/CORE/SERVICES/COMMON/ol_txrx_api.h
@@ -124,10 +124,4 @@ typedef void (*tp_ol_packetdump_cb)(adf_nbuf_t netbuf,
void ol_register_packetdump_callback(tp_ol_packetdump_cb ol_tx_packetdump_cb,
tp_ol_packetdump_cb ol_rx_packetdump_cb);
void ol_deregister_packetdump_callback(void);
-void ol_tx_failure_cb_set(ol_txrx_pdev_handle pdev,
- void (*tx_failure_cb)(void *ctx,
- unsigned int num_msdu,
- unsigned char tid,
- unsigned int status));
-
#endif /* _OL_TXRX_API__H_ */
diff --git a/CORE/SERVICES/COMMON/ol_txrx_htt_api.h b/CORE/SERVICES/COMMON/ol_txrx_htt_api.h
index 6dff7eb0d643..0aa85cec4b2a 100644
--- a/CORE/SERVICES/COMMON/ol_txrx_htt_api.h
+++ b/CORE/SERVICES/COMMON/ol_txrx_htt_api.h
@@ -735,4 +735,55 @@ u_int32_t ol_tx_get_max_tx_groups_supported(struct ol_txrx_pdev_t *pdev);
#define OL_TX_GET_MAX_GROUPS(pdev) 0
#endif
+#ifdef MAC_NOTIFICATION_FEATURE
+/**
+ * ol_tx_failure_cb_set() - add TX failure callback
+ * @pdev: PDEV TXRX handle
+ * @tx_failure_cb: TX failure callback
+ */
+void
+ol_tx_failure_cb_set(struct ol_txrx_pdev_t *pdev,
+ void (*tx_failure_cb)(void *ctx,
+ unsigned int num_msdu,
+ unsigned char tid,
+ unsigned int status));
+
+/**
+ * ol_tx_failure_indication() - indicate TX failure to user layer
+ * @pdev: Pdev TXRX handle
+ * @tid: TID
+ * @msdu_num: number of MSDUs with the same failure status
+ * @status: failure status
+ */
+void
+ol_tx_failure_indication(struct ol_txrx_pdev_t *pdev, uint8_t tid,
+ uint32_t msdu_num, uint32_t status);
+#else
+/**
+ * ol_tx_failure_cb_set() - add TX failure callback
+ * @pdev: PDEV TXRX handle
+ * @tx_failure_cb: TX failure callback
+ */
+static inline void
+ol_tx_failure_cb_set(ol_txrx_pdev_handle pdev,
+ void (*tx_failure_cb)(void *ctx,
+ unsigned int num_msdu,
+ unsigned char tid,
+ unsigned int status))
+{
+}
+
+/**
+ * ol_tx_failure_indication() - indicate TX failure to user layer
+ * @pdev: Pdev TXRX handle
+ * @tid: TID
+ * @msdu_num: number of MSDUs with the same failure status
+ * @status: failure status
+ */
+static inline void
+ol_tx_failure_indication(struct ol_txrx_pdev_t *pdev, uint8_t tid,
+ uint32_t msdu_num, uint32_t status)
+{
+}
+#endif
#endif /* _OL_TXRX_HTT_API__H_ */
diff --git a/Kbuild b/Kbuild
index be875499043e..5bc6f1d24dff 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1547,11 +1547,13 @@ CDEFINES += -DTX_COMPLETION_THREAD
CDEFINES += -DACS_FW_REPORT_PARAM
CDEFINES += -DFEATURE_WLAN_SUB_20_MHZ
CDEFINES += -DHL_RX_AGGREGATION_HOLE_DETCTION
+CDEFINES += -DMAC_NOTIFICATION_FEATURE
endif
ifeq ($(CONFIG_ARCH_MSM8996), y)
CDEFINES += -DACS_FW_REPORT_PARAM
CDEFINES += -DFEATURE_WLAN_SUB_20_MHZ
+CDEFINES += -DMAC_NOTIFICATION_FEATURE
endif
ifdef CPTCFG_QCA_CLD_WLAN