mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacld-3.0: New HTT H2T msg support
Current HTT_H2T messages from host driver does not have consistency in message length set by host driver. Some message types include HTC header length also within the message length, while other types have message length itself only. Fix the same by sending same message format based on firmware capability. Change-Id: I885a21530a2d8f852387ae54cf7ee0751aad2516 CRs-Fixed: 2145560
This commit is contained in:
parent
b5333945b8
commit
ebf3a9204f
5 changed files with 64 additions and 0 deletions
|
|
@ -269,6 +269,10 @@ ol_tx_prepare_ll_fast(struct ol_txrx_pdev_t *pdev,
|
|||
* with it for the time being, since this is not checked in f/w
|
||||
*/
|
||||
/* TODO : Prefill this, look at multi-fragment case */
|
||||
|
||||
if (ol_txrx_get_new_htt_msg_format(pdev))
|
||||
pkt_download_len = pkt_download_len - HTC_HEADER_LEN;
|
||||
|
||||
HTC_TX_DESC_FILL(htc_hdr_vaddr, pkt_download_len, ep_id, 0);
|
||||
|
||||
return tx_desc;
|
||||
|
|
|
|||
|
|
@ -5526,6 +5526,8 @@ static struct cdp_cfg_ops ol_ops_cfg = {
|
|||
ol_txrx_wrapper_set_flow_control_parameters,
|
||||
.set_flow_steering = ol_set_cfg_flow_steering,
|
||||
.set_ptp_rx_opt_enabled = ol_set_cfg_ptp_rx_opt_enabled,
|
||||
.set_new_htt_msg_format =
|
||||
ol_txrx_set_new_htt_msg_format,
|
||||
};
|
||||
|
||||
static struct cdp_peer_ops ol_ops_peer = {
|
||||
|
|
@ -5644,3 +5646,24 @@ struct cdp_soc_t *ol_txrx_soc_attach(void *scn_handle,
|
|||
soc->ops = &ol_txrx_ops;
|
||||
return soc;
|
||||
}
|
||||
|
||||
bool ol_txrx_get_new_htt_msg_format(struct ol_txrx_pdev_t *pdev)
|
||||
{
|
||||
if (!pdev) {
|
||||
qdf_print("%s: pdev is NULL\n", __func__);
|
||||
return false;
|
||||
}
|
||||
return pdev->new_htt_msg_format;
|
||||
}
|
||||
|
||||
void ol_txrx_set_new_htt_msg_format(uint8_t val)
|
||||
{
|
||||
struct ol_txrx_pdev_t *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
|
||||
|
||||
if (!pdev) {
|
||||
qdf_print("%s: pdev is NULL\n", __func__);
|
||||
return;
|
||||
}
|
||||
pdev->new_htt_msg_format = val;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -358,4 +358,24 @@ int ol_txrx_register_hl_flow_control(struct cdp_soc_t *soc,
|
|||
int ol_txrx_set_vdev_os_queue_status(u8 vdev_id, enum netif_action_type action);
|
||||
int ol_txrx_set_vdev_tx_desc_limit(u8 vdev_id, u8 chan);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ol_txrx_get_new_htt_msg_format() - check htt h2t msg feature
|
||||
* @pdev - datapath device instance
|
||||
*
|
||||
* Check if h2t message length includes htc header length
|
||||
*
|
||||
* return if new htt h2t msg feature enabled
|
||||
*/
|
||||
bool ol_txrx_get_new_htt_msg_format(struct ol_txrx_pdev_t *pdev);
|
||||
|
||||
/**
|
||||
* ol_txrx_set_new_htt_msg_format() - set htt h2t msg feature
|
||||
* @val - enable or disable new htt h2t msg feature
|
||||
*
|
||||
* Set if h2t message length includes htc header length
|
||||
*
|
||||
* return NONE
|
||||
*/
|
||||
void ol_txrx_set_new_htt_msg_format(uint8_t val);
|
||||
#endif /* _OL_TXRX__H_ */
|
||||
|
|
|
|||
|
|
@ -1047,6 +1047,7 @@ struct ol_txrx_pdev_t {
|
|||
void *usr_ctxt;
|
||||
struct ol_txrx_ipa_resources ipa_resource;
|
||||
#endif /* IPA_UC_OFFLOAD */
|
||||
bool new_htt_msg_format;
|
||||
};
|
||||
|
||||
struct ol_txrx_vdev_t {
|
||||
|
|
|
|||
|
|
@ -6645,6 +6645,9 @@ int wma_rx_service_ready_ext_event(void *handle, uint8_t *event,
|
|||
QDF_STATUS ret;
|
||||
struct target_psoc_info *tgt_hdl;
|
||||
uint32_t conc_scan_config_bits, fw_config_bits;
|
||||
struct wmi_unified *wmi_handle;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
target_resource_config *wlan_res_cfg;
|
||||
|
||||
WMA_LOGD("%s: Enter", __func__);
|
||||
|
||||
|
|
@ -6653,12 +6656,15 @@ int wma_rx_service_ready_ext_event(void *handle, uint8_t *event,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(wma_handle->psoc);
|
||||
|
||||
tgt_hdl = wlan_psoc_get_tgt_if_handle(wma_handle->psoc);
|
||||
if (!tgt_hdl) {
|
||||
WMA_LOGE("%s: target psoc info is NULL", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
wlan_res_cfg = target_psoc_get_wlan_res_cfg(tgt_hdl);
|
||||
param_buf = (WMI_SERVICE_READY_EXT_EVENTID_param_tlvs *) event;
|
||||
if (!param_buf) {
|
||||
WMA_LOGE("%s: Invalid event", __func__);
|
||||
|
|
@ -6698,6 +6704,16 @@ int wma_rx_service_ready_ext_event(void *handle, uint8_t *event,
|
|||
fw_config_bits);
|
||||
|
||||
target_psoc_set_num_radios(tgt_hdl, 1);
|
||||
|
||||
if (wmi_service_enabled(wmi_handle,
|
||||
wmi_service_new_htt_msg_format)) {
|
||||
cdp_cfg_set_new_htt_msg_format(soc, 1);
|
||||
wlan_res_cfg->new_htt_msg_format = true;
|
||||
} else {
|
||||
cdp_cfg_set_new_htt_msg_format(soc, 0);
|
||||
wlan_res_cfg->new_htt_msg_format = false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue