Commit 76a2407a authored by Jay Sternberg's avatar Jay Sternberg Committed by John W. Linville
Browse files

iwlwifi: correct API command overlap



Correct the API commands where same command id used for two different
commands. Update max api versions for affected devices.

TX_ANT_CONFIGURATION_CMD was already using id 0x98, so
REPLY_TX_POWER_DBM_CMD moved to 0x95

Older API interfaces may used original value so V1 defines provided.
Signed-off-by: default avatarJay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 050681b7
......@@ -46,7 +46,7 @@
#include "iwl-5000-hw.h"
/* Highest firmware API version supported */
#define IWL100_UCODE_API_MAX 1
#define IWL100_UCODE_API_MAX 2
/* Lowest firmware API version supported */
#define IWL100_UCODE_API_MIN 1
......
......@@ -1411,12 +1411,19 @@ static int iwl5000_send_rxon_assoc(struct iwl_priv *priv)
static int iwl5000_send_tx_power(struct iwl_priv *priv)
{
struct iwl5000_tx_power_dbm_cmd tx_power_cmd;
u8 tx_ant_cfg_cmd;
/* half dBm need to multiply */
tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt);
tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED;
tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO;
return iwl_send_cmd_pdu_async(priv, REPLY_TX_POWER_DBM_CMD,
if (IWL_UCODE_API(priv->ucode_ver) == 1)
tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD_V1;
else
tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD;
return iwl_send_cmd_pdu_async(priv, tx_ant_cfg_cmd,
sizeof(tx_power_cmd), &tx_power_cmd,
NULL);
}
......
......@@ -46,8 +46,8 @@
#include "iwl-5000-hw.h"
/* Highest firmware API version supported */
#define IWL6000_UCODE_API_MAX 1
#define IWL6050_UCODE_API_MAX 1
#define IWL6000_UCODE_API_MAX 2
#define IWL6050_UCODE_API_MAX 2
/* Lowest firmware API version supported */
#define IWL6000_UCODE_API_MIN 1
......
......@@ -144,9 +144,11 @@ enum {
WHO_IS_AWAKE_NOTIFICATION = 0x94, /* not used */
/* Miscellaneous commands */
REPLY_TX_POWER_DBM_CMD = 0x95,
QUIET_NOTIFICATION = 0x96, /* not used */
REPLY_TX_PWR_TABLE_CMD = 0x97,
REPLY_TX_POWER_DBM_CMD = 0x98,
REPLY_TX_POWER_DBM_CMD_V1 = 0x98, /* old version of API */
TX_ANT_CONFIGURATION_CMD = 0x98, /* not used */
MEASURE_ABORT_NOTIFICATION = 0x99, /* not used */
/* Bluetooth device coexistence config command */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment