diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-24 18:01:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-24 18:01:29 -0500 |
commit | 4ba3eb034fb6fd1990ccc5a6d71d5abcda37b905 (patch) | |
tree | 0789ba36d96dba330416a1e6a9a68e891a78802a /drivers/net/wireless/iwlwifi/iwl-5000.c | |
parent | 35700212b45ea9f98fa682cfc1bc1a67c9ccc34b (diff) | |
parent | 18b6c9a2213d3b6e0212e8b225abf95f7564206a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index e23d301e816..e2f8615c8c9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -994,8 +994,7 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv, | |||
994 | info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]); | 994 | info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]); |
995 | info->status.rates[0].count = tx_resp->failure_frame + 1; | 995 | info->status.rates[0].count = tx_resp->failure_frame + 1; |
996 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; | 996 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; |
997 | info->flags |= iwl_is_tx_success(status) ? | 997 | info->flags |= iwl_tx_status_to_mac80211(status); |
998 | IEEE80211_TX_STAT_ACK : 0; | ||
999 | iwl_hwrate_to_tx_control(priv, rate_n_flags, info); | 998 | iwl_hwrate_to_tx_control(priv, rate_n_flags, info); |
1000 | 999 | ||
1001 | /* FIXME: code repetition end */ | 1000 | /* FIXME: code repetition end */ |
@@ -1140,8 +1139,7 @@ static void iwl5000_rx_reply_tx(struct iwl_priv *priv, | |||
1140 | BUG_ON(txq_id != txq->swq_id); | 1139 | BUG_ON(txq_id != txq->swq_id); |
1141 | 1140 | ||
1142 | info->status.rates[0].count = tx_resp->failure_frame + 1; | 1141 | info->status.rates[0].count = tx_resp->failure_frame + 1; |
1143 | info->flags |= iwl_is_tx_success(status) ? | 1142 | info->flags |= iwl_tx_status_to_mac80211(status); |
1144 | IEEE80211_TX_STAT_ACK : 0; | ||
1145 | iwl_hwrate_to_tx_control(priv, | 1143 | iwl_hwrate_to_tx_control(priv, |
1146 | le32_to_cpu(tx_resp->rate_n_flags), | 1144 | le32_to_cpu(tx_resp->rate_n_flags), |
1147 | info); | 1145 | info); |
@@ -1251,6 +1249,22 @@ int iwl5000_send_tx_power(struct iwl_priv *priv) | |||
1251 | 1249 | ||
1252 | /* half dBm need to multiply */ | 1250 | /* half dBm need to multiply */ |
1253 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); | 1251 | tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt); |
1252 | |||
1253 | if (priv->tx_power_lmt_in_half_dbm && | ||
1254 | priv->tx_power_lmt_in_half_dbm < tx_power_cmd.global_lmt) { | ||
1255 | /* | ||
1256 | * For the newer devices which using enhanced/extend tx power | ||
1257 | * table in EEPROM, the format is in half dBm. driver need to | ||
1258 | * convert to dBm format before report to mac80211. | ||
1259 | * By doing so, there is a possibility of 1/2 dBm resolution | ||
1260 | * lost. driver will perform "round-up" operation before | ||
1261 | * reporting, but it will cause 1/2 dBm tx power over the | ||
1262 | * regulatory limit. Perform the checking here, if the | ||
1263 | * "tx_power_user_lmt" is higher than EEPROM value (in | ||
1264 | * half-dBm format), lower the tx power based on EEPROM | ||
1265 | */ | ||
1266 | tx_power_cmd.global_lmt = priv->tx_power_lmt_in_half_dbm; | ||
1267 | } | ||
1254 | tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED; | 1268 | tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED; |
1255 | tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO; | 1269 | tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO; |
1256 | 1270 | ||
@@ -1584,14 +1598,15 @@ struct iwl_cfg iwl5300_agn_cfg = { | |||
1584 | .ht_greenfield_support = true, | 1598 | .ht_greenfield_support = true, |
1585 | .led_compensation = 51, | 1599 | .led_compensation = 51, |
1586 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1600 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1601 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
1587 | }; | 1602 | }; |
1588 | 1603 | ||
1589 | struct iwl_cfg iwl5100_bg_cfg = { | 1604 | struct iwl_cfg iwl5100_bgn_cfg = { |
1590 | .name = "5100BG", | 1605 | .name = "5100BGN", |
1591 | .fw_name_pre = IWL5000_FW_PRE, | 1606 | .fw_name_pre = IWL5000_FW_PRE, |
1592 | .ucode_api_max = IWL5000_UCODE_API_MAX, | 1607 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
1593 | .ucode_api_min = IWL5000_UCODE_API_MIN, | 1608 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
1594 | .sku = IWL_SKU_G, | 1609 | .sku = IWL_SKU_G|IWL_SKU_N, |
1595 | .ops = &iwl5000_ops, | 1610 | .ops = &iwl5000_ops, |
1596 | .eeprom_size = IWL_5000_EEPROM_IMG_SIZE, | 1611 | .eeprom_size = IWL_5000_EEPROM_IMG_SIZE, |
1597 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 1612 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, |
@@ -1627,7 +1642,6 @@ struct iwl_cfg iwl5100_abg_cfg = { | |||
1627 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | 1642 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
1628 | .set_l0s = true, | 1643 | .set_l0s = true, |
1629 | .use_bsm = false, | 1644 | .use_bsm = false, |
1630 | .ht_greenfield_support = true, | ||
1631 | .led_compensation = 51, | 1645 | .led_compensation = 51, |
1632 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1646 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1633 | }; | 1647 | }; |
@@ -1653,6 +1667,7 @@ struct iwl_cfg iwl5100_agn_cfg = { | |||
1653 | .ht_greenfield_support = true, | 1667 | .ht_greenfield_support = true, |
1654 | .led_compensation = 51, | 1668 | .led_compensation = 51, |
1655 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1669 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1670 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
1656 | }; | 1671 | }; |
1657 | 1672 | ||
1658 | struct iwl_cfg iwl5350_agn_cfg = { | 1673 | struct iwl_cfg iwl5350_agn_cfg = { |
@@ -1676,6 +1691,7 @@ struct iwl_cfg iwl5350_agn_cfg = { | |||
1676 | .ht_greenfield_support = true, | 1691 | .ht_greenfield_support = true, |
1677 | .led_compensation = 51, | 1692 | .led_compensation = 51, |
1678 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1693 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1694 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
1679 | }; | 1695 | }; |
1680 | 1696 | ||
1681 | struct iwl_cfg iwl5150_agn_cfg = { | 1697 | struct iwl_cfg iwl5150_agn_cfg = { |
@@ -1699,6 +1715,29 @@ struct iwl_cfg iwl5150_agn_cfg = { | |||
1699 | .ht_greenfield_support = true, | 1715 | .ht_greenfield_support = true, |
1700 | .led_compensation = 51, | 1716 | .led_compensation = 51, |
1701 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1717 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1718 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
1719 | }; | ||
1720 | |||
1721 | struct iwl_cfg iwl5150_abg_cfg = { | ||
1722 | .name = "5150ABG", | ||
1723 | .fw_name_pre = IWL5150_FW_PRE, | ||
1724 | .ucode_api_max = IWL5150_UCODE_API_MAX, | ||
1725 | .ucode_api_min = IWL5150_UCODE_API_MIN, | ||
1726 | .sku = IWL_SKU_A|IWL_SKU_G, | ||
1727 | .ops = &iwl5150_ops, | ||
1728 | .eeprom_size = IWL_5000_EEPROM_IMG_SIZE, | ||
1729 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, | ||
1730 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | ||
1731 | .num_of_queues = IWL50_NUM_QUEUES, | ||
1732 | .num_of_ampdu_queues = IWL50_NUM_AMPDU_QUEUES, | ||
1733 | .mod_params = &iwl50_mod_params, | ||
1734 | .valid_tx_ant = ANT_A, | ||
1735 | .valid_rx_ant = ANT_AB, | ||
1736 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
1737 | .set_l0s = true, | ||
1738 | .use_bsm = false, | ||
1739 | .led_compensation = 51, | ||
1740 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
1702 | }; | 1741 | }; |
1703 | 1742 | ||
1704 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); | 1743 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); |