xmit.c (3459731a39894e5377283b3ccf2fede54e19aae1) xmit.c (82b2d334314c387ebd857b88a3d889c9a2cfec4a)
1/*
2 * Copyright (c) 2008-2011 Atheros Communications Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 1620 unchanged lines hidden (view full) ---

1629 (chainmask == 0x7) && (rate < 0x90))
1630 return 0x3;
1631 else
1632 return chainmask;
1633}
1634
1635static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, int len)
1636{
1/*
2 * Copyright (c) 2008-2011 Atheros Communications Inc.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 1620 unchanged lines hidden (view full) ---

1629 (chainmask == 0x7) && (rate < 0x90))
1630 return 0x3;
1631 else
1632 return chainmask;
1633}
1634
1635static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, int len)
1636{
1637 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
1637 struct ath_hw *ah = sc->sc_ah;
1638 struct ath9k_11n_rate_series series[4];
1639 struct sk_buff *skb;
1640 struct ieee80211_tx_info *tx_info;
1641 struct ieee80211_tx_rate *rates;
1642 const struct ieee80211_rate *rate;
1643 struct ieee80211_hdr *hdr;
1644 int i, flags = 0;
1645 u8 rix = 0, ctsrate = 0;

--- 43 unchanged lines hidden (view full) ---

1689 is_sgi = !!(rates[i].flags & IEEE80211_TX_RC_SHORT_GI);
1690 is_40 = !!(rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH);
1691 is_sp = !!(rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE);
1692
1693 if (rates[i].flags & IEEE80211_TX_RC_MCS) {
1694 /* MCS rates */
1695 series[i].Rate = rix | 0x80;
1696 series[i].ChSel = ath_txchainmask_reduction(sc,
1638 struct ath9k_11n_rate_series series[4];
1639 struct sk_buff *skb;
1640 struct ieee80211_tx_info *tx_info;
1641 struct ieee80211_tx_rate *rates;
1642 const struct ieee80211_rate *rate;
1643 struct ieee80211_hdr *hdr;
1644 int i, flags = 0;
1645 u8 rix = 0, ctsrate = 0;

--- 43 unchanged lines hidden (view full) ---

1689 is_sgi = !!(rates[i].flags & IEEE80211_TX_RC_SHORT_GI);
1690 is_40 = !!(rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH);
1691 is_sp = !!(rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE);
1692
1693 if (rates[i].flags & IEEE80211_TX_RC_MCS) {
1694 /* MCS rates */
1695 series[i].Rate = rix | 0x80;
1696 series[i].ChSel = ath_txchainmask_reduction(sc,
1697 common->tx_chainmask, series[i].Rate);
1697 ah->txchainmask, series[i].Rate);
1698 series[i].PktDuration = ath_pkt_duration(sc, rix, len,
1699 is_40, is_sgi, is_sp);
1700 if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC))
1701 series[i].RateFlags |= ATH9K_RATESERIES_STBC;
1702 continue;
1703 }
1704
1705 /* legacy rates */

--- 8 unchanged lines hidden (view full) ---

1714 if (rate->hw_value_short) {
1715 if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
1716 series[i].Rate |= rate->hw_value_short;
1717 } else {
1718 is_sp = false;
1719 }
1720
1721 if (bf->bf_state.bfs_paprd)
1698 series[i].PktDuration = ath_pkt_duration(sc, rix, len,
1699 is_40, is_sgi, is_sp);
1700 if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC))
1701 series[i].RateFlags |= ATH9K_RATESERIES_STBC;
1702 continue;
1703 }
1704
1705 /* legacy rates */

--- 8 unchanged lines hidden (view full) ---

1714 if (rate->hw_value_short) {
1715 if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
1716 series[i].Rate |= rate->hw_value_short;
1717 } else {
1718 is_sp = false;
1719 }
1720
1721 if (bf->bf_state.bfs_paprd)
1722 series[i].ChSel = common->tx_chainmask;
1722 series[i].ChSel = ah->txchainmask;
1723 else
1724 series[i].ChSel = ath_txchainmask_reduction(sc,
1723 else
1724 series[i].ChSel = ath_txchainmask_reduction(sc,
1725 common->tx_chainmask, series[i].Rate);
1725 ah->txchainmask, series[i].Rate);
1726
1727 series[i].PktDuration = ath9k_hw_computetxtime(sc->sc_ah,
1728 phy, rate->bitrate * 100, len, rix, is_sp);
1729 }
1730
1731 /* For AR5416 - RTS cannot be followed by a frame larger than 8K */
1732 if (bf_isaggr(bf) && (len > sc->sc_ah->caps.rts_aggr_limit))
1733 flags &= ~ATH9K_TXDESC_RTSENA;

--- 740 unchanged lines hidden ---
1726
1727 series[i].PktDuration = ath9k_hw_computetxtime(sc->sc_ah,
1728 phy, rate->bitrate * 100, len, rix, is_sp);
1729 }
1730
1731 /* For AR5416 - RTS cannot be followed by a frame larger than 8K */
1732 if (bf_isaggr(bf) && (len > sc->sc_ah->caps.rts_aggr_limit))
1733 flags &= ~ATH9K_TXDESC_RTSENA;

--- 740 unchanged lines hidden ---