diff options
author | Jay Sternberg <jay.e.sternberg@linux.intel.com> | 2009-01-29 14:09:14 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-09 15:03:42 -0500 |
commit | 76a2407a5b043d0950d5657184118e89860d545c (patch) | |
tree | 1173069fb065ace0f4a6d938bfc04b1ac629ad02 /drivers/net/wireless | |
parent | 050681b77d10ac81bf6be5b2c61aa6c5969947e4 (diff) |
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: Jay Sternberg <jay.e.sternberg@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-100.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 4 |
4 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-100.c b/drivers/net/wireless/iwlwifi/iwl-100.c index a5df93154d21..11d206abb710 100644 --- a/drivers/net/wireless/iwlwifi/iwl-100.c +++ b/drivers/net/wireless/iwlwifi/iwl-100.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include "iwl-5000-hw.h" | 46 | #include "iwl-5000-hw.h" |
47 | 47 | ||
48 | /* Highest firmware API version supported */ | 48 | /* Highest firmware API version supported */ |
49 | #define IWL100_UCODE_API_MAX 1 | 49 | #define IWL100_UCODE_API_MAX 2 |
50 | 50 | ||
51 | /* Lowest firmware API version supported */ | 51 | /* Lowest firmware API version supported */ |
52 | #define IWL100_UCODE_API_MIN 1 | 52 | #define IWL100_UCODE_API_MIN 1 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index f8158edf6ebf..17aaca8dad1f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1411,12 +1411,19 @@ static int iwl5000_send_rxon_assoc(struct iwl_priv *priv) | |||
1411 | static int iwl5000_send_tx_power(struct iwl_priv *priv) | 1411 | static int iwl5000_send_tx_power(struct iwl_priv *priv) |
1412 | { | 1412 | { |
1413 | struct iwl5000_tx_power_dbm_cmd tx_power_cmd; | 1413 | struct iwl5000_tx_power_dbm_cmd tx_power_cmd; |
1414 | u8 tx_ant_cfg_cmd; | ||
1414 | 1415 | ||
1415 | /* half dBm need to multiply */ | 1416 | /* half dBm need to multiply */ |
1416 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); | 1417 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); |
1417 | tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED; | 1418 | tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED; |
1418 | tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO; | 1419 | tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO; |
1419 | return iwl_send_cmd_pdu_async(priv, REPLY_TX_POWER_DBM_CMD, | 1420 | |
1421 | if (IWL_UCODE_API(priv->ucode_ver) == 1) | ||
1422 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD_V1; | ||
1423 | else | ||
1424 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD; | ||
1425 | |||
1426 | return iwl_send_cmd_pdu_async(priv, tx_ant_cfg_cmd, | ||
1420 | sizeof(tx_power_cmd), &tx_power_cmd, | 1427 | sizeof(tx_power_cmd), &tx_power_cmd, |
1421 | NULL); | 1428 | NULL); |
1422 | } | 1429 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 1672a988424a..af700707cb73 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -46,8 +46,8 @@ | |||
46 | #include "iwl-5000-hw.h" | 46 | #include "iwl-5000-hw.h" |
47 | 47 | ||
48 | /* Highest firmware API version supported */ | 48 | /* Highest firmware API version supported */ |
49 | #define IWL6000_UCODE_API_MAX 1 | 49 | #define IWL6000_UCODE_API_MAX 2 |
50 | #define IWL6050_UCODE_API_MAX 1 | 50 | #define IWL6050_UCODE_API_MAX 2 |
51 | 51 | ||
52 | /* Lowest firmware API version supported */ | 52 | /* Lowest firmware API version supported */ |
53 | #define IWL6000_UCODE_API_MIN 1 | 53 | #define IWL6000_UCODE_API_MIN 1 |
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index e49415c7fb2a..77f32ad3de0b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -144,9 +144,11 @@ enum { | |||
144 | WHO_IS_AWAKE_NOTIFICATION = 0x94, /* not used */ | 144 | WHO_IS_AWAKE_NOTIFICATION = 0x94, /* not used */ |
145 | 145 | ||
146 | /* Miscellaneous commands */ | 146 | /* Miscellaneous commands */ |
147 | REPLY_TX_POWER_DBM_CMD = 0x95, | ||
147 | QUIET_NOTIFICATION = 0x96, /* not used */ | 148 | QUIET_NOTIFICATION = 0x96, /* not used */ |
148 | REPLY_TX_PWR_TABLE_CMD = 0x97, | 149 | REPLY_TX_PWR_TABLE_CMD = 0x97, |
149 | REPLY_TX_POWER_DBM_CMD = 0x98, | 150 | REPLY_TX_POWER_DBM_CMD_V1 = 0x98, /* old version of API */ |
151 | TX_ANT_CONFIGURATION_CMD = 0x98, /* not used */ | ||
150 | MEASURE_ABORT_NOTIFICATION = 0x99, /* not used */ | 152 | MEASURE_ABORT_NOTIFICATION = 0x99, /* not used */ |
151 | 153 | ||
152 | /* Bluetooth device coexistence config command */ | 154 | /* Bluetooth device coexistence config command */ |