qcacld-3.0: Add capability based logic to mark first packet after wakeup

Propagation from qcacld-2.0 to qcacld-3.0.

Add a capability in service bitmask to indicate that fw also supports
this feature of marking first packet after wow wakeup to maintain backward
compatibility.

Change-Id: I3d41f5425e3a170c046941a439d17e06df0c6bef
CRs-Fixed: 1021382
This commit is contained in:
Himanshu Agarwal
2016-07-20 20:15:48 +05:30
committed by Gerrit - the friendly Code Review server
parent 053d4556d8
commit 19141bb676
7 changed files with 58 additions and 7 deletions

View File

@@ -813,3 +813,23 @@ htt_ipa_uc_set_doorbell_paddr(htt_pdev_handle pdev,
return 0;
}
#endif /* IPA_OFFLOAD */
/**
* 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) {
qdf_print("%s: htt pdev is NULL", __func__);
return;
}
pdev->cfg.is_first_wakeup_packet = value;
}

View File

@@ -1448,6 +1448,16 @@ htt_rx_offload_paddr_msdu_pop_ll(htt_pdev_handle pdev,
#else
qdf_nbuf_unmap(pdev->osdev, buf, QDF_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) {
qdf_nbuf_mark_wakeup_frame(buf);
qdf_print("%s: First packet after WOW Wakeup rcvd\n",
__func__);
}
}
msdu_hdr = (uint32_t *) qdf_nbuf_data(buf);
/* First dword */
@@ -2041,13 +2051,6 @@ htt_rx_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
HTT_RX_IN_ORD_PADDR_IND_FW_DESC_GET(*(msg_word + NEXT_FIELD_OFFSET_IN32));
#undef NEXT_FIELD_OFFSET_IN32
if (HTT_RX_IN_ORD_PADDR_IND_MSDU_INFO_GET(*(msg_word + 1)) &
FW_MSDU_INFO_FIRST_WAKEUP_M) {
qdf_print("%s: first packet after WOW wakeup\n",
__func__);
qdf_nbuf_mark_wakeup_frame(msdu);
}
msdu_count--;
if (qdf_unlikely((*((u_int8_t *) &rx_desc->fw_desc.u.val)) &

View File

@@ -252,6 +252,7 @@ struct htt_pdev_t {
int is_full_reorder_offload;
int default_tx_comp_req;
int ce_classify_enabled;
uint8_t is_first_wakeup_packet;
} cfg;
struct {
uint8_t major;

View File

@@ -383,5 +383,6 @@ static inline void htt_clear_bundle_stats(struct htt_pdev_t *pdev)
}
#endif
void htt_mark_first_wakeup_packet(htt_pdev_handle pdev, uint8_t value);
#endif /* _OL_HTT_API__H_ */

View File

@@ -668,4 +668,6 @@ static inline int ol_tx_delete_flow_pool(struct ol_tx_flow_pool_t *pool,
}
#endif
void ol_tx_mark_first_wakeup_packet(uint8_t value);
#endif /* _OL_TXRX_CTRL_API__H_ */

View File

@@ -169,6 +169,26 @@ ol_txrx_update_last_real_peer(
}
#endif
/**
* 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)
{
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
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)
{

View File

@@ -4393,6 +4393,10 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
return -EINVAL;
}
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);