parent
faf45b7316
commit
92e5e35c77
@ -1,38 +0,0 @@ |
||||
--- a/drivers/net/wireless/ath/carl9170/main.c
|
||||
+++ b/drivers/net/wireless/ath/carl9170/main.c
|
||||
@@ -811,16 +811,34 @@ out:
|
||||
}
|
||||
|
||||
static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw,
|
||||
- struct netdev_hw_addr_list *mc_list)
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
+ struct netdev_hw_addr_list *mc_list)
|
||||
+#else
|
||||
+ int mc_count, struct dev_addr_list *ha)
|
||||
+#endif
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
struct netdev_hw_addr *ha;
|
||||
+#else
|
||||
+ int i;
|
||||
+#endif
|
||||
u64 mchash;
|
||||
|
||||
/* always get broadcast frames */
|
||||
mchash = 1ULL << (0xff >> 2);
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
netdev_hw_addr_list_for_each(ha, mc_list)
|
||||
mchash |= 1ULL << (ha->addr[5] >> 2);
|
||||
+#else
|
||||
+ for (i = 0; i < mc_count; i++) {
|
||||
+ if (!ha)
|
||||
+ break;
|
||||
+
|
||||
+ mchash |= 1ULL << (ha->dmi_addr[5] >> 2);
|
||||
+ ha = ha->next;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
return mchash;
|
||||
}
|
@ -1,15 +0,0 @@ |
||||
--- a/include/linux/compat-2.6.33.h
|
||||
+++ b/include/linux/compat-2.6.33.h
|
||||
@@ -98,6 +98,12 @@ int pccard_loop_tuple(struct pcmcia_sock
|
||||
#define kfifo_out(a, b, c) __kfifo_get(*a, b, c)
|
||||
#define kfifo_len(a) __kfifo_len(*a)
|
||||
|
||||
+#define list_for_each_entry_continue_rcu(pos, head, member) \
|
||||
+ for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \
|
||||
+ prefetch(pos->member.next), &pos->member != (head); \
|
||||
+ pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
|
||||
+
|
||||
+
|
||||
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
|
||||
|
||||
#endif /* LINUX_26_33_COMPAT_H */
|
@ -1,69 +0,0 @@ |
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -2574,9 +2574,8 @@ void cfg80211_cqm_rssi_notify(struct net
|
||||
wiphy_printk(KERN_NOTICE, wiphy, format, ##args)
|
||||
#define wiphy_info(wiphy, format, args...) \
|
||||
wiphy_printk(KERN_INFO, wiphy, format, ##args)
|
||||
-
|
||||
-int wiphy_debug(const struct wiphy *wiphy, const char *format, ...)
|
||||
- __attribute__ ((format (printf, 2, 3)));
|
||||
+#define wiphy_debug(wiphy, format, args...) \
|
||||
+ wiphy_printk(KERN_DEBUG, wiphy, format, ##args)
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define wiphy_dbg(wiphy, format, args...) \
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -936,52 +936,3 @@ static void __exit cfg80211_exit(void)
|
||||
destroy_workqueue(cfg80211_wq);
|
||||
}
|
||||
module_exit(cfg80211_exit);
|
||||
-
|
||||
-static int ___wiphy_printk(const char *level, const struct wiphy *wiphy,
|
||||
- struct va_format *vaf)
|
||||
-{
|
||||
- if (!wiphy)
|
||||
- return printk("%s(NULL wiphy *): %pV", level, vaf);
|
||||
-
|
||||
- return printk("%s%s: %pV", level, wiphy_name(wiphy), vaf);
|
||||
-}
|
||||
-
|
||||
-int __wiphy_printk(const char *level, const struct wiphy *wiphy,
|
||||
- const char *fmt, ...)
|
||||
-{
|
||||
- struct va_format vaf;
|
||||
- va_list args;
|
||||
- int r;
|
||||
-
|
||||
- va_start(args, fmt);
|
||||
-
|
||||
- vaf.fmt = fmt;
|
||||
- vaf.va = &args;
|
||||
-
|
||||
- r = ___wiphy_printk(level, wiphy, &vaf);
|
||||
- va_end(args);
|
||||
-
|
||||
- return r;
|
||||
-}
|
||||
-EXPORT_SYMBOL(__wiphy_printk);
|
||||
-
|
||||
-#define define_wiphy_printk_level(func, kern_level) \
|
||||
-int func(const struct wiphy *wiphy, const char *fmt, ...) \
|
||||
-{ \
|
||||
- struct va_format vaf; \
|
||||
- va_list args; \
|
||||
- int r; \
|
||||
- \
|
||||
- va_start(args, fmt); \
|
||||
- \
|
||||
- vaf.fmt = fmt; \
|
||||
- vaf.va = &args; \
|
||||
- \
|
||||
- r = ___wiphy_printk(kern_level, wiphy, &vaf); \
|
||||
- va_end(args); \
|
||||
- \
|
||||
- return r; \
|
||||
-} \
|
||||
-EXPORT_SYMBOL(func);
|
||||
-
|
||||
-define_wiphy_printk_level(wiphy_debug, KERN_DEBUG);
|
@ -1,14 +0,0 @@ |
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -661,7 +661,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
hw->sta_data_size = sizeof(struct ath_node);
|
||||
hw->vif_data_size = sizeof(struct ath_vif);
|
||||
|
||||
+#ifdef ATH9K_USE_MINSTREL
|
||||
+ hw->rate_control_algorithm = "minstrel_ht";
|
||||
+#else
|
||||
hw->rate_control_algorithm = "ath9k_rate_control";
|
||||
+#endif
|
||||
|
||||
if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes))
|
||||
hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
|
@ -1,36 +0,0 @@ |
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -254,7 +254,7 @@ struct ath_atx_tid {
|
||||
struct list_head buf_q;
|
||||
struct ath_node *an;
|
||||
struct ath_atx_ac *ac;
|
||||
- struct ath_buf *tx_buf[ATH_TID_MAX_BUFS];
|
||||
+ unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
|
||||
u16 seq_start;
|
||||
u16 seq_next;
|
||||
u16 baw_size;
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -168,9 +168,9 @@ static void ath_tx_update_baw(struct ath
|
||||
index = ATH_BA_INDEX(tid->seq_start, seqno);
|
||||
cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
|
||||
|
||||
- tid->tx_buf[cindex] = NULL;
|
||||
+ __clear_bit(cindex, tid->tx_buf);
|
||||
|
||||
- while (tid->baw_head != tid->baw_tail && !tid->tx_buf[tid->baw_head]) {
|
||||
+ while (tid->baw_head != tid->baw_tail && !test_bit(tid->baw_head, tid->tx_buf)) {
|
||||
INCR(tid->seq_start, IEEE80211_SEQ_MAX);
|
||||
INCR(tid->baw_head, ATH_TID_MAX_BUFS);
|
||||
}
|
||||
@@ -186,9 +186,7 @@ static void ath_tx_addto_baw(struct ath_
|
||||
|
||||
index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno);
|
||||
cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
|
||||
-
|
||||
- BUG_ON(tid->tx_buf[cindex] != NULL);
|
||||
- tid->tx_buf[cindex] = bf;
|
||||
+ __set_bit(cindex, tid->tx_buf);
|
||||
|
||||
if (index >= ((tid->baw_tail - tid->baw_head) &
|
||||
(ATH_TID_MAX_BUFS - 1))) {
|
@ -1,12 +0,0 @@ |
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -124,7 +124,8 @@ static void ath_tx_resume_tid(struct ath
|
||||
{
|
||||
struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
|
||||
|
||||
- WARN_ON(!tid->paused);
|
||||
+ if (!tid->paused)
|
||||
+ return;
|
||||
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
tid->paused = false;
|
@ -1,55 +0,0 @@ |
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -784,17 +784,23 @@ static void ath_tx_sched_aggr(struct ath
|
||||
status != ATH_AGGR_BAW_CLOSED);
|
||||
}
|
||||
|
||||
-void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||
- u16 tid, u16 *ssn)
|
||||
+int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||
+ u16 tid, u16 *ssn)
|
||||
{
|
||||
struct ath_atx_tid *txtid;
|
||||
struct ath_node *an;
|
||||
|
||||
an = (struct ath_node *)sta->drv_priv;
|
||||
txtid = ATH_AN_2_TID(an, tid);
|
||||
+
|
||||
+ if (txtid->state & (AGGR_CLEANUP | AGGR_ADDBA_COMPLETE))
|
||||
+ return -EAGAIN;
|
||||
+
|
||||
txtid->state |= AGGR_ADDBA_PROGRESS;
|
||||
txtid->paused = true;
|
||||
*ssn = txtid->seq_start;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -346,8 +346,8 @@ void ath_tx_tasklet(struct ath_softc *sc
|
||||
void ath_tx_edma_tasklet(struct ath_softc *sc);
|
||||
void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb);
|
||||
bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, u8 tidno);
|
||||
-void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||
- u16 tid, u16 *ssn);
|
||||
+int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||
+ u16 tid, u16 *ssn);
|
||||
void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
|
||||
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
|
||||
void ath9k_enable_ps(struct ath_softc *sc);
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1968,8 +1968,9 @@ static int ath9k_ampdu_action(struct iee
|
||||
break;
|
||||
case IEEE80211_AMPDU_TX_START:
|
||||
ath9k_ps_wakeup(sc);
|
||||
- ath_tx_aggr_start(sc, sta, tid, ssn);
|
||||
- ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
||||
+ ret = ath_tx_aggr_start(sc, sta, tid, ssn);
|
||||
+ if (!ret)
|
||||
+ ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
||||
ath9k_ps_restore(sc);
|
||||
break;
|
||||
case IEEE80211_AMPDU_TX_STOP:
|
@ -1,131 +0,0 @@ |
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -61,6 +61,8 @@ static int ath_tx_num_badfrms(struct ath
|
||||
struct ath_tx_status *ts, int txok);
|
||||
static void ath_tx_rc_status(struct ath_buf *bf, struct ath_tx_status *ts,
|
||||
int nbad, int txok, bool update_rc);
|
||||
+static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
|
||||
+ int seqno);
|
||||
|
||||
enum {
|
||||
MCS_HT20,
|
||||
@@ -144,18 +146,23 @@ static void ath_tx_flush_tid(struct ath_
|
||||
struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
|
||||
struct ath_buf *bf;
|
||||
struct list_head bf_head;
|
||||
- INIT_LIST_HEAD(&bf_head);
|
||||
+ struct ath_tx_status ts;
|
||||
|
||||
- WARN_ON(!tid->paused);
|
||||
+ INIT_LIST_HEAD(&bf_head);
|
||||
|
||||
+ memset(&ts, 0, sizeof(ts));
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
- tid->paused = false;
|
||||
|
||||
while (!list_empty(&tid->buf_q)) {
|
||||
bf = list_first_entry(&tid->buf_q, struct ath_buf, list);
|
||||
- BUG_ON(bf_isretried(bf));
|
||||
list_move_tail(&bf->list, &bf_head);
|
||||
- ath_tx_send_ht_normal(sc, txq, tid, &bf_head);
|
||||
+
|
||||
+ if (bf_isretried(bf)) {
|
||||
+ ath_tx_update_baw(sc, tid, bf->bf_seqno);
|
||||
+ ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0);
|
||||
+ } else {
|
||||
+ ath_tx_send_ht_normal(sc, txq, tid, &bf_head);
|
||||
+ }
|
||||
}
|
||||
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
@@ -430,7 +437,7 @@ static void ath_tx_complete_aggr(struct
|
||||
list_move_tail(&bf->list, &bf_head);
|
||||
}
|
||||
|
||||
- if (!txpending) {
|
||||
+ if (!txpending || (tid->state & AGGR_CLEANUP)) {
|
||||
/*
|
||||
* complete the acked-ones/xretried ones; update
|
||||
* block-ack window
|
||||
@@ -451,6 +458,7 @@ static void ath_tx_complete_aggr(struct
|
||||
!txfail, sendbar);
|
||||
} else {
|
||||
/* retry the un-acked ones */
|
||||
+
|
||||
if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)) {
|
||||
if (bf->bf_next == NULL && bf_last->bf_stale) {
|
||||
struct ath_buf *tbf;
|
||||
@@ -509,15 +517,12 @@ static void ath_tx_complete_aggr(struct
|
||||
}
|
||||
|
||||
if (tid->state & AGGR_CLEANUP) {
|
||||
+ ath_tx_flush_tid(sc, tid);
|
||||
+
|
||||
if (tid->baw_head == tid->baw_tail) {
|
||||
tid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
tid->state &= ~AGGR_CLEANUP;
|
||||
-
|
||||
- /* send buffered frames as singles */
|
||||
- ath_tx_flush_tid(sc, tid);
|
||||
}
|
||||
- rcu_read_unlock();
|
||||
- return;
|
||||
}
|
||||
|
||||
rcu_read_unlock();
|
||||
@@ -808,12 +813,6 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
struct ath_node *an = (struct ath_node *)sta->drv_priv;
|
||||
struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
|
||||
struct ath_txq *txq = &sc->tx.txq[txtid->ac->qnum];
|
||||
- struct ath_tx_status ts;
|
||||
- struct ath_buf *bf;
|
||||
- struct list_head bf_head;
|
||||
-
|
||||
- memset(&ts, 0, sizeof(ts));
|
||||
- INIT_LIST_HEAD(&bf_head);
|
||||
|
||||
if (txtid->state & AGGR_CLEANUP)
|
||||
return;
|
||||
@@ -823,31 +822,22 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
return;
|
||||
}
|
||||
|
||||
- /* drop all software retried frames and mark this TID */
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
txtid->paused = true;
|
||||
- while (!list_empty(&txtid->buf_q)) {
|
||||
- bf = list_first_entry(&txtid->buf_q, struct ath_buf, list);
|
||||
- if (!bf_isretried(bf)) {
|
||||
- /*
|
||||
- * NB: it's based on the assumption that
|
||||
- * software retried frame will always stay
|
||||
- * at the head of software queue.
|
||||
- */
|
||||
- break;
|
||||
- }
|
||||
- list_move_tail(&bf->list, &bf_head);
|
||||
- ath_tx_update_baw(sc, txtid, bf->bf_seqno);
|
||||
- ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0);
|
||||
- }
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
- if (txtid->baw_head != txtid->baw_tail) {
|
||||
+ /*
|
||||
+ * If frames are still being transmitted for this TID, they will be
|
||||
+ * cleaned up during tx completion. To prevent race conditions, this
|
||||
+ * TID can only be reused after all in-progress subframes have been
|
||||
+ * completed.
|
||||
+ */
|
||||
+ if (txtid->baw_head != txtid->baw_tail)
|
||||
txtid->state |= AGGR_CLEANUP;
|
||||
- } else {
|
||||
+ else
|
||||
txtid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
- ath_tx_flush_tid(sc, txtid);
|
||||
- }
|
||||
+ spin_unlock_bh(&txq->axq_lock);
|
||||
+
|
||||
+ ath_tx_flush_tid(sc, txtid);
|
||||
}
|
||||
|
||||
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
|
Loading…
Reference in new issue