diff --git a/dp/inc/cdp_txrx_cfg.h b/dp/inc/cdp_txrx_cfg.h index 4375a49d39b5..edb083180b5a 100644 --- a/dp/inc/cdp_txrx_cfg.h +++ b/dp/inc/cdp_txrx_cfg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017, 2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -306,4 +306,31 @@ cdp_cfg_set_ptp_rx_opt_enabled(ol_txrx_soc_handle soc, soc->ops->cfg_ops->set_ptp_rx_opt_enabled(cfg_pdev, val); } + +/** + * cdp_cfg_set_new_htt_msg_format() - set htt h2t msg feature + * @soc - datapath soc handle + * @val - enable or disable new htt h2t msg feature + * + * Enable whether htt h2t message length includes htc header length + * + * return NONE + */ +static inline void +cdp_cfg_set_new_htt_msg_format(ol_txrx_soc_handle soc, + uint8_t val) +{ + if (!soc || !soc->ops) { + QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG, + "%s invalid instance", __func__); + return; + } + + if (!soc->ops->cfg_ops || + !soc->ops->cfg_ops->set_new_htt_msg_format) + return; + + soc->ops->cfg_ops->set_new_htt_msg_format(val); +} + #endif /* _CDP_TXRX_CFG_H_ */ diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index dd4f6b9abc2c..9a1a5fa797bc 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -964,6 +964,7 @@ struct cdp_cfg_ops { void *param); void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val); void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val); + void (*set_new_htt_msg_format)(uint8_t val); }; /** diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 28889d57509e..734d90110276 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5236,6 +5236,7 @@ typedef enum { wmi_service_esp_support, wmi_service_obss_spatial_reuse, wmi_service_per_vdev_chain_support, + wmi_service_new_htt_msg_format, wmi_services_max, } wmi_conv_service_ids; #define WMI_SERVICE_UNAVAILABLE 0xFFFF @@ -5399,7 +5400,8 @@ typedef struct { uint32_t tt_support; uint32_t atf_config:1, mgmt_comp_evt_bundle_support:1, - tx_msdu_new_partition_id_support:1; + tx_msdu_new_partition_id_support:1, + new_htt_msg_format:1; uint32_t iphdr_pad_config; uint32_t qwrap_config:16, diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index ff9fc5822b87..226933044673 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -6274,6 +6274,10 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg, tgt_res_cfg->eapol_minrate_ac_set); } } + if (tgt_res_cfg->new_htt_msg_format) { + WMI_RSRC_CFG_FLAG_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN_SET( + resource_cfg->flag1, 1); + } wmi_copy_twt_resource_config(resource_cfg, tgt_res_cfg); resource_cfg->peer_map_unmap_v2_support = @@ -11856,6 +11860,9 @@ static void populate_tlv_service(uint32_t *wmi_service) WMI_SERVICE_OBSS_SPATIAL_REUSE; wmi_service[wmi_service_per_vdev_chain_support] = WMI_SERVICE_PER_VDEV_CHAINMASK_CONFIG_SUPPORT; + wmi_service[wmi_service_new_htt_msg_format] = + WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN; + } #ifndef CONFIG_MCL