diff options
| author | Manjeet Singh <manjee@codeaurora.org> | 2016-12-29 16:37:08 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-01-06 20:52:52 -0800 |
| commit | 5cbbef507af664e43cd5552240784b949f1e3719 (patch) | |
| tree | 0fee45655da08f4c6587b57674a2f55c647262c2 | |
| parent | 85962e92fa8d49b2317997029973e755ce254a42 (diff) | |
qcacld-3.0: CL 2747653 - update fw common interface files
WMI changes for regulatory offload
Change-Id: Ia9b77cbb6672d88b0ad6d78d31ca76bd2e697762
CRs-Fixed: 865207
| -rw-r--r-- | target/inc/wmi_services.h | 2 | ||||
| -rw-r--r-- | target/inc/wmi_tlv_defs.h | 37 | ||||
| -rw-r--r-- | target/inc/wmi_unified.h | 100 | ||||
| -rw-r--r-- | target/inc/wmi_version.h | 2 |
4 files changed, 140 insertions, 1 deletions
diff --git a/target/inc/wmi_services.h b/target/inc/wmi_services.h index 8a399375240d..cbe86409b2e1 100644 --- a/target/inc/wmi_services.h +++ b/target/inc/wmi_services.h @@ -275,6 +275,8 @@ typedef enum { WMI_SERVICE_FW_MEM_DUMP_SUPPORT = 115, /* Support FW Memory dump */ WMI_SERVICE_PEER_STATS_INFO = 116, /* support per peer stats info */ + WMI_SERVICE_REGULATORY_DB = 117, /* support regulatory database in FW */ + WMI_SERVICE_11D_OFFLOAD = 118, /* support 11D scan offload in FW */ /*** ADD NEW SERVICES HERE UNTIL ALL VALUES UP TO 128 ARE USED ***/ diff --git a/target/inc/wmi_tlv_defs.h b/target/inc/wmi_tlv_defs.h index ae49330e04b5..b7ffec36ac29 100644 --- a/target/inc/wmi_tlv_defs.h +++ b/target/inc/wmi_tlv_defs.h @@ -772,6 +772,12 @@ typedef enum { WMITLV_TAG_STRUC_wmi_peer_stats_info_event_fixed_param, WMITLV_TAG_STRUC_wmi_pkgid_event_fixed_param, WMITLV_TAG_STRUC_wmi_connected_nlo_rssi_params, + WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_regulatory_rule_struct, + WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param, + WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param, } WMITLV_TAG_ID; /* @@ -1083,6 +1089,9 @@ typedef enum { OP(WMI_VDEV_ADFS_OCAC_ABORT_CMDID) \ OP(WMI_REQUEST_RCPI_CMDID) \ OP(WMI_REQUEST_PEER_STATS_INFO_CMDID) \ + OP(WMI_SET_CURRENT_COUNTRY_CMDID) \ + OP(WMI_11D_SCAN_START_CMDID) \ + OP(WMI_11D_SCAN_STOP_CMDID) \ /* add new CMD_LIST elements above this line */ /* @@ -1251,6 +1260,8 @@ typedef enum { OP(WMI_UPDATE_RCPI_EVENTID) \ OP(WMI_PEER_STATS_INFO_EVENTID) \ OP(WMI_PKGID_EVENTID) \ + OP(WMI_REG_CHAN_LIST_CC_EVENTID) \ + OP(WMI_11D_NEW_COUNTRY_EVENTID) \ /* add new EVT_LIST elements above this line */ /* TLV definitions of WMI commands */ @@ -3104,6 +3115,21 @@ WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_WLAN_STATS_CMDID); WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_request_peer_stats_info_cmd_fixed_param, wmi_request_peer_stats_info_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_PEER_STATS_INFO_CMDID); +/* Host sets the current country code */ +#define WMITLV_TABLE_WMI_SET_CURRENT_COUNTRY_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param, wmi_set_current_country_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_SET_CURRENT_COUNTRY_CMDID); + +/* Start 11d scan in FW */ +#define WMITLV_TABLE_WMI_11D_SCAN_START_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param, wmi_11d_scan_start_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_11D_SCAN_START_CMDID); + +/* Stop 11d scan in FW */ +#define WMITLV_TABLE_WMI_11D_SCAN_STOP_CMDID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param, wmi_11d_scan_stop_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_11D_SCAN_STOP_CMDID); + /************************** TLV definitions of WMI events *******************************/ /* Service Ready event */ @@ -3942,6 +3968,17 @@ WMITLV_CREATE_PARAM_STRUC(WMI_BPF_CAPABILIY_INFO_EVENTID); WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_bpf_vdev_stats_info_evt_fixed_param, wmi_bpf_vdev_stats_info_evt_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_BPF_VDEV_STATS_INFO_EVENTID); +/* Indicate new country code to host from 11d scan */ +#define WMITLV_TABLE_WMI_11D_NEW_COUNTRY_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param, wmi_11d_new_country_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_11D_NEW_COUNTRY_EVENTID); + +/* Regulatory channel list of current country code */ +#define WMITLV_TABLE_WMI_REG_CHAN_LIST_CC_EVENTID(id, op, buf, len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param, wmi_reg_chan_list_cc_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_regulatory_rule_struct, reg_rule_array, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_REG_CHAN_LIST_CC_EVENTID); + /* FIPS event */ #define WMITLV_TABLE_WMI_PDEV_FIPS_EVENTID(id, op, buf, len) \ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_pdev_fips_event_fixed_param, wmi_pdev_fips_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ diff --git a/target/inc/wmi_unified.h b/target/inc/wmi_unified.h index 1dea75eb7898..b494f642e0c1 100644 --- a/target/inc/wmi_unified.h +++ b/target/inc/wmi_unified.h @@ -236,6 +236,7 @@ typedef enum { WMI_GRP_NAN_DATA, /* 0x37 */ WMI_GRP_PROTOTYPE, /* 0x38 */ WMI_GRP_MONITOR, /* 0x39 */ + WMI_GRP_REGULATORY, /* 0x3a */ } WMI_GRP_ID; #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) @@ -1022,6 +1023,11 @@ typedef enum { /** WMI commands related to monitor mode. */ WMI_MNT_FILTER_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MONITOR), + /** WMI commands related to regulatory offload */ + WMI_SET_CURRENT_COUNTRY_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_REGULATORY), + WMI_11D_SCAN_START_CMDID, + WMI_11D_SCAN_STOP_CMDID, + /** * Nan Data commands * NDI - NAN Data Interface @@ -1481,6 +1487,10 @@ typedef enum { WMI_BPF_CAPABILIY_INFO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BPF_OFFLOAD), WMI_BPF_VDEV_STATS_INFO_EVENTID, + /** WMI events related to regulatory offload */ + WMI_REG_CHAN_LIST_CC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_REGULATORY), + WMI_11D_NEW_COUNTRY_EVENTID, + /* Events in Prototyping phase */ WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE), WMI_NDP_INITIATOR_RSP_EVENTID, @@ -17974,6 +17984,96 @@ typedef struct { * wmi_scan_adaptive_dwell_parameters_tlv param[]; (0 or 1 elements) */ } wmi_scan_adaptive_dwell_config_fixed_param; +/** WMI commands/events for the regulatory offload */ + +/** Host indicating current country code to FW */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_set_current_country_cmd_fixed_param */ + A_UINT32 new_alpha2; /** alpha2 characters representing the country code */ +} wmi_set_current_country_cmd_fixed_param; + +/* Freq units in MHz */ +#define WMI_REG_RULE_START_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16) +#define WMI_REG_RULE_START_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 0, 16, value) +#define WMI_REG_RULE_END_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 16, 16) +#define WMI_REG_RULE_END_FREQ_SET(freq_info, value) WMI_SET_BITS(freq_info, 16, 16, value) + +/* BW in MHz */ +#define WMI_REG_RULE_MAX_BW_GET(bw_info) WMI_GET_BITS(bw_info, 0, 16) +#define WMI_REG_RULE_MAX_BW_SET(bw_info, value) WMI_SET_BITS(bw_info, 0, 16, value) +/* regpower in dBm */ +#define WMI_REG_RULE_REG_POWER_GET(bw_info) WMI_GET_BITS(bw_info, 16, 8) +#define WMI_REG_RULE_REG_POWER_SET(bw_info, value) WMI_SET_BITS(bw_info, 16, 8, value) + +typedef enum { + WMI_REG_FLAG_CHAN_NO_IR = 0x0001, /* passive channel */ + WMI_REG_FLAG_CHAN_RADAR = 0x0002, /* dfs channel */ + WMI_REG_FLAG_CHAN_NO_OFDM = 0x0004, /* no ofdm channel */ + WMI_REG_FLAG_CHAN_INDOOR_ONLY = 0x0008, /* indoor only channel */ +} WMI_REGULATORY_FLAGS; + +#define WMI_REG_RULE_FLAGS_GET(flag_info) WMI_GET_BITS(flag_info, 0, 16) +#define WMI_REG_RULE_FLAGS_SET(flag_info, value) WMI_SET_BITS(flag_info, 0, 16, value) + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_regulatory_rule_struct */ + A_UINT32 freq_info; /* u16 start_freq, u16 end_freq */ + A_UINT32 bw_info; /* u16 max_bw, u8 reg_power, u8 reserved */ + A_UINT32 power_flag_info; /* u16 flags, u16 reserved */ +} wmi_regulatory_rule_struct; + +typedef enum { + WMI_REG_DFS_UNINIT_REGION = 0, + WMI_REG_DFS_FCC_REGION = 1, + WMI_REG_DFS_ETSI_REGION = 2, + WMI_REG_DFS_MKK_REGION = 3, + WMI_REG_DFS_CN_REGION = 4, + WMI_REG_DFS_KR_REGION = 5, + + /* Add new items above */ + WMI_REG_DFS_UNDEF_REGION = 0xFFFF, +} WMI_REG_DFS_REGION; + +typedef enum { + WMI_REGULATORY_PHYMODE_NO11A = 0x0001, /* NO 11A */ + WMI_REGULATORY_PHYMODE_NO11B = 0x0002, /* NO 11B */ + WMI_REGULATORY_PHYMODE_NO11G = 0x0004, /* NO 11G */ + WMI_REGULATORY_PHYMODE_NO11N = 0x0008, /* NO 11N */ + WMI_REGULATORY_PHYMODE_NO11AC = 0x0010, /* NO 11AC */ + WMI_REGULATORY_PHYMODE_NO11AX = 0x0020, /* NO 11AX */ +} WMI_REGULATORY_PHYBITMAP; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_reg_chan_list_cc_event_fixed_param */ + A_UINT32 alpha2; + A_UINT32 dfs_region; /* WMI_REG_DFS_REGION */ + A_UINT32 phybitmap; /* WMI_REGULATORY_PHYBITMAP */ + A_UINT32 min_bw_2g; /* BW in MHz */ + A_UINT32 max_bw_2g; /* BW in MHz */ + A_UINT32 min_bw_5g; /* BW in MHz */ + A_UINT32 max_bw_5g; /* BW in MHz */ + A_UINT32 num_2g_reg_rules; + A_UINT32 num_5g_reg_rules; +/* followed by wmi_regulatory_rule_struct TLV array. First 2G and then 5G */ +} wmi_reg_chan_list_cc_event_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_start_cmd_fixed_param */ + A_UINT32 vdev_id; + A_UINT32 scan_period_msec; /** scan duration in milli-seconds */ + A_UINT32 start_interval_msec; /** offset duration to start the scan in milli-seconds */ +} wmi_11d_scan_start_cmd_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_scan_stop_cmd_fixed_param */ + A_UINT32 vdev_id; +} wmi_11d_scan_stop_cmd_fixed_param; + +/** FW indicating new current country code to Host */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_11d_new_country_event_fixed_param */ + A_UINT32 new_alpha2; /** alpha2 characters representing the country code */ +} wmi_11d_new_country_event_fixed_param; typedef struct { /** TLV tag and len; tag equals diff --git a/target/inc/wmi_version.h b/target/inc/wmi_version.h index 8638db53f088..8cf68d24af83 100644 --- a/target/inc/wmi_version.h +++ b/target/inc/wmi_version.h @@ -36,7 +36,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility */ -#define __WMI_REVISION_ 326 +#define __WMI_REVISION_ 327 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work |
