summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@qti.qualcomm.com>2016-05-26 18:27:34 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-06-13 16:35:18 +0530
commit3713352cef530b159495eda2db0fb5c4f5371326 (patch)
tree2958e8698287281645ceef8012af71e5297a9da3
parentf551b65b2c1734937dca03156643fc174f0df416 (diff)
qcacld-2.0: Add capability based logic to mark first packet after wakeup
Add a capability in service bitmask to indicate that fw also supports this feature of marking first packet after wow wakeup to maintain backward compatibilty. Change-Id: I3d41f5425e3a170c046941a439d17e06df0c6bef CRs-Fixed: 1021382
-rw-r--r--CORE/CLD_TXRX/HTT/htt.c22
-rw-r--r--CORE/CLD_TXRX/HTT/htt_rx.c16
-rw-r--r--CORE/CLD_TXRX/HTT/htt_types.h3
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_txrx.c22
-rw-r--r--CORE/SERVICES/COMMON/ol_htt_api.h1
-rw-r--r--CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h1
-rw-r--r--CORE/SERVICES/WMA/wma.c4
7 files changed, 60 insertions, 9 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt.c b/CORE/CLD_TXRX/HTT/htt.c
index f88cbca62c05..40fadc4e91d3 100644
--- a/CORE/CLD_TXRX/HTT/htt.c
+++ b/CORE/CLD_TXRX/HTT/htt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2014-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -658,3 +658,23 @@ void htt_clear_bundle_stats(htt_pdev_handle pdev)
}
#endif
+/**
+ * htt_mark_first_wakeup_packet() - set flag to indicate that
+ * fw is compatible for marking first packet after wow wakeup
+ * @pdev: pointer to htt pdev
+ * @value: 1 for enabled/ 0 for disabled
+ *
+ * Return: None
+ */
+void htt_mark_first_wakeup_packet(htt_pdev_handle pdev,
+ uint8_t value)
+{
+ if (!pdev) {
+ adf_os_print("%s: htt pdev is NULL", __func__);
+ return;
+ }
+
+ pdev->cfg.is_first_wakeup_packet = value;
+}
+
+
diff --git a/CORE/CLD_TXRX/HTT/htt_rx.c b/CORE/CLD_TXRX/HTT/htt_rx.c
index ba34bce3caca..c22edc615ce4 100644
--- a/CORE/CLD_TXRX/HTT/htt_rx.c
+++ b/CORE/CLD_TXRX/HTT/htt_rx.c
@@ -1368,6 +1368,15 @@ htt_rx_offload_paddr_msdu_pop_ll(
#else
adf_nbuf_unmap(pdev->osdev, buf, ADF_OS_DMA_FROM_DEVICE);
#endif
+
+ if (pdev->cfg.is_first_wakeup_packet) {
+ if (HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_GET(*(curr_msdu + 1)) &
+ FW_MSDU_INFO_FIRST_WAKEUP_M) {
+ adf_nbuf_update_skb_mark(buf, HTT_MARK_FIRST_WAKEUP_PACKET);
+ adf_os_print("%s: First packet after WOW Wakeup rcvd\n", __func__);
+ }
+ }
+
msdu_hdr = (u_int32_t *)adf_nbuf_data(buf);
/* First dword */
@@ -1917,13 +1926,6 @@ htt_rx_amsdu_rx_in_order_pop_ll(
*((u_int8_t *) &rx_desc->fw_desc.u.val) =
HTT_RX_IN_ORD_PADDR_IND_FW_DESC_GET(*(msg_word + 1));
-#ifdef FEATURE_MARK_FIRST_WOW_WAKEUP
- if (HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_GET(*(msg_word + 1)) &
- FW_MSDU_INFO_FIRST_WAKEUP_M) {
- adf_nbuf_update_skb_mark(msdu, HTT_MARK_FIRST_WAKEUP_PACKET);
- }
-#endif
-
msdu_count--;
/* calling callback function for packet logging */
diff --git a/CORE/CLD_TXRX/HTT/htt_types.h b/CORE/CLD_TXRX/HTT/htt_types.h
index 8d7b099ccb75..b5c064991517 100644
--- a/CORE/CLD_TXRX/HTT/htt_types.h
+++ b/CORE/CLD_TXRX/HTT/htt_types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2014, 2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -242,6 +242,7 @@ struct htt_pdev_t {
int is_high_latency;
int is_full_reorder_offload;
int default_tx_comp_req;
+ uint8_t is_first_wakeup_packet;
} cfg;
struct {
u_int8_t major;
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx.c b/CORE/CLD_TXRX/TXRX/ol_txrx.c
index 7add94714be6..76ba63191d15 100644
--- a/CORE/CLD_TXRX/TXRX/ol_txrx.c
+++ b/CORE/CLD_TXRX/TXRX/ol_txrx.c
@@ -72,6 +72,28 @@
/*=== function definitions ===*/
+/**
+ * ol_tx_mark_first_wakeup_packet() - set flag to indicate that
+ * fw is compatible for marking first packet after wow wakeup
+ * @value: 1 for enabled/ 0 for disabled
+ *
+ * Return: None
+ */
+void ol_tx_mark_first_wakeup_packet(uint8_t value)
+{
+ void *vos_context = vos_get_global_context(VOS_MODULE_ID_TXRX, NULL);
+ struct ol_txrx_pdev_t *pdev = vos_get_context(VOS_MODULE_ID_TXRX,
+ vos_context);
+
+ if (!pdev) {
+ TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
+ "%s: pdev is NULL\n", __func__);
+ return;
+ }
+
+ htt_mark_first_wakeup_packet(pdev->htt_pdev, value);
+}
+
u_int16_t
ol_tx_desc_pool_size_hl(ol_pdev_handle ctrl_pdev)
{
diff --git a/CORE/SERVICES/COMMON/ol_htt_api.h b/CORE/SERVICES/COMMON/ol_htt_api.h
index 8d9262fae713..068624c77f22 100644
--- a/CORE/SERVICES/COMMON/ol_htt_api.h
+++ b/CORE/SERVICES/COMMON/ol_htt_api.h
@@ -332,5 +332,6 @@ void htt_register_rx_pkt_dump_callback(struct htt_pdev_t *pdev,
tp_rx_pkt_dump_cb ol_rx_pkt_dump_call);
void htt_deregister_rx_pkt_dump_callback(struct htt_pdev_t *pdev);
void ol_rx_pkt_dump_call(adf_nbuf_t msdu, uint16_t peer_id, uint8_t status);
+void htt_mark_first_wakeup_packet(htt_pdev_handle pdev, uint8_t value);
#endif /* _OL_HTT_API__H_ */
diff --git a/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h b/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
index cd2e7fed0ecd..cc18608858fa 100644
--- a/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
+++ b/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
@@ -1479,5 +1479,6 @@ void ol_txrx_clear_stats(struct ol_txrx_pdev_t *pdev, uint16_t bitmap);
void ol_rx_reset_pn_replay_counter(struct ol_txrx_pdev_t *pdev);
uint32_t ol_rx_get_tkip_replay_counter(struct ol_txrx_pdev_t *pdev);
uint32_t ol_rx_get_ccmp_replay_counter(struct ol_txrx_pdev_t *pdev);
+void ol_tx_mark_first_wakeup_packet(uint8_t value);
#endif /* _OL_TXRX_CTRL_API__H_ */
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index d05dd39224ca..f3a14e7ddbb4 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -33704,6 +33704,10 @@ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info)
return;
}
+ ol_tx_mark_first_wakeup_packet(
+ WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
+ WMI_SERVICE_MARK_FIRST_WAKEUP_PACKET));
+
wma_handle->nan_datapath_enabled =
WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
WMI_SERVICE_NAN_DATA);