summaryrefslogtreecommitdiff
path: root/package/mac80211/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-06-27 22:32:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-06-27 22:32:51 +0000
commitcbf93f02bacfb1e89626406f3f51b83aab105b87 (patch)
treef6a57f34f5fce97da5d3f7e8b6b973d54a1da44a /package/mac80211/patches
parenta5c684de26f4eea3aac7f164dd641b93332099be (diff)
downloadmtk-20170518-cbf93f02bacfb1e89626406f3f51b83aab105b87.zip
mtk-20170518-cbf93f02bacfb1e89626406f3f51b83aab105b87.tar.gz
mtk-20170518-cbf93f02bacfb1e89626406f3f51b83aab105b87.tar.bz2
ath9k: remove the queue length limiting patch, the approach was experimental, not used by default and a different solution is required
SVN-Revision: 32515
Diffstat (limited to 'package/mac80211/patches')
-rw-r--r--package/mac80211/patches/530-ath9k_fix_initvals.patch (renamed from package/mac80211/patches/531-ath9k_fix_initvals.patch)0
-rw-r--r--package/mac80211/patches/530-ath9k_limit_qlen.patch143
-rw-r--r--package/mac80211/patches/540-ath9k_extra_leds.patch8
3 files changed, 4 insertions, 147 deletions
diff --git a/package/mac80211/patches/531-ath9k_fix_initvals.patch b/package/mac80211/patches/530-ath9k_fix_initvals.patch
index 99121f7..99121f7 100644
--- a/package/mac80211/patches/531-ath9k_fix_initvals.patch
+++ b/package/mac80211/patches/530-ath9k_fix_initvals.patch
diff --git a/package/mac80211/patches/530-ath9k_limit_qlen.patch b/package/mac80211/patches/530-ath9k_limit_qlen.patch
deleted file mode 100644
index 6c85b42..0000000
--- a/package/mac80211/patches/530-ath9k_limit_qlen.patch
+++ /dev/null
@@ -1,143 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -244,6 +244,7 @@ struct ath_atx_tid {
- struct ath_node *an;
- struct ath_atx_ac *ac;
- unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
-+ int buf_pending;
- int bar_index;
- u16 seq_start;
- u16 seq_next;
-@@ -290,6 +291,9 @@ struct ath_tx_control {
- * (axq_qnum).
- */
- struct ath_tx {
-+ u32 qlen_single;
-+ u32 qlen_aggr;
-+
- u16 seq_no;
- u32 txqsetup;
- spinlock_t txbuflock;
---- a/drivers/net/wireless/ath/ath9k/debug.c
-+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1647,6 +1647,10 @@ int ath9k_init_debug(struct ath_hw *ah)
- &fops_interrupt);
- debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
- &fops_xmit);
-+ debugfs_create_u32("qlen_single", S_IRUSR | S_IWUSR,
-+ sc->debug.debugfs_phy, &sc->tx.qlen_single);
-+ debugfs_create_u32("qlen_aggr", S_IRUSR | S_IWUSR,
-+ sc->debug.debugfs_phy, &sc->tx.qlen_aggr);
- debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc,
- &fops_stations);
- debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -393,6 +393,14 @@ static void ath_tx_count_frames(struct a
- }
- }
-
-+static struct ath_atx_tid *ath_get_tid(struct ath_node *an, struct sk_buff *skb)
-+{
-+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
-+ u8 tidno;
-+
-+ tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK;
-+ return ATH_AN_2_TID(an, tidno);
-+}
-
- static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
- struct ath_buf *bf, struct list_head *bf_q,
-@@ -487,6 +495,8 @@ static void ath_tx_complete_aggr(struct
- __skb_queue_head_init(&bf_pending);
-
- ath_tx_count_frames(sc, bf, ts, txok, &nframes, &nbad);
-+ tid->buf_pending -= nframes;
-+
- while (bf) {
- u16 seqno = bf->bf_state.seqno;
-
-@@ -885,6 +895,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_
- ath_tx_addto_baw(sc, tid, seqno);
- bf->bf_state.ndelim = ndelim;
-
-+ tid->buf_pending++;
- __skb_unlink(skb, &tid->buf_q);
- list_add_tail(&bf->list, bf_q);
- if (bf_prev)
-@@ -1740,6 +1751,8 @@ static void ath_tx_send_ampdu(struct ath
- /* Add sub-frame to BAW */
- ath_tx_addto_baw(sc, tid, bf->bf_state.seqno);
-
-+ tid->buf_pending++;
-+
- /* Queue to h/w without aggregation */
- TX_STAT_INC(txctl->txq->axq_qnum, a_queued_hw);
- bf->bf_lastbf = bf;
-@@ -1890,22 +1903,11 @@ error:
-
- /* FIXME: tx power */
- static void ath_tx_start_dma(struct ath_softc *sc, struct sk_buff *skb,
-- struct ath_tx_control *txctl)
-+ struct ath_tx_control *txctl,
-+ struct ath_atx_tid *tid)
- {
- struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
-- struct ath_atx_tid *tid = NULL;
- struct ath_buf *bf;
-- u8 tidno;
--
-- if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) && txctl->an &&
-- ieee80211_is_data_qos(hdr->frame_control)) {
-- tidno = ieee80211_get_qos_ctl(hdr)[0] &
-- IEEE80211_QOS_CTL_TID_MASK;
-- tid = ATH_AN_2_TID(txctl->an, tidno);
--
-- WARN_ON(tid->ac->txq != txctl->txq);
-- }
-
- if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
- /*
-@@ -1937,6 +1939,7 @@ int ath_tx_start(struct ieee80211_hw *hw
- struct ieee80211_vif *vif = info->control.vif;
- struct ath_softc *sc = hw->priv;
- struct ath_txq *txq = txctl->txq;
-+ struct ath_atx_tid *tid = NULL;
- int padpos, padsize;
- int frmlen = skb->len + FCS_LEN;
- int q;
-@@ -1979,6 +1982,24 @@ int ath_tx_start(struct ieee80211_hw *hw
-
- setup_frame_info(hw, skb, frmlen);
-
-+ if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) && txctl->an &&
-+ ieee80211_is_data_qos(hdr->frame_control)) {
-+ tid = ath_get_tid(txctl->an, skb);
-+
-+ WARN_ON(tid->ac->txq != txq);
-+ }
-+
-+ if ((info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
-+ if (sc->tx.qlen_aggr > 0 && skb_queue_len(&tid->buf_q) +
-+ tid->buf_pending >= sc->tx.qlen_aggr)
-+ return -ENOMEM;
-+ } else {
-+ if (sc->tx.qlen_single > 0 &&
-+ txq->axq_depth - txq->axq_ampdu_depth >=
-+ sc->tx.qlen_single)
-+ return -ENOMEM;
-+ }
-+
- /*
- * At this point, the vif, hw_key and sta pointers in the tx control
- * info are no longer valid (overwritten by the ath_frame_info data.
-@@ -1993,7 +2014,7 @@ int ath_tx_start(struct ieee80211_hw *hw
- txq->stopped = true;
- }
-
-- ath_tx_start_dma(sc, skb, txctl);
-+ ath_tx_start_dma(sc, skb, txctl, tid);
-
- ath_txq_unlock(sc, txq);
-
diff --git a/package/mac80211/patches/540-ath9k_extra_leds.patch b/package/mac80211/patches/540-ath9k_extra_leds.patch
index c0a7317..dbda5ef 100644
--- a/package/mac80211/patches/540-ath9k_extra_leds.patch
+++ b/package/mac80211/patches/540-ath9k_extra_leds.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -523,6 +523,9 @@ static inline u16 ath9k_btcoex_aggr_limi
+@@ -519,6 +519,9 @@ static inline u16 ath9k_btcoex_aggr_limi
#ifdef CONFIG_MAC80211_LEDS
void ath_init_leds(struct ath_softc *sc);
void ath_deinit_leds(struct ath_softc *sc);
@@ -10,7 +10,7 @@
#else
static inline void ath_init_leds(struct ath_softc *sc)
{
-@@ -641,6 +644,13 @@ struct ath9k_vif_iter_data {
+@@ -637,6 +640,13 @@ struct ath9k_vif_iter_data {
int nadhocs; /* number of adhoc vifs */
};
@@ -24,7 +24,7 @@
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
-@@ -682,9 +692,8 @@ struct ath_softc {
+@@ -678,9 +688,8 @@ struct ath_softc {
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
#ifdef CONFIG_MAC80211_LEDS
@@ -244,7 +244,7 @@
#ifdef CONFIG_ATH9K_MAC_DEBUG
void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
-@@ -1685,6 +1740,11 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1681,6 +1736,11 @@ int ath9k_init_debug(struct ath_hw *ah)
&fops_samps);
#endif