summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
diff options
context:
space:
mode:
authorGil Adam <gil.adam@intel.com>2019-06-16 13:18:28 +0300
committerLuca Coelho <luciano.coelho@intel.com>2019-09-06 15:31:20 +0300
commit6ce1e5c0c207d9a0dbd0f451ed58f333c8e3594c (patch)
tree8d633789249ef24469d65cb8a54f3a6ddd5430bc /drivers/net/wireless/intel/iwlwifi/fw/api/power.h
parente533f74589685a43fb191764c26f33a41a908ec3 (diff)
downloadlinux-6ce1e5c0c207d9a0dbd0f451ed58f333c8e3594c.tar.xz
iwlwifi: support per-platform antenna gain
TX power limits as defined in the OTP assume the worst case scenario in terms of the platform's atenna gain, but most platforms are below that value so they can use more TX power without passing the regulatory limit. If the platform indicates in the BIOS that it indeed has lower gain, and the geographic location allows it, higher TX power can be used. The driver reads the PPAG (Per-Platform Antenna Gain) data from BIOS (if it exists), validates it and sends the appropriate command to the FW. This flow happens once at FW init, in case of suspend/resume there is no need to read again from BIOS as we save those values during init, so just send the PPAG command again to FW. Signed-off-by: Gil Adam <gil.adam@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/fw/api/power.h')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/api/power.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/power.h b/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
index f195db398bed..6e1b9b21904e 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/power.h
@@ -450,6 +450,18 @@ struct iwl_geo_tx_power_profiles_resp {
} __packed; /* GEO_TX_POWER_LIMIT_RESP */
/**
+ * struct iwl_ppag_table_cmd - struct for PER_PLATFORM_ANT_GAIN_CMD cmd.
+ * @enabled: 1 if PPAG is enabled, 0 otherwise
+ * @gain: table of antenna gain values per chain and sub-band
+ * @reserved: reserved
+ */
+struct iwl_ppag_table_cmd {
+ __le32 enabled;
+ s8 gain[IWL_NUM_CHAIN_LIMITS][IWL_NUM_SUB_BANDS];
+ s8 reserved[2];
+} __packed; /* PER_PLATFORM_ANT_GAIN_CMD */
+
+/**
* struct iwl_beacon_filter_cmd
* REPLY_BEACON_FILTERING_CMD = 0xd2 (command)
* @bf_energy_delta: Used for RSSI filtering, if in 'normal' state. Send beacon