diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/4965-mac.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/4965-mac.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c index 34f61a0581a2..eac4dc8bc879 100644 --- a/drivers/net/wireless/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c | |||
@@ -1526,8 +1526,11 @@ il4965_tx_cmd_build_basic(struct il_priv *il, struct sk_buff *skb, | |||
1526 | } | 1526 | } |
1527 | 1527 | ||
1528 | static void | 1528 | static void |
1529 | il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd, | 1529 | il4965_tx_cmd_build_rate(struct il_priv *il, |
1530 | struct ieee80211_tx_info *info, __le16 fc) | 1530 | struct il_tx_cmd *tx_cmd, |
1531 | struct ieee80211_tx_info *info, | ||
1532 | struct ieee80211_sta *sta, | ||
1533 | __le16 fc) | ||
1531 | { | 1534 | { |
1532 | const u8 rts_retry_limit = 60; | 1535 | const u8 rts_retry_limit = 60; |
1533 | u32 rate_flags; | 1536 | u32 rate_flags; |
@@ -1561,9 +1564,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd, | |||
1561 | rate_idx = info->control.rates[0].idx; | 1564 | rate_idx = info->control.rates[0].idx; |
1562 | if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0 | 1565 | if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0 |
1563 | || rate_idx > RATE_COUNT_LEGACY) | 1566 | || rate_idx > RATE_COUNT_LEGACY) |
1564 | rate_idx = | 1567 | rate_idx = rate_lowest_index(&il->bands[info->band], sta); |
1565 | rate_lowest_index(&il->bands[info->band], | ||
1566 | info->control.sta); | ||
1567 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ | 1568 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
1568 | if (info->band == IEEE80211_BAND_5GHZ) | 1569 | if (info->band == IEEE80211_BAND_5GHZ) |
1569 | rate_idx += IL_FIRST_OFDM_RATE; | 1570 | rate_idx += IL_FIRST_OFDM_RATE; |
@@ -1630,11 +1631,12 @@ il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info, | |||
1630 | * start C_TX command process | 1631 | * start C_TX command process |
1631 | */ | 1632 | */ |
1632 | int | 1633 | int |
1633 | il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | 1634 | il4965_tx_skb(struct il_priv *il, |
1635 | struct ieee80211_sta *sta, | ||
1636 | struct sk_buff *skb) | ||
1634 | { | 1637 | { |
1635 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 1638 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
1636 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 1639 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); |
1637 | struct ieee80211_sta *sta = info->control.sta; | ||
1638 | struct il_station_priv *sta_priv = NULL; | 1640 | struct il_station_priv *sta_priv = NULL; |
1639 | struct il_tx_queue *txq; | 1641 | struct il_tx_queue *txq; |
1640 | struct il_queue *q; | 1642 | struct il_queue *q; |
@@ -1680,7 +1682,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
1680 | sta_id = il->hw_params.bcast_id; | 1682 | sta_id = il->hw_params.bcast_id; |
1681 | else { | 1683 | else { |
1682 | /* Find idx into station table for destination station */ | 1684 | /* Find idx into station table for destination station */ |
1683 | sta_id = il_sta_id_or_broadcast(il, info->control.sta); | 1685 | sta_id = il_sta_id_or_broadcast(il, sta); |
1684 | 1686 | ||
1685 | if (sta_id == IL_INVALID_STATION) { | 1687 | if (sta_id == IL_INVALID_STATION) { |
1686 | D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1); | 1688 | D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1); |
@@ -1786,7 +1788,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
1786 | /* TODO need this for burst mode later on */ | 1788 | /* TODO need this for burst mode later on */ |
1787 | il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id); | 1789 | il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id); |
1788 | 1790 | ||
1789 | il4965_tx_cmd_build_rate(il, tx_cmd, info, fc); | 1791 | il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc); |
1790 | 1792 | ||
1791 | il_update_stats(il, true, fc, len); | 1793 | il_update_stats(il, true, fc, len); |
1792 | /* | 1794 | /* |
@@ -5828,7 +5830,9 @@ il4965_mac_stop(struct ieee80211_hw *hw) | |||
5828 | } | 5830 | } |
5829 | 5831 | ||
5830 | void | 5832 | void |
5831 | il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 5833 | il4965_mac_tx(struct ieee80211_hw *hw, |
5834 | struct ieee80211_tx_control *control, | ||
5835 | struct sk_buff *skb) | ||
5832 | { | 5836 | { |
5833 | struct il_priv *il = hw->priv; | 5837 | struct il_priv *il = hw->priv; |
5834 | 5838 | ||
@@ -5837,7 +5841,7 @@ il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
5837 | D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, | 5841 | D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, |
5838 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); | 5842 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); |
5839 | 5843 | ||
5840 | if (il4965_tx_skb(il, skb)) | 5844 | if (il4965_tx_skb(il, control->sta, skb)) |
5841 | dev_kfree_skb_any(skb); | 5845 | dev_kfree_skb_any(skb); |
5842 | 5846 | ||
5843 | D_MACDUMP("leave\n"); | 5847 | D_MACDUMP("leave\n"); |