ath11k: add TWT support
Add target wait time wmi calls to the driver. En/disable the support from when the bss_config changes. We ignore the cmd completion events. Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com> Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
@@ -169,6 +169,9 @@ enum wmi_cmd_group {
|
||||
WMI_GRP_MONITOR = 0x39,
|
||||
WMI_GRP_REGULATORY = 0x3a,
|
||||
WMI_GRP_HW_DATA_FILTER = 0x3b,
|
||||
WMI_GRP_WLM = 0x3c,
|
||||
WMI_GRP_11K_OFFLOAD = 0x3d,
|
||||
WMI_GRP_TWT = 0x3e,
|
||||
};
|
||||
|
||||
#define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1)
|
||||
@@ -530,6 +533,12 @@ enum wmi_tlv_cmd_id {
|
||||
WMI_NDP_RESPONDER_REQ_CMDID,
|
||||
WMI_NDP_END_REQ_CMDID,
|
||||
WMI_HW_DATA_FILTER_CMDID = WMI_TLV_CMD(WMI_GRP_HW_DATA_FILTER),
|
||||
WMI_TWT_ENABLE_CMDID = WMI_TLV_CMD(WMI_GRP_TWT),
|
||||
WMI_TWT_DISABLE_CMDID,
|
||||
WMI_TWT_ADD_DIALOG_CMDID,
|
||||
WMI_TWT_DEL_DIALOG_CMDID,
|
||||
WMI_TWT_PAUSE_DIALOG_CMDID,
|
||||
WMI_TWT_RESUME_DIALOG_CMDID,
|
||||
};
|
||||
|
||||
enum wmi_tlv_event_id {
|
||||
@@ -724,6 +733,13 @@ enum wmi_tlv_event_id {
|
||||
WMI_NDP_INDICATION_EVENTID,
|
||||
WMI_NDP_CONFIRM_EVENTID,
|
||||
WMI_NDP_END_INDICATION_EVENTID,
|
||||
|
||||
WMI_TWT_ENABLE_EVENTID = WMI_TLV_CMD(WMI_GRP_TWT),
|
||||
WMI_TWT_DISABLE_EVENTID,
|
||||
WMI_TWT_ADD_DIALOG_EVENTID,
|
||||
WMI_TWT_DEL_DIALOG_EVENTID,
|
||||
WMI_TWT_PAUSE_DIALOG_EVENTID,
|
||||
WMI_TWT_RESUME_DIALOG_EVENTID,
|
||||
};
|
||||
|
||||
enum wmi_tlv_pdev_param {
|
||||
@@ -2183,6 +2199,9 @@ struct wmi_resource_config {
|
||||
u32 max_num_dbs_scan_duty_cycle;
|
||||
u32 max_num_group_keys;
|
||||
u32 peer_map_unmap_v2_support;
|
||||
u32 sched_params;
|
||||
u32 twt_ap_pdev_count;
|
||||
u32 twt_ap_sta_count;
|
||||
} __packed;
|
||||
|
||||
struct wmi_service_ready_event {
|
||||
@@ -3401,6 +3420,8 @@ struct peer_assoc_params {
|
||||
u32 peer_he_mcs_count;
|
||||
u32 peer_he_rx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
|
||||
u32 peer_he_tx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
|
||||
bool twt_responder;
|
||||
bool twt_requester;
|
||||
struct ath11k_ppe_threshold peer_ppet;
|
||||
};
|
||||
|
||||
@@ -3652,6 +3673,8 @@ struct wmi_unit_test_cmd {
|
||||
#define WMI_PEER_DYN_MIMOPS 0x00020000
|
||||
#define WMI_PEER_STATIC_MIMOPS 0x00040000
|
||||
#define WMI_PEER_SPATIAL_MUX 0x00200000
|
||||
#define WMI_PEER_TWT_REQ 0x00400000
|
||||
#define WMI_PEER_TWT_RESP 0x00800000
|
||||
#define WMI_PEER_VHT 0x02000000
|
||||
#define WMI_PEER_80MHZ 0x04000000
|
||||
#define WMI_PEER_PMF 0x08000000
|
||||
@@ -4494,6 +4517,48 @@ struct wmi_wmm_params_all_arg {
|
||||
struct wmi_wmm_params_arg ac_vo;
|
||||
};
|
||||
|
||||
#define ATH11K_TWT_DEF_STA_CONG_TIMER_MS 5000
|
||||
#define ATH11K_TWT_DEF_DEFAULT_SLOT_SIZE 10
|
||||
#define ATH11K_TWT_DEF_CONGESTION_THRESH_SETUP 50
|
||||
#define ATH11K_TWT_DEF_CONGESTION_THRESH_TEARDOWN 20
|
||||
#define ATH11K_TWT_DEF_CONGESTION_THRESH_CRITICAL 100
|
||||
#define ATH11K_TWT_DEF_INTERFERENCE_THRESH_TEARDOWN 80
|
||||
#define ATH11K_TWT_DEF_INTERFERENCE_THRESH_SETUP 50
|
||||
#define ATH11K_TWT_DEF_MIN_NO_STA_SETUP 10
|
||||
#define ATH11K_TWT_DEF_MIN_NO_STA_TEARDOWN 2
|
||||
#define ATH11K_TWT_DEF_NO_OF_BCAST_MCAST_SLOTS 2
|
||||
#define ATH11K_TWT_DEF_MIN_NO_TWT_SLOTS 2
|
||||
#define ATH11K_TWT_DEF_MAX_NO_STA_TWT 500
|
||||
#define ATH11K_TWT_DEF_MODE_CHECK_INTERVAL 10000
|
||||
#define ATH11K_TWT_DEF_ADD_STA_SLOT_INTERVAL 1000
|
||||
#define ATH11K_TWT_DEF_REMOVE_STA_SLOT_INTERVAL 5000
|
||||
|
||||
struct wmi_twt_enable_params_cmd {
|
||||
u32 tlv_header;
|
||||
u32 pdev_id;
|
||||
u32 sta_cong_timer_ms;
|
||||
u32 mbss_support;
|
||||
u32 default_slot_size;
|
||||
u32 congestion_thresh_setup;
|
||||
u32 congestion_thresh_teardown;
|
||||
u32 congestion_thresh_critical;
|
||||
u32 interference_thresh_teardown;
|
||||
u32 interference_thresh_setup;
|
||||
u32 min_no_sta_setup;
|
||||
u32 min_no_sta_teardown;
|
||||
u32 no_of_bcast_mcast_slots;
|
||||
u32 min_no_twt_slots;
|
||||
u32 max_no_sta_twt;
|
||||
u32 mode_check_interval;
|
||||
u32 add_sta_slot_interval;
|
||||
u32 remove_sta_slot_interval;
|
||||
};
|
||||
|
||||
struct wmi_twt_disable_params_cmd {
|
||||
u32 tlv_header;
|
||||
u32 pdev_id;
|
||||
};
|
||||
|
||||
struct target_resource_config {
|
||||
u32 num_vdevs;
|
||||
u32 num_peers;
|
||||
@@ -4553,6 +4618,9 @@ struct target_resource_config {
|
||||
u32 max_bssid_rx_filters;
|
||||
u32 use_pdev_id;
|
||||
u32 peer_map_unmap_v2_support;
|
||||
u32 sched_params;
|
||||
u32 twt_ap_pdev_count;
|
||||
u32 twt_ap_sta_count;
|
||||
};
|
||||
|
||||
#define WMI_MAX_MEM_REQS 32
|
||||
@@ -4676,4 +4744,6 @@ void ath11k_wmi_fw_stats_fill(struct ath11k *ar,
|
||||
struct ath11k_fw_stats *fw_stats, u32 stats_id,
|
||||
char *buf);
|
||||
int ath11k_wmi_simulate_radar(struct ath11k *ar);
|
||||
int ath11k_wmi_send_twt_enable_cmd(struct ath11k *ar, u32 pdev_id);
|
||||
int ath11k_wmi_send_twt_disable_cmd(struct ath11k *ar, u32 pdev_id);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user