aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-08-13 10:35:14 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-08-13 10:35:14 +0000
commit339fd0a8e13f237a67685d224a9cfb36d157fc62 (patch)
treed8f26b6a25f9511f3ef9b5f59d4d25b30392039b /package/kernel/mac80211
parent6d651b4e3d6de30fd31fce25fa8e4b4b39b2b3a7 (diff)
downloadupstream-339fd0a8e13f237a67685d224a9cfb36d157fc62.tar.gz
upstream-339fd0a8e13f237a67685d224a9cfb36d157fc62.tar.bz2
upstream-339fd0a8e13f237a67685d224a9cfb36d157fc62.zip
ath9k: reorganize patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37766 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/patches/300-pending_work.patch105
-rw-r--r--package/kernel/mac80211/patches/511-ath9k_reduce_rxbuf.patch2
-rw-r--r--package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch4
-rw-r--r--package/kernel/mac80211/patches/522-ath9k_per_chain_signal_strength.patch6
-rw-r--r--package/kernel/mac80211/patches/530-ath9k_extra_leds.patch6
-rw-r--r--package/kernel/mac80211/patches/540-ath9k_reduce_ani_interval.patch (renamed from package/kernel/mac80211/patches/550-ath9k_reduce_ani_interval.patch)0
-rw-r--r--package/kernel/mac80211/patches/541-ath9k_optimize_interrupt_mitigation.patch30
-rw-r--r--package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch (renamed from package/kernel/mac80211/patches/552-ath9k_rx_dma_stop_check.patch)0
-rw-r--r--package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch (renamed from package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch)0
-rw-r--r--package/kernel/mac80211/patches/543-ath9k-allow-to-disable-bands-via-platform-data.patch (renamed from package/kernel/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch)0
-rw-r--r--package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch13
-rw-r--r--package/kernel/mac80211/patches/556-ath9k_fix_rx_race.patch82
12 files changed, 108 insertions, 140 deletions
diff --git a/package/kernel/mac80211/patches/300-pending_work.patch b/package/kernel/mac80211/patches/300-pending_work.patch
index 4ec4423c6b..f6ef30e633 100644
--- a/package/kernel/mac80211/patches/300-pending_work.patch
+++ b/package/kernel/mac80211/patches/300-pending_work.patch
@@ -2235,7 +2235,18 @@
#define REALTEK_USB_VENQT_WRITE 0x40
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -137,7 +137,8 @@ int ath_descdma_setup(struct ath_softc *
+@@ -79,10 +79,6 @@ struct ath_config {
+ sizeof(struct ath_buf_state)); \
+ } while (0)
+
+-#define ATH_RXBUF_RESET(_bf) do { \
+- (_bf)->bf_stale = false; \
+- } while (0)
+-
+ /**
+ * enum buffer_type - Buffer type flags
+ *
+@@ -137,7 +133,8 @@ int ath_descdma_setup(struct ath_softc *
#define ATH_AGGR_ENCRYPTDELIM 10
/* minimum h/w qdepth to be sustained to maximize aggregation */
#define ATH_AGGR_MIN_QDEPTH 2
@@ -2245,7 +2256,7 @@
#define IEEE80211_SEQ_SEQ_SHIFT 4
#define IEEE80211_SEQ_MAX 4096
-@@ -174,12 +175,6 @@ int ath_descdma_setup(struct ath_softc *
+@@ -174,12 +171,6 @@ int ath_descdma_setup(struct ath_softc *
#define ATH_TX_COMPLETE_POLL_INT 1000
@@ -2258,7 +2269,7 @@
#define ATH_TXFIFO_DEPTH 8
struct ath_txq {
int mac80211_qnum; /* mac80211 queue number, -1 means not mac80211 Q */
-@@ -212,8 +207,9 @@ struct ath_frame_info {
+@@ -212,8 +203,9 @@ struct ath_frame_info {
int framelen;
enum ath9k_key_type keytype;
u8 keyix;
@@ -2269,7 +2280,7 @@
};
struct ath_buf_state {
-@@ -241,6 +237,7 @@ struct ath_buf {
+@@ -241,6 +233,7 @@ struct ath_buf {
struct ath_atx_tid {
struct list_head list;
struct sk_buff_head buf_q;
@@ -2277,7 +2288,7 @@
struct ath_node *an;
struct ath_atx_ac *ac;
unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
-@@ -268,6 +265,7 @@ struct ath_node {
+@@ -268,6 +261,7 @@ struct ath_node {
u8 mpdudensity;
bool sleeping;
@@ -2285,7 +2296,15 @@
#if defined(CPTCFG_MAC80211_DEBUGFS) && defined(CPTCFG_ATH9K_DEBUGFS)
struct dentry *node_stat;
-@@ -367,6 +365,7 @@ void ath9k_release_buffered_frames(struc
+@@ -317,6 +311,7 @@ struct ath_rx {
+ struct ath_descdma rxdma;
+ struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX];
+
++ struct ath_buf *buf_hold;
+ struct sk_buff *frag;
+
+ u32 ampdu_ref;
+@@ -367,6 +362,7 @@ void ath9k_release_buffered_frames(struc
/********/
struct ath_vif {
@@ -2374,3 +2393,77 @@
ibss_dbg(sdata, "sta_find_ibss: did not try to join ibss\n");
/* Selected IBSS not found in current scan results - try to scan */
+--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+@@ -1173,6 +1173,10 @@ skip_ws_det:
+ * is_on == 0 means MRC CCK is OFF (more noise imm)
+ */
+ bool is_on = param ? 1 : 0;
++
++ if (ah->caps.rx_chainmask == 1)
++ break;
++
+ REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
+ AR_PHY_MRC_CCK_ENABLE, is_on);
+ REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
+--- a/drivers/net/wireless/ath/ath9k/recv.c
++++ b/drivers/net/wireless/ath/ath9k/recv.c
+@@ -42,8 +42,6 @@ static void ath_rx_buf_link(struct ath_s
+ struct ath_desc *ds;
+ struct sk_buff *skb;
+
+- ATH_RXBUF_RESET(bf);
+-
+ ds = bf->bf_desc;
+ ds->ds_link = 0; /* link to null */
+ ds->ds_data = bf->bf_buf_addr;
+@@ -70,6 +68,14 @@ static void ath_rx_buf_link(struct ath_s
+ sc->rx.rxlink = &ds->ds_link;
+ }
+
++static void ath_rx_buf_relink(struct ath_softc *sc, struct ath_buf *bf)
++{
++ if (sc->rx.buf_hold)
++ ath_rx_buf_link(sc, sc->rx.buf_hold);
++
++ sc->rx.buf_hold = bf;
++}
++
+ static void ath_setdefantenna(struct ath_softc *sc, u32 antenna)
+ {
+ /* XXX block beacon interrupts */
+@@ -117,7 +123,6 @@ static bool ath_rx_edma_buf_link(struct
+
+ skb = bf->bf_mpdu;
+
+- ATH_RXBUF_RESET(bf);
+ memset(skb->data, 0, ah->caps.rx_status_len);
+ dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
+ ah->caps.rx_status_len, DMA_TO_DEVICE);
+@@ -432,6 +437,7 @@ int ath_startrecv(struct ath_softc *sc)
+ if (list_empty(&sc->rx.rxbuf))
+ goto start_recv;
+
++ sc->rx.buf_hold = NULL;
+ sc->rx.rxlink = NULL;
+ list_for_each_entry_safe(bf, tbf, &sc->rx.rxbuf, list) {
+ ath_rx_buf_link(sc, bf);
+@@ -677,6 +683,9 @@ static struct ath_buf *ath_get_next_rx_b
+ }
+
+ bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list);
++ if (bf == sc->rx.buf_hold)
++ return NULL;
++
+ ds = bf->bf_desc;
+
+ /*
+@@ -1375,7 +1384,7 @@ requeue:
+ if (edma) {
+ ath_rx_edma_buf_link(sc, qtype);
+ } else {
+- ath_rx_buf_link(sc, bf);
++ ath_rx_buf_relink(sc, bf);
+ ath9k_hw_rxena(ah);
+ }
+ } while (1);
diff --git a/package/kernel/mac80211/patches/511-ath9k_reduce_rxbuf.patch b/package/kernel/mac80211/patches/511-ath9k_reduce_rxbuf.patch
index 8d8c5fd7fe..273b68381f 100644
--- a/package/kernel/mac80211/patches/511-ath9k_reduce_rxbuf.patch
+++ b/package/kernel/mac80211/patches/511-ath9k_reduce_rxbuf.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -119,7 +119,7 @@ int ath_descdma_setup(struct ath_softc *
+@@ -115,7 +115,7 @@ int ath_descdma_setup(struct ath_softc *
/* RX / TX */
/***********/
diff --git a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
index d09306f3ef..87aaf3061c 100644
--- a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
+++ b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -700,6 +700,7 @@ struct ath_softc {
+@@ -697,6 +697,7 @@ struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
@@ -8,7 +8,7 @@
struct survey_info *cur_survey;
struct survey_info survey[ATH9K_NUM_CHANNELS];
-@@ -904,6 +905,7 @@ struct fft_sample_ht20 {
+@@ -901,6 +902,7 @@ struct fft_sample_ht20 {
u8 data[SPECTRAL_HT20_NUM_BINS];
} __packed;
diff --git a/package/kernel/mac80211/patches/522-ath9k_per_chain_signal_strength.patch b/package/kernel/mac80211/patches/522-ath9k_per_chain_signal_strength.patch
index 50dbcd9902..b6075a8144 100644
--- a/package/kernel/mac80211/patches/522-ath9k_per_chain_signal_strength.patch
+++ b/package/kernel/mac80211/patches/522-ath9k_per_chain_signal_strength.patch
@@ -17,7 +17,7 @@
u8 rs_num_delims;
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
-@@ -939,6 +939,7 @@ static int ath9k_rx_skb_preprocess(struc
+@@ -948,6 +948,7 @@ static int ath9k_rx_skb_preprocess(struc
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
bool discard_current = sc->rx.discard_next;
@@ -25,7 +25,7 @@
sc->rx.discard_next = rx_stats->rs_more;
if (discard_current)
-@@ -968,6 +969,21 @@ static int ath9k_rx_skb_preprocess(struc
+@@ -977,6 +978,21 @@ static int ath9k_rx_skb_preprocess(struc
if (rx_stats->rs_moreaggr)
rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
@@ -47,7 +47,7 @@
sc->rx.discard_next = false;
return 0;
}
-@@ -1077,7 +1093,7 @@ static int ath_process_fft(struct ath_so
+@@ -1086,7 +1102,7 @@ static int ath_process_fft(struct ath_so
fft_sample.tlv.length = __cpu_to_be16(length);
fft_sample.freq = __cpu_to_be16(ah->curchan->chan->center_freq);
diff --git a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
index 79eb9c84c9..f595059027 100644
--- a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
+++ b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -556,6 +556,9 @@ struct ath9k_wow_pattern {
+@@ -553,6 +553,9 @@ struct ath9k_wow_pattern {
void ath_init_leds(struct ath_softc *sc);
void ath_deinit_leds(struct ath_softc *sc);
void ath_fill_led_pin(struct ath_softc *sc);
@@ -10,7 +10,7 @@
#else
static inline void ath_init_leds(struct ath_softc *sc)
{
-@@ -696,6 +699,13 @@ enum spectral_mode {
+@@ -693,6 +696,13 @@ enum spectral_mode {
SPECTRAL_CHANSCAN,
};
@@ -24,7 +24,7 @@
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
-@@ -738,9 +748,8 @@ struct ath_softc {
+@@ -735,9 +745,8 @@ struct ath_softc {
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
#ifdef CPTCFG_MAC80211_LEDS
diff --git a/package/kernel/mac80211/patches/550-ath9k_reduce_ani_interval.patch b/package/kernel/mac80211/patches/540-ath9k_reduce_ani_interval.patch
index 7c24f46f67..7c24f46f67 100644
--- a/package/kernel/mac80211/patches/550-ath9k_reduce_ani_interval.patch
+++ b/package/kernel/mac80211/patches/540-ath9k_reduce_ani_interval.patch
diff --git a/package/kernel/mac80211/patches/541-ath9k_optimize_interrupt_mitigation.patch b/package/kernel/mac80211/patches/541-ath9k_optimize_interrupt_mitigation.patch
deleted file mode 100644
index 95ceb3575d..0000000000
--- a/package/kernel/mac80211/patches/541-ath9k_optimize_interrupt_mitigation.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
-@@ -241,21 +241,19 @@ static bool ar9003_hw_get_isr(struct ath
-
- *masked = isr & ATH9K_INT_COMMON;
-
-- if (ah->config.rx_intr_mitigation)
-+ if (ah->config.rx_intr_mitigation) {
- if (isr & (AR_ISR_RXMINTR | AR_ISR_RXINTM))
- *masked |= ATH9K_INT_RXLP;
--
-- if (ah->config.tx_intr_mitigation)
-- if (isr & (AR_ISR_TXMINTR | AR_ISR_TXINTM))
-- *masked |= ATH9K_INT_TX;
--
-- if (isr & (AR_ISR_LP_RXOK | AR_ISR_RXERR))
-+ } else if (isr & (AR_ISR_LP_RXOK | AR_ISR_RXERR))
- *masked |= ATH9K_INT_RXLP;
-
- if (isr & AR_ISR_HP_RXOK)
- *masked |= ATH9K_INT_RXHP;
-
-- if (isr & (AR_ISR_TXOK | AR_ISR_TXERR | AR_ISR_TXEOL)) {
-+ if (ah->config.tx_intr_mitigation) {
-+ if (isr & (AR_ISR_TXMINTR | AR_ISR_TXINTM))
-+ *masked |= ATH9K_INT_TX;
-+ } else if (isr & (AR_ISR_TXOK | AR_ISR_TXERR | AR_ISR_TXEOL)) {
- *masked |= ATH9K_INT_TX;
-
- if (!(pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED)) {
diff --git a/package/kernel/mac80211/patches/552-ath9k_rx_dma_stop_check.patch b/package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch
index 5d063c7d65..5d063c7d65 100644
--- a/package/kernel/mac80211/patches/552-ath9k_rx_dma_stop_check.patch
+++ b/package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch
diff --git a/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
index b069cb2cdb..b069cb2cdb 100644
--- a/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch
+++ b/package/kernel/mac80211/patches/542-ath9k_debugfs_diag.patch
diff --git a/package/kernel/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch b/package/kernel/mac80211/patches/543-ath9k-allow-to-disable-bands-via-platform-data.patch
index c5b90af68c..c5b90af68c 100644
--- a/package/kernel/mac80211/patches/555-ath9k-allow-to-disable-bands-via-platform-data.patch
+++ b/package/kernel/mac80211/patches/543-ath9k-allow-to-disable-bands-via-platform-data.patch
diff --git a/package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch b/package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch
deleted file mode 100644
index 47df721322..0000000000
--- a/package/kernel/mac80211/patches/554-ath9k_ani_mrc_fix.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
-+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
-@@ -1173,6 +1173,10 @@ skip_ws_det:
- * is_on == 0 means MRC CCK is OFF (more noise imm)
- */
- bool is_on = param ? 1 : 0;
-+
-+ if (ah->caps.rx_chainmask == 1)
-+ break;
-+
- REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
- AR_PHY_MRC_CCK_ENABLE, is_on);
- REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
diff --git a/package/kernel/mac80211/patches/556-ath9k_fix_rx_race.patch b/package/kernel/mac80211/patches/556-ath9k_fix_rx_race.patch
deleted file mode 100644
index 3e5347dfb3..0000000000
--- a/package/kernel/mac80211/patches/556-ath9k_fix_rx_race.patch
+++ /dev/null
@@ -1,82 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -79,10 +79,6 @@ struct ath_config {
- sizeof(struct ath_buf_state)); \
- } while (0)
-
--#define ATH_RXBUF_RESET(_bf) do { \
-- (_bf)->bf_stale = false; \
-- } while (0)
--
- /**
- * enum buffer_type - Buffer type flags
- *
-@@ -315,6 +311,7 @@ struct ath_rx {
- struct ath_descdma rxdma;
- struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX];
-
-+ struct ath_buf *buf_hold;
- struct sk_buff *frag;
-
- u32 ampdu_ref;
---- a/drivers/net/wireless/ath/ath9k/recv.c
-+++ b/drivers/net/wireless/ath/ath9k/recv.c
-@@ -42,8 +42,6 @@ static void ath_rx_buf_link(struct ath_s
- struct ath_desc *ds;
- struct sk_buff *skb;
-
-- ATH_RXBUF_RESET(bf);
--
- ds = bf->bf_desc;
- ds->ds_link = 0; /* link to null */
- ds->ds_data = bf->bf_buf_addr;
-@@ -70,6 +68,14 @@ static void ath_rx_buf_link(struct ath_s
- sc->rx.rxlink = &ds->ds_link;
- }
-
-+static void ath_rx_buf_relink(struct ath_softc *sc, struct ath_buf *bf)
-+{
-+ if (sc->rx.buf_hold)
-+ ath_rx_buf_link(sc, sc->rx.buf_hold);
-+
-+ sc->rx.buf_hold = bf;
-+}
-+
- static void ath_setdefantenna(struct ath_softc *sc, u32 antenna)
- {
- /* XXX block beacon interrupts */
-@@ -117,7 +123,6 @@ static bool ath_rx_edma_buf_link(struct
-
- skb = bf->bf_mpdu;
-
-- ATH_RXBUF_RESET(bf);
- memset(skb->data, 0, ah->caps.rx_status_len);
- dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
- ah->caps.rx_status_len, DMA_TO_DEVICE);
-@@ -432,6 +437,7 @@ int ath_startrecv(struct ath_softc *sc)
- if (list_empty(&sc->rx.rxbuf))
- goto start_recv;
-
-+ sc->rx.buf_hold = NULL;
- sc->rx.rxlink = NULL;
- list_for_each_entry_safe(bf, tbf, &sc->rx.rxbuf, list) {
- ath_rx_buf_link(sc, bf);
-@@ -677,6 +683,9 @@ static struct ath_buf *ath_get_next_rx_b
- }
-
- bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list);
-+ if (bf == sc->rx.buf_hold)
-+ return NULL;
-+
- ds = bf->bf_desc;
-
- /*
-@@ -1391,7 +1400,7 @@ requeue:
- if (edma) {
- ath_rx_edma_buf_link(sc, qtype);
- } else {
-- ath_rx_buf_link(sc, bf);
-+ ath_rx_buf_relink(sc, bf);
- ath9k_hw_rxena(ah);
- }
- } while (1);