Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194449
b: refs/heads/master
c: b0a3344
h: refs/heads/master
i:
  194447: 37b860a
v: v3
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Apr 16, 2010
1 parent 4548be4 commit 5f300df
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce01805a226328228a885b4a6e4b632b4e73f8ee
refs/heads/master: b0a3344834fcaf30e472ccc661c8842281453402
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ static void setup_ht_cap(struct ath_softc *sc,
IEEE80211_HT_CAP_SGI_40 |
IEEE80211_HT_CAP_DSSSCCK40;

if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_LDPC)
ht_info->cap |= IEEE80211_HT_CAP_LDPC_CODING;

ht_info->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
ht_info->ampdu_density = IEEE80211_HT_MPDU_DENSITY_8;

Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,15 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
rate_table = sc->cur_rate_table;
rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe);

/*
* If we're in HT mode and both us and our peer supports LDPC.
* We don't need to check our own device's capabilities as our own
* ht capabilities would have already been intersected with our peer's.
*/
if (conf_is_ht(&sc->hw->conf) &&
(sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING))
tx_info->flags |= IEEE80211_TX_CTL_LDPC;

if (is_probe) {
/* set one try for probe rates. For the
* probes don't enable rts */
Expand Down
14 changes: 10 additions & 4 deletions trunk/drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,8 +1483,7 @@ static void assign_aggr_tid_seqno(struct sk_buff *skb,
INCR(tid->seq_next, IEEE80211_SEQ_MAX);
}

static int setup_tx_flags(struct ath_softc *sc, struct sk_buff *skb,
struct ath_txq *txq)
static int setup_tx_flags(struct sk_buff *skb, bool use_ldpc)
{
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
int flags = 0;
Expand All @@ -1495,6 +1494,9 @@ static int setup_tx_flags(struct ath_softc *sc, struct sk_buff *skb,
if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK)
flags |= ATH9K_TXDESC_NOACK;

if (use_ldpc)
flags |= ATH9K_TXDESC_LDPC;

return flags;
}

Expand Down Expand Up @@ -1646,6 +1648,7 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
int hdrlen;
__le16 fc;
int padpos, padsize;
bool use_ldpc = false;

tx_info->pad[0] = 0;
switch (txctl->frame_type) {
Expand All @@ -1672,10 +1675,13 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
bf->bf_frmlen -= padsize;
}

if (conf_is_ht(&hw->conf))
if (conf_is_ht(&hw->conf)) {
bf->bf_state.bf_type |= BUF_HT;
if (tx_info->flags & IEEE80211_TX_CTL_LDPC)
use_ldpc = true;
}

bf->bf_flags = setup_tx_flags(sc, skb, txctl->txq);
bf->bf_flags = setup_tx_flags(skb, use_ldpc);

bf->bf_keytype = get_hw_crypto_keytype(skb);
if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) {
Expand Down

0 comments on commit 5f300df

Please sign in to comment.