aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/xmit.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-04-15 17:39:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-16 15:43:48 -0400
commitb0a3344834fcaf30e472ccc661c8842281453402 (patch)
tree22720f13c77315e19fc9db456b05371234d2f100 /drivers/net/wireless/ath/ath9k/xmit.c
parentce01805a226328228a885b4a6e4b632b4e73f8ee (diff)
ath9k: add LDPC support
LDPC is enabled by the rate control if the its determined that the target peer supports LDPC. We would have already intersected the HT capabilities so if our peer supports LDPC so do we. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index c2b45030d0b4..90e629f276f3 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1483,8 +1483,7 @@ static void assign_aggr_tid_seqno(struct sk_buff *skb,
1483 INCR(tid->seq_next, IEEE80211_SEQ_MAX); 1483 INCR(tid->seq_next, IEEE80211_SEQ_MAX);
1484} 1484}
1485 1485
1486static int setup_tx_flags(struct ath_softc *sc, struct sk_buff *skb, 1486static int setup_tx_flags(struct sk_buff *skb, bool use_ldpc)
1487 struct ath_txq *txq)
1488{ 1487{
1489 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 1488 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
1490 int flags = 0; 1489 int flags = 0;
@@ -1495,6 +1494,9 @@ static int setup_tx_flags(struct ath_softc *sc, struct sk_buff *skb,
1495 if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) 1494 if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK)
1496 flags |= ATH9K_TXDESC_NOACK; 1495 flags |= ATH9K_TXDESC_NOACK;
1497 1496
1497 if (use_ldpc)
1498 flags |= ATH9K_TXDESC_LDPC;
1499
1498 return flags; 1500 return flags;
1499} 1501}
1500 1502
@@ -1646,6 +1648,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
1646 int hdrlen; 1648 int hdrlen;
1647 __le16 fc; 1649 __le16 fc;
1648 int padpos, padsize; 1650 int padpos, padsize;
1651 bool use_ldpc = false;
1649 1652
1650 tx_info->pad[0] = 0; 1653 tx_info->pad[0] = 0;
1651 switch (txctl->frame_type) { 1654 switch (txctl->frame_type) {
@@ -1672,10 +1675,13 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
1672 bf->bf_frmlen -= padsize; 1675 bf->bf_frmlen -= padsize;
1673 } 1676 }
1674 1677
1675 if (conf_is_ht(&hw->conf)) 1678 if (conf_is_ht(&hw->conf)) {
1676 bf->bf_state.bf_type |= BUF_HT; 1679 bf->bf_state.bf_type |= BUF_HT;
1680 if (tx_info->flags & IEEE80211_TX_CTL_LDPC)
1681 use_ldpc = true;
1682 }
1677 1683
1678 bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq); 1684 bf->bf_flags = setup_tx_flags(skb, use_ldpc);
1679 1685
1680 bf->bf_keytype = get_hw_crypto_keytype(skb); 1686 bf->bf_keytype = get_hw_crypto_keytype(skb);
1681 if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) { 1687 if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) {