summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-02-08 00:19:49 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-02-08 00:19:49 -0800
commitefe2d108cdd7687b8a0eb70deb7fbc2a60c30d38 (patch)
tree03b1f4bda0f93eb79787bec2706ef474c7384929
parent9323f1f6408d7189d0ddc629ee2cfd44d66d0997 (diff)
parent7eb1c496a41bb9bf4a5f049eae621df23635ce79 (diff)
Merge "qcacld-2.0: CL 2747653 - update fw common interface files" into wlan-cld2.driver.lnx.1.0-dev
-rw-r--r--CORE/SERVICES/COMMON/wmi_services.h5
-rw-r--r--CORE/SERVICES/COMMON/wmi_tlv_defs.h39
-rw-r--r--CORE/SERVICES/COMMON/wmi_unified.h103
-rw-r--r--CORE/SERVICES/COMMON/wmi_version.h4
-rw-r--r--CORE/SERVICES/WMI/wmi_unified.c5
5 files changed, 149 insertions, 7 deletions
diff --git a/CORE/SERVICES/COMMON/wmi_services.h b/CORE/SERVICES/COMMON/wmi_services.h
index 89c88f95adec..db9014c32513 100644
--- a/CORE/SERVICES/COMMON/wmi_services.h
+++ b/CORE/SERVICES/COMMON/wmi_services.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -276,7 +276,8 @@ typedef enum {
WMI_SERVICE_RCPI_SUPPORT=114,
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 *****/
WMI_MAX_SERVICE = 128, /* max service */
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
index 0b5fd2121283..0705587a9e8b 100644
--- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h
+++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -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 */
/*
@@ -1250,6 +1259,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 */
@@ -3106,6 +3117,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 */
@@ -3932,6 +3958,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/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h
index d366199e57e1..0f7eb5d185f5 100644
--- a/CORE/SERVICES/COMMON/wmi_unified.h
+++ b/CORE/SERVICES/COMMON/wmi_unified.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -237,6 +237,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)
@@ -993,6 +994,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
@@ -1443,6 +1449,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,
+
_place_holder_evt_1 = WMI_EVT_GRP_START_ID(WMI_GRP_RMC),
/** Events in Prototyping phase */
@@ -17003,6 +17013,97 @@ typedef struct {
*/
} 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
* WMITLV_TAG_STRUC_wmi_coex_get_antenna_isolation_cmd_fixed_param */
diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h
index 7154910592b6..2e68612ba235 100644
--- a/CORE/SERVICES/COMMON/wmi_version.h
+++ b/CORE/SERVICES/COMMON/wmi_version.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -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
diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c
index 908e4d37ed6e..14d7cbe0cb5e 100644
--- a/CORE/SERVICES/WMI/wmi_unified.c
+++ b/CORE/SERVICES/WMI/wmi_unified.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -727,6 +727,9 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command)
CASE_RETURN_STRING(WMI_VDEV_ADFS_OCAC_ABORT_CMDID);
CASE_RETURN_STRING(WMI_REQUEST_RCPI_CMDID);
CASE_RETURN_STRING(WMI_REQUEST_PEER_STATS_INFO_CMDID);
+ CASE_RETURN_STRING(WMI_SET_CURRENT_COUNTRY_CMDID);
+ CASE_RETURN_STRING(WMI_11D_SCAN_START_CMDID);
+ CASE_RETURN_STRING(WMI_11D_SCAN_STOP_CMDID);
}
return "Invalid WMI cmd";
}