qcacld-3.0: CL 1683879 - update fw common interface files

WMI message to allow Specific Absorbtion Rate / tx power
limits to be set per band, chain, or modulation class.

Change-Id: Iece786a4e731462fd282e3eb3107541338a3af30
CRs-Fixed: 865207
This commit is contained in:
Nishank Aggarwal 2016-10-28 17:54:02 +05:30 • committed by Prakash Dhavali
commit beedc3ede2
3 changed files with 119 additions and 1 deletions

View file

@ -755,6 +755,9 @@ typedef enum {
WMITLV_TAG_STRUC_wmi_pdev_band_to_mac,
WMITLV_TAG_STRUC_wmi_tbtt_offset_info,
WMITLV_TAG_STRUC_wmi_tbtt_offset_ext_event_fixed_param,
WMITLV_TAG_STRUC_wmi_sar_limits_cmd_fixed_param,
WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row,
} WMITLV_TAG_ID;
/*
@ -1059,6 +1062,7 @@ typedef enum {
OP(WMI_PDEV_SET_STATS_THRESHOLD_CMDID) \
OP(WMI_REQUEST_WLAN_STATS_CMDID) \
OP(WMI_VDEV_ENCRYPT_DECRYPT_DATA_REQ_CMDID) \
OP(WMI_SAR_LIMITS_CMDID) \
/* add new CMD_LIST elements above this line */
/*
@ -2527,6 +2531,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_NDP_END_REQ_CMDID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_modem_power_state_cmd_param, wmi_modem_power_state_cmd_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_MODEM_POWER_STATE_CMDID);
/* SAR limit update cmd */
#define WMITLV_TABLE_WMI_SAR_LIMITS_CMDID(id, op, buf, len) \
WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_sar_limits_cmd_fixed_param, wmi_sar_limits_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_sar_limit_cmd_row, sar_limits, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_SAR_LIMITS_CMDID);
/* get estimated link speed cmd */
#define WMITLV_TABLE_WMI_PEER_GET_ESTIMATED_LINKSPEED_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_get_estimated_linkspeed_cmd_fixed_param, wmi_peer_get_estimated_linkspeed_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)

View file

@ -920,6 +920,7 @@ typedef enum {
WMI_COEX_CONFIG_CMDID,
WMI_CHAN_AVOID_RPT_ALLOW_CMDID,
WMI_COEX_GET_ANTENNA_ISOLATION_CMDID,
WMI_SAR_LIMITS_CMDID,
/**
* OBSS scan offload enable/disable commands
@ -12948,6 +12949,113 @@ enum {
WMI_MODEM_STATE_ON
};
/**
* This command is sent from WLAN host driver to firmware to
* notify the updated Specific Absorption Rate (SAR) limits.
* A critical regulation for FCC compliance, OEMs require methods to set
* limits on TX power of WLAN/WWAN.
* Host would receive instructions on what to set the limits per
* band/chain/modulation to, it would then interpret and send the limits
* to FW using this WMI message.
* Since it is possible to have too many commands to fit into one message,
* FW will keep receiving the messages, until it finds one with
* commit_limits = 1, at which point it will apply all the received
* specifications.
*/
typedef struct {
/** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limits_cmd_param */
A_UINT32 tlv_header;
/** when set to WMI_SAR_FEATURE_ON, enable SAR feature;
* if set to WMI_SAR_FEATURE_OFF, disable feature;
* if set to WMI_SAR_FEATURE_NO_CHANGE, do not alter state of feature;
*/
A_UINT32 sar_enable;
/** number of items in sar_limits[] */
A_UINT32 num_limit_rows;
/** once received and is set to 1, FW will calculate the power limits
* and send set_power command to apply them.
* Otherwise just update local values stored in FW until a future msg
* with commit_limits=1 arrives.
*/
A_UINT32 commit_limits;
/**
* TLV (tag length value) parameters follow the sar_limit_cmd_row
* structure. The TLV's are:
* wmi_sar_limit_cmd_row sar_limits[];
*/
} wmi_sar_limits_cmd_fixed_param;
enum wmi_sar_feature_state_flags {
WMI_SAR_FEATURE_OFF = 0,
WMI_SAR_FEATURE_ON_SET_0,
WMI_SAR_FEATURE_ON_SET_1,
WMI_SAR_FEATURE_ON_SET_2,
WMI_SAR_FEATURE_ON_SET_3,
WMI_SAR_FEATURE_ON_SET_4,
WMI_SAR_FEATURE_NO_CHANGE
};
typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sar_limit_cmd_row */
/** Current values: WMI_SAR_2G_ID, WMI_SAR_5G_ID. Can be extended by adding
* new band_id values .
*/
A_UINT32 band_id;
A_UINT32 chain_id;
/** Current values: WMI_SAR_MOD_CCK, WMI_SAR_MOD_OFDM */
A_UINT32 mod_id;
/** actual power limit value, in steps of 0.5 dBm */
A_UINT32 limit_value;
/** in case the OEM doesn't care about one of the qualifiers from above,
* the bit for that qualifier within the validity_bitmap can be set to 0
* so that limit is applied to all possible cases of this qualifier
* (i.e. if a qualifier's validity_bitmap flag is 0, the qualifier is
* treated as a wildcard).
* Current masks:
* WMI_SAR_BAND_ID_VALID_MASK
* WMI_SAR_CHAIN_ID_VALID_MASK
* WMI_SAR_MOD_ID_VALID_MASK
* Example: if !WMI_IS_SAR_MOD_ID_VALID(bitmap),
* it means apply same limit_value to both WMI_SAR_MOD_CCK and
* WMI_SAR_MOD_OFDM cases.
*/
A_UINT32 validity_bitmap;
} wmi_sar_limit_cmd_row;
enum wmi_sar_band_id_flags {
WMI_SAR_2G_ID = 0,
WMI_SAR_5G_ID
};
enum wmi_sar_mod_id_flags {
WMI_SAR_MOD_CCK = 0,
WMI_SAR_MOD_OFDM
};
#define WMI_SAR_BAND_ID_VALID_MASK (0x1)
#define WMI_SAR_CHAIN_ID_VALID_MASK (0x2)
#define WMI_SAR_MOD_ID_VALID_MASK (0x4)
#define WMI_SET_SAR_BAND_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_BAND_ID_VALID_MASK)
#define WMI_SET_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_CHAIN_ID_VALID_MASK)
#define WMI_SET_SAR_MOD_ID_VALID(bitmap) ((bitmap) |= WMI_SAR_MOD_ID_VALID_MASK)
#define WMI_IS_SAR_BAND_ID_VALID(bitmap) ((bitmap) & WMI_SAR_BAND_ID_VALID_MASK)
#define WMI_IS_SAR_CHAIN_ID_VALID(bitmap) ((bitmap) & WMI_SAR_CHAIN_ID_VALID_MASK)
#define WMI_IS_SAR_MOD_ID_VALID(bitmap) ((bitmap) & WMI_SAR_MOD_ID_VALID_MASK)
#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */

View file

@ -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_ 304
#define __WMI_REVISION_ 305
/** The Version Namespace should not be normally changed. Only
* host and firmware of the same WMI namespace will work