mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 19:25:21 +02:00
mac80211: update to wireless-testing 2010-09-28
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23149 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
dd6dd54f83
commit
47aae06f26
@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2010-09-14
|
||||
PKG_VERSION:=2010-09-28
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
||||
# http://wireless.kernel.org/download/compat-wireless-2.6
|
||||
PKG_MD5SUM:=88511287e013ff0f2843b3679f52f335
|
||||
PKG_MD5SUM:=c1b4ebcb61a59824493ec35f799f8393
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -297,8 +297,8 @@ endif #CONFIG_SSB
|
||||
@@ -300,8 +300,8 @@ endif #CONFIG_SSB
|
||||
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
ifeq ($(CONFIG_MAC80211),y)
|
||||
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
|
||||
@@ -572,8 +572,8 @@ endif #CONFIG_COMPAT_KERNEL_27
|
||||
@@ -585,8 +585,8 @@ endif #CONFIG_COMPAT_KERNEL_27
|
||||
# We need the backported rfkill module on kernel < 2.6.31.
|
||||
# In more recent kernel versions use the in kernel rfkill module.
|
||||
ifdef CONFIG_COMPAT_KERNEL_31
|
||||
|
@ -19,8 +19,8 @@
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -280,21 +279,6 @@ endif #CONFIG_WEXT_PRIV
|
||||
endif #CONFIG_WEXT_SPY
|
||||
@@ -283,21 +282,6 @@ CONFIG_IPW2200_QOS=y
|
||||
# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
|
||||
endif #CONFIG_WIRELESS_EXT
|
||||
|
||||
-ifdef CONFIG_SSB
|
||||
@ -41,7 +41,7 @@
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
# CONFIG_B44=m
|
||||
@@ -474,7 +458,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
@@ -485,7 +469,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
|
||||
ifdef CONFIG_MMC
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
endif
|
||||
|
||||
# mac80211 test driver
|
||||
@@ -311,13 +311,13 @@ endif #CONFIG_CRC_ITU_T
|
||||
@@ -314,13 +314,13 @@ endif #CONFIG_CRC_ITU_T
|
||||
CONFIG_MWL8K=m
|
||||
|
||||
# Ethernet drivers go here
|
||||
@ -28,7 +28,7 @@
|
||||
endif #CONFIG_COMPAT_KERNEL_27
|
||||
|
||||
ifdef CONFIG_WIRELESS_EXT
|
||||
@@ -372,17 +372,17 @@ CONFIG_ZD1211RW=m
|
||||
@@ -371,17 +371,17 @@ CONFIG_ZD1211RW=m
|
||||
# Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
|
||||
# it also requires new RNDIS_HOST and CDC_ETHER modules which we add
|
||||
ifdef CONFIG_COMPAT_KERNEL_29
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
# enable mesh networking too
|
||||
CONFIG_MAC80211_MESH=y
|
||||
@@ -233,7 +233,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
|
||||
@@ -240,7 +240,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifdef CONFIG_PCMCIA
|
||||
CONFIG_B43_PCMCIA=y
|
||||
endif #CONFIG_PCMCIA
|
||||
@ -18,7 +18,7 @@
|
||||
CONFIG_B43_PHY_LP=y
|
||||
CONFIG_B43_NPHY=y
|
||||
# CONFIG_B43_FORCE_PIO=y
|
||||
@@ -242,7 +242,7 @@ CONFIG_B43_NPHY=y
|
||||
@@ -249,7 +249,7 @@ CONFIG_B43_NPHY=y
|
||||
CONFIG_B43LEGACY=m
|
||||
CONFIG_B43LEGACY_HWRNG=y
|
||||
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
|
||||
@ -27,7 +27,7 @@
|
||||
# CONFIG_B43LEGACY_DEBUG=y
|
||||
CONFIG_B43LEGACY_DMA=y
|
||||
CONFIG_B43LEGACY_PIO=y
|
||||
@@ -529,7 +529,7 @@ endif
|
||||
@@ -542,7 +542,7 @@ endif
|
||||
|
||||
# p54
|
||||
CONFIG_P54_COMMON=m
|
||||
|
@ -9,7 +9,7 @@
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -214,7 +214,7 @@ CONFIG_B43=m
|
||||
@@ -221,7 +221,7 @@ CONFIG_B43=m
|
||||
CONFIG_B43_HWRNG=y
|
||||
CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifdef CONFIG_PCMCIA
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -441,7 +441,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
@@ -452,7 +452,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
|
||||
ifdef CONFIG_MMC
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -218,7 +218,7 @@ ifdef CONFIG_PCMCIA
|
||||
@@ -225,7 +225,7 @@ ifdef CONFIG_PCMCIA
|
||||
endif #CONFIG_PCMCIA
|
||||
# CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -271,12 +271,12 @@ CONFIG_RTL8180=m
|
||||
@@ -274,12 +274,12 @@ CONFIG_RTL8180=m
|
||||
|
||||
CONFIG_ADM8211=m
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
# CONFIG_RT2800PCI_RT30XX=y
|
||||
# CONFIG_RT2800PCI_RT35XX=y
|
||||
# CONFIG_RT2800PCI_SOC=y
|
||||
@@ -391,7 +391,7 @@ CONFIG_RT2800USB_RT30XX=y
|
||||
@@ -402,7 +402,7 @@ CONFIG_RT2800USB_RT30XX=y
|
||||
CONFIG_RT2800USB_RT35XX=y
|
||||
CONFIG_RT2800USB_UNKNOWN=y
|
||||
endif #CONFIG_CRC_CCITT
|
||||
|
@ -3,7 +3,7 @@
|
||||
@@ -112,7 +112,7 @@ CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
|
||||
# This is the one used by our compat-wireless net/mac80211/rate.c
|
||||
# in case you have and old kernel which is overriding this to pid.
|
||||
CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel
|
||||
CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
|
||||
-CONFIG_MAC80211_RC_PID=y
|
||||
+# CONFIG_MAC80211_RC_PID=y
|
||||
CONFIG_MAC80211_RC_MINSTREL=y
|
||||
|
@ -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,8 +1,8 @@
|
||||
--- a/include/linux/compat-2.6.36.h
|
||||
+++ b/include/linux/compat-2.6.36.h
|
||||
@@ -15,6 +15,8 @@ struct va_format {
|
||||
|
||||
#define device_rename(dev, new_name) device_rename(dev, (char *)new_name)
|
||||
@@ -56,6 +56,8 @@ static inline int pcmcia_write_config_by
|
||||
return pcmcia_access_configuration_register(p_dev, ®);
|
||||
}
|
||||
|
||||
+#define PCI_EEPROM_WIDTH_93C86 8
|
||||
+
|
||||
|
@ -31,3 +31,14 @@
|
||||
#if 0
|
||||
extern void usb_poison_urb(struct urb *urb);
|
||||
#endif
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -389,7 +389,7 @@ endif #CONFIG_COMPAT_KERNEL_29
|
||||
# This activates a threading fix for usb urb.
|
||||
# this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
|
||||
# This fix will be included in some stable releases.
|
||||
-CONFIG_COMPAT_USB_URB_THREAD_FIX=y
|
||||
+# CONFIG_COMPAT_USB_URB_THREAD_FIX=y
|
||||
|
||||
CONFIG_ATH9K_HTC=m
|
||||
# CONFIG_ATH9K_HTC_DEBUGFS=y
|
||||
|
@ -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);
|
@ -17,7 +17,7 @@
|
||||
|
||||
common = ath9k_hw_common(ah);
|
||||
common->ops = &ath9k_common_ops;
|
||||
@@ -677,6 +680,24 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
@@ -680,6 +683,24 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -695,6 +716,9 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -698,6 +719,9 @@ int ath9k_init_device(u16 devid, struct
|
||||
common = ath9k_hw_common(ah);
|
||||
ath9k_set_hw_capab(sc, hw);
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
ath9k_reg_notifier);
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -643,6 +643,8 @@ struct ath_softc {
|
||||
@@ -641,6 +641,8 @@ struct ath_softc {
|
||||
|
||||
int beacon_interval;
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -460,6 +460,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
@@ -459,6 +459,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
|
||||
#define ATH_LED_PIN_DEF 1
|
||||
#define ATH_LED_PIN_9287 8
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -897,6 +897,53 @@ static const struct file_operations fops
|
||||
@@ -930,6 +930,53 @@ static const struct file_operations fops
|
||||
.owner = THIS_MODULE
|
||||
};
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -960,6 +1007,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -993,6 +1040,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
|
||||
goto err;
|
||||
|
@ -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
Block a user