aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2009-09-17 13:43:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:35 -0400
commit2f748deceee10bac563df0e859830cc628d1a841 (patch)
tree5eff6c8dbe0a464af077207dd45ddcc3e2501839 /drivers/net/wireless/iwlwifi/iwl-5000.c
parente3949d62861b3fdef19e80080d670aa1153a23c4 (diff)
iwlwifi: send cmd to uCode to configure valid tx antenna
In order for uCode to select the valid antennas for transmit, driver need to configure the allowed tx antennas through host command. The TX_ANT_CONFIGURATION_CMD should be used for 5000 series and up Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@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/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 75fa55db330e..68d97f50fd00 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1450,6 +1450,24 @@ int iwl5000_calc_rssi(struct iwl_priv *priv,
1450 return max_rssi - agc - IWL49_RSSI_OFFSET; 1450 return max_rssi - agc - IWL49_RSSI_OFFSET;
1451} 1451}
1452 1452
1453static int iwl5000_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant)
1454{
1455 struct iwl_tx_ant_config_cmd tx_ant_cmd = {
1456 .valid = cpu_to_le32(valid_tx_ant),
1457 };
1458
1459 if (IWL_UCODE_API(priv->ucode_ver) > 1) {
1460 IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant);
1461 return iwl_send_cmd_pdu(priv, TX_ANT_CONFIGURATION_CMD,
1462 sizeof(struct iwl_tx_ant_config_cmd),
1463 &tx_ant_cmd);
1464 } else {
1465 IWL_DEBUG_HC(priv, "TX_ANT_CONFIGURATION_CMD not supported\n");
1466 return -EOPNOTSUPP;
1467 }
1468}
1469
1470
1453#define IWL5000_UCODE_GET(item) \ 1471#define IWL5000_UCODE_GET(item) \
1454static u32 iwl5000_ucode_get_##item(const struct iwl_ucode_header *ucode,\ 1472static u32 iwl5000_ucode_get_##item(const struct iwl_ucode_header *ucode,\
1455 u32 api_ver) \ 1473 u32 api_ver) \
@@ -1492,6 +1510,7 @@ struct iwl_hcmd_ops iwl5000_hcmd = {
1492 .rxon_assoc = iwl5000_send_rxon_assoc, 1510 .rxon_assoc = iwl5000_send_rxon_assoc,
1493 .commit_rxon = iwl_commit_rxon, 1511 .commit_rxon = iwl_commit_rxon,
1494 .set_rxon_chain = iwl_set_rxon_chain, 1512 .set_rxon_chain = iwl_set_rxon_chain,
1513 .set_tx_ant = iwl5000_send_tx_ant_config,
1495}; 1514};
1496 1515
1497struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = { 1516struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = {