diff --git a/wmi_unified_api.h b/wmi_unified_api.h index e85f3d1b55..9b45c13af1 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -884,7 +884,10 @@ QDF_STATUS wmi_send_pdev_caldata_version_check_cmd(void *wmi_hdl, uint32_t value); QDF_STATUS wmi_unified_send_btcoex_wlan_priority_cmd(void *wmi_hdl, - int value); + struct btcoex_cfg_params *param); + +QDF_STATUS wmi_unified_send_btcoex_duty_cycle_cmd(void *wmi_hdl, + struct btcoex_cfg_params *param); QDF_STATUS wmi_unified_set_atf_cmd_send(void *wmi_hdl, struct set_atf_params *param); diff --git a/wmi_unified_param.h b/wmi_unified_param.h index 804756ef03..e789afe868 100644 --- a/wmi_unified_param.h +++ b/wmi_unified_param.h @@ -4169,6 +4169,38 @@ struct gpio_output_params { uint32_t set; }; +/* flags bit 0: to configure wlan priority bitmap */ +#define WMI_HOST_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT (1<<0) +/* flags bit 1: to configure both period and wlan duration */ +#define WMI_HOST_BTCOEX_PARAM_FLAGS_DUTY_CYCLE_BIT (1<<1) +struct btcoex_cfg_params { + /* WLAN priority bitmask for different frame types */ + uint32_t btcoex_wlan_priority_bitmap; + /* This command is used to configure different btcoex params + * in different situations.The host sets the appropriate bit(s) + * in btcoex_param_flags to indicate which configuration parameters + * are valid within a particular BT coex config message, so that one + * BT configuration parameter can be configured without affecting + * other BT configuration parameters.E.g. if the host wants to + * configure only btcoex_wlan_priority_bitmap it sets only + * WMI_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT in + * btcoex_param_flags so that firmware will not overwrite + * other params with default value passed in the command. + * Host can also set multiple bits in btcoex_param_flags + * to configure more than one param in single message. + */ + uint32_t btcoex_param_flags; + /* period denotes the total time in milliseconds which WLAN and BT share + * configured percentage for transmission and reception. + */ + uint32_t period; + /* wlan duration is the time in milliseconds given for wlan + * in above period. + */ + uint32_t wlan_duration; +}; + + #define WMI_HOST_RTT_REPORT_CFR 0 #define WMI_HOST_RTT_NO_REPORT_CFR 1 #define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR 2 @@ -5228,6 +5260,7 @@ typedef enum { wmi_service_tx_mode_push_pull, wmi_service_tx_mode_dynamic, wmi_service_check_cal_version, + wmi_service_btcoex_duty_cycle, wmi_services_max, } wmi_conv_service_ids; diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h index c82e044535..b2dd38c0d5 100644 --- a/wmi_unified_priv.h +++ b/wmi_unified_priv.h @@ -986,7 +986,12 @@ QDF_STATUS uint32_t value); QDF_STATUS -(*send_btcoex_wlan_priority_cmd)(wmi_unified_t wmi_handle, int value); +(*send_btcoex_wlan_priority_cmd)(wmi_unified_t wmi_handle, + struct btcoex_cfg_params *param); + +QDF_STATUS +(*send_btcoex_duty_cycle_cmd)(wmi_unified_t wmi_handle, + struct btcoex_cfg_params *param); QDF_STATUS (*extract_wds_addr_event)(wmi_unified_t wmi_handle, void *evt_buf, uint16_t len, wds_addr_event_t *wds_ev);