| /* |
| * Copyright (c) 2005-2011 Atheros Communications Inc. |
| * Copyright (c) 2011-2013 Qualcomm Atheros, Inc. |
| * |
| * Permission to use, copy, modify, and/or distribute this software for any |
| * purpose with or without fee is hereby granted, provided that the above |
| * copyright notice and this permission notice appear in all copies. |
| * |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| */ |
| |
| #include <linux/skbuff.h> |
| #include <linux/ctype.h> |
| |
| #include "core.h" |
| #include "htc.h" |
| #include "debug.h" |
| #include "wmi.h" |
| #include "wmi-tlv.h" |
| #include "mac.h" |
| #include "testmode.h" |
| #include "wmi-ops.h" |
| #include "p2p.h" |
| #include "hw.h" |
| |
| /* MAIN WMI cmd track */ |
| static struct wmi_cmd_map wmi_cmd_map = { |
| .init_cmdid = WMI_INIT_CMDID, |
| .start_scan_cmdid = WMI_START_SCAN_CMDID, |
| .stop_scan_cmdid = WMI_STOP_SCAN_CMDID, |
| .scan_chan_list_cmdid = WMI_SCAN_CHAN_LIST_CMDID, |
| .scan_sch_prio_tbl_cmdid = WMI_SCAN_SCH_PRIO_TBL_CMDID, |
| .pdev_set_regdomain_cmdid = WMI_PDEV_SET_REGDOMAIN_CMDID, |
| .pdev_set_channel_cmdid = WMI_PDEV_SET_CHANNEL_CMDID, |
| .pdev_set_param_cmdid = WMI_PDEV_SET_PARAM_CMDID, |
| .pdev_pktlog_enable_cmdid = WMI_PDEV_PKTLOG_ENABLE_CMDID, |
| .pdev_pktlog_disable_cmdid = WMI_PDEV_PKTLOG_DISABLE_CMDID, |
| .pdev_set_wmm_params_cmdid = WMI_PDEV_SET_WMM_PARAMS_CMDID, |
| .pdev_set_ht_cap_ie_cmdid = WMI_PDEV_SET_HT_CAP_IE_CMDID, |
| .pdev_set_vht_cap_ie_cmdid = WMI_PDEV_SET_VHT_CAP_IE_CMDID, |
| .pdev_set_dscp_tid_map_cmdid = WMI_PDEV_SET_DSCP_TID_MAP_CMDID, |
| .pdev_set_quiet_mode_cmdid = WMI_PDEV_SET_QUIET_MODE_CMDID, |
| .pdev_green_ap_ps_enable_cmdid = WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| .pdev_get_tpc_config_cmdid = WMI_PDEV_GET_TPC_CONFIG_CMDID, |
| .pdev_set_base_macaddr_cmdid = WMI_PDEV_SET_BASE_MACADDR_CMDID, |
| .vdev_create_cmdid = WMI_VDEV_CREATE_CMDID, |
| .vdev_delete_cmdid = WMI_VDEV_DELETE_CMDID, |
| .vdev_start_request_cmdid = WMI_VDEV_START_REQUEST_CMDID, |
| .vdev_restart_request_cmdid = WMI_VDEV_RESTART_REQUEST_CMDID, |
| .vdev_up_cmdid = WMI_VDEV_UP_CMDID, |
| .vdev_stop_cmdid = WMI_VDEV_STOP_CMDID, |
| .vdev_down_cmdid = WMI_VDEV_DOWN_CMDID, |
| .vdev_set_param_cmdid = WMI_VDEV_SET_PARAM_CMDID, |
| .vdev_install_key_cmdid = WMI_VDEV_INSTALL_KEY_CMDID, |
| .peer_create_cmdid = WMI_PEER_CREATE_CMDID, |
| .peer_delete_cmdid = WMI_PEER_DELETE_CMDID, |
| .peer_flush_tids_cmdid = WMI_PEER_FLUSH_TIDS_CMDID, |
| .peer_set_param_cmdid = WMI_PEER_SET_PARAM_CMDID, |
| .peer_assoc_cmdid = WMI_PEER_ASSOC_CMDID, |
| .peer_add_wds_entry_cmdid = WMI_PEER_ADD_WDS_ENTRY_CMDID, |
| .peer_remove_wds_entry_cmdid = WMI_PEER_REMOVE_WDS_ENTRY_CMDID, |
| .peer_mcast_group_cmdid = WMI_PEER_MCAST_GROUP_CMDID, |
| .bcn_tx_cmdid = WMI_BCN_TX_CMDID, |
| .pdev_send_bcn_cmdid = WMI_PDEV_SEND_BCN_CMDID, |
| .bcn_tmpl_cmdid = WMI_BCN_TMPL_CMDID, |
| .bcn_filter_rx_cmdid = WMI_BCN_FILTER_RX_CMDID, |
| .prb_req_filter_rx_cmdid = WMI_PRB_REQ_FILTER_RX_CMDID, |
| .mgmt_tx_cmdid = WMI_MGMT_TX_CMDID, |
| .prb_tmpl_cmdid = WMI_PRB_TMPL_CMDID, |
| .addba_clear_resp_cmdid = WMI_ADDBA_CLEAR_RESP_CMDID, |
| .addba_send_cmdid = WMI_ADDBA_SEND_CMDID, |
| .addba_status_cmdid = WMI_ADDBA_STATUS_CMDID, |
| .delba_send_cmdid = WMI_DELBA_SEND_CMDID, |
| .addba_set_resp_cmdid = WMI_ADDBA_SET_RESP_CMDID, |
| .send_singleamsdu_cmdid = WMI_SEND_SINGLEAMSDU_CMDID, |
| .sta_powersave_mode_cmdid = WMI_STA_POWERSAVE_MODE_CMDID, |
| .sta_powersave_param_cmdid = WMI_STA_POWERSAVE_PARAM_CMDID, |
| .sta_mimo_ps_mode_cmdid = WMI_STA_MIMO_PS_MODE_CMDID, |
| .pdev_dfs_enable_cmdid = WMI_PDEV_DFS_ENABLE_CMDID, |
| .pdev_dfs_disable_cmdid = WMI_PDEV_DFS_DISABLE_CMDID, |
| .roam_scan_mode = WMI_ROAM_SCAN_MODE, |
| .roam_scan_rssi_threshold = WMI_ROAM_SCAN_RSSI_THRESHOLD, |
| .roam_scan_period = WMI_ROAM_SCAN_PERIOD, |
| .roam_scan_rssi_change_threshold = WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| .roam_ap_profile = WMI_ROAM_AP_PROFILE, |
| .ofl_scan_add_ap_profile = WMI_ROAM_AP_PROFILE, |
| .ofl_scan_remove_ap_profile = WMI_OFL_SCAN_REMOVE_AP_PROFILE, |
| .ofl_scan_period = WMI_OFL_SCAN_PERIOD, |
| .p2p_dev_set_device_info = WMI_P2P_DEV_SET_DEVICE_INFO, |
| .p2p_dev_set_discoverability = WMI_P2P_DEV_SET_DISCOVERABILITY, |
| .p2p_go_set_beacon_ie = WMI_P2P_GO_SET_BEACON_IE, |
| .p2p_go_set_probe_resp_ie = WMI_P2P_GO_SET_PROBE_RESP_IE, |
| .p2p_set_vendor_ie_data_cmdid = WMI_P2P_SET_VENDOR_IE_DATA_CMDID, |
| .ap_ps_peer_param_cmdid = WMI_AP_PS_PEER_PARAM_CMDID, |
| .ap_ps_peer_uapsd_coex_cmdid = WMI_AP_PS_PEER_UAPSD_COEX_CMDID, |
| .peer_rate_retry_sched_cmdid = WMI_PEER_RATE_RETRY_SCHED_CMDID, |
| .wlan_profile_trigger_cmdid = WMI_WLAN_PROFILE_TRIGGER_CMDID, |
| .wlan_profile_set_hist_intvl_cmdid = |
| WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| .wlan_profile_get_profile_data_cmdid = |
| WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| .wlan_profile_enable_profile_id_cmdid = |
| WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| .wlan_profile_list_profile_id_cmdid = |
| WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| .pdev_suspend_cmdid = WMI_PDEV_SUSPEND_CMDID, |
| .pdev_resume_cmdid = WMI_PDEV_RESUME_CMDID, |
| .add_bcn_filter_cmdid = WMI_ADD_BCN_FILTER_CMDID, |
| .rmv_bcn_filter_cmdid = WMI_RMV_BCN_FILTER_CMDID, |
| .wow_add_wake_pattern_cmdid = WMI_WOW_ADD_WAKE_PATTERN_CMDID, |
| .wow_del_wake_pattern_cmdid = WMI_WOW_DEL_WAKE_PATTERN_CMDID, |
| .wow_enable_disable_wake_event_cmdid = |
| WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| .wow_enable_cmdid = WMI_WOW_ENABLE_CMDID, |
| .wow_hostwakeup_from_sleep_cmdid = WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| .rtt_measreq_cmdid = WMI_RTT_MEASREQ_CMDID, |
| .rtt_tsf_cmdid = WMI_RTT_TSF_CMDID, |
| .vdev_spectral_scan_configure_cmdid = |
| WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, |
| .vdev_spectral_scan_enable_cmdid = WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| .request_stats_cmdid = WMI_REQUEST_STATS_CMDID, |
| .set_arp_ns_offload_cmdid = WMI_SET_ARP_NS_OFFLOAD_CMDID, |
| .network_list_offload_config_cmdid = |
| WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID, |
| .gtk_offload_cmdid = WMI_GTK_OFFLOAD_CMDID, |
| .csa_offload_enable_cmdid = WMI_CSA_OFFLOAD_ENABLE_CMDID, |
| .csa_offload_chanswitch_cmdid = WMI_CSA_OFFLOAD_CHANSWITCH_CMDID, |
| .chatter_set_mode_cmdid = WMI_CHATTER_SET_MODE_CMDID, |
| .peer_tid_addba_cmdid = WMI_PEER_TID_ADDBA_CMDID, |
| .peer_tid_delba_cmdid = WMI_PEER_TID_DELBA_CMDID, |
| .sta_dtim_ps_method_cmdid = WMI_STA_DTIM_PS_METHOD_CMDID, |
| .sta_uapsd_auto_trig_cmdid = WMI_STA_UAPSD_AUTO_TRIG_CMDID, |
| .sta_keepalive_cmd = WMI_STA_KEEPALIVE_CMD, |
| .echo_cmdid = WMI_ECHO_CMDID, |
| .pdev_utf_cmdid = WMI_PDEV_UTF_CMDID, |
| .dbglog_cfg_cmdid = WMI_DBGLOG_CFG_CMDID, |
| .pdev_qvit_cmdid = WMI_PDEV_QVIT_CMDID, |
| .pdev_ftm_intg_cmdid = WMI_PDEV_FTM_INTG_CMDID, |
| .vdev_set_keepalive_cmdid = WMI_VDEV_SET_KEEPALIVE_CMDID, |
| .vdev_get_keepalive_cmdid = WMI_VDEV_GET_KEEPALIVE_CMDID, |
| .force_fw_hang_cmdid = WMI_FORCE_FW_HANG_CMDID, |
| .gpio_config_cmdid = WMI_GPIO_CONFIG_CMDID, |
| .gpio_output_cmdid = WMI_GPIO_OUTPUT_CMDID, |
| .pdev_get_temperature_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_enable_adaptive_cca_cmdid = WMI_CMD_UNSUPPORTED, |
| .scan_update_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_standby_response_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_resume_response_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_add_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_evict_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_restore_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_print_all_peers_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_update_wds_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_add_proxy_sta_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .rtt_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .oem_req_cmdid = WMI_CMD_UNSUPPORTED, |
| .nan_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_ratemask_cmdid = WMI_CMD_UNSUPPORTED, |
| .qboost_cfg_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_smart_ant_enable_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_smart_ant_set_rx_antenna_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_tx_antenna_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_train_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_node_config_ops_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_antenna_switch_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_ctl_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_mimogain_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_ratepwr_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_ratepwr_chainmsk_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_fips_cmdid = WMI_CMD_UNSUPPORTED, |
| .tt_set_conf_cmdid = WMI_CMD_UNSUPPORTED, |
| .fwtest_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_atf_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_atf_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ani_cck_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ani_ofdm_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_reserve_ast_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_nfcal_power_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_tpc_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ast_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_set_dscp_tid_map_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_get_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_filter_neighbor_rx_packets_cmdid = WMI_CMD_UNSUPPORTED, |
| .mu_cal_start_cmdid = WMI_CMD_UNSUPPORTED, |
| .set_cca_params_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_bss_chan_info_request_cmdid = WMI_CMD_UNSUPPORTED, |
| }; |
| |
| /* 10.X WMI cmd track */ |
| static struct wmi_cmd_map wmi_10x_cmd_map = { |
| .init_cmdid = WMI_10X_INIT_CMDID, |
| .start_scan_cmdid = WMI_10X_START_SCAN_CMDID, |
| .stop_scan_cmdid = WMI_10X_STOP_SCAN_CMDID, |
| .scan_chan_list_cmdid = WMI_10X_SCAN_CHAN_LIST_CMDID, |
| .scan_sch_prio_tbl_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_regdomain_cmdid = WMI_10X_PDEV_SET_REGDOMAIN_CMDID, |
| .pdev_set_channel_cmdid = WMI_10X_PDEV_SET_CHANNEL_CMDID, |
| .pdev_set_param_cmdid = WMI_10X_PDEV_SET_PARAM_CMDID, |
| .pdev_pktlog_enable_cmdid = WMI_10X_PDEV_PKTLOG_ENABLE_CMDID, |
| .pdev_pktlog_disable_cmdid = WMI_10X_PDEV_PKTLOG_DISABLE_CMDID, |
| .pdev_set_wmm_params_cmdid = WMI_10X_PDEV_SET_WMM_PARAMS_CMDID, |
| .pdev_set_ht_cap_ie_cmdid = WMI_10X_PDEV_SET_HT_CAP_IE_CMDID, |
| .pdev_set_vht_cap_ie_cmdid = WMI_10X_PDEV_SET_VHT_CAP_IE_CMDID, |
| .pdev_set_dscp_tid_map_cmdid = WMI_10X_PDEV_SET_DSCP_TID_MAP_CMDID, |
| .pdev_set_quiet_mode_cmdid = WMI_10X_PDEV_SET_QUIET_MODE_CMDID, |
| .pdev_green_ap_ps_enable_cmdid = WMI_10X_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| .pdev_get_tpc_config_cmdid = WMI_10X_PDEV_GET_TPC_CONFIG_CMDID, |
| .pdev_set_base_macaddr_cmdid = WMI_10X_PDEV_SET_BASE_MACADDR_CMDID, |
| .vdev_create_cmdid = WMI_10X_VDEV_CREATE_CMDID, |
| .vdev_delete_cmdid = WMI_10X_VDEV_DELETE_CMDID, |
| .vdev_start_request_cmdid = WMI_10X_VDEV_START_REQUEST_CMDID, |
| .vdev_restart_request_cmdid = WMI_10X_VDEV_RESTART_REQUEST_CMDID, |
| .vdev_up_cmdid = WMI_10X_VDEV_UP_CMDID, |
| .vdev_stop_cmdid = WMI_10X_VDEV_STOP_CMDID, |
| .vdev_down_cmdid = WMI_10X_VDEV_DOWN_CMDID, |
| .vdev_set_param_cmdid = WMI_10X_VDEV_SET_PARAM_CMDID, |
| .vdev_install_key_cmdid = WMI_10X_VDEV_INSTALL_KEY_CMDID, |
| .peer_create_cmdid = WMI_10X_PEER_CREATE_CMDID, |
| .peer_delete_cmdid = WMI_10X_PEER_DELETE_CMDID, |
| .peer_flush_tids_cmdid = WMI_10X_PEER_FLUSH_TIDS_CMDID, |
| .peer_set_param_cmdid = WMI_10X_PEER_SET_PARAM_CMDID, |
| .peer_assoc_cmdid = WMI_10X_PEER_ASSOC_CMDID, |
| .peer_add_wds_entry_cmdid = WMI_10X_PEER_ADD_WDS_ENTRY_CMDID, |
| .peer_remove_wds_entry_cmdid = WMI_10X_PEER_REMOVE_WDS_ENTRY_CMDID, |
| .peer_mcast_group_cmdid = WMI_10X_PEER_MCAST_GROUP_CMDID, |
| .bcn_tx_cmdid = WMI_10X_BCN_TX_CMDID, |
| .pdev_send_bcn_cmdid = WMI_10X_PDEV_SEND_BCN_CMDID, |
| .bcn_tmpl_cmdid = WMI_CMD_UNSUPPORTED, |
| .bcn_filter_rx_cmdid = WMI_10X_BCN_FILTER_RX_CMDID, |
| .prb_req_filter_rx_cmdid = WMI_10X_PRB_REQ_FILTER_RX_CMDID, |
| .mgmt_tx_cmdid = WMI_10X_MGMT_TX_CMDID, |
| .prb_tmpl_cmdid = WMI_CMD_UNSUPPORTED, |
| .addba_clear_resp_cmdid = WMI_10X_ADDBA_CLEAR_RESP_CMDID, |
| .addba_send_cmdid = WMI_10X_ADDBA_SEND_CMDID, |
| .addba_status_cmdid = WMI_10X_ADDBA_STATUS_CMDID, |
| .delba_send_cmdid = WMI_10X_DELBA_SEND_CMDID, |
| .addba_set_resp_cmdid = WMI_10X_ADDBA_SET_RESP_CMDID, |
| .send_singleamsdu_cmdid = WMI_10X_SEND_SINGLEAMSDU_CMDID, |
| .sta_powersave_mode_cmdid = WMI_10X_STA_POWERSAVE_MODE_CMDID, |
| .sta_powersave_param_cmdid = WMI_10X_STA_POWERSAVE_PARAM_CMDID, |
| .sta_mimo_ps_mode_cmdid = WMI_10X_STA_MIMO_PS_MODE_CMDID, |
| .pdev_dfs_enable_cmdid = WMI_10X_PDEV_DFS_ENABLE_CMDID, |
| .pdev_dfs_disable_cmdid = WMI_10X_PDEV_DFS_DISABLE_CMDID, |
| .roam_scan_mode = WMI_10X_ROAM_SCAN_MODE, |
| .roam_scan_rssi_threshold = WMI_10X_ROAM_SCAN_RSSI_THRESHOLD, |
| .roam_scan_period = WMI_10X_ROAM_SCAN_PERIOD, |
| .roam_scan_rssi_change_threshold = |
| WMI_10X_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| .roam_ap_profile = WMI_10X_ROAM_AP_PROFILE, |
| .ofl_scan_add_ap_profile = WMI_10X_OFL_SCAN_ADD_AP_PROFILE, |
| .ofl_scan_remove_ap_profile = WMI_10X_OFL_SCAN_REMOVE_AP_PROFILE, |
| .ofl_scan_period = WMI_10X_OFL_SCAN_PERIOD, |
| .p2p_dev_set_device_info = WMI_10X_P2P_DEV_SET_DEVICE_INFO, |
| .p2p_dev_set_discoverability = WMI_10X_P2P_DEV_SET_DISCOVERABILITY, |
| .p2p_go_set_beacon_ie = WMI_10X_P2P_GO_SET_BEACON_IE, |
| .p2p_go_set_probe_resp_ie = WMI_10X_P2P_GO_SET_PROBE_RESP_IE, |
| .p2p_set_vendor_ie_data_cmdid = WMI_CMD_UNSUPPORTED, |
| .ap_ps_peer_param_cmdid = WMI_10X_AP_PS_PEER_PARAM_CMDID, |
| .ap_ps_peer_uapsd_coex_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_rate_retry_sched_cmdid = WMI_10X_PEER_RATE_RETRY_SCHED_CMDID, |
| .wlan_profile_trigger_cmdid = WMI_10X_WLAN_PROFILE_TRIGGER_CMDID, |
| .wlan_profile_set_hist_intvl_cmdid = |
| WMI_10X_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| .wlan_profile_get_profile_data_cmdid = |
| WMI_10X_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| .wlan_profile_enable_profile_id_cmdid = |
| WMI_10X_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| .wlan_profile_list_profile_id_cmdid = |
| WMI_10X_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| .pdev_suspend_cmdid = WMI_10X_PDEV_SUSPEND_CMDID, |
| .pdev_resume_cmdid = WMI_10X_PDEV_RESUME_CMDID, |
| .add_bcn_filter_cmdid = WMI_10X_ADD_BCN_FILTER_CMDID, |
| .rmv_bcn_filter_cmdid = WMI_10X_RMV_BCN_FILTER_CMDID, |
| .wow_add_wake_pattern_cmdid = WMI_10X_WOW_ADD_WAKE_PATTERN_CMDID, |
| .wow_del_wake_pattern_cmdid = WMI_10X_WOW_DEL_WAKE_PATTERN_CMDID, |
| .wow_enable_disable_wake_event_cmdid = |
| WMI_10X_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| .wow_enable_cmdid = WMI_10X_WOW_ENABLE_CMDID, |
| .wow_hostwakeup_from_sleep_cmdid = |
| WMI_10X_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| .rtt_measreq_cmdid = WMI_10X_RTT_MEASREQ_CMDID, |
| .rtt_tsf_cmdid = WMI_10X_RTT_TSF_CMDID, |
| .vdev_spectral_scan_configure_cmdid = |
| WMI_10X_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, |
| .vdev_spectral_scan_enable_cmdid = |
| WMI_10X_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| .request_stats_cmdid = WMI_10X_REQUEST_STATS_CMDID, |
| .set_arp_ns_offload_cmdid = WMI_CMD_UNSUPPORTED, |
| .network_list_offload_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .gtk_offload_cmdid = WMI_CMD_UNSUPPORTED, |
| .csa_offload_enable_cmdid = WMI_CMD_UNSUPPORTED, |
| .csa_offload_chanswitch_cmdid = WMI_CMD_UNSUPPORTED, |
| .chatter_set_mode_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_tid_addba_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_tid_delba_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_dtim_ps_method_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_uapsd_auto_trig_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_keepalive_cmd = WMI_CMD_UNSUPPORTED, |
| .echo_cmdid = WMI_10X_ECHO_CMDID, |
| .pdev_utf_cmdid = WMI_10X_PDEV_UTF_CMDID, |
| .dbglog_cfg_cmdid = WMI_10X_DBGLOG_CFG_CMDID, |
| .pdev_qvit_cmdid = WMI_10X_PDEV_QVIT_CMDID, |
| .pdev_ftm_intg_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_set_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_get_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .force_fw_hang_cmdid = WMI_CMD_UNSUPPORTED, |
| .gpio_config_cmdid = WMI_10X_GPIO_CONFIG_CMDID, |
| .gpio_output_cmdid = WMI_10X_GPIO_OUTPUT_CMDID, |
| .pdev_get_temperature_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_enable_adaptive_cca_cmdid = WMI_CMD_UNSUPPORTED, |
| .scan_update_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_standby_response_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_resume_response_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_add_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_evict_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_restore_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_print_all_peers_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_update_wds_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_add_proxy_sta_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .rtt_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .oem_req_cmdid = WMI_CMD_UNSUPPORTED, |
| .nan_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_ratemask_cmdid = WMI_CMD_UNSUPPORTED, |
| .qboost_cfg_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_smart_ant_enable_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_smart_ant_set_rx_antenna_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_tx_antenna_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_train_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_node_config_ops_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_antenna_switch_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_ctl_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_mimogain_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_ratepwr_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_ratepwr_chainmsk_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_fips_cmdid = WMI_CMD_UNSUPPORTED, |
| .tt_set_conf_cmdid = WMI_CMD_UNSUPPORTED, |
| .fwtest_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_atf_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_atf_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ani_cck_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ani_ofdm_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_reserve_ast_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_nfcal_power_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_tpc_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ast_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_set_dscp_tid_map_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_get_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_filter_neighbor_rx_packets_cmdid = WMI_CMD_UNSUPPORTED, |
| .mu_cal_start_cmdid = WMI_CMD_UNSUPPORTED, |
| .set_cca_params_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_bss_chan_info_request_cmdid = WMI_CMD_UNSUPPORTED, |
| }; |
| |
| /* 10.2.4 WMI cmd track */ |
| static struct wmi_cmd_map wmi_10_2_4_cmd_map = { |
| .init_cmdid = WMI_10_2_INIT_CMDID, |
| .start_scan_cmdid = WMI_10_2_START_SCAN_CMDID, |
| .stop_scan_cmdid = WMI_10_2_STOP_SCAN_CMDID, |
| .scan_chan_list_cmdid = WMI_10_2_SCAN_CHAN_LIST_CMDID, |
| .scan_sch_prio_tbl_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_regdomain_cmdid = WMI_10_2_PDEV_SET_REGDOMAIN_CMDID, |
| .pdev_set_channel_cmdid = WMI_10_2_PDEV_SET_CHANNEL_CMDID, |
| .pdev_set_param_cmdid = WMI_10_2_PDEV_SET_PARAM_CMDID, |
| .pdev_pktlog_enable_cmdid = WMI_10_2_PDEV_PKTLOG_ENABLE_CMDID, |
| .pdev_pktlog_disable_cmdid = WMI_10_2_PDEV_PKTLOG_DISABLE_CMDID, |
| .pdev_set_wmm_params_cmdid = WMI_10_2_PDEV_SET_WMM_PARAMS_CMDID, |
| .pdev_set_ht_cap_ie_cmdid = WMI_10_2_PDEV_SET_HT_CAP_IE_CMDID, |
| .pdev_set_vht_cap_ie_cmdid = WMI_10_2_PDEV_SET_VHT_CAP_IE_CMDID, |
| .pdev_set_quiet_mode_cmdid = WMI_10_2_PDEV_SET_QUIET_MODE_CMDID, |
| .pdev_green_ap_ps_enable_cmdid = WMI_10_2_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| .pdev_get_tpc_config_cmdid = WMI_10_2_PDEV_GET_TPC_CONFIG_CMDID, |
| .pdev_set_base_macaddr_cmdid = WMI_10_2_PDEV_SET_BASE_MACADDR_CMDID, |
| .vdev_create_cmdid = WMI_10_2_VDEV_CREATE_CMDID, |
| .vdev_delete_cmdid = WMI_10_2_VDEV_DELETE_CMDID, |
| .vdev_start_request_cmdid = WMI_10_2_VDEV_START_REQUEST_CMDID, |
| .vdev_restart_request_cmdid = WMI_10_2_VDEV_RESTART_REQUEST_CMDID, |
| .vdev_up_cmdid = WMI_10_2_VDEV_UP_CMDID, |
| .vdev_stop_cmdid = WMI_10_2_VDEV_STOP_CMDID, |
| .vdev_down_cmdid = WMI_10_2_VDEV_DOWN_CMDID, |
| .vdev_set_param_cmdid = WMI_10_2_VDEV_SET_PARAM_CMDID, |
| .vdev_install_key_cmdid = WMI_10_2_VDEV_INSTALL_KEY_CMDID, |
| .peer_create_cmdid = WMI_10_2_PEER_CREATE_CMDID, |
| .peer_delete_cmdid = WMI_10_2_PEER_DELETE_CMDID, |
| .peer_flush_tids_cmdid = WMI_10_2_PEER_FLUSH_TIDS_CMDID, |
| .peer_set_param_cmdid = WMI_10_2_PEER_SET_PARAM_CMDID, |
| .peer_assoc_cmdid = WMI_10_2_PEER_ASSOC_CMDID, |
| .peer_add_wds_entry_cmdid = WMI_10_2_PEER_ADD_WDS_ENTRY_CMDID, |
| .peer_remove_wds_entry_cmdid = WMI_10_2_PEER_REMOVE_WDS_ENTRY_CMDID, |
| .peer_mcast_group_cmdid = WMI_10_2_PEER_MCAST_GROUP_CMDID, |
| .bcn_tx_cmdid = WMI_10_2_BCN_TX_CMDID, |
| .pdev_send_bcn_cmdid = WMI_10_2_PDEV_SEND_BCN_CMDID, |
| .bcn_tmpl_cmdid = WMI_CMD_UNSUPPORTED, |
| .bcn_filter_rx_cmdid = WMI_10_2_BCN_FILTER_RX_CMDID, |
| .prb_req_filter_rx_cmdid = WMI_10_2_PRB_REQ_FILTER_RX_CMDID, |
| .mgmt_tx_cmdid = WMI_10_2_MGMT_TX_CMDID, |
| .prb_tmpl_cmdid = WMI_CMD_UNSUPPORTED, |
| .addba_clear_resp_cmdid = WMI_10_2_ADDBA_CLEAR_RESP_CMDID, |
| .addba_send_cmdid = WMI_10_2_ADDBA_SEND_CMDID, |
| .addba_status_cmdid = WMI_10_2_ADDBA_STATUS_CMDID, |
| .delba_send_cmdid = WMI_10_2_DELBA_SEND_CMDID, |
| .addba_set_resp_cmdid = WMI_10_2_ADDBA_SET_RESP_CMDID, |
| .send_singleamsdu_cmdid = WMI_10_2_SEND_SINGLEAMSDU_CMDID, |
| .sta_powersave_mode_cmdid = WMI_10_2_STA_POWERSAVE_MODE_CMDID, |
| .sta_powersave_param_cmdid = WMI_10_2_STA_POWERSAVE_PARAM_CMDID, |
| .sta_mimo_ps_mode_cmdid = WMI_10_2_STA_MIMO_PS_MODE_CMDID, |
| .pdev_dfs_enable_cmdid = WMI_10_2_PDEV_DFS_ENABLE_CMDID, |
| .pdev_dfs_disable_cmdid = WMI_10_2_PDEV_DFS_DISABLE_CMDID, |
| .roam_scan_mode = WMI_10_2_ROAM_SCAN_MODE, |
| .roam_scan_rssi_threshold = WMI_10_2_ROAM_SCAN_RSSI_THRESHOLD, |
| .roam_scan_period = WMI_10_2_ROAM_SCAN_PERIOD, |
| .roam_scan_rssi_change_threshold = |
| WMI_10_2_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| .roam_ap_profile = WMI_10_2_ROAM_AP_PROFILE, |
| .ofl_scan_add_ap_profile = WMI_10_2_OFL_SCAN_ADD_AP_PROFILE, |
| .ofl_scan_remove_ap_profile = WMI_10_2_OFL_SCAN_REMOVE_AP_PROFILE, |
| .ofl_scan_period = WMI_10_2_OFL_SCAN_PERIOD, |
| .p2p_dev_set_device_info = WMI_10_2_P2P_DEV_SET_DEVICE_INFO, |
| .p2p_dev_set_discoverability = WMI_10_2_P2P_DEV_SET_DISCOVERABILITY, |
| .p2p_go_set_beacon_ie = WMI_10_2_P2P_GO_SET_BEACON_IE, |
| .p2p_go_set_probe_resp_ie = WMI_10_2_P2P_GO_SET_PROBE_RESP_IE, |
| .p2p_set_vendor_ie_data_cmdid = WMI_CMD_UNSUPPORTED, |
| .ap_ps_peer_param_cmdid = WMI_10_2_AP_PS_PEER_PARAM_CMDID, |
| .ap_ps_peer_uapsd_coex_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_rate_retry_sched_cmdid = WMI_10_2_PEER_RATE_RETRY_SCHED_CMDID, |
| .wlan_profile_trigger_cmdid = WMI_10_2_WLAN_PROFILE_TRIGGER_CMDID, |
| .wlan_profile_set_hist_intvl_cmdid = |
| WMI_10_2_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| .wlan_profile_get_profile_data_cmdid = |
| WMI_10_2_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| .wlan_profile_enable_profile_id_cmdid = |
| WMI_10_2_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| .wlan_profile_list_profile_id_cmdid = |
| WMI_10_2_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| .pdev_suspend_cmdid = WMI_10_2_PDEV_SUSPEND_CMDID, |
| .pdev_resume_cmdid = WMI_10_2_PDEV_RESUME_CMDID, |
| .add_bcn_filter_cmdid = WMI_10_2_ADD_BCN_FILTER_CMDID, |
| .rmv_bcn_filter_cmdid = WMI_10_2_RMV_BCN_FILTER_CMDID, |
| .wow_add_wake_pattern_cmdid = WMI_10_2_WOW_ADD_WAKE_PATTERN_CMDID, |
| .wow_del_wake_pattern_cmdid = WMI_10_2_WOW_DEL_WAKE_PATTERN_CMDID, |
| .wow_enable_disable_wake_event_cmdid = |
| WMI_10_2_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| .wow_enable_cmdid = WMI_10_2_WOW_ENABLE_CMDID, |
| .wow_hostwakeup_from_sleep_cmdid = |
| WMI_10_2_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| .rtt_measreq_cmdid = WMI_10_2_RTT_MEASREQ_CMDID, |
| .rtt_tsf_cmdid = WMI_10_2_RTT_TSF_CMDID, |
| .vdev_spectral_scan_configure_cmdid = |
| WMI_10_2_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, |
| .vdev_spectral_scan_enable_cmdid = |
| WMI_10_2_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| .request_stats_cmdid = WMI_10_2_REQUEST_STATS_CMDID, |
| .set_arp_ns_offload_cmdid = WMI_CMD_UNSUPPORTED, |
| .network_list_offload_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .gtk_offload_cmdid = WMI_CMD_UNSUPPORTED, |
| .csa_offload_enable_cmdid = WMI_CMD_UNSUPPORTED, |
| .csa_offload_chanswitch_cmdid = WMI_CMD_UNSUPPORTED, |
| .chatter_set_mode_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_tid_addba_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_tid_delba_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_dtim_ps_method_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_uapsd_auto_trig_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_keepalive_cmd = WMI_CMD_UNSUPPORTED, |
| .echo_cmdid = WMI_10_2_ECHO_CMDID, |
| .pdev_utf_cmdid = WMI_10_2_PDEV_UTF_CMDID, |
| .dbglog_cfg_cmdid = WMI_10_2_DBGLOG_CFG_CMDID, |
| .pdev_qvit_cmdid = WMI_10_2_PDEV_QVIT_CMDID, |
| .pdev_ftm_intg_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_set_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_get_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .force_fw_hang_cmdid = WMI_CMD_UNSUPPORTED, |
| .gpio_config_cmdid = WMI_10_2_GPIO_CONFIG_CMDID, |
| .gpio_output_cmdid = WMI_10_2_GPIO_OUTPUT_CMDID, |
| .pdev_get_temperature_cmdid = WMI_10_2_PDEV_GET_TEMPERATURE_CMDID, |
| .pdev_enable_adaptive_cca_cmdid = WMI_10_2_SET_CCA_PARAMS, |
| .scan_update_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_standby_response_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_resume_response_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_add_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_evict_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_restore_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_print_all_peers_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_update_wds_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_add_proxy_sta_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .rtt_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .oem_req_cmdid = WMI_CMD_UNSUPPORTED, |
| .nan_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_ratemask_cmdid = WMI_CMD_UNSUPPORTED, |
| .qboost_cfg_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_smart_ant_enable_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_smart_ant_set_rx_antenna_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_tx_antenna_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_train_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_node_config_ops_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_antenna_switch_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_ctl_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_mimogain_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_ratepwr_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_ratepwr_chainmsk_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_fips_cmdid = WMI_CMD_UNSUPPORTED, |
| .tt_set_conf_cmdid = WMI_CMD_UNSUPPORTED, |
| .fwtest_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_atf_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_atf_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ani_cck_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ani_ofdm_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_reserve_ast_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_nfcal_power_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_tpc_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ast_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_set_dscp_tid_map_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_get_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_filter_neighbor_rx_packets_cmdid = WMI_CMD_UNSUPPORTED, |
| .mu_cal_start_cmdid = WMI_CMD_UNSUPPORTED, |
| .set_cca_params_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_bss_chan_info_request_cmdid = WMI_CMD_UNSUPPORTED, |
| }; |
| |
| /* 10.4 WMI cmd track */ |
| static struct wmi_cmd_map wmi_10_4_cmd_map = { |
| .init_cmdid = WMI_10_4_INIT_CMDID, |
| .start_scan_cmdid = WMI_10_4_START_SCAN_CMDID, |
| .stop_scan_cmdid = WMI_10_4_STOP_SCAN_CMDID, |
| .scan_chan_list_cmdid = WMI_10_4_SCAN_CHAN_LIST_CMDID, |
| .scan_sch_prio_tbl_cmdid = WMI_10_4_SCAN_SCH_PRIO_TBL_CMDID, |
| .pdev_set_regdomain_cmdid = WMI_10_4_PDEV_SET_REGDOMAIN_CMDID, |
| .pdev_set_channel_cmdid = WMI_10_4_PDEV_SET_CHANNEL_CMDID, |
| .pdev_set_param_cmdid = WMI_10_4_PDEV_SET_PARAM_CMDID, |
| .pdev_pktlog_enable_cmdid = WMI_10_4_PDEV_PKTLOG_ENABLE_CMDID, |
| .pdev_pktlog_disable_cmdid = WMI_10_4_PDEV_PKTLOG_DISABLE_CMDID, |
| .pdev_set_wmm_params_cmdid = WMI_10_4_PDEV_SET_WMM_PARAMS_CMDID, |
| .pdev_set_ht_cap_ie_cmdid = WMI_10_4_PDEV_SET_HT_CAP_IE_CMDID, |
| .pdev_set_vht_cap_ie_cmdid = WMI_10_4_PDEV_SET_VHT_CAP_IE_CMDID, |
| .pdev_set_dscp_tid_map_cmdid = WMI_10_4_PDEV_SET_DSCP_TID_MAP_CMDID, |
| .pdev_set_quiet_mode_cmdid = WMI_10_4_PDEV_SET_QUIET_MODE_CMDID, |
| .pdev_green_ap_ps_enable_cmdid = WMI_10_4_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| .pdev_get_tpc_config_cmdid = WMI_10_4_PDEV_GET_TPC_CONFIG_CMDID, |
| .pdev_set_base_macaddr_cmdid = WMI_10_4_PDEV_SET_BASE_MACADDR_CMDID, |
| .vdev_create_cmdid = WMI_10_4_VDEV_CREATE_CMDID, |
| .vdev_delete_cmdid = WMI_10_4_VDEV_DELETE_CMDID, |
| .vdev_start_request_cmdid = WMI_10_4_VDEV_START_REQUEST_CMDID, |
| .vdev_restart_request_cmdid = WMI_10_4_VDEV_RESTART_REQUEST_CMDID, |
| .vdev_up_cmdid = WMI_10_4_VDEV_UP_CMDID, |
| .vdev_stop_cmdid = WMI_10_4_VDEV_STOP_CMDID, |
| .vdev_down_cmdid = WMI_10_4_VDEV_DOWN_CMDID, |
| .vdev_set_param_cmdid = WMI_10_4_VDEV_SET_PARAM_CMDID, |
| .vdev_install_key_cmdid = WMI_10_4_VDEV_INSTALL_KEY_CMDID, |
| .peer_create_cmdid = WMI_10_4_PEER_CREATE_CMDID, |
| .peer_delete_cmdid = WMI_10_4_PEER_DELETE_CMDID, |
| .peer_flush_tids_cmdid = WMI_10_4_PEER_FLUSH_TIDS_CMDID, |
| .peer_set_param_cmdid = WMI_10_4_PEER_SET_PARAM_CMDID, |
| .peer_assoc_cmdid = WMI_10_4_PEER_ASSOC_CMDID, |
| .peer_add_wds_entry_cmdid = WMI_10_4_PEER_ADD_WDS_ENTRY_CMDID, |
| .peer_remove_wds_entry_cmdid = WMI_10_4_PEER_REMOVE_WDS_ENTRY_CMDID, |
| .peer_mcast_group_cmdid = WMI_10_4_PEER_MCAST_GROUP_CMDID, |
| .bcn_tx_cmdid = WMI_10_4_BCN_TX_CMDID, |
| .pdev_send_bcn_cmdid = WMI_10_4_PDEV_SEND_BCN_CMDID, |
| .bcn_tmpl_cmdid = WMI_10_4_BCN_PRB_TMPL_CMDID, |
| .bcn_filter_rx_cmdid = WMI_10_4_BCN_FILTER_RX_CMDID, |
| .prb_req_filter_rx_cmdid = WMI_10_4_PRB_REQ_FILTER_RX_CMDID, |
| .mgmt_tx_cmdid = WMI_10_4_MGMT_TX_CMDID, |
| .prb_tmpl_cmdid = WMI_10_4_PRB_TMPL_CMDID, |
| .addba_clear_resp_cmdid = WMI_10_4_ADDBA_CLEAR_RESP_CMDID, |
| .addba_send_cmdid = WMI_10_4_ADDBA_SEND_CMDID, |
| .addba_status_cmdid = WMI_10_4_ADDBA_STATUS_CMDID, |
| .delba_send_cmdid = WMI_10_4_DELBA_SEND_CMDID, |
| .addba_set_resp_cmdid = WMI_10_4_ADDBA_SET_RESP_CMDID, |
| .send_singleamsdu_cmdid = WMI_10_4_SEND_SINGLEAMSDU_CMDID, |
| .sta_powersave_mode_cmdid = WMI_10_4_STA_POWERSAVE_MODE_CMDID, |
| .sta_powersave_param_cmdid = WMI_10_4_STA_POWERSAVE_PARAM_CMDID, |
| .sta_mimo_ps_mode_cmdid = WMI_10_4_STA_MIMO_PS_MODE_CMDID, |
| .pdev_dfs_enable_cmdid = WMI_10_4_PDEV_DFS_ENABLE_CMDID, |
| .pdev_dfs_disable_cmdid = WMI_10_4_PDEV_DFS_DISABLE_CMDID, |
| .roam_scan_mode = WMI_10_4_ROAM_SCAN_MODE, |
| .roam_scan_rssi_threshold = WMI_10_4_ROAM_SCAN_RSSI_THRESHOLD, |
| .roam_scan_period = WMI_10_4_ROAM_SCAN_PERIOD, |
| .roam_scan_rssi_change_threshold = |
| WMI_10_4_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| .roam_ap_profile = WMI_10_4_ROAM_AP_PROFILE, |
| .ofl_scan_add_ap_profile = WMI_10_4_OFL_SCAN_ADD_AP_PROFILE, |
| .ofl_scan_remove_ap_profile = WMI_10_4_OFL_SCAN_REMOVE_AP_PROFILE, |
| .ofl_scan_period = WMI_10_4_OFL_SCAN_PERIOD, |
| .p2p_dev_set_device_info = WMI_10_4_P2P_DEV_SET_DEVICE_INFO, |
| .p2p_dev_set_discoverability = WMI_10_4_P2P_DEV_SET_DISCOVERABILITY, |
| .p2p_go_set_beacon_ie = WMI_10_4_P2P_GO_SET_BEACON_IE, |
| .p2p_go_set_probe_resp_ie = WMI_10_4_P2P_GO_SET_PROBE_RESP_IE, |
| .p2p_set_vendor_ie_data_cmdid = WMI_10_4_P2P_SET_VENDOR_IE_DATA_CMDID, |
| .ap_ps_peer_param_cmdid = WMI_10_4_AP_PS_PEER_PARAM_CMDID, |
| .ap_ps_peer_uapsd_coex_cmdid = WMI_10_4_AP_PS_PEER_UAPSD_COEX_CMDID, |
| .peer_rate_retry_sched_cmdid = WMI_10_4_PEER_RATE_RETRY_SCHED_CMDID, |
| .wlan_profile_trigger_cmdid = WMI_10_4_WLAN_PROFILE_TRIGGER_CMDID, |
| .wlan_profile_set_hist_intvl_cmdid = |
| WMI_10_4_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| .wlan_profile_get_profile_data_cmdid = |
| WMI_10_4_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| .wlan_profile_enable_profile_id_cmdid = |
| WMI_10_4_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| .wlan_profile_list_profile_id_cmdid = |
| WMI_10_4_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| .pdev_suspend_cmdid = WMI_10_4_PDEV_SUSPEND_CMDID, |
| .pdev_resume_cmdid = WMI_10_4_PDEV_RESUME_CMDID, |
| .add_bcn_filter_cmdid = WMI_10_4_ADD_BCN_FILTER_CMDID, |
| .rmv_bcn_filter_cmdid = WMI_10_4_RMV_BCN_FILTER_CMDID, |
| .wow_add_wake_pattern_cmdid = WMI_10_4_WOW_ADD_WAKE_PATTERN_CMDID, |
| .wow_del_wake_pattern_cmdid = WMI_10_4_WOW_DEL_WAKE_PATTERN_CMDID, |
| .wow_enable_disable_wake_event_cmdid = |
| WMI_10_4_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| .wow_enable_cmdid = WMI_10_4_WOW_ENABLE_CMDID, |
| .wow_hostwakeup_from_sleep_cmdid = |
| WMI_10_4_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| .rtt_measreq_cmdid = WMI_10_4_RTT_MEASREQ_CMDID, |
| .rtt_tsf_cmdid = WMI_10_4_RTT_TSF_CMDID, |
| .vdev_spectral_scan_configure_cmdid = |
| WMI_10_4_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, |
| .vdev_spectral_scan_enable_cmdid = |
| WMI_10_4_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| .request_stats_cmdid = WMI_10_4_REQUEST_STATS_CMDID, |
| .set_arp_ns_offload_cmdid = WMI_CMD_UNSUPPORTED, |
| .network_list_offload_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .gtk_offload_cmdid = WMI_10_4_GTK_OFFLOAD_CMDID, |
| .csa_offload_enable_cmdid = WMI_10_4_CSA_OFFLOAD_ENABLE_CMDID, |
| .csa_offload_chanswitch_cmdid = WMI_10_4_CSA_OFFLOAD_CHANSWITCH_CMDID, |
| .chatter_set_mode_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_tid_addba_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_tid_delba_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_dtim_ps_method_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_uapsd_auto_trig_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_keepalive_cmd = WMI_CMD_UNSUPPORTED, |
| .echo_cmdid = WMI_10_4_ECHO_CMDID, |
| .pdev_utf_cmdid = WMI_10_4_PDEV_UTF_CMDID, |
| .dbglog_cfg_cmdid = WMI_10_4_DBGLOG_CFG_CMDID, |
| .pdev_qvit_cmdid = WMI_10_4_PDEV_QVIT_CMDID, |
| .pdev_ftm_intg_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_set_keepalive_cmdid = WMI_10_4_VDEV_SET_KEEPALIVE_CMDID, |
| .vdev_get_keepalive_cmdid = WMI_10_4_VDEV_GET_KEEPALIVE_CMDID, |
| .force_fw_hang_cmdid = WMI_10_4_FORCE_FW_HANG_CMDID, |
| .gpio_config_cmdid = WMI_10_4_GPIO_CONFIG_CMDID, |
| .gpio_output_cmdid = WMI_10_4_GPIO_OUTPUT_CMDID, |
| .pdev_get_temperature_cmdid = WMI_10_4_PDEV_GET_TEMPERATURE_CMDID, |
| .vdev_set_wmm_params_cmdid = WMI_CMD_UNSUPPORTED, |
| .tdls_set_state_cmdid = WMI_CMD_UNSUPPORTED, |
| .tdls_peer_update_cmdid = WMI_CMD_UNSUPPORTED, |
| .adaptive_qcs_cmdid = WMI_CMD_UNSUPPORTED, |
| .scan_update_request_cmdid = WMI_10_4_SCAN_UPDATE_REQUEST_CMDID, |
| .vdev_standby_response_cmdid = WMI_10_4_VDEV_STANDBY_RESPONSE_CMDID, |
| .vdev_resume_response_cmdid = WMI_10_4_VDEV_RESUME_RESPONSE_CMDID, |
| .wlan_peer_caching_add_peer_cmdid = |
| WMI_10_4_WLAN_PEER_CACHING_ADD_PEER_CMDID, |
| .wlan_peer_caching_evict_peer_cmdid = |
| WMI_10_4_WLAN_PEER_CACHING_EVICT_PEER_CMDID, |
| .wlan_peer_caching_restore_peer_cmdid = |
| WMI_10_4_WLAN_PEER_CACHING_RESTORE_PEER_CMDID, |
| .wlan_peer_caching_print_all_peers_info_cmdid = |
| WMI_10_4_WLAN_PEER_CACHING_PRINT_ALL_PEERS_INFO_CMDID, |
| .peer_update_wds_entry_cmdid = WMI_10_4_PEER_UPDATE_WDS_ENTRY_CMDID, |
| .peer_add_proxy_sta_entry_cmdid = |
| WMI_10_4_PEER_ADD_PROXY_STA_ENTRY_CMDID, |
| .rtt_keepalive_cmdid = WMI_10_4_RTT_KEEPALIVE_CMDID, |
| .oem_req_cmdid = WMI_10_4_OEM_REQ_CMDID, |
| .nan_cmdid = WMI_10_4_NAN_CMDID, |
| .vdev_ratemask_cmdid = WMI_10_4_VDEV_RATEMASK_CMDID, |
| .qboost_cfg_cmdid = WMI_10_4_QBOOST_CFG_CMDID, |
| .pdev_smart_ant_enable_cmdid = WMI_10_4_PDEV_SMART_ANT_ENABLE_CMDID, |
| .pdev_smart_ant_set_rx_antenna_cmdid = |
| WMI_10_4_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID, |
| .peer_smart_ant_set_tx_antenna_cmdid = |
| WMI_10_4_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID, |
| .peer_smart_ant_set_train_info_cmdid = |
| WMI_10_4_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID, |
| .peer_smart_ant_set_node_config_ops_cmdid = |
| WMI_10_4_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID, |
| .pdev_set_antenna_switch_table_cmdid = |
| WMI_10_4_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID, |
| .pdev_set_ctl_table_cmdid = WMI_10_4_PDEV_SET_CTL_TABLE_CMDID, |
| .pdev_set_mimogain_table_cmdid = WMI_10_4_PDEV_SET_MIMOGAIN_TABLE_CMDID, |
| .pdev_ratepwr_table_cmdid = WMI_10_4_PDEV_RATEPWR_TABLE_CMDID, |
| .pdev_ratepwr_chainmsk_table_cmdid = |
| WMI_10_4_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID, |
| .pdev_fips_cmdid = WMI_10_4_PDEV_FIPS_CMDID, |
| .tt_set_conf_cmdid = WMI_10_4_TT_SET_CONF_CMDID, |
| .fwtest_cmdid = WMI_10_4_FWTEST_CMDID, |
| .vdev_atf_request_cmdid = WMI_10_4_VDEV_ATF_REQUEST_CMDID, |
| .peer_atf_request_cmdid = WMI_10_4_PEER_ATF_REQUEST_CMDID, |
| .pdev_get_ani_cck_config_cmdid = WMI_10_4_PDEV_GET_ANI_CCK_CONFIG_CMDID, |
| .pdev_get_ani_ofdm_config_cmdid = |
| WMI_10_4_PDEV_GET_ANI_OFDM_CONFIG_CMDID, |
| .pdev_reserve_ast_entry_cmdid = WMI_10_4_PDEV_RESERVE_AST_ENTRY_CMDID, |
| .pdev_get_nfcal_power_cmdid = WMI_10_4_PDEV_GET_NFCAL_POWER_CMDID, |
| .pdev_get_tpc_cmdid = WMI_10_4_PDEV_GET_TPC_CMDID, |
| .pdev_get_ast_info_cmdid = WMI_10_4_PDEV_GET_AST_INFO_CMDID, |
| .vdev_set_dscp_tid_map_cmdid = WMI_10_4_VDEV_SET_DSCP_TID_MAP_CMDID, |
| .pdev_get_info_cmdid = WMI_10_4_PDEV_GET_INFO_CMDID, |
| .vdev_get_info_cmdid = WMI_10_4_VDEV_GET_INFO_CMDID, |
| .vdev_filter_neighbor_rx_packets_cmdid = |
| WMI_10_4_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID, |
| .mu_cal_start_cmdid = WMI_10_4_MU_CAL_START_CMDID, |
| .set_cca_params_cmdid = WMI_10_4_SET_CCA_PARAMS_CMDID, |
| .pdev_bss_chan_info_request_cmdid = |
| WMI_10_4_PDEV_BSS_CHAN_INFO_REQUEST_CMDID, |
| }; |
| |
| /* MAIN WMI VDEV param map */ |
| static struct wmi_vdev_param_map wmi_vdev_param_map = { |
| .rts_threshold = WMI_VDEV_PARAM_RTS_THRESHOLD, |
| .fragmentation_threshold = WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| .beacon_interval = WMI_VDEV_PARAM_BEACON_INTERVAL, |
| .listen_interval = WMI_VDEV_PARAM_LISTEN_INTERVAL, |
| .multicast_rate = WMI_VDEV_PARAM_MULTICAST_RATE, |
| .mgmt_tx_rate = WMI_VDEV_PARAM_MGMT_TX_RATE, |
| .slot_time = WMI_VDEV_PARAM_SLOT_TIME, |
| .preamble = WMI_VDEV_PARAM_PREAMBLE, |
| .swba_time = WMI_VDEV_PARAM_SWBA_TIME, |
| .wmi_vdev_stats_update_period = WMI_VDEV_STATS_UPDATE_PERIOD, |
| .wmi_vdev_pwrsave_ageout_time = WMI_VDEV_PWRSAVE_AGEOUT_TIME, |
| .wmi_vdev_host_swba_interval = WMI_VDEV_HOST_SWBA_INTERVAL, |
| .dtim_period = WMI_VDEV_PARAM_DTIM_PERIOD, |
| .wmi_vdev_oc_scheduler_air_time_limit = |
| WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| .wds = WMI_VDEV_PARAM_WDS, |
| .atim_window = WMI_VDEV_PARAM_ATIM_WINDOW, |
| .bmiss_count_max = WMI_VDEV_PARAM_BMISS_COUNT_MAX, |
| .bmiss_first_bcnt = WMI_VDEV_PARAM_BMISS_FIRST_BCNT, |
| .bmiss_final_bcnt = WMI_VDEV_PARAM_BMISS_FINAL_BCNT, |
| .feature_wmm = WMI_VDEV_PARAM_FEATURE_WMM, |
| .chwidth = WMI_VDEV_PARAM_CHWIDTH, |
| .chextoffset = WMI_VDEV_PARAM_CHEXTOFFSET, |
| .disable_htprotection = WMI_VDEV_PARAM_DISABLE_HTPROTECTION, |
| .sta_quickkickout = WMI_VDEV_PARAM_STA_QUICKKICKOUT, |
| .mgmt_rate = WMI_VDEV_PARAM_MGMT_RATE, |
| .protection_mode = WMI_VDEV_PARAM_PROTECTION_MODE, |
| .fixed_rate = WMI_VDEV_PARAM_FIXED_RATE, |
| .sgi = WMI_VDEV_PARAM_SGI, |
| .ldpc = WMI_VDEV_PARAM_LDPC, |
| .tx_stbc = WMI_VDEV_PARAM_TX_STBC, |
| .rx_stbc = WMI_VDEV_PARAM_RX_STBC, |
| .intra_bss_fwd = WMI_VDEV_PARAM_INTRA_BSS_FWD, |
| .def_keyid = WMI_VDEV_PARAM_DEF_KEYID, |
| .nss = WMI_VDEV_PARAM_NSS, |
| .bcast_data_rate = WMI_VDEV_PARAM_BCAST_DATA_RATE, |
| .mcast_data_rate = WMI_VDEV_PARAM_MCAST_DATA_RATE, |
| .mcast_indicate = WMI_VDEV_PARAM_MCAST_INDICATE, |
| .dhcp_indicate = WMI_VDEV_PARAM_DHCP_INDICATE, |
| .unknown_dest_indicate = WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| .ap_keepalive_min_idle_inactive_time_secs = |
| WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| .ap_keepalive_max_idle_inactive_time_secs = |
| WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| .ap_keepalive_max_unresponsive_time_secs = |
| WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| .ap_enable_nawds = WMI_VDEV_PARAM_AP_ENABLE_NAWDS, |
| .mcast2ucast_set = WMI_VDEV_PARAM_UNSUPPORTED, |
| .enable_rtscts = WMI_VDEV_PARAM_ENABLE_RTSCTS, |
| .txbf = WMI_VDEV_PARAM_TXBF, |
| .packet_powersave = WMI_VDEV_PARAM_PACKET_POWERSAVE, |
| .drop_unencry = WMI_VDEV_PARAM_DROP_UNENCRY, |
| .tx_encap_type = WMI_VDEV_PARAM_TX_ENCAP_TYPE, |
| .ap_detect_out_of_sync_sleeping_sta_time_secs = |
| WMI_VDEV_PARAM_UNSUPPORTED, |
| .rc_num_retries = WMI_VDEV_PARAM_UNSUPPORTED, |
| .cabq_maxdur = WMI_VDEV_PARAM_UNSUPPORTED, |
| .mfptest_set = WMI_VDEV_PARAM_UNSUPPORTED, |
| .rts_fixed_rate = WMI_VDEV_PARAM_UNSUPPORTED, |
| .vht_sgimask = WMI_VDEV_PARAM_UNSUPPORTED, |
| .vht80_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_adjust_enable = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_tgt_bmiss_num = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_bmiss_sample_cycle = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_slop_step = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_init_slop = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_adjust_pause = WMI_VDEV_PARAM_UNSUPPORTED, |
| .proxy_sta = WMI_VDEV_PARAM_UNSUPPORTED, |
| .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, |
| .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
| .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
| }; |
| |
| /* 10.X WMI VDEV param map */ |
| static struct wmi_vdev_param_map wmi_10x_vdev_param_map = { |
| .rts_threshold = WMI_10X_VDEV_PARAM_RTS_THRESHOLD, |
| .fragmentation_threshold = WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| .beacon_interval = WMI_10X_VDEV_PARAM_BEACON_INTERVAL, |
| .listen_interval = WMI_10X_VDEV_PARAM_LISTEN_INTERVAL, |
| .multicast_rate = WMI_10X_VDEV_PARAM_MULTICAST_RATE, |
| .mgmt_tx_rate = WMI_10X_VDEV_PARAM_MGMT_TX_RATE, |
| .slot_time = WMI_10X_VDEV_PARAM_SLOT_TIME, |
| .preamble = WMI_10X_VDEV_PARAM_PREAMBLE, |
| .swba_time = WMI_10X_VDEV_PARAM_SWBA_TIME, |
| .wmi_vdev_stats_update_period = WMI_10X_VDEV_STATS_UPDATE_PERIOD, |
| .wmi_vdev_pwrsave_ageout_time = WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME, |
| .wmi_vdev_host_swba_interval = WMI_10X_VDEV_HOST_SWBA_INTERVAL, |
| .dtim_period = WMI_10X_VDEV_PARAM_DTIM_PERIOD, |
| .wmi_vdev_oc_scheduler_air_time_limit = |
| WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| .wds = WMI_10X_VDEV_PARAM_WDS, |
| .atim_window = WMI_10X_VDEV_PARAM_ATIM_WINDOW, |
| .bmiss_count_max = WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX, |
| .bmiss_first_bcnt = WMI_VDEV_PARAM_UNSUPPORTED, |
| .bmiss_final_bcnt = WMI_VDEV_PARAM_UNSUPPORTED, |
| .feature_wmm = WMI_10X_VDEV_PARAM_FEATURE_WMM, |
| .chwidth = WMI_10X_VDEV_PARAM_CHWIDTH, |
| .chextoffset = WMI_10X_VDEV_PARAM_CHEXTOFFSET, |
| .disable_htprotection = WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION, |
| .sta_quickkickout = WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT, |
| .mgmt_rate = WMI_10X_VDEV_PARAM_MGMT_RATE, |
| .protection_mode = WMI_10X_VDEV_PARAM_PROTECTION_MODE, |
| .fixed_rate = WMI_10X_VDEV_PARAM_FIXED_RATE, |
| .sgi = WMI_10X_VDEV_PARAM_SGI, |
| .ldpc = WMI_10X_VDEV_PARAM_LDPC, |
| .tx_stbc = WMI_10X_VDEV_PARAM_TX_STBC, |
| .rx_stbc = WMI_10X_VDEV_PARAM_RX_STBC, |
| .intra_bss_fwd = WMI_10X_VDEV_PARAM_INTRA_BSS_FWD, |
| .def_keyid = WMI_10X_VDEV_PARAM_DEF_KEYID, |
| .nss = WMI_10X_VDEV_PARAM_NSS, |
| .bcast_data_rate = WMI_10X_VDEV_PARAM_BCAST_DATA_RATE, |
| .mcast_data_rate = WMI_10X_VDEV_PARAM_MCAST_DATA_RATE, |
| .mcast_indicate = WMI_10X_VDEV_PARAM_MCAST_INDICATE, |
| .dhcp_indicate = WMI_10X_VDEV_PARAM_DHCP_INDICATE, |
| .unknown_dest_indicate = WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| .ap_keepalive_min_idle_inactive_time_secs = |
| WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| .ap_keepalive_max_idle_inactive_time_secs = |
| WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| .ap_keepalive_max_unresponsive_time_secs = |
| WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| .ap_enable_nawds = WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS, |
| .mcast2ucast_set = WMI_10X_VDEV_PARAM_MCAST2UCAST_SET, |
| .enable_rtscts = WMI_10X_VDEV_PARAM_ENABLE_RTSCTS, |
| .txbf = WMI_VDEV_PARAM_UNSUPPORTED, |
| .packet_powersave = WMI_VDEV_PARAM_UNSUPPORTED, |
| .drop_unencry = WMI_VDEV_PARAM_UNSUPPORTED, |
| .tx_encap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
| .ap_detect_out_of_sync_sleeping_sta_time_secs = |
| WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, |
| .rc_num_retries = WMI_VDEV_PARAM_UNSUPPORTED, |
| .cabq_maxdur = WMI_VDEV_PARAM_UNSUPPORTED, |
| .mfptest_set = WMI_VDEV_PARAM_UNSUPPORTED, |
| .rts_fixed_rate = WMI_VDEV_PARAM_UNSUPPORTED, |
| .vht_sgimask = WMI_VDEV_PARAM_UNSUPPORTED, |
| .vht80_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_adjust_enable = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_tgt_bmiss_num = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_bmiss_sample_cycle = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_slop_step = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_init_slop = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_adjust_pause = WMI_VDEV_PARAM_UNSUPPORTED, |
| .proxy_sta = WMI_VDEV_PARAM_UNSUPPORTED, |
| .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, |
| .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
| .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
| }; |
| |
| static struct wmi_vdev_param_map wmi_10_2_4_vdev_param_map = { |
| .rts_threshold = WMI_10X_VDEV_PARAM_RTS_THRESHOLD, |
| .fragmentation_threshold = WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| .beacon_interval = WMI_10X_VDEV_PARAM_BEACON_INTERVAL, |
| .listen_interval = WMI_10X_VDEV_PARAM_LISTEN_INTERVAL, |
| .multicast_rate = WMI_10X_VDEV_PARAM_MULTICAST_RATE, |
| .mgmt_tx_rate = WMI_10X_VDEV_PARAM_MGMT_TX_RATE, |
| .slot_time = WMI_10X_VDEV_PARAM_SLOT_TIME, |
| .preamble = WMI_10X_VDEV_PARAM_PREAMBLE, |
| .swba_time = WMI_10X_VDEV_PARAM_SWBA_TIME, |
| .wmi_vdev_stats_update_period = WMI_10X_VDEV_STATS_UPDATE_PERIOD, |
| .wmi_vdev_pwrsave_ageout_time = WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME, |
| .wmi_vdev_host_swba_interval = WMI_10X_VDEV_HOST_SWBA_INTERVAL, |
| .dtim_period = WMI_10X_VDEV_PARAM_DTIM_PERIOD, |
| .wmi_vdev_oc_scheduler_air_time_limit = |
| WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| .wds = WMI_10X_VDEV_PARAM_WDS, |
| .atim_window = WMI_10X_VDEV_PARAM_ATIM_WINDOW, |
| .bmiss_count_max = WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX, |
| .bmiss_first_bcnt = WMI_VDEV_PARAM_UNSUPPORTED, |
| .bmiss_final_bcnt = WMI_VDEV_PARAM_UNSUPPORTED, |
| .feature_wmm = WMI_10X_VDEV_PARAM_FEATURE_WMM, |
| .chwidth = WMI_10X_VDEV_PARAM_CHWIDTH, |
| .chextoffset = WMI_10X_VDEV_PARAM_CHEXTOFFSET, |
| .disable_htprotection = WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION, |
| .sta_quickkickout = WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT, |
| .mgmt_rate = WMI_10X_VDEV_PARAM_MGMT_RATE, |
| .protection_mode = WMI_10X_VDEV_PARAM_PROTECTION_MODE, |
| .fixed_rate = WMI_10X_VDEV_PARAM_FIXED_RATE, |
| .sgi = WMI_10X_VDEV_PARAM_SGI, |
| .ldpc = WMI_10X_VDEV_PARAM_LDPC, |
| .tx_stbc = WMI_10X_VDEV_PARAM_TX_STBC, |
| .rx_stbc = WMI_10X_VDEV_PARAM_RX_STBC, |
| .intra_bss_fwd = WMI_10X_VDEV_PARAM_INTRA_BSS_FWD, |
| .def_keyid = WMI_10X_VDEV_PARAM_DEF_KEYID, |
| .nss = WMI_10X_VDEV_PARAM_NSS, |
| .bcast_data_rate = WMI_10X_VDEV_PARAM_BCAST_DATA_RATE, |
| .mcast_data_rate = WMI_10X_VDEV_PARAM_MCAST_DATA_RATE, |
| .mcast_indicate = WMI_10X_VDEV_PARAM_MCAST_INDICATE, |
| .dhcp_indicate = WMI_10X_VDEV_PARAM_DHCP_INDICATE, |
| .unknown_dest_indicate = WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| .ap_keepalive_min_idle_inactive_time_secs = |
| WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| .ap_keepalive_max_idle_inactive_time_secs = |
| WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| .ap_keepalive_max_unresponsive_time_secs = |
| WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| .ap_enable_nawds = WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS, |
| .mcast2ucast_set = WMI_10X_VDEV_PARAM_MCAST2UCAST_SET, |
| .enable_rtscts = WMI_10X_VDEV_PARAM_ENABLE_RTSCTS, |
| .txbf = WMI_VDEV_PARAM_UNSUPPORTED, |
| .packet_powersave = WMI_VDEV_PARAM_UNSUPPORTED, |
| .drop_unencry = WMI_VDEV_PARAM_UNSUPPORTED, |
| .tx_encap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
| .ap_detect_out_of_sync_sleeping_sta_time_secs = |
| WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, |
| .rc_num_retries = WMI_VDEV_PARAM_UNSUPPORTED, |
| .cabq_maxdur = WMI_VDEV_PARAM_UNSUPPORTED, |
| .mfptest_set = WMI_VDEV_PARAM_UNSUPPORTED, |
| .rts_fixed_rate = WMI_VDEV_PARAM_UNSUPPORTED, |
| .vht_sgimask = WMI_VDEV_PARAM_UNSUPPORTED, |
| .vht80_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_adjust_enable = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_tgt_bmiss_num = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_bmiss_sample_cycle = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_slop_step = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_init_slop = WMI_VDEV_PARAM_UNSUPPORTED, |
| .early_rx_adjust_pause = WMI_VDEV_PARAM_UNSUPPORTED, |
| .proxy_sta = WMI_VDEV_PARAM_UNSUPPORTED, |
| .meru_vc = WMI_VDEV_PARAM_UNSUPPORTED, |
| .rx_decap_type = WMI_VDEV_PARAM_UNSUPPORTED, |
| .bw_nss_ratemask = WMI_VDEV_PARAM_UNSUPPORTED, |
| }; |
| |
| static struct wmi_vdev_param_map wmi_10_4_vdev_param_map = { |
| .rts_threshold = WMI_10_4_VDEV_PARAM_RTS_THRESHOLD, |
| .fragmentation_threshold = WMI_10_4_VDEV_PARAM_FRAGMENTATION_THRESHOLD, |
| .beacon_interval = WMI_10_4_VDEV_PARAM_BEACON_INTERVAL, |
| .listen_interval = WMI_10_4_VDEV_PARAM_LISTEN_INTERVAL, |
| .multicast_rate = WMI_10_4_VDEV_PARAM_MULTICAST_RATE, |
| .mgmt_tx_rate = WMI_10_4_VDEV_PARAM_MGMT_TX_RATE, |
| .slot_time = WMI_10_4_VDEV_PARAM_SLOT_TIME, |
| .preamble = WMI_10_4_VDEV_PARAM_PREAMBLE, |
| .swba_time = WMI_10_4_VDEV_PARAM_SWBA_TIME, |
| .wmi_vdev_stats_update_period = WMI_10_4_VDEV_STATS_UPDATE_PERIOD, |
| .wmi_vdev_pwrsave_ageout_time = WMI_10_4_VDEV_PWRSAVE_AGEOUT_TIME, |
| .wmi_vdev_host_swba_interval = WMI_10_4_VDEV_HOST_SWBA_INTERVAL, |
| .dtim_period = WMI_10_4_VDEV_PARAM_DTIM_PERIOD, |
| .wmi_vdev_oc_scheduler_air_time_limit = |
| WMI_10_4_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, |
| .wds = WMI_10_4_VDEV_PARAM_WDS, |
| .atim_window = WMI_10_4_VDEV_PARAM_ATIM_WINDOW, |
| .bmiss_count_max = WMI_10_4_VDEV_PARAM_BMISS_COUNT_MAX, |
| .bmiss_first_bcnt = WMI_10_4_VDEV_PARAM_BMISS_FIRST_BCNT, |
| .bmiss_final_bcnt = WMI_10_4_VDEV_PARAM_BMISS_FINAL_BCNT, |
| .feature_wmm = WMI_10_4_VDEV_PARAM_FEATURE_WMM, |
| .chwidth = WMI_10_4_VDEV_PARAM_CHWIDTH, |
| .chextoffset = WMI_10_4_VDEV_PARAM_CHEXTOFFSET, |
| .disable_htprotection = WMI_10_4_VDEV_PARAM_DISABLE_HTPROTECTION, |
| .sta_quickkickout = WMI_10_4_VDEV_PARAM_STA_QUICKKICKOUT, |
| .mgmt_rate = WMI_10_4_VDEV_PARAM_MGMT_RATE, |
| .protection_mode = WMI_10_4_VDEV_PARAM_PROTECTION_MODE, |
| .fixed_rate = WMI_10_4_VDEV_PARAM_FIXED_RATE, |
| .sgi = WMI_10_4_VDEV_PARAM_SGI, |
| .ldpc = WMI_10_4_VDEV_PARAM_LDPC, |
| .tx_stbc = WMI_10_4_VDEV_PARAM_TX_STBC, |
| .rx_stbc = WMI_10_4_VDEV_PARAM_RX_STBC, |
| .intra_bss_fwd = WMI_10_4_VDEV_PARAM_INTRA_BSS_FWD, |
| .def_keyid = WMI_10_4_VDEV_PARAM_DEF_KEYID, |
| .nss = WMI_10_4_VDEV_PARAM_NSS, |
| .bcast_data_rate = WMI_10_4_VDEV_PARAM_BCAST_DATA_RATE, |
| .mcast_data_rate = WMI_10_4_VDEV_PARAM_MCAST_DATA_RATE, |
| .mcast_indicate = WMI_10_4_VDEV_PARAM_MCAST_INDICATE, |
| .dhcp_indicate = WMI_10_4_VDEV_PARAM_DHCP_INDICATE, |
| .unknown_dest_indicate = WMI_10_4_VDEV_PARAM_UNKNOWN_DEST_INDICATE, |
| .ap_keepalive_min_idle_inactive_time_secs = |
| WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS, |
| .ap_keepalive_max_idle_inactive_time_secs = |
| WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS, |
| .ap_keepalive_max_unresponsive_time_secs = |
| WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS, |
| .ap_enable_nawds = WMI_10_4_VDEV_PARAM_AP_ENABLE_NAWDS, |
| .mcast2ucast_set = WMI_10_4_VDEV_PARAM_MCAST2UCAST_SET, |
| .enable_rtscts = WMI_10_4_VDEV_PARAM_ENABLE_RTSCTS, |
| .txbf = WMI_10_4_VDEV_PARAM_TXBF, |
| .packet_powersave = WMI_10_4_VDEV_PARAM_PACKET_POWERSAVE, |
| .drop_unencry = WMI_10_4_VDEV_PARAM_DROP_UNENCRY, |
| .tx_encap_type = WMI_10_4_VDEV_PARAM_TX_ENCAP_TYPE, |
| .ap_detect_out_of_sync_sleeping_sta_time_secs = |
| WMI_10_4_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS, |
| .rc_num_retries = WMI_10_4_VDEV_PARAM_RC_NUM_RETRIES, |
| .cabq_maxdur = WMI_10_4_VDEV_PARAM_CABQ_MAXDUR, |
| .mfptest_set = WMI_10_4_VDEV_PARAM_MFPTEST_SET, |
| .rts_fixed_rate = WMI_10_4_VDEV_PARAM_RTS_FIXED_RATE, |
| .vht_sgimask = WMI_10_4_VDEV_PARAM_VHT_SGIMASK, |
| .vht80_ratemask = WMI_10_4_VDEV_PARAM_VHT80_RATEMASK, |
| .early_rx_adjust_enable = WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE, |
| .early_rx_tgt_bmiss_num = WMI_10_4_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM, |
| .early_rx_bmiss_sample_cycle = |
| WMI_10_4_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE, |
| .early_rx_slop_step = WMI_10_4_VDEV_PARAM_EARLY_RX_SLOP_STEP, |
| .early_rx_init_slop = WMI_10_4_VDEV_PARAM_EARLY_RX_INIT_SLOP, |
| .early_rx_adjust_pause = WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE, |
| .proxy_sta = WMI_10_4_VDEV_PARAM_PROXY_STA, |
| .meru_vc = WMI_10_4_VDEV_PARAM_MERU_VC, |
| .rx_decap_type = WMI_10_4_VDEV_PARAM_RX_DECAP_TYPE, |
| .bw_nss_ratemask = WMI_10_4_VDEV_PARAM_BW_NSS_RATEMASK, |
| }; |
| |
| static struct wmi_pdev_param_map wmi_pdev_param_map = { |
| .tx_chain_mask = WMI_PDEV_PARAM_TX_CHAIN_MASK, |
| .rx_chain_mask = WMI_PDEV_PARAM_RX_CHAIN_MASK, |
| .txpower_limit2g = WMI_PDEV_PARAM_TXPOWER_LIMIT2G, |
| .txpower_limit5g = WMI_PDEV_PARAM_TXPOWER_LIMIT5G, |
| .txpower_scale = WMI_PDEV_PARAM_TXPOWER_SCALE, |
| .beacon_gen_mode = WMI_PDEV_PARAM_BEACON_GEN_MODE, |
| .beacon_tx_mode = WMI_PDEV_PARAM_BEACON_TX_MODE, |
| .resmgr_offchan_mode = WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| .protection_mode = WMI_PDEV_PARAM_PROTECTION_MODE, |
| .dynamic_bw = WMI_PDEV_PARAM_DYNAMIC_BW, |
| .non_agg_sw_retry_th = WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| .agg_sw_retry_th = WMI_PDEV_PARAM_AGG_SW_RETRY_TH, |
| .sta_kickout_th = WMI_PDEV_PARAM_STA_KICKOUT_TH, |
| .ac_aggrsize_scaling = WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| .ltr_enable = WMI_PDEV_PARAM_LTR_ENABLE, |
| .ltr_ac_latency_be = WMI_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| .ltr_ac_latency_bk = WMI_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| .ltr_ac_latency_vi = WMI_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| .ltr_ac_latency_vo = WMI_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| .ltr_ac_latency_timeout = WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| .ltr_sleep_override = WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| .ltr_rx_override = WMI_PDEV_PARAM_LTR_RX_OVERRIDE, |
| .ltr_tx_activity_timeout = WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| .l1ss_enable = WMI_PDEV_PARAM_L1SS_ENABLE, |
| .dsleep_enable = WMI_PDEV_PARAM_DSLEEP_ENABLE, |
| .pcielp_txbuf_flush = WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH, |
| .pcielp_txbuf_watermark = WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, |
| .pcielp_txbuf_tmo_en = WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, |
| .pcielp_txbuf_tmo_value = WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, |
| .pdev_stats_update_period = WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| .vdev_stats_update_period = WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| .peer_stats_update_period = WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| .bcnflt_stats_update_period = WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| .pmf_qos = WMI_PDEV_PARAM_PMF_QOS, |
| .arp_ac_override = WMI_PDEV_PARAM_ARP_AC_OVERRIDE, |
| .dcs = WMI_PDEV_PARAM_DCS, |
| .ani_enable = WMI_PDEV_PARAM_ANI_ENABLE, |
| .ani_poll_period = WMI_PDEV_PARAM_ANI_POLL_PERIOD, |
| .ani_listen_period = WMI_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| .ani_ofdm_level = WMI_PDEV_PARAM_ANI_OFDM_LEVEL, |
| .ani_cck_level = WMI_PDEV_PARAM_ANI_CCK_LEVEL, |
| .dyntxchain = WMI_PDEV_PARAM_DYNTXCHAIN, |
| .proxy_sta = WMI_PDEV_PARAM_PROXY_STA, |
| .idle_ps_config = WMI_PDEV_PARAM_IDLE_PS_CONFIG, |
| .power_gating_sleep = WMI_PDEV_PARAM_POWER_GATING_SLEEP, |
| .fast_channel_reset = WMI_PDEV_PARAM_UNSUPPORTED, |
| .burst_dur = WMI_PDEV_PARAM_UNSUPPORTED, |
| .burst_enable = WMI_PDEV_PARAM_UNSUPPORTED, |
| .cal_period = WMI_PDEV_PARAM_UNSUPPORTED, |
| .aggr_burst = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rx_decap_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .smart_antenna_default_antenna = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_override = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_tid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .antenna_gain = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rx_filter = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast_to_ucast_tid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .proxy_sta_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast2ucast_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, |
| .remove_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, |
| .peer_sta_ps_statechg_enable = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_ac_override = WMI_PDEV_PARAM_UNSUPPORTED, |
| .block_interbss = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_disable_reset_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_msdu_ttl_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_ppdu_duration_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .txbf_sound_period_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_promisc_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_burst_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .en_stats = WMI_PDEV_PARAM_UNSUPPORTED, |
| .mu_group_policy = WMI_PDEV_PARAM_UNSUPPORTED, |
| .noise_detection = WMI_PDEV_PARAM_UNSUPPORTED, |
| .noise_threshold = WMI_PDEV_PARAM_UNSUPPORTED, |
| .dpd_enable = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast_bcast_echo = WMI_PDEV_PARAM_UNSUPPORTED, |
| .atf_strict_sch = WMI_PDEV_PARAM_UNSUPPORTED, |
| .atf_sched_duration = WMI_PDEV_PARAM_UNSUPPORTED, |
| .ant_plzn = WMI_PDEV_PARAM_UNSUPPORTED, |
| .mgmt_retry_limit = WMI_PDEV_PARAM_UNSUPPORTED, |
| .sensitivity_level = WMI_PDEV_PARAM_UNSUPPORTED, |
| .signed_txpower_2g = WMI_PDEV_PARAM_UNSUPPORTED, |
| .signed_txpower_5g = WMI_PDEV_PARAM_UNSUPPORTED, |
| .enable_per_tid_amsdu = WMI_PDEV_PARAM_UNSUPPORTED, |
| .enable_per_tid_ampdu = WMI_PDEV_PARAM_UNSUPPORTED, |
| .cca_threshold = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rts_fixed_rate = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pdev_reset = WMI_PDEV_PARAM_UNSUPPORTED, |
| .wapi_mbssid_offset = WMI_PDEV_PARAM_UNSUPPORTED, |
| .arp_srcaddr = WMI_PDEV_PARAM_UNSUPPORTED, |
| .arp_dstaddr = WMI_PDEV_PARAM_UNSUPPORTED, |
| }; |
| |
| static struct wmi_pdev_param_map wmi_10x_pdev_param_map = { |
| .tx_chain_mask = WMI_10X_PDEV_PARAM_TX_CHAIN_MASK, |
| .rx_chain_mask = WMI_10X_PDEV_PARAM_RX_CHAIN_MASK, |
| .txpower_limit2g = WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G, |
| .txpower_limit5g = WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G, |
| .txpower_scale = WMI_10X_PDEV_PARAM_TXPOWER_SCALE, |
| .beacon_gen_mode = WMI_10X_PDEV_PARAM_BEACON_GEN_MODE, |
| .beacon_tx_mode = WMI_10X_PDEV_PARAM_BEACON_TX_MODE, |
| .resmgr_offchan_mode = WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| .protection_mode = WMI_10X_PDEV_PARAM_PROTECTION_MODE, |
| .dynamic_bw = WMI_10X_PDEV_PARAM_DYNAMIC_BW, |
| .non_agg_sw_retry_th = WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| .agg_sw_retry_th = WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH, |
| .sta_kickout_th = WMI_10X_PDEV_PARAM_STA_KICKOUT_TH, |
| .ac_aggrsize_scaling = WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| .ltr_enable = WMI_10X_PDEV_PARAM_LTR_ENABLE, |
| .ltr_ac_latency_be = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| .ltr_ac_latency_bk = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| .ltr_ac_latency_vi = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| .ltr_ac_latency_vo = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| .ltr_ac_latency_timeout = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| .ltr_sleep_override = WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| .ltr_rx_override = WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE, |
| .ltr_tx_activity_timeout = WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| .l1ss_enable = WMI_10X_PDEV_PARAM_L1SS_ENABLE, |
| .dsleep_enable = WMI_10X_PDEV_PARAM_DSLEEP_ENABLE, |
| .pcielp_txbuf_flush = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pcielp_txbuf_watermark = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pcielp_txbuf_tmo_en = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pcielp_txbuf_tmo_value = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pdev_stats_update_period = WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| .vdev_stats_update_period = WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| .peer_stats_update_period = WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| .bcnflt_stats_update_period = |
| WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| .pmf_qos = WMI_10X_PDEV_PARAM_PMF_QOS, |
| .arp_ac_override = WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE, |
| .dcs = WMI_10X_PDEV_PARAM_DCS, |
| .ani_enable = WMI_10X_PDEV_PARAM_ANI_ENABLE, |
| .ani_poll_period = WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD, |
| .ani_listen_period = WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| .ani_ofdm_level = WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL, |
| .ani_cck_level = WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL, |
| .dyntxchain = WMI_10X_PDEV_PARAM_DYNTXCHAIN, |
| .proxy_sta = WMI_PDEV_PARAM_UNSUPPORTED, |
| .idle_ps_config = WMI_PDEV_PARAM_UNSUPPORTED, |
| .power_gating_sleep = WMI_PDEV_PARAM_UNSUPPORTED, |
| .fast_channel_reset = WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET, |
| .burst_dur = WMI_10X_PDEV_PARAM_BURST_DUR, |
| .burst_enable = WMI_10X_PDEV_PARAM_BURST_ENABLE, |
| .cal_period = WMI_10X_PDEV_PARAM_CAL_PERIOD, |
| .aggr_burst = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rx_decap_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .smart_antenna_default_antenna = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_override = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_tid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .antenna_gain = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rx_filter = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast_to_ucast_tid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .proxy_sta_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast2ucast_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, |
| .remove_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, |
| .peer_sta_ps_statechg_enable = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_ac_override = WMI_PDEV_PARAM_UNSUPPORTED, |
| .block_interbss = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_disable_reset_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_msdu_ttl_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_ppdu_duration_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .txbf_sound_period_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_promisc_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_burst_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .en_stats = WMI_PDEV_PARAM_UNSUPPORTED, |
| .mu_group_policy = WMI_PDEV_PARAM_UNSUPPORTED, |
| .noise_detection = WMI_PDEV_PARAM_UNSUPPORTED, |
| .noise_threshold = WMI_PDEV_PARAM_UNSUPPORTED, |
| .dpd_enable = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast_bcast_echo = WMI_PDEV_PARAM_UNSUPPORTED, |
| .atf_strict_sch = WMI_PDEV_PARAM_UNSUPPORTED, |
| .atf_sched_duration = WMI_PDEV_PARAM_UNSUPPORTED, |
| .ant_plzn = WMI_PDEV_PARAM_UNSUPPORTED, |
| .mgmt_retry_limit = WMI_PDEV_PARAM_UNSUPPORTED, |
| .sensitivity_level = WMI_PDEV_PARAM_UNSUPPORTED, |
| .signed_txpower_2g = WMI_PDEV_PARAM_UNSUPPORTED, |
| .signed_txpower_5g = WMI_PDEV_PARAM_UNSUPPORTED, |
| .enable_per_tid_amsdu = WMI_PDEV_PARAM_UNSUPPORTED, |
| .enable_per_tid_ampdu = WMI_PDEV_PARAM_UNSUPPORTED, |
| .cca_threshold = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rts_fixed_rate = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pdev_reset = WMI_PDEV_PARAM_UNSUPPORTED, |
| .wapi_mbssid_offset = WMI_PDEV_PARAM_UNSUPPORTED, |
| .arp_srcaddr = WMI_PDEV_PARAM_UNSUPPORTED, |
| .arp_dstaddr = WMI_PDEV_PARAM_UNSUPPORTED, |
| }; |
| |
| static struct wmi_pdev_param_map wmi_10_2_4_pdev_param_map = { |
| .tx_chain_mask = WMI_10X_PDEV_PARAM_TX_CHAIN_MASK, |
| .rx_chain_mask = WMI_10X_PDEV_PARAM_RX_CHAIN_MASK, |
| .txpower_limit2g = WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G, |
| .txpower_limit5g = WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G, |
| .txpower_scale = WMI_10X_PDEV_PARAM_TXPOWER_SCALE, |
| .beacon_gen_mode = WMI_10X_PDEV_PARAM_BEACON_GEN_MODE, |
| .beacon_tx_mode = WMI_10X_PDEV_PARAM_BEACON_TX_MODE, |
| .resmgr_offchan_mode = WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| .protection_mode = WMI_10X_PDEV_PARAM_PROTECTION_MODE, |
| .dynamic_bw = WMI_10X_PDEV_PARAM_DYNAMIC_BW, |
| .non_agg_sw_retry_th = WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| .agg_sw_retry_th = WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH, |
| .sta_kickout_th = WMI_10X_PDEV_PARAM_STA_KICKOUT_TH, |
| .ac_aggrsize_scaling = WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| .ltr_enable = WMI_10X_PDEV_PARAM_LTR_ENABLE, |
| .ltr_ac_latency_be = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| .ltr_ac_latency_bk = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| .ltr_ac_latency_vi = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| .ltr_ac_latency_vo = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| .ltr_ac_latency_timeout = WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| .ltr_sleep_override = WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| .ltr_rx_override = WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE, |
| .ltr_tx_activity_timeout = WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| .l1ss_enable = WMI_10X_PDEV_PARAM_L1SS_ENABLE, |
| .dsleep_enable = WMI_10X_PDEV_PARAM_DSLEEP_ENABLE, |
| .pcielp_txbuf_flush = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pcielp_txbuf_watermark = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pcielp_txbuf_tmo_en = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pcielp_txbuf_tmo_value = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pdev_stats_update_period = WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| .vdev_stats_update_period = WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| .peer_stats_update_period = WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| .bcnflt_stats_update_period = |
| WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| .pmf_qos = WMI_10X_PDEV_PARAM_PMF_QOS, |
| .arp_ac_override = WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE, |
| .dcs = WMI_10X_PDEV_PARAM_DCS, |
| .ani_enable = WMI_10X_PDEV_PARAM_ANI_ENABLE, |
| .ani_poll_period = WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD, |
| .ani_listen_period = WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| .ani_ofdm_level = WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL, |
| .ani_cck_level = WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL, |
| .dyntxchain = WMI_10X_PDEV_PARAM_DYNTXCHAIN, |
| .proxy_sta = WMI_PDEV_PARAM_UNSUPPORTED, |
| .idle_ps_config = WMI_PDEV_PARAM_UNSUPPORTED, |
| .power_gating_sleep = WMI_PDEV_PARAM_UNSUPPORTED, |
| .fast_channel_reset = WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET, |
| .burst_dur = WMI_10X_PDEV_PARAM_BURST_DUR, |
| .burst_enable = WMI_10X_PDEV_PARAM_BURST_ENABLE, |
| .cal_period = WMI_10X_PDEV_PARAM_CAL_PERIOD, |
| .aggr_burst = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rx_decap_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .smart_antenna_default_antenna = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_override = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_tid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .antenna_gain = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rx_filter = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast_to_ucast_tid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .proxy_sta_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast2ucast_mode = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, |
| .remove_mcast2ucast_buffer = WMI_PDEV_PARAM_UNSUPPORTED, |
| .peer_sta_ps_statechg_enable = WMI_PDEV_PARAM_UNSUPPORTED, |
| .igmpmld_ac_override = WMI_PDEV_PARAM_UNSUPPORTED, |
| .block_interbss = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_disable_reset_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_msdu_ttl_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_ppdu_duration_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .txbf_sound_period_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_promisc_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_burst_mode_cmdid = WMI_PDEV_PARAM_UNSUPPORTED, |
| .en_stats = WMI_PDEV_PARAM_UNSUPPORTED, |
| .mu_group_policy = WMI_PDEV_PARAM_UNSUPPORTED, |
| .noise_detection = WMI_PDEV_PARAM_UNSUPPORTED, |
| .noise_threshold = WMI_PDEV_PARAM_UNSUPPORTED, |
| .dpd_enable = WMI_PDEV_PARAM_UNSUPPORTED, |
| .set_mcast_bcast_echo = WMI_PDEV_PARAM_UNSUPPORTED, |
| .atf_strict_sch = WMI_PDEV_PARAM_UNSUPPORTED, |
| .atf_sched_duration = WMI_PDEV_PARAM_UNSUPPORTED, |
| .ant_plzn = WMI_PDEV_PARAM_UNSUPPORTED, |
| .mgmt_retry_limit = WMI_PDEV_PARAM_UNSUPPORTED, |
| .sensitivity_level = WMI_PDEV_PARAM_UNSUPPORTED, |
| .signed_txpower_2g = WMI_PDEV_PARAM_UNSUPPORTED, |
| .signed_txpower_5g = WMI_PDEV_PARAM_UNSUPPORTED, |
| .enable_per_tid_amsdu = WMI_PDEV_PARAM_UNSUPPORTED, |
| .enable_per_tid_ampdu = WMI_PDEV_PARAM_UNSUPPORTED, |
| .cca_threshold = WMI_PDEV_PARAM_UNSUPPORTED, |
| .rts_fixed_rate = WMI_PDEV_PARAM_UNSUPPORTED, |
| .pdev_reset = WMI_PDEV_PARAM_UNSUPPORTED, |
| .wapi_mbssid_offset = WMI_PDEV_PARAM_UNSUPPORTED, |
| .arp_srcaddr = WMI_PDEV_PARAM_UNSUPPORTED, |
| .arp_dstaddr = WMI_PDEV_PARAM_UNSUPPORTED, |
| }; |
| |
| /* firmware 10.2 specific mappings */ |
| static struct wmi_cmd_map wmi_10_2_cmd_map = { |
| .init_cmdid = WMI_10_2_INIT_CMDID, |
| .start_scan_cmdid = WMI_10_2_START_SCAN_CMDID, |
| .stop_scan_cmdid = WMI_10_2_STOP_SCAN_CMDID, |
| .scan_chan_list_cmdid = WMI_10_2_SCAN_CHAN_LIST_CMDID, |
| .scan_sch_prio_tbl_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_regdomain_cmdid = WMI_10_2_PDEV_SET_REGDOMAIN_CMDID, |
| .pdev_set_channel_cmdid = WMI_10_2_PDEV_SET_CHANNEL_CMDID, |
| .pdev_set_param_cmdid = WMI_10_2_PDEV_SET_PARAM_CMDID, |
| .pdev_pktlog_enable_cmdid = WMI_10_2_PDEV_PKTLOG_ENABLE_CMDID, |
| .pdev_pktlog_disable_cmdid = WMI_10_2_PDEV_PKTLOG_DISABLE_CMDID, |
| .pdev_set_wmm_params_cmdid = WMI_10_2_PDEV_SET_WMM_PARAMS_CMDID, |
| .pdev_set_ht_cap_ie_cmdid = WMI_10_2_PDEV_SET_HT_CAP_IE_CMDID, |
| .pdev_set_vht_cap_ie_cmdid = WMI_10_2_PDEV_SET_VHT_CAP_IE_CMDID, |
| .pdev_set_quiet_mode_cmdid = WMI_10_2_PDEV_SET_QUIET_MODE_CMDID, |
| .pdev_green_ap_ps_enable_cmdid = WMI_10_2_PDEV_GREEN_AP_PS_ENABLE_CMDID, |
| .pdev_get_tpc_config_cmdid = WMI_10_2_PDEV_GET_TPC_CONFIG_CMDID, |
| .pdev_set_base_macaddr_cmdid = WMI_10_2_PDEV_SET_BASE_MACADDR_CMDID, |
| .vdev_create_cmdid = WMI_10_2_VDEV_CREATE_CMDID, |
| .vdev_delete_cmdid = WMI_10_2_VDEV_DELETE_CMDID, |
| .vdev_start_request_cmdid = WMI_10_2_VDEV_START_REQUEST_CMDID, |
| .vdev_restart_request_cmdid = WMI_10_2_VDEV_RESTART_REQUEST_CMDID, |
| .vdev_up_cmdid = WMI_10_2_VDEV_UP_CMDID, |
| .vdev_stop_cmdid = WMI_10_2_VDEV_STOP_CMDID, |
| .vdev_down_cmdid = WMI_10_2_VDEV_DOWN_CMDID, |
| .vdev_set_param_cmdid = WMI_10_2_VDEV_SET_PARAM_CMDID, |
| .vdev_install_key_cmdid = WMI_10_2_VDEV_INSTALL_KEY_CMDID, |
| .peer_create_cmdid = WMI_10_2_PEER_CREATE_CMDID, |
| .peer_delete_cmdid = WMI_10_2_PEER_DELETE_CMDID, |
| .peer_flush_tids_cmdid = WMI_10_2_PEER_FLUSH_TIDS_CMDID, |
| .peer_set_param_cmdid = WMI_10_2_PEER_SET_PARAM_CMDID, |
| .peer_assoc_cmdid = WMI_10_2_PEER_ASSOC_CMDID, |
| .peer_add_wds_entry_cmdid = WMI_10_2_PEER_ADD_WDS_ENTRY_CMDID, |
| .peer_remove_wds_entry_cmdid = WMI_10_2_PEER_REMOVE_WDS_ENTRY_CMDID, |
| .peer_mcast_group_cmdid = WMI_10_2_PEER_MCAST_GROUP_CMDID, |
| .bcn_tx_cmdid = WMI_10_2_BCN_TX_CMDID, |
| .pdev_send_bcn_cmdid = WMI_10_2_PDEV_SEND_BCN_CMDID, |
| .bcn_tmpl_cmdid = WMI_CMD_UNSUPPORTED, |
| .bcn_filter_rx_cmdid = WMI_10_2_BCN_FILTER_RX_CMDID, |
| .prb_req_filter_rx_cmdid = WMI_10_2_PRB_REQ_FILTER_RX_CMDID, |
| .mgmt_tx_cmdid = WMI_10_2_MGMT_TX_CMDID, |
| .prb_tmpl_cmdid = WMI_CMD_UNSUPPORTED, |
| .addba_clear_resp_cmdid = WMI_10_2_ADDBA_CLEAR_RESP_CMDID, |
| .addba_send_cmdid = WMI_10_2_ADDBA_SEND_CMDID, |
| .addba_status_cmdid = WMI_10_2_ADDBA_STATUS_CMDID, |
| .delba_send_cmdid = WMI_10_2_DELBA_SEND_CMDID, |
| .addba_set_resp_cmdid = WMI_10_2_ADDBA_SET_RESP_CMDID, |
| .send_singleamsdu_cmdid = WMI_10_2_SEND_SINGLEAMSDU_CMDID, |
| .sta_powersave_mode_cmdid = WMI_10_2_STA_POWERSAVE_MODE_CMDID, |
| .sta_powersave_param_cmdid = WMI_10_2_STA_POWERSAVE_PARAM_CMDID, |
| .sta_mimo_ps_mode_cmdid = WMI_10_2_STA_MIMO_PS_MODE_CMDID, |
| .pdev_dfs_enable_cmdid = WMI_10_2_PDEV_DFS_ENABLE_CMDID, |
| .pdev_dfs_disable_cmdid = WMI_10_2_PDEV_DFS_DISABLE_CMDID, |
| .roam_scan_mode = WMI_10_2_ROAM_SCAN_MODE, |
| .roam_scan_rssi_threshold = WMI_10_2_ROAM_SCAN_RSSI_THRESHOLD, |
| .roam_scan_period = WMI_10_2_ROAM_SCAN_PERIOD, |
| .roam_scan_rssi_change_threshold = |
| WMI_10_2_ROAM_SCAN_RSSI_CHANGE_THRESHOLD, |
| .roam_ap_profile = WMI_10_2_ROAM_AP_PROFILE, |
| .ofl_scan_add_ap_profile = WMI_10_2_OFL_SCAN_ADD_AP_PROFILE, |
| .ofl_scan_remove_ap_profile = WMI_10_2_OFL_SCAN_REMOVE_AP_PROFILE, |
| .ofl_scan_period = WMI_10_2_OFL_SCAN_PERIOD, |
| .p2p_dev_set_device_info = WMI_10_2_P2P_DEV_SET_DEVICE_INFO, |
| .p2p_dev_set_discoverability = WMI_10_2_P2P_DEV_SET_DISCOVERABILITY, |
| .p2p_go_set_beacon_ie = WMI_10_2_P2P_GO_SET_BEACON_IE, |
| .p2p_go_set_probe_resp_ie = WMI_10_2_P2P_GO_SET_PROBE_RESP_IE, |
| .p2p_set_vendor_ie_data_cmdid = WMI_CMD_UNSUPPORTED, |
| .ap_ps_peer_param_cmdid = WMI_10_2_AP_PS_PEER_PARAM_CMDID, |
| .ap_ps_peer_uapsd_coex_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_rate_retry_sched_cmdid = WMI_10_2_PEER_RATE_RETRY_SCHED_CMDID, |
| .wlan_profile_trigger_cmdid = WMI_10_2_WLAN_PROFILE_TRIGGER_CMDID, |
| .wlan_profile_set_hist_intvl_cmdid = |
| WMI_10_2_WLAN_PROFILE_SET_HIST_INTVL_CMDID, |
| .wlan_profile_get_profile_data_cmdid = |
| WMI_10_2_WLAN_PROFILE_GET_PROFILE_DATA_CMDID, |
| .wlan_profile_enable_profile_id_cmdid = |
| WMI_10_2_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID, |
| .wlan_profile_list_profile_id_cmdid = |
| WMI_10_2_WLAN_PROFILE_LIST_PROFILE_ID_CMDID, |
| .pdev_suspend_cmdid = WMI_10_2_PDEV_SUSPEND_CMDID, |
| .pdev_resume_cmdid = WMI_10_2_PDEV_RESUME_CMDID, |
| .add_bcn_filter_cmdid = WMI_10_2_ADD_BCN_FILTER_CMDID, |
| .rmv_bcn_filter_cmdid = WMI_10_2_RMV_BCN_FILTER_CMDID, |
| .wow_add_wake_pattern_cmdid = WMI_10_2_WOW_ADD_WAKE_PATTERN_CMDID, |
| .wow_del_wake_pattern_cmdid = WMI_10_2_WOW_DEL_WAKE_PATTERN_CMDID, |
| .wow_enable_disable_wake_event_cmdid = |
| WMI_10_2_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID, |
| .wow_enable_cmdid = WMI_10_2_WOW_ENABLE_CMDID, |
| .wow_hostwakeup_from_sleep_cmdid = |
| WMI_10_2_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID, |
| .rtt_measreq_cmdid = WMI_10_2_RTT_MEASREQ_CMDID, |
| .rtt_tsf_cmdid = WMI_10_2_RTT_TSF_CMDID, |
| .vdev_spectral_scan_configure_cmdid = |
| WMI_10_2_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID, |
| .vdev_spectral_scan_enable_cmdid = |
| WMI_10_2_VDEV_SPECTRAL_SCAN_ENABLE_CMDID, |
| .request_stats_cmdid = WMI_10_2_REQUEST_STATS_CMDID, |
| .set_arp_ns_offload_cmdid = WMI_CMD_UNSUPPORTED, |
| .network_list_offload_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .gtk_offload_cmdid = WMI_CMD_UNSUPPORTED, |
| .csa_offload_enable_cmdid = WMI_CMD_UNSUPPORTED, |
| .csa_offload_chanswitch_cmdid = WMI_CMD_UNSUPPORTED, |
| .chatter_set_mode_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_tid_addba_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_tid_delba_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_dtim_ps_method_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_uapsd_auto_trig_cmdid = WMI_CMD_UNSUPPORTED, |
| .sta_keepalive_cmd = WMI_CMD_UNSUPPORTED, |
| .echo_cmdid = WMI_10_2_ECHO_CMDID, |
| .pdev_utf_cmdid = WMI_10_2_PDEV_UTF_CMDID, |
| .dbglog_cfg_cmdid = WMI_10_2_DBGLOG_CFG_CMDID, |
| .pdev_qvit_cmdid = WMI_10_2_PDEV_QVIT_CMDID, |
| .pdev_ftm_intg_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_set_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_get_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .force_fw_hang_cmdid = WMI_CMD_UNSUPPORTED, |
| .gpio_config_cmdid = WMI_10_2_GPIO_CONFIG_CMDID, |
| .gpio_output_cmdid = WMI_10_2_GPIO_OUTPUT_CMDID, |
| .pdev_get_temperature_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_enable_adaptive_cca_cmdid = WMI_CMD_UNSUPPORTED, |
| .scan_update_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_standby_response_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_resume_response_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_add_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_evict_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_restore_peer_cmdid = WMI_CMD_UNSUPPORTED, |
| .wlan_peer_caching_print_all_peers_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_update_wds_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_add_proxy_sta_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| .rtt_keepalive_cmdid = WMI_CMD_UNSUPPORTED, |
| .oem_req_cmdid = WMI_CMD_UNSUPPORTED, |
| .nan_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_ratemask_cmdid = WMI_CMD_UNSUPPORTED, |
| .qboost_cfg_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_smart_ant_enable_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_smart_ant_set_rx_antenna_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_tx_antenna_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_train_info_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_smart_ant_set_node_config_ops_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_antenna_switch_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_ctl_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_set_mimogain_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_ratepwr_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_ratepwr_chainmsk_table_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_fips_cmdid = WMI_CMD_UNSUPPORTED, |
| .tt_set_conf_cmdid = WMI_CMD_UNSUPPORTED, |
| .fwtest_cmdid = WMI_CMD_UNSUPPORTED, |
| .vdev_atf_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .peer_atf_request_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ani_cck_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_get_ani_ofdm_config_cmdid = WMI_CMD_UNSUPPORTED, |
| .pdev_reserve_ast_entry_cmdid = WMI_CMD_UNSUPPORTED, |
| }; |
| |
| static struct wmi_pdev_param_map wmi_10_4_pdev_param_map = { |
| .tx_chain_mask = WMI_10_4_PDEV_PARAM_TX_CHAIN_MASK, |
| .rx_chain_mask = WMI_10_4_PDEV_PARAM_RX_CHAIN_MASK, |
| .txpower_limit2g = WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT2G, |
| .txpower_limit5g = WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT5G, |
| .txpower_scale = WMI_10_4_PDEV_PARAM_TXPOWER_SCALE, |
| .beacon_gen_mode = WMI_10_4_PDEV_PARAM_BEACON_GEN_MODE, |
| .beacon_tx_mode = WMI_10_4_PDEV_PARAM_BEACON_TX_MODE, |
| .resmgr_offchan_mode = WMI_10_4_PDEV_PARAM_RESMGR_OFFCHAN_MODE, |
| .protection_mode = WMI_10_4_PDEV_PARAM_PROTECTION_MODE, |
| .dynamic_bw = WMI_10_4_PDEV_PARAM_DYNAMIC_BW, |
| .non_agg_sw_retry_th = WMI_10_4_PDEV_PARAM_NON_AGG_SW_RETRY_TH, |
| .agg_sw_retry_th = WMI_10_4_PDEV_PARAM_AGG_SW_RETRY_TH, |
| .sta_kickout_th = WMI_10_4_PDEV_PARAM_STA_KICKOUT_TH, |
| .ac_aggrsize_scaling = WMI_10_4_PDEV_PARAM_AC_AGGRSIZE_SCALING, |
| .ltr_enable = WMI_10_4_PDEV_PARAM_LTR_ENABLE, |
| .ltr_ac_latency_be = WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BE, |
| .ltr_ac_latency_bk = WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BK, |
| .ltr_ac_latency_vi = WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VI, |
| .ltr_ac_latency_vo = WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VO, |
| .ltr_ac_latency_timeout = WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT, |
| .ltr_sleep_override = WMI_10_4_PDEV_PARAM_LTR_SLEEP_OVERRIDE, |
| .ltr_rx_override = WMI_10_4_PDEV_PARAM_LTR_RX_OVERRIDE, |
| .ltr_tx_activity_timeout = WMI_10_4_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT, |
| .l1ss_enable = WMI_10_4_PDEV_PARAM_L1SS_ENABLE, |
| .dsleep_enable = WMI_10_4_PDEV_PARAM_DSLEEP_ENABLE, |
| .pcielp_txbuf_flush = WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_FLUSH, |
| .pcielp_txbuf_watermark = WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_WATERMARK, |
| .pcielp_txbuf_tmo_en = WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_EN, |
| .pcielp_txbuf_tmo_value = WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE, |
| .pdev_stats_update_period = |
| WMI_10_4_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD, |
| .vdev_stats_update_period = |
| WMI_10_4_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD, |
| .peer_stats_update_period = |
| WMI_10_4_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD, |
| .bcnflt_stats_update_period = |
| WMI_10_4_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD, |
| .pmf_qos = WMI_10_4_PDEV_PARAM_PMF_QOS, |
| .arp_ac_override = WMI_10_4_PDEV_PARAM_ARP_AC_OVERRIDE, |
| .dcs = WMI_10_4_PDEV_PARAM_DCS, |
| .ani_enable = WMI_10_4_PDEV_PARAM_ANI_ENABLE, |
| .ani_poll_period = WMI_10_4_PDEV_PARAM_ANI_POLL_PERIOD, |
| .ani_listen_period = WMI_10_4_PDEV_PARAM_ANI_LISTEN_PERIOD, |
| .ani_ofdm_level = WMI_10_4_PDEV_PARAM_ANI_OFDM_LEVEL, |
| .ani_cck_level = WMI_10_4_PDEV_PARAM_ANI_CCK_LEVEL, |
| .dyntxchain = WMI_10_4_PDEV_PARAM_DYNTXCHAIN, |
| .proxy_sta = WMI_10_4_PDEV_PARAM_PROXY_STA, |
| .idle_ps_config = WMI_10_4_PDEV_PARAM_IDLE_PS_CONFIG, |
| .power_gating_sleep = WMI_10_4_PDEV_PARAM_POWER_GATING_SLEEP, |
| .fast_channel_reset = WMI_10_4_PDEV_PARAM_FAST_CHANNEL_RESET, |
| .burst_dur = WMI_10_4_PDEV_PARAM_BURST_DUR, |
| .burst_enable = WMI_10_4_PDEV_PARAM_BURST_ENABLE, |
| .cal_period = WMI_10_4_PDEV_PARAM_CAL_PERIOD, |
| .aggr_burst = WMI_10_4_PDEV_PARAM_AGGR_BURST, |
| .rx_decap_mode = WMI_10_4_PDEV_PARAM_RX_DECAP_MODE, |
| .smart_antenna_default_antenna = |
| WMI_10_4_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA, |
| .igmpmld_override = WMI_10_4_PDEV_PARAM_IGMPMLD_OVERRIDE, |
| .igmpmld_tid = WMI_10_4_PDEV_PARAM_IGMPMLD_TID, |
| .antenna_gain = WMI_10_4_PDEV_PARAM_ANTENNA_GAIN, |
| .rx_filter = WMI_10_4_PDEV_PARAM_RX_FILTER, |
| .set_mcast_to_ucast_tid = WMI_10_4_PDEV_SET_MCAST_TO_UCAST_TID, |
| .proxy_sta_mode = WMI_10_4_PDEV_PARAM_PROXY_STA_MODE, |
| .set_mcast2ucast_mode = WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_MODE, |
| .set_mcast2ucast_buffer = WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_BUFFER, |
| .remove_mcast2ucast_buffer = |
| WMI_10_4_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER, |
| .peer_sta_ps_statechg_enable = |
| WMI_10_4_PDEV_PEER_STA_PS_STATECHG_ENABLE, |
| .igmpmld_ac_override = WMI_10_4_PDEV_PARAM_IGMPMLD_AC_OVERRIDE, |
| .block_interbss = WMI_10_4_PDEV_PARAM_BLOCK_INTERBSS, |
| .set_disable_reset_cmdid = WMI_10_4_PDEV_PARAM_SET_DISABLE_RESET_CMDID, |
| .set_msdu_ttl_cmdid = WMI_10_4_PDEV_PARAM_SET_MSDU_TTL_CMDID, |
| .set_ppdu_duration_cmdid = WMI_10_4_PDEV_PARAM_SET_PPDU_DURATION_CMDID, |
| .txbf_sound_period_cmdid = WMI_10_4_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID, |
| .set_promisc_mode_cmdid = WMI_10_4_PDEV_PARAM_SET_PROMISC_MODE_CMDID, |
| .set_burst_mode_cmdid = WMI_10_4_PDEV_PARAM_SET_BURST_MODE_CMDID, |
| .en_stats = WMI_10_4_PDEV_PARAM_EN_STATS, |
| .mu_group_policy = WMI_10_4_PDEV_PARAM_MU_GROUP_POLICY, |
| .noise_detection = WMI_10_4_PDEV_PARAM_NOISE_DETECTION, |
| .noise_threshold = WMI_10_4_PDEV_PARAM_NOISE_THRESHOLD, |
| .dpd_enable = WMI_10_4_PDEV_PARAM_DPD_ENABLE, |
| .set_mcast_bcast_echo = WMI_10_4_PDEV_PARAM_SET_MCAST_BCAST_ECHO, |
| .atf_strict_sch = WMI_10_4_PDEV_PARAM_ATF_STRICT_SCH, |
| .atf_sched_duration = WMI_10_4_PDEV_PARAM_ATF_SCHED_DURATION, |
| .ant_plzn = WMI_10_4_PDEV_PARAM_ANT_PLZN, |
| .mgmt_retry_limit = WMI_10_4_PDEV_PARAM_MGMT_RETRY_LIMIT, |
| .sensitivity_level = WMI_10_4_PDEV_PARAM_SENSITIVITY_LEVEL, |
| .signed_txpower_2g = WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_2G, |
| .signed_txpower_5g = WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_5G, |
| .enable_per_tid_amsdu = WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMSDU, |
| .enable_per_tid_ampdu = WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMPDU, |
| .cca_threshold = WMI_10_4_PDEV_PARAM_CCA_THRESHOLD, |
| .rts_fixed_rate = WMI_10_4_PDEV_PARAM_RTS_FIXED_RATE, |
| .pdev_reset = WMI_10_4_PDEV_PARAM_PDEV_RESET, |
| .wapi_mbssid_offset = WMI_10_4_PDEV_PARAM_WAPI_MBSSID_OFFSET, |
| .arp_srcaddr = WMI_10_4_PDEV_PARAM_ARP_SRCADDR, |
| .arp_dstaddr = WMI_10_4_PDEV_PARAM_ARP_DSTADDR, |
| }; |
| |
| static const struct wmi_peer_flags_map wmi_peer_flags_map = { |
| .auth = WMI_PEER_AUTH, |
| .qos = WMI_PEER_QOS, |
| .need_ptk_4_way = WMI_PEER_NEED_PTK_4_WAY, |
| .need_gtk_2_way = WMI_PEER_NEED_GTK_2_WAY, |
| .apsd = WMI_PEER_APSD, |
| .ht = WMI_PEER_HT, |
| .bw40 = WMI_PEER_40MHZ, |
| .stbc = WMI_PEER_STBC, |
| .ldbc = WMI_PEER_LDPC, |
| .dyn_mimops = WMI_PEER_DYN_MIMOPS, |
| .static_mimops = WMI_PEER_STATIC_MIMOPS, |
| .spatial_mux = WMI_PEER_SPATIAL_MUX, |
| .vht = WMI_PEER_VHT, |
| .bw80 = WMI_PEER_80MHZ, |
| .vht_2g = WMI_PEER_VHT_2G, |
| .pmf = WMI_PEER_PMF, |
| }; |
| |
| static const struct wmi_peer_flags_map wmi_10x_peer_flags_map = { |
| .auth = WMI_10X_PEER_AUTH, |
| .qos = WMI_10X_PEER_QOS, |
| .need_ptk_4_way = WMI_10X_PEER_NEED_PTK_4_WAY, |
| .need_gtk_2_way = WMI_10X_PEER_NEED_GTK_2_WAY, |
| .apsd = WMI_10X_PEER_APSD, |
| .ht = WMI_10X_PEER_HT, |
| .bw40 = WMI_10X_PEER_40MHZ, |
| .stbc = WMI_10X_PEER_STBC, |
| .ldbc = WMI_10X_PEER_LDPC, |
| .dyn_mimops = WMI_10X_PEER_DYN_MIMOPS, |
| .static_mimops = WMI_10X_PEER_STATIC_MIMOPS, |
| .spatial_mux = WMI_10X_PEER_SPATIAL_MUX, |
| .vht = WMI_10X_PEER_VHT, |
| .bw80 = WMI_10X_PEER_80MHZ, |
| }; |
| |
| static const struct wmi_peer_flags_map wmi_10_2_peer_flags_map = { |
| .auth = WMI_10_2_PEER_AUTH, |
| .qos = WMI_10_2_PEER_QOS, |
| .need_ptk_4_way = WMI_10_2_PEER_NEED_PTK_4_WAY, |
| .need_gtk_2_way = WMI_10_2_PEER_NEED_GTK_2_WAY, |
| .apsd = WMI_10_2_PEER_APSD, |
| .ht = WMI_10_2_PEER_HT, |
| .bw40 = WMI_10_2_PEER_40MHZ, |
| .stbc = WMI_10_2_PEER_STBC, |
| .ldbc = WMI_10_2_PEER_LDPC, |
| .dyn_mimops = WMI_10_2_PEER_DYN_MIMOPS, |
| .static_mimops = WMI_10_2_PEER_STATIC_MIMOPS, |
| .spatial_mux = WMI_10_2_PEER_SPATIAL_MUX, |
| .vht = WMI_10_2_PEER_VHT, |
| .bw80 = WMI_10_2_PEER_80MHZ, |
| .vht_2g = WMI_10_2_PEER_VHT_2G, |
| .pmf = WMI_10_2_PEER_PMF, |
| }; |
| |
| void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch, |
| const struct wmi_channel_arg *arg) |
| { |
| u32 flags = 0; |
| |
| memset(ch, 0, sizeof(*ch)); |
| |
| if (arg->passive) |
| flags |= WMI_CHAN_FLAG_PASSIVE; |
| if (arg->allow_ibss) |
| flags |= WMI_CHAN_FLAG_ADHOC_ALLOWED; |
| if (arg->allow_ht) |
| flags |= WMI_CHAN_FLAG_ALLOW_HT; |
| if (arg->allow_vht) |
| flags |= WMI_CHAN_FLAG_ALLOW_VHT; |
| if (arg->ht40plus) |
| flags |= WMI_CHAN_FLAG_HT40_PLUS; |
| if (arg->chan_radar) |
| flags |= WMI_CHAN_FLAG_DFS; |
| |
| ch->mhz = __cpu_to_le32(arg->freq); |
| ch->band_center_freq1 = __cpu_to_le32(arg->band_center_freq1); |
| ch->band_center_freq2 = 0; |
| ch->min_power = arg->min_power; |
| ch->max_power = arg->max_power; |
| ch->reg_power = arg->max_reg_power; |
| ch->antenna_max = arg->max_antenna_gain; |
| |
| /* mode & flags share storage */ |
| ch->mode = arg->mode; |
| ch->flags |= __cpu_to_le32(flags); |
| } |
| |
| int ath10k_wmi_wait_for_service_ready(struct ath10k *ar) |
| { |
| unsigned long time_left; |
| |
| time_left = wait_for_completion_timeout(&ar->wmi.service_ready, |
| WMI_SERVICE_READY_TIMEOUT_HZ); |
| if (!time_left) |
| return -ETIMEDOUT; |
| return 0; |
| } |
| |
| int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar) |
| { |
| unsigned long time_left; |
| |
| time_left = wait_for_completion_timeout(&ar->wmi.unified_ready, |
| WMI_UNIFIED_READY_TIMEOUT_HZ); |
| if (!time_left) |
| return -ETIMEDOUT; |
| return 0; |
| } |
| |
| struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len) |
| { |
| struct sk_buff *skb; |
| u32 round_len = roundup(len, 4); |
| |
| skb = ath10k_htc_alloc_skb(ar, WMI_SKB_HEADROOM + round_len); |
| if (!skb) |
| return NULL; |
| |
| skb_reserve(skb, WMI_SKB_HEADROOM); |
| if (!IS_ALIGNED((unsigned long)skb->data, 4)) |
| ath10k_warn(ar, "Unaligned WMI skb\n"); |
| |
| skb_put(skb, round_len); |
| memset(skb->data, 0, round_len); |
| |
| return skb; |
| } |
| |
| static void ath10k_wmi_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb) |
| { |
| dev_kfree_skb(skb); |
| } |
| |
| int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb, |
| u32 cmd_id) |
| { |
| struct ath10k_skb_cb *skb_cb = ATH10K_SKB_CB(skb); |
| struct wmi_cmd_hdr *cmd_hdr; |
| int ret; |
| u32 cmd = 0; |
| |
| if (skb_push(skb, sizeof(struct wmi_cmd_hdr)) == NULL) |
| return -ENOMEM; |
| |
| cmd |= SM(cmd_id, WMI_CMD_HDR_CMD_ID); |
| |
| cmd_hdr = (struct wmi_cmd_hdr *)skb->data; |
| cmd_hdr->cmd_id = __cpu_to_le32(cmd); |
| |
| memset(skb_cb, 0, sizeof(*skb_cb)); |
| ret = ath10k_htc_send(&ar->htc, ar->wmi.eid, skb); |
| trace_ath10k_wmi_cmd(ar, cmd_id, skb->data, skb->len, ret); |
| |
| if (ret) |
| goto err_pull; |
| |
| return 0; |
| |
| err_pull: |
| skb_pull(skb, sizeof(struct wmi_cmd_hdr)); |
| return ret; |
| } |
| |
| static void ath10k_wmi_tx_beacon_nowait(struct ath10k_vif *arvif) |
| { |
| struct ath10k *ar = arvif->ar; |
| struct ath10k_skb_cb *cb; |
| struct sk_buff *bcn; |
| bool dtim_zero; |
| bool deliver_cab; |
| int ret; |
| |
| spin_lock_bh(&ar->data_lock); |
| |
| bcn = arvif->beacon; |
| |
| if (!bcn) |
| goto unlock; |
| |
| cb = ATH10K_SKB_CB(bcn); |
| |
| switch (arvif->beacon_state) { |
| case ATH10K_BEACON_SENDING: |
| case ATH10K_BEACON_SENT: |
| break; |
| case ATH10K_BEACON_SCHEDULED: |
| arvif->beacon_state = ATH10K_BEACON_SENDING; |
| spin_unlock_bh(&ar->data_lock); |
| |
| dtim_zero = !!(cb->flags & ATH10K_SKB_F_DTIM_ZERO); |
| deliver_cab = !!(cb->flags & ATH10K_SKB_F_DELIVER_CAB); |
| ret = ath10k_wmi_beacon_send_ref_nowait(arvif->ar, |
| arvif->vdev_id, |
| bcn->data, bcn->len, |
| cb->paddr, |
| dtim_zero, |
| deliver_cab); |
| |
| spin_lock_bh(&ar->data_lock); |
| |
| if (ret == 0) |
| arvif->beacon_state = ATH10K_BEACON_SENT; |
| else |
| arvif->beacon_state = ATH10K_BEACON_SCHEDULED; |
| } |
| |
| unlock: |
| spin_unlock_bh(&ar->data_lock); |
| } |
| |
| static void ath10k_wmi_tx_beacons_iter(void *data, u8 *mac, |
| struct ieee80211_vif *vif) |
| { |
| struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| |
| ath10k_wmi_tx_beacon_nowait(arvif); |
| } |
| |
| static void ath10k_wmi_tx_beacons_nowait(struct ath10k *ar) |
| { |
| ieee80211_iterate_active_interfaces_atomic(ar->hw, |
| IEEE80211_IFACE_ITER_NORMAL, |
| ath10k_wmi_tx_beacons_iter, |
| NULL); |
| } |
| |
| static void ath10k_wmi_op_ep_tx_credits(struct ath10k *ar) |
| { |
| /* try to send pending beacons first. they take priority */ |
| ath10k_wmi_tx_beacons_nowait(ar); |
| |
| wake_up(&ar->wmi.tx_credits_wq); |
| } |
| |
| int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id) |
| { |
| int ret = -EOPNOTSUPP; |
| |
| might_sleep(); |
| |
| if (cmd_id == WMI_CMD_UNSUPPORTED) { |
| ath10k_warn(ar, "wmi command %d is not supported by firmware\n", |
| cmd_id); |
| return ret; |
| } |
| |
| wait_event_timeout(ar->wmi.tx_credits_wq, ({ |
| /* try to send pending beacons first. they take priority */ |
| ath10k_wmi_tx_beacons_nowait(ar); |
| |
| ret = ath10k_wmi_cmd_send_nowait(ar, skb, cmd_id); |
| |
| if (ret && test_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags)) |
| ret = -ESHUTDOWN; |
| |
| (ret != -EAGAIN); |
| }), 3*HZ); |
| |
| if (ret) |
| dev_kfree_skb_any(skb); |
| |
| return ret; |
| } |
| |
| static struct sk_buff * |
| ath10k_wmi_op_gen_mgmt_tx(struct ath10k *ar, struct sk_buff *msdu) |
| { |
| struct ath10k_skb_cb *cb = ATH10K_SKB_CB(msdu); |
| struct ath10k_vif *arvif = (void *)cb->vif->drv_priv; |
| struct wmi_mgmt_tx_cmd *cmd; |
| struct ieee80211_hdr *hdr; |
| struct sk_buff *skb; |
| int len; |
| u32 vdev_id; |
| u32 buf_len = msdu->len; |
| u16 fc; |
| |
| hdr = (struct ieee80211_hdr *)msdu->data; |
| fc = le16_to_cpu(hdr->frame_control); |
| |
| if (cb->vif) |
| vdev_id = arvif->vdev_id; |
| else |
| vdev_id = 0; |
| |
| if (WARN_ON_ONCE(!ieee80211_is_mgmt(hdr->frame_control))) |
| return ERR_PTR(-EINVAL); |
| |
| len = sizeof(cmd->hdr) + msdu->len; |
| |
| if ((ieee80211_is_action(hdr->frame_control) || |
| ieee80211_is_deauth(hdr->frame_control) || |
| ieee80211_is_disassoc(hdr->frame_control)) && |
| ieee80211_has_protected(hdr->frame_control)) { |
| len += IEEE80211_CCMP_MIC_LEN; |
| buf_len += IEEE80211_CCMP_MIC_LEN; |
| } |
| |
| len = round_up(len, 4); |
| |
| skb = ath10k_wmi_alloc_skb(ar, len); |
| if (!skb) |
| return ERR_PTR(-ENOMEM); |
| |
| cmd = (struct wmi_mgmt_tx_cmd *)skb->data; |
| |
| cmd->hdr.vdev_id = __cpu_to_le32(vdev_id); |
| cmd->hdr.tx_rate = 0; |
| cmd->hdr.tx_power = 0; |
| cmd->hdr.buf_len = __cpu_to_le32(buf_len); |
| |
| ether_addr_copy(cmd->hdr.peer_macaddr.addr, ieee80211_get_DA(hdr)); |
| memcpy(cmd->buf, msdu->data, msdu->len); |
| |
| ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi mgmt tx skb %p len %d ftype %02x stype %02x\n", |
| msdu, skb->len, fc & IEEE80211_FCTL_FTYPE, |
| fc & IEEE80211_FCTL_STYPE); |
| trace_ath10k_tx_hdr(ar, skb->data, skb->len); |
| trace_ath10k_tx_payload(ar, skb->data, skb->len); |
| |
| return skb; |
| } |
| |
| static void ath10k_wmi_event_scan_started(struct ath10k *ar) |
| { |
| lockdep_assert_held(&ar->data_lock); |
| |
| switch (ar->scan.state) { |
| case ATH10K_SCAN_IDLE: |
| case ATH10K_SCAN_RUNNING: |
| case ATH10K_SCAN_ABORTING: |
| ath10k_warn(ar, "received scan started event in an invalid scan state: %s (%d)\n", |
| ath10k_scan_state_str(ar->scan.state), |
| ar->scan.state); |
| break; |
| case ATH10K_SCAN_STARTING: |
| ar->scan.state = ATH10K_SCAN_RUNNING; |
| |
| if (ar->scan.is_roc) |
| ieee80211_ready_on_channel(ar->hw); |
| |
| complete(&ar->scan.started); |
| break; |
| } |
| } |
| |
| static void ath10k_wmi_event_scan_start_failed(struct ath10k *ar) |
| { |
| lockdep_assert_held(&ar->data_lock); |
| |
| switch (ar->scan.state) { |
| case ATH10K_SCAN_IDLE: |
| case ATH10K_SCAN_RUNNING: |
| case ATH10K_SCAN_ABORTING: |
| ath10k_warn(ar, "received scan start failed event in an invalid scan state: %s (%d)\n", |
| ath10k_scan_state_str(ar->scan.state), |
| ar->scan.state); |
| break; |
| case ATH10K_SCAN_STARTING: |
| complete(&ar->scan.started); |
| __ath10k_scan_finish(ar); |
| break; |
| } |
| } |
| |
| static void ath10k_wmi_event_scan_completed(struct ath10k *ar) |
| { |
| lockdep_assert_held(&ar->data_lock); |
| |
| switch (ar->scan.state) { |
| case ATH10K_SCAN_IDLE: |
| case ATH10K_SCAN_STARTING: |
| /* One suspected reason scan can be completed while starting is |
| * if firmware fails to deliver all scan events to the host, |
| * e.g. when transport pipe is full. This has been observed |
| * with spectral scan phyerr events starving wmi transport |
| * pipe. In such case the "scan completed" event should be (and |
| * is) ignored by the host as it may be just firmware's scan |
| * state machine recovering. |
| */ |
| ath10k_warn(ar, "received scan completed event in an invalid scan state: %s (%d)\n", |
| ath10k_scan_state_str(ar->scan.state), |
| ar->scan.state); |
| break; |
| case ATH10K_SCAN_RUNNING: |
| case ATH10K_SCAN_ABORTING: |
| __ath10k_scan_finish(ar); |
| break; |
| } |
| } |
| |
| static void ath10k_wmi_event_scan_bss_chan(struct ath10k *ar) |
| { |
| lockdep_assert_held(&ar->data_lock); |
| |
| switch (ar->scan.state) { |
| case ATH10K_SCAN_IDLE: |
| case ATH10K_SCAN_STARTING: |
| ath10k_warn(ar, "received scan bss chan event in an invalid scan state: %s (%d)\n", |
| ath10k_scan_state_str(ar->scan.state), |
| ar->scan.state); |
| break; |
| case ATH10K_SCAN_RUNNING: |
| case ATH10K_SCAN_ABORTING: |
| ar->scan_channel = NULL; |
| break; |
| } |
| } |
| |
| static void ath10k_wmi_event_scan_foreign_chan(struct ath10k *ar, u32 freq) |
| { |
| lockdep_assert_held(&ar->data_lock); |
| |
| switch (ar->scan.state) { |
| case ATH10K_SCAN_IDLE: |
| case ATH10K_SCAN_STARTING: |
| ath10k_warn(ar, "received scan foreign chan event in an invalid scan state: %s (%d)\n", |
| ath10k_scan_state_str(ar->scan.state), |
| ar->scan.state); |
| break; |
| case ATH10K_SCAN_RUNNING: |
| case ATH10K_SCAN_ABORTING: |
| ar->scan_channel = ieee80211_get_channel(ar->hw->wiphy, freq); |
| |
| if (ar->scan.is_roc && ar->scan.roc_freq == freq) |
| complete(&ar->scan.on_channel); |
| break; |
| } |
| } |
| |
| static const char * |
| ath10k_wmi_event_scan_type_str(enum wmi_scan_event_type type, |
| enum wmi_scan_completion_reason reason) |
| { |
| switch (type) { |
| case WMI_SCAN_EVENT_STARTED: |
| return "started"; |
| case WMI_SCAN_EVENT_COMPLETED: |
| switch (reason) { |
| case WMI_SCAN_REASON_COMPLETED: |
| return "completed"; |
| case WMI_SCAN_REASON_CANCELLED: |
| return "completed [cancelled]"; |
| case WMI_SCAN_REASON_PREEMPTED: |
| return "completed [preempted]"; |
| case WMI_SCAN_REASON_TIMEDOUT: |
| return "completed [timedout]"; |
| case WMI_SCAN_REASON_INTERNAL_FAILURE: |
| return "completed [internal err]"; |
| case WMI_SCAN_REASON_MAX: |
| break; |
| } |
| return "completed [unknown]"; |
| case WMI_SCAN_EVENT_BSS_CHANNEL: |
| return "bss channel"; |
| case WMI_SCAN_EVENT_FOREIGN_CHANNEL: |
| return "foreign channel"; |
| case WMI_SCAN_EVENT_DEQUEUED: |
| return "dequeued"; |
| case WMI_SCAN_EVENT_PREEMPTED: |
| return "preempted"; |
| case WMI_SCAN_EVENT_START_FAILED: |
| return "start failed"; |
| case WMI_SCAN_EVENT_RESTARTED: |
| return "restarted"; |
| case WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT: |
| return "foreign channel exit"; |
| default: |
| return "unknown"; |
| } |
| } |
| |
| static int ath10k_wmi_op_pull_scan_ev(struct ath10k *ar, struct sk_buff *skb, |
| struct wmi_scan_ev_arg *arg) |
| { |
| struct wmi_scan_event *ev = (void *)skb->data; |
| |
| if (skb->len < sizeof(*ev)) |
| return -EPROTO; |
| |
| skb_pull(skb, sizeof(*ev)); |
| arg->event_type = ev->event_type; |
| arg->reason = ev->reason; |
| arg->channel_freq = ev->channel_freq; |
| arg->scan_req_id = ev->scan_req_id; |
| arg->scan_id = ev->scan_id; |
| arg->vdev_id = ev->vdev_id; |
| |
| return 0; |
| } |
| |
| int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb) |
| { |
| struct wmi_scan_ev_arg arg = {}; |
| enum wmi_scan_event_type event_type; |
| enum wmi_scan_completion_reason reason; |
| u32 freq; |
| u32 req_id; |
| u32 scan_id; |
| u32 vdev_id; |
| int ret; |
| |
| ret = ath10k_wmi_pull_scan(ar, skb, &arg); |
| if (ret) { |
| ath10k_warn(ar, "failed to parse scan event: %d\n", ret); |
| return ret; |
| } |
| |
| event_type = __le32_to_cpu(arg.event_type); |
| reason = __le32_to_cpu(arg.reason); |
| freq = __le32_to_cpu(arg.channel_freq); |
| req_id = __le32_to_cpu(arg.scan_req_id); |
| scan_id = __le32_to_cpu(arg.scan_id); |
| vdev_id = __le32_to_cpu(arg.vdev_id); |
| |
| spin_lock_bh(&ar->data_lock); |
| |
| ath10k_dbg(ar, ATH10K_DBG_WMI, |
| "scan event %s type %d reason %d freq %d req_id %d scan_id %d vdev_id %d state %s (%d)\n", |
| ath10k_wmi_event_scan_type_str(event_type, reason), |
| event_type, reason, freq, req_id, scan_id, vdev_id, |
| ath10k_scan_state_str(ar->scan.state), ar->scan.state); |
| |
| switch (event_type) { |
| case WMI_SCAN_EVENT_STARTED: |
| ath10k_wmi_event_scan_started(ar); |
| break; |
| case WMI_SCAN_EVENT_COMPLETED: |
| ath10k_wmi_event_scan_completed(ar); |
| break; |
| case WMI_SCAN_EVENT_BSS_CHANNEL: |
| ath10k_wmi_event_scan_bss_chan(ar); |
| break; |
| case WMI_SCAN_EVENT_FOREIGN_CHANNEL: |
| ath10k_wmi_event_scan_foreign_chan(ar, freq); |
| break; |
| case WMI_SCAN_EVENT_START_FAILED: |
| ath10k_warn(ar, "received scan start failure event\n"); |
| ath10k_wmi_event_scan_start_failed(ar); |
| break; |
| case WMI_SCAN_EVENT_DEQUEUED: |
| case WMI_SCAN_EVENT_PREEMPTED: |
| case WMI_SCAN_EVENT_RESTARTED: |
| case WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT: |
| default: |
| break; |
| } |
| |
| spin_unlock_bh(&ar->data_lock); |
| return 0; |
| } |
| |
| static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) |
| { |
| enum ieee80211_band band; |
| |
| switch (phy_mode) { |
| case MODE_11A: |
| case MODE_11NA_HT20: |
| case MODE_11NA_HT40: |
| case MODE_11AC_VHT20: |
| case MODE_11AC_VHT40: |
| case MODE_11AC_VHT80: |
| band = IEEE80211_BAND_5GHZ; |
| break; |
| case MODE_11G: |
| case MODE_11B: |
| case MODE_11GONLY: |
| case MODE_11NG_HT20: |
| case MODE_11NG_HT40: |
| case MODE_11AC_VHT20_2G: |
| case MODE_11AC_VHT40_2G: |
| case MODE_11AC_VHT80_2G: |
| default: |
| band = IEEE80211_BAND_2GHZ; |
| } |
| |
| return band; |
| } |
| |
| /* If keys are configured, HW decrypts all frames |
| * with protected bit set. Mark such frames as decrypted. |
| */ |
| static void ath10k_wmi_handle_wep_reauth(struct ath10k *ar, |
| struct sk_buff *skb, |
| struct ieee80211_rx_status *status) |
| { |
| struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
| unsigned int hdrlen; |
| bool peer_key; |
| u8 *addr, keyidx; |
| |
| if (!ieee80211_is_auth(hdr->frame_control) || |
| !ieee80211_has_protected(hdr->frame_control)) |
| return; |
| |
| hdrlen = ieee80211_hdrlen(hdr->frame_control); |
| if (skb->len < (hdrlen + IEEE80211_WEP_IV_LEN)) |
| return; |
| |
| keyidx = skb->data[hdrlen + (IEEE80211_WEP_IV_LEN - 1)] >> WEP_KEYID_SHIFT; |
| addr = ieee80211_get_SA(hdr); |
| |
| spin_lock_bh(&ar->data_lock); |
| peer_key = ath10k_mac_is_peer_wep_key_set(ar, addr, keyidx); |
| spin_unlock_bh(&ar->data_lock); |
| |
| if (peer_key) { |
| ath10k_dbg(ar, ATH10K_DBG_MAC, |
| "mac wep key present for peer %pM\n", addr); |
| status->flag |= RX_FLAG_DECRYPTED; |
| } |
| } |
| |
| static int ath10k_wmi_op_pull_mgmt_rx_ev(struct ath10k *ar, struct sk_buff *skb, |
| struct wmi_mgmt_rx_ev_arg *arg) |
| { |
| struct wmi_mgmt_rx_event_v1 *ev_v1; |
| struct wmi_mgmt_rx_event_v2 *ev_v2; |
| struct wmi_mgmt_rx_hdr_v1 *ev_hdr; |
| size_t pull_len; |
| u32 msdu_len; |
| |
| if (test_bit(ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX, ar->fw_features)) { |
| ev_v2 = (struct wmi_mgmt_rx_event_v2 *)skb->data; |
| ev_hdr = &ev_v2->hdr.v1; |
| pull_len = sizeof(*ev_v2); |
| } else { |
| ev_v1 = (struct wmi_mgmt_rx_event_v1 *)skb->data; |
| ev_hdr = &ev_v1->hdr; |
| pull_len = sizeof(*ev_v1); |
| } |
| |
| if (skb->len < pull_len) |
| return -EPROTO; |
| |
| skb_pull(skb, pull_len); |
| arg->channel = ev_hdr->channel; |
| arg->buf_len = ev_hdr->buf_len; |
| arg->status = ev_hdr->status; |
| arg->snr = ev_hdr->snr; |
| arg->phy_mode = ev_hdr->phy_mode; |
| arg->rate = ev_hdr->rate; |
| |
| msdu_len = __le32_to_cpu(arg->buf_len); |
| if (skb->len < msdu_len) |
| return -EPROTO; |
| |
| /* the WMI buffer might've ended up being padded to 4 bytes due to HTC |
| * trailer with credit update. Trim the excess garbage. |
| */ |
| skb_trim(skb, msdu_len); |
| |
| return 0; |
| } |
| |
| static int ath10k_wmi_10_4_op_pull_mgmt_rx_ev(struct ath10k *ar, |
| struct sk_buff *skb, |
| struct wmi_mgmt_rx_ev_arg *arg) |
| { |
| struct wmi_10_4_mgmt_rx_event *ev; |
| struct wmi_10_4_mgmt_rx_hdr *ev_hdr; |
| size_t pull_len; |
| u32 msdu_len; |
| |
| ev = (struct wmi_10_4_mgmt_rx_event *)skb->data; |
| ev_hdr = &ev->hdr; |
| pull_len = sizeof(*ev); |
| |
| if (skb->len < pull_len) |
| return -EPROTO; |
| |
| skb_pull(skb, pull_len); |
| arg->channel = ev_hdr->channel; |
| arg->buf_len = ev_hdr->buf_len; |
| arg->status = ev_hdr->status; |
| arg->snr = ev_hdr->snr; |
| arg->phy_mode = ev_hdr->phy_mode; |
| arg->rate = ev_hdr->rate; |
| |
| msdu_len = __le32_to_cpu(arg->buf_len); |
| if (skb->len < msdu_len) |
| return -EPROTO; |
| |
| /* Make sure bytes added for padding are removed. */ |
| skb_trim(skb, msdu_len); |
| |
| return 0; |
| } |
| |
| int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) |
| { |
| struct wmi_mgmt_rx_ev_arg arg = {}; |
| struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); |
| struct ieee80211_hdr *hdr; |
| struct ieee80211_supported_band *sband; |
| u32 rx_status; |
| u32 channel; |
| u32 phy_mode; |
| u32 snr; |
| u32 rate; |
| u32 buf_len; |
| u16 fc; |
| int ret; |
| |
| ret = ath10k_wmi_pull_mgmt_rx(ar, skb, &arg); |
| if (ret) { |
| ath10k_warn(ar, "failed to parse mgmt rx event: %d\n", ret); |
| dev_kfree_skb(skb); |
| return ret; |
| } |
| |
| channel = __le32_to_cpu(arg.channel); |
| buf_len = __le32_to_cpu(arg.buf_len); |
| rx_status = __le32_to_cpu(arg.status); |
| snr = __le32_to_cpu(arg.snr); |
| phy_mode = __le32_to_cpu(arg.phy_mode); |
| rate = __le32_to_cpu(arg.rate); |
| |
| memset(status, 0, sizeof(*status)); |
| |
| ath10k_dbg(ar, ATH10K_DBG_MGMT, |
| "event mgmt rx status %08x\n", rx_status); |
| |
| if ((test_bit(ATH10K_CAC_RUNNING, &ar->dev_flags)) || |
| (rx_status & (WMI_RX_STATUS_ERR_DECRYPT | |
| WMI_RX_STATUS_ERR_KEY_CACHE_MISS | WMI_RX_STATUS_ERR_CRC))) { |
| dev_kfree_skb(skb); |
| return 0; |
| } |
| |
| if (rx_status & WMI_RX_STATUS_ERR_MIC) |
| status->flag |= RX_FLAG_MMIC_ERROR; |
| |
| /* Hardware can Rx CCK rates on 5GHz. In that case phy_mode is set to |
| * MODE_11B. This means phy_mode is not a reliable source for the band |
| * of mgmt rx. |
| */ |
| if (channel >= 1 && channel <= 14) { |
| status->band = IEEE80211_BAND_2GHZ; |
| } else if (channel >= 36 && channel <= 165) { |
| status->band = IEEE80211_BAND_5GHZ; |
| } else { |
| /* Shouldn't happen unless list of advertised channels to |
| * mac80211 has been changed. |
| */ |
| WARN_ON_ONCE(1); |
| dev_kfree_skb(skb); |
| return 0; |
| } |
| |
| if (phy_mode == MODE_11B && status->band == IEEE80211_BAND_5GHZ) |
| ath10k_dbg(ar, ATH10K_DBG_MGMT, "wmi mgmt rx 11b (CCK) on 5GHz\n"); |
| |
| sband = &ar->mac.sbands[status->band]; |
| |
| status->freq = ieee80211_channel_to_frequency(channel, status->band); |
| status->signal = snr + ATH10K_DEFAULT_NOISE_FLOOR; |
| status->rate_idx = ath10k_mac_bitrate_to_idx(sband, rate / 100); |
| |
| hdr = (struct ieee80211_hdr *)skb->data; |
| fc = le16_to_cpu(hdr->frame_control); |
| |
| ath10k_wmi_handle_wep_reauth(ar, skb, status); |
| |
| /* FW delivers WEP Shared Auth frame with Protected Bit set and |
| * encrypted payload. However in case of PMF it delivers decrypted |
| * frames with Protected Bit set. */ |
| if (ieee80211_has_protected(hdr->frame_control) && |
| !ieee80211_is_auth(hdr->frame_control)) { |
| status->flag |= RX_FLAG_DECRYPTED; |
| |
| if (!ieee80211_is_action(hdr->frame_control) && |
| !ieee80211_is_deauth(hdr->frame_control) && |
| !ieee80211_is_disassoc(hdr->frame_control)) { |
| status->flag |= RX_FLAG_IV_STRIPPED | |
| RX_FLAG_MMIC_STRIPPED; |
| hdr->frame_control = __cpu_to_le16(fc & |
| ~IEEE80211_FCTL_PROTECTED); |
| } |
| } |
| |
| if (ieee80211_is_beacon(hdr->frame_control)) |
| ath10k_mac_handle_beacon(ar, skb); |
| |
| ath10k_dbg(ar, ATH10K_DBG_MGMT, |
| "event mgmt rx skb %p len %d ftype %02x stype %02x\n", |
| skb, skb->len, |
| fc & IEEE80211_FCTL_FTYPE, fc & IEEE80211_FCTL_STYPE); |
| |
| ath10k_dbg(ar, ATH10K_DBG_MGMT, |
| "event mgmt rx freq %d band %d snr %d, rate_idx %d\n", |
| status->freq, status->band, status->signal, |
| status->rate_idx); |
| |
| ieee80211_rx(ar->hw, skb); |
| return 0; |
| } |
| |
| static int freq_to_idx(struct ath10k *ar, int freq) |
| { |
| struct ieee80211_supported_band *sband; |
| int band, ch, idx = 0; |
| |
| for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) { |
| sband = ar->hw->wiphy->bands[band]; |
| if (!sband) |
| continue; |
| |
| for (ch = 0; ch < sband->n_channels; ch++, idx++) |
| if (sband->channels[ch].center_freq == freq) |
| goto exit; |
| } |
| |
| exit: |
| return idx; |
| } |
| |
| static int ath10k_wmi_op_pull_ch_info_ev(struct ath10k *ar, struct sk_buff *skb, |
| struct wmi_ch_info_ev_arg *arg) |
| { |
| struct wmi_chan_info_event *ev = (void *)skb->data; |
| |
| if (skb->len < sizeof(*ev)) |
| return -EPROTO; |
| |
| skb_pull(skb, sizeof(*ev)); |
| arg->err_code = ev->err_code; |
| arg->freq = ev->freq; |
| arg->cmd_flags = ev->cmd_flags; |
| arg->noise_floor = ev->noise_floor; |
| arg->rx_clear_count = ev->rx_clear_count; |
| arg->cycle_count = ev->cycle_count; |
| |
| return 0; |
| } |
| |
| static int ath10k_wmi_10_4_op_pull_ch_info_ev(struct ath10k *ar, |
| struct sk_buff *skb, |
| struct wmi_ch_info_ev_arg *arg) |
| { |
| struct wmi_10_4_chan_info_event *ev = (void *)skb->data; |
| |
| if (skb->len < sizeof(*ev)) |
| return -EPROTO; |
| |
| skb_pull(skb, sizeof(*ev)); |
| arg->err_code = ev->err_code; |
| arg->freq = ev->freq; |
| arg->cmd_flags = ev->cmd_flags; |
| arg->noise_floor = ev->noise_floor; |
| arg->rx_clear_count = ev->rx_clear_count; |
| arg->cycle_count = ev->cycle_count; |
| arg->chan_tx_pwr_range = ev->chan_tx_pwr_range; |
| arg->chan_tx_pwr_tp = ev->chan_tx_pwr_tp; |
| arg->rx_frame_count = ev->rx_frame_count; |
| |
| return 0; |
| } |
| |
| void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb) |
| { |
| struct wmi_ch_info_ev_arg arg = {}; |
| struct survey_info *survey; |
| u32 err_code, freq, cmd_flags, noise_floor, rx_clear_count, cycle_count; |
| int idx, ret; |
| |
| ret = ath10k_wmi_pull_ch_info(ar, skb, &arg); |
| if (ret) { |
| ath10k_warn(ar, "failed to parse chan info event: %d\n", ret); |
| return; |
| } |
| |
| err_code = __le32_to_cpu(arg.err_code); |
| freq = __le32_to_cpu(arg.freq); |
| cmd_flags = __le32_to_cpu(arg.cmd_flags); |
| noise_floor = __le32_to_cpu(arg.noise_floor); |
| rx_clear_count = __le32_to_cpu(arg.rx_clear_count); |
| cycle_count = __le32_to_cpu(arg.cycle_count); |
| |
| ath10k_dbg(ar, ATH10K_DBG_WMI, |
| "chan info err_code %d freq %d cmd_flags %d noise_floor %d rx_clear_count %d cycle_count %d\n", |
| err_code, freq, cmd_flags, noise_floor, rx_clear_count, |
| cycle_count); |
| |
| spin_lock_bh(&ar->data_lock); |
| |
| switch (ar->scan.state) { |
| case ATH10K_SCAN_IDLE: |
| case ATH10K_SCAN_STARTING: |
| ath10k_warn(ar, "received chan info event without a scan request, ignoring\n"); |
| goto exit; |
| case ATH10K_SCAN_RUNNING: |
| case ATH10K_SCAN_ABORTING: |
| break; |
| } |
| |
| idx = freq_to_idx(ar, freq); |
| if (idx >= ARRAY_SIZE(ar->survey)) { |
| ath10k_warn(ar, "chan info: invalid frequency %d (idx %d out of bounds)\n", |
| freq, idx); |
| goto exit; |
| } |
| |
| if (cmd_flags & WMI_CHAN_INFO_FLAG_COMPLETE) { |
| if (ar->ch_info_can_report_survey) { |
| survey = &ar->survey[idx]; |
| survey->noise = noise_floor; |
| survey->filled = SURVEY_INFO_NOISE_DBM; |
| |
| ath10k_hw_fill_survey_time(ar, |
| survey, |
| cycle_count, |
| rx_clear_count, |
| ar->survey_last_cycle_count, |
| ar->survey_last_rx_clear_count); |
| } |
| |
| ar->ch_info_can_report_survey = false; |
| } else { |
| ar->ch_info_can_report_survey = true; |
| } |
| |
| if (!(cmd_flags & WMI_CHAN_INFO_FLAG_PRE_COMPLETE)) { |
| ar->survey_last_rx_clear_count = rx_clear_count; |
| ar->survey_last_cycle_count = cycle_count; |
| } |
| |
| exit: |
| spin_unlock_bh(&ar->data_lock); |
| } |
| |
| void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb) |
| { |
| ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_ECHO_EVENTID\n"); |
| } |
| |
| int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb) |
| { |
| ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi event debug mesg len %d\n", |
| skb->len); |
| |
| trace_ath10k_wmi_dbglog(ar, skb->data, skb->len); |
| |
| return 0; |
| } |
| |
| void ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src, |
| struct ath10k_fw_stats_pdev *dst) |
| { |
| dst->ch_noise_floor = __le32_to_cpu(src->chan_nf); |
| dst->tx_frame_count = __le32_to_cpu(src->tx_frame_count); |
| dst->rx_frame_count = __le32_to_cpu(src->rx_frame_count); |
| dst->rx_clear_count = __le32_to_cpu(src->rx_clear_count); |
| dst->cycle_count = __le32_to_cpu(src->cycle_count); |
| dst->phy_err_count = __le32_to_cpu(src->phy_err_count); |
| dst->chan_tx_power = __le32_to_cpu(src->chan_tx_pwr); |
| } |
| |
| void ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src, |
| struct ath10k_fw_stats_pdev *dst) |
| { |
| dst->comp_queued = __le32_to_cpu(src->comp_queued); |
| dst->comp_delivered = __le32_to_cpu(src->comp_delivered); |
| dst->msdu_enqued = __le32_to_cpu(src->msdu_enqued); |
| dst->mpdu_enqued = __le32_to_cpu(src->mpdu_enqued); |
| dst->wmm_drop = __le32_to_cpu(src->wmm_drop); |
| dst->local_enqued = __le32_to_cpu(src->local_enqued); |
| dst->local_freed = __le32_to_cpu(src->local_freed); |
| dst->hw_queued = __le32_to_cpu(src->hw_queued); |
| dst->hw_reaped = __le32_to_cpu(src->hw_reaped); |
| dst->underrun = __le32_to_cpu(src->underrun); |
| dst->tx_abort = __le32_to_cpu(src->tx_abort); |
| dst->mpdus_requed = __le32_to_cpu(src->mpdus_requed); |
| dst->tx_ko = __le32_to_cpu(src->tx_ko); |
| dst->data_rc = __le32_to_cpu(src->data_rc); |
| dst->self_triggers = __le32_to_cpu(src->self_triggers); |
| dst->sw_retry_failure = __le32_to_cpu(src->sw_retry_failure); |
| dst->illgl_rate_phy_err = __le32_to_cpu(src->illgl_rate_phy_err); |
| dst->pdev_cont_xretry = __le32_to_cpu(src->pdev_cont_xretry); |
| dst->pdev_tx_timeout = __le32_to_cpu(src->pdev_tx_timeout); |
| dst->pdev_resets = __le32_to_cpu(src->pdev_resets); |
| dst->phy_underrun = __le32_to_cpu(src->phy_underrun); |
| dst->txop_ovf = __le32_to_cpu(src->txop_ovf); |
| } |
| |
| static void |
| ath10k_wmi_10_4_pull_pdev_stats_tx(const struct wmi_10_4_pdev_stats_tx *src, |
| struct ath10k_fw_stats_pdev *dst) |
| { |
| dst->comp_queued = __le32_to_cpu(src->comp_queued); |
| dst->comp_delivered = __le32_to_cpu(src->comp_delivered); |
| dst->msdu_enqued = __le32_to_cpu(src->msdu_enqued); |
| dst->mpdu_enqued = __le32_to_cpu(src->mpdu_enqued); |
| dst->wmm_drop = __le32_to_cpu(src->wmm_drop); |
| dst->local_enqued = __le32_to_cpu(src->local_enqued); |
| dst->local_freed = __le32_to_cpu(src->local_freed); |
| dst->hw_queued = __le32_to_cpu(src->hw_queued); |
| dst->hw_reaped = __le32_to_cpu(src->hw_reaped); |
| dst->underrun = __le32_to_cpu(src->underrun); |
| dst->tx_abort = __le32_to_cpu(src->tx_abort); |
| dst->mpdus_requed = __le32_to_cpu(src->mpdus_requed); |
| dst->tx_ko = __le32_to_cpu(src->tx_ko); |
| dst->data_rc = __le32_to_cpu(src->data_rc); |
| dst->self_triggers = __le32_to_cpu(src->self_triggers); |
| dst->sw_retry_failure = __le32_to_cpu(src->sw_retry_failure); |
| dst->illgl_rate_phy_err = __le32_to_cpu(src->illgl_rate_phy_err); |
| dst->pdev_cont_xretry = __le32_to_cpu(src->pdev_cont_xretry); |
| dst->pdev_tx_timeout = __le32_to_cpu(src->pdev_tx_timeout); |
| dst->pdev_resets = __le32_to_cpu(src->pdev_resets); |
| dst->phy_underrun = __le32_to_cpu(src->phy_underrun); |
| dst->txop_ovf = __le32_to_cpu(src->txop_ovf); |
| dst->hw_paused = __le32_to_cpu(src->hw_paused); |
| dst->seq_posted = __le32_to_cpu(src->seq_posted); |
| dst->seq_failed_queueing = |
| __le32_to_cpu(src->seq_failed_queueing); |
| dst->seq_completed = __le32_to_cpu(src->seq_completed); |
| dst->seq_restarted = __le32_to_cpu(src->seq_restarted); |
| dst->mu_seq_posted = __le32_to_cpu(src->mu_seq_posted); |
| dst->mpdus_sw_flush = __le32_to_cpu(src->mpdus_sw_flush); |
| dst->mpdus_hw_filter = __le32_to_cpu(src->mpdus_hw_filter); |
| dst->mpdus_truncated = __le32_to_cpu(src->mpdus_truncated); |
| dst->mpdus_ack_failed = __le32_to_cpu(src->mpdus_ack_failed); |
| dst->mpdus_hw_filter = __le32_to_cpu(src->mpdus_hw_filter); |
| dst->mpdus_expired = __le32_to_cpu(src->mpdus_expired); |
| } |
| |
| void ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src, |
| struct ath10k_fw_stats_pdev *dst) |
| { |
| dst->mid_ppdu_route_change = __le32_to_cpu(src->mid_ppdu_route_change); |
| dst->status_rcvd = __le32_to_cpu(src->status_rcvd); |
| dst->r0_frags = __le32_to_cpu(src->r0_frags); |
| dst->r1_frags = __le32_to_cpu(src->r1_frags); |
| dst->r2_frags = __le32_to_cpu(src->r2_frags); |
| dst->r3_frags = __le32_to_cpu(src->r3_frags); |
| dst->htt_msdus = __le32_to_cpu(src->htt_msdus); |
| dst->htt_mpdus = __le32_to_cpu(src->htt_mpdus); |
| dst->loc_msdus = __le32_to_cpu(src->loc_msdus); |
| dst->loc_mpdus = __le32_to_cpu(src->loc_mpdus); |
| dst->oversize_amsdu = __le32_to_cpu(src->oversize_amsdu); |
| dst->phy_errs = __le32_to_cpu(src->phy_errs); |
| dst->phy_err_drop = __le32_to_cpu(src->phy_err_drop); |
| dst->mpdu_errs = __le32_to_cpu(src->mpdu_errs); |
| } |
| |
| void ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src, |
| struct ath10k_fw_stats_pdev *dst) |
| { |
| dst->ack_rx_bad = __le32_to_cpu(src->ack_rx_bad); |
| dst->rts_bad = __le32_to_cpu(src->rts_bad); |
| dst->rts_good = __le32_to_cpu(src->rts_good); |
| dst->fcs_bad = __le32_to_cpu(src->fcs_bad); |
| dst->no_beacons = __le32_to_cpu(src->no_beacons); |
| dst->mib_int_count = __le32_to_cpu(src->mib_int_count); |
| } |
| |
| void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src, |
| struct ath10k_fw_stats_peer *dst) |
| { |
| ether_addr_copy(dst->peer_macaddr, src->peer_macaddr.addr); |
| dst->peer_rssi = __le32_to_cpu(src->peer_rssi); |
| dst->peer_tx_rate = __le32_to_cpu(src->peer_tx_rate); |
| } |
| |
| static int ath10k_wmi_main_op_pull_fw_stats(struct ath10k *ar, |
| struct sk_buff *skb, |
| struct ath10k_fw_stats *stats) |
| { |
| const struct wmi_stats_event *ev = (void *)skb->data; |
| u32 num_pdev_stats, num_vdev_stats, num_peer_stats; |
| int i; |
| |
| if (!skb_pull(skb, sizeof(*ev))) |
| return -EPROTO; |
| |
| num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); |
| num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); |
| num_peer_stats = __le32_to_cpu(ev->num_peer_stats); |
| |
| for (i = 0; i < num_pdev_stats; i++) { |
| const struct wmi_pdev_stats *src; |
| struct ath10k_fw_stats_pdev *dst; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| dst = kzalloc(sizeof(*dst), GFP_ATOMIC); |
| if (!dst) |
| continue; |
| |
| ath10k_wmi_pull_pdev_stats_base(&src->base, dst); |
| ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst); |
| ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); |
| |
| list_add_tail(&dst->list, &stats->pdevs); |
| } |
| |
| /* fw doesn't implement vdev stats */ |
| |
| for (i = 0; i < num_peer_stats; i++) { |
| const struct wmi_peer_stats *src; |
| struct ath10k_fw_stats_peer *dst; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| dst = kzalloc(sizeof(*dst), GFP_ATOMIC); |
| if (!dst) |
| continue; |
| |
| ath10k_wmi_pull_peer_stats(src, dst); |
| list_add_tail(&dst->list, &stats->peers); |
| } |
| |
| return 0; |
| } |
| |
| static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar, |
| struct sk_buff *skb, |
| struct ath10k_fw_stats *stats) |
| { |
| const struct wmi_stats_event *ev = (void *)skb->data; |
| u32 num_pdev_stats, num_vdev_stats, num_peer_stats; |
| int i; |
| |
| if (!skb_pull(skb, sizeof(*ev))) |
| return -EPROTO; |
| |
| num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); |
| num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); |
| num_peer_stats = __le32_to_cpu(ev->num_peer_stats); |
| |
| for (i = 0; i < num_pdev_stats; i++) { |
| const struct wmi_10x_pdev_stats *src; |
| struct ath10k_fw_stats_pdev *dst; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| dst = kzalloc(sizeof(*dst), GFP_ATOMIC); |
| if (!dst) |
| continue; |
| |
| ath10k_wmi_pull_pdev_stats_base(&src->base, dst); |
| ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst); |
| ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); |
| ath10k_wmi_pull_pdev_stats_extra(&src->extra, dst); |
| |
| list_add_tail(&dst->list, &stats->pdevs); |
| } |
| |
| /* fw doesn't implement vdev stats */ |
| |
| for (i = 0; i < num_peer_stats; i++) { |
| const struct wmi_10x_peer_stats *src; |
| struct ath10k_fw_stats_peer *dst; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| dst = kzalloc(sizeof(*dst), GFP_ATOMIC); |
| if (!dst) |
| continue; |
| |
| ath10k_wmi_pull_peer_stats(&src->old, dst); |
| |
| dst->peer_rx_rate = __le32_to_cpu(src->peer_rx_rate); |
| |
| list_add_tail(&dst->list, &stats->peers); |
| } |
| |
| return 0; |
| } |
| |
| static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k *ar, |
| struct sk_buff *skb, |
| struct ath10k_fw_stats *stats) |
| { |
| const struct wmi_10_2_stats_event *ev = (void *)skb->data; |
| u32 num_pdev_stats; |
| u32 num_pdev_ext_stats; |
| u32 num_vdev_stats; |
| u32 num_peer_stats; |
| int i; |
| |
| if (!skb_pull(skb, sizeof(*ev))) |
| return -EPROTO; |
| |
| num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); |
| num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats); |
| num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); |
| num_peer_stats = __le32_to_cpu(ev->num_peer_stats); |
| |
| for (i = 0; i < num_pdev_stats; i++) { |
| const struct wmi_10_2_pdev_stats *src; |
| struct ath10k_fw_stats_pdev *dst; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| dst = kzalloc(sizeof(*dst), GFP_ATOMIC); |
| if (!dst) |
| continue; |
| |
| ath10k_wmi_pull_pdev_stats_base(&src->base, dst); |
| ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst); |
| ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); |
| ath10k_wmi_pull_pdev_stats_extra(&src->extra, dst); |
| /* FIXME: expose 10.2 specific values */ |
| |
| list_add_tail(&dst->list, &stats->pdevs); |
| } |
| |
| for (i = 0; i < num_pdev_ext_stats; i++) { |
| const struct wmi_10_2_pdev_ext_stats *src; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| /* FIXME: expose values to userspace |
| * |
| * Note: Even though this loop seems to do nothing it is |
| * required to parse following sub-structures properly. |
| */ |
| } |
| |
| /* fw doesn't implement vdev stats */ |
| |
| for (i = 0; i < num_peer_stats; i++) { |
| const struct wmi_10_2_peer_stats *src; |
| struct ath10k_fw_stats_peer *dst; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| dst = kzalloc(sizeof(*dst), GFP_ATOMIC); |
| if (!dst) |
| continue; |
| |
| ath10k_wmi_pull_peer_stats(&src->old, dst); |
| |
| dst->peer_rx_rate = __le32_to_cpu(src->peer_rx_rate); |
| /* FIXME: expose 10.2 specific values */ |
| |
| list_add_tail(&dst->list, &stats->peers); |
| } |
| |
| return 0; |
| } |
| |
| static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct ath10k *ar, |
| struct sk_buff *skb, |
| struct ath10k_fw_stats *stats) |
| { |
| const struct wmi_10_2_stats_event *ev = (void *)skb->data; |
| u32 num_pdev_stats; |
| u32 num_pdev_ext_stats; |
| u32 num_vdev_stats; |
| u32 num_peer_stats; |
| int i; |
| |
| if (!skb_pull(skb, sizeof(*ev))) |
| return -EPROTO; |
| |
| num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); |
| num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats); |
| num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); |
| num_peer_stats = __le32_to_cpu(ev->num_peer_stats); |
| |
| for (i = 0; i < num_pdev_stats; i++) { |
| const struct wmi_10_2_pdev_stats *src; |
| struct ath10k_fw_stats_pdev *dst; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| dst = kzalloc(sizeof(*dst), GFP_ATOMIC); |
| if (!dst) |
| continue; |
| |
| ath10k_wmi_pull_pdev_stats_base(&src->base, dst); |
| ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst); |
| ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst); |
| ath10k_wmi_pull_pdev_stats_extra(&src->extra, dst); |
| /* FIXME: expose 10.2 specific values */ |
| |
| list_add_tail(&dst->list, &stats->pdevs); |
| } |
| |
| for (i = 0; i < num_pdev_ext_stats; i++) { |
| const struct wmi_10_2_pdev_ext_stats *src; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
| |
| /* FIXME: expose values to userspace |
| * |
| * Note: Even though this loop seems to do nothing it is |
| * required to parse following sub-structures properly. |
| */ |
| } |
| |
| /* fw doesn't implement vdev stats */ |
| |
| for (i = 0; i < num_peer_stats; i++) { |
| const struct wmi_10_2_4_peer_stats *src; |
| struct ath10k_fw_stats_peer *dst; |
| |
| src = (void *)skb->data; |
| if (!skb_pull(skb, sizeof(*src))) |
| return -EPROTO; |
|