diff options
author | David Vrabel <david.vrabel@csr.com> | 2009-02-02 12:52:39 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2009-02-02 12:52:39 -0500 |
commit | 8f04915532485d81e7f6c580a396ea7b01094221 (patch) | |
tree | c5740e961a025f2fb6b520a2bc5937f19d4345ab /drivers/net/wireless/iwlwifi | |
parent | 8f5140a6a0b1a9aa79585b0008e88c5d266c5c1d (diff) | |
parent | 45c82b5a770be66845687a7d027c8b52946d59af (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945-rs.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-hcmd.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 4 |
5 files changed, 31 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c index 9b60a0c5de5f..21c841847d88 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c | |||
@@ -638,12 +638,16 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
638 | s8 scale_action = 0; | 638 | s8 scale_action = 0; |
639 | unsigned long flags; | 639 | unsigned long flags; |
640 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 640 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
641 | u16 fc, rate_mask; | 641 | u16 fc; |
642 | u16 rate_mask = 0; | ||
642 | struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_r; | 643 | struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_r; |
643 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 644 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
644 | 645 | ||
645 | IWL_DEBUG_RATE("enter\n"); | 646 | IWL_DEBUG_RATE("enter\n"); |
646 | 647 | ||
648 | if (sta) | ||
649 | rate_mask = sta->supp_rates[sband->band]; | ||
650 | |||
647 | /* Send management frames and broadcast/multicast data using lowest | 651 | /* Send management frames and broadcast/multicast data using lowest |
648 | * rate. */ | 652 | * rate. */ |
649 | fc = le16_to_cpu(hdr->frame_control); | 653 | fc = le16_to_cpu(hdr->frame_control); |
@@ -651,11 +655,15 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, | |||
651 | is_multicast_ether_addr(hdr->addr1) || | 655 | is_multicast_ether_addr(hdr->addr1) || |
652 | !sta || !priv_sta) { | 656 | !sta || !priv_sta) { |
653 | IWL_DEBUG_RATE("leave: No STA priv data to update!\n"); | 657 | IWL_DEBUG_RATE("leave: No STA priv data to update!\n"); |
654 | info->control.rates[0].idx = rate_lowest_index(sband, sta); | 658 | if (!rate_mask) |
659 | info->control.rates[0].idx = | ||
660 | rate_lowest_index(sband, NULL); | ||
661 | else | ||
662 | info->control.rates[0].idx = | ||
663 | rate_lowest_index(sband, sta); | ||
655 | return; | 664 | return; |
656 | } | 665 | } |
657 | 666 | ||
658 | rate_mask = sta->supp_rates[sband->band]; | ||
659 | index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1); | 667 | index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1); |
660 | 668 | ||
661 | if (sband->band == IEEE80211_BAND_5GHZ) | 669 | if (sband->band == IEEE80211_BAND_5GHZ) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index f3f17929ca0b..27f50471aed8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -944,7 +944,8 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
944 | } | 944 | } |
945 | 945 | ||
946 | /* See if there's a better rate or modulation mode to try. */ | 946 | /* See if there's a better rate or modulation mode to try. */ |
947 | rs_rate_scale_perform(priv, hdr, sta, lq_sta); | 947 | if (sta && sta->supp_rates[sband->band]) |
948 | rs_rate_scale_perform(priv, hdr, sta, lq_sta); | ||
948 | out: | 949 | out: |
949 | return; | 950 | return; |
950 | } | 951 | } |
@@ -2101,14 +2102,23 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, | |||
2101 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 2102 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
2102 | struct iwl_lq_sta *lq_sta = priv_sta; | 2103 | struct iwl_lq_sta *lq_sta = priv_sta; |
2103 | int rate_idx; | 2104 | int rate_idx; |
2105 | u64 mask_bit = 0; | ||
2104 | 2106 | ||
2105 | IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n"); | 2107 | IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n"); |
2106 | 2108 | ||
2109 | if (sta) | ||
2110 | mask_bit = sta->supp_rates[sband->band]; | ||
2111 | |||
2107 | /* Send management frames and broadcast/multicast data using lowest | 2112 | /* Send management frames and broadcast/multicast data using lowest |
2108 | * rate. */ | 2113 | * rate. */ |
2109 | if (!ieee80211_is_data(hdr->frame_control) || | 2114 | if (!ieee80211_is_data(hdr->frame_control) || |
2110 | is_multicast_ether_addr(hdr->addr1) || !sta || !lq_sta) { | 2115 | is_multicast_ether_addr(hdr->addr1) || !sta || !lq_sta) { |
2111 | info->control.rates[0].idx = rate_lowest_index(sband, sta); | 2116 | if (!mask_bit) |
2117 | info->control.rates[0].idx = | ||
2118 | rate_lowest_index(sband, NULL); | ||
2119 | else | ||
2120 | info->control.rates[0].idx = | ||
2121 | rate_lowest_index(sband, sta); | ||
2112 | return; | 2122 | return; |
2113 | } | 2123 | } |
2114 | 2124 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 5da6b35cd26d..b35c8813bef4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1719,6 +1719,10 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1719 | priv->ucode_data_backup.len = data_size; | 1719 | priv->ucode_data_backup.len = data_size; |
1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); | 1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); |
1721 | 1721 | ||
1722 | if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr || | ||
1723 | !priv->ucode_data_backup.v_addr) | ||
1724 | goto err_pci_alloc; | ||
1725 | |||
1722 | /* Initialization instructions and data */ | 1726 | /* Initialization instructions and data */ |
1723 | if (init_size && init_data_size) { | 1727 | if (init_size && init_data_size) { |
1724 | priv->ucode_init.len = init_size; | 1728 | priv->ucode_init.len = init_size; |
@@ -2482,7 +2486,7 @@ static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2482 | dev_kfree_skb_any(skb); | 2486 | dev_kfree_skb_any(skb); |
2483 | 2487 | ||
2484 | IWL_DEBUG_MACDUMP("leave\n"); | 2488 | IWL_DEBUG_MACDUMP("leave\n"); |
2485 | return 0; | 2489 | return NETDEV_TX_OK; |
2486 | } | 2490 | } |
2487 | 2491 | ||
2488 | static int iwl_mac_add_interface(struct ieee80211_hw *hw, | 2492 | static int iwl_mac_add_interface(struct ieee80211_hw *hw, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-hcmd.c index 8c71ad4f88c5..4b35b30e493e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-hcmd.c | |||
@@ -224,7 +224,7 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
224 | IWL_ERROR("Error: Response NULL in '%s'\n", | 224 | IWL_ERROR("Error: Response NULL in '%s'\n", |
225 | get_cmd_string(cmd->id)); | 225 | get_cmd_string(cmd->id)); |
226 | ret = -EIO; | 226 | ret = -EIO; |
227 | goto out; | 227 | goto cancel; |
228 | } | 228 | } |
229 | 229 | ||
230 | ret = 0; | 230 | ret = 0; |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index d64580805d6e..95d01984c80e 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -745,7 +745,7 @@ static int iwl3945_send_cmd_sync(struct iwl3945_priv *priv, struct iwl3945_host_ | |||
745 | IWL_ERROR("Error: Response NULL in '%s'\n", | 745 | IWL_ERROR("Error: Response NULL in '%s'\n", |
746 | get_cmd_string(cmd->id)); | 746 | get_cmd_string(cmd->id)); |
747 | ret = -EIO; | 747 | ret = -EIO; |
748 | goto out; | 748 | goto cancel; |
749 | } | 749 | } |
750 | 750 | ||
751 | ret = 0; | 751 | ret = 0; |
@@ -6538,7 +6538,7 @@ static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
6538 | dev_kfree_skb_any(skb); | 6538 | dev_kfree_skb_any(skb); |
6539 | 6539 | ||
6540 | IWL_DEBUG_MAC80211("leave\n"); | 6540 | IWL_DEBUG_MAC80211("leave\n"); |
6541 | return 0; | 6541 | return NETDEV_TX_OK; |
6542 | } | 6542 | } |
6543 | 6543 | ||
6544 | static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, | 6544 | static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, |