mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 15:56:49 +00:00
mac80211: update to wireless-testing 2010-02-07
SVN-Revision: 25425
This commit is contained in:
parent
b32ae97fd6
commit
d807f70e47
@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=mac80211
|
PKG_NAME:=mac80211
|
||||||
|
|
||||||
PKG_VERSION:=2011-01-24
|
PKG_VERSION:=2011-02-07
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||||
PKG_MD5SUM:=c91b57972276b26824d4b18e927a9e5f
|
PKG_MD5SUM:=a194610426c81ed5ad71ee83330c9669
|
||||||
|
|
||||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||||
|
@ -186,24 +186,3 @@
|
|||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
--- a/drivers/net/wireless/ath/main.c
|
|
||||||
+++ b/drivers/net/wireless/ath/main.c
|
|
||||||
@@ -60,16 +60,13 @@ EXPORT_SYMBOL(ath_rxbuf_alloc);
|
|
||||||
int ath_printk(const char *level, struct ath_common *common,
|
|
||||||
const char *fmt, ...)
|
|
||||||
{
|
|
||||||
- struct va_format vaf;
|
|
||||||
va_list args;
|
|
||||||
int rtn;
|
|
||||||
|
|
||||||
va_start(args, fmt);
|
|
||||||
|
|
||||||
- vaf.fmt = fmt;
|
|
||||||
- vaf.va = &args;
|
|
||||||
-
|
|
||||||
- rtn = printk("%sath: %pV", level, &vaf);
|
|
||||||
+ printk("%sath: ", level);
|
|
||||||
+ rtn = vprintk(fmt, args);
|
|
||||||
|
|
||||||
va_end(args);
|
|
||||||
|
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
--- a/include/linux/compat-2.6.38.h
|
|
||||||
+++ b/include/linux/compat-2.6.38.h
|
|
||||||
@@ -8,23 +8,6 @@
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
|
|
||||||
-/*
|
|
||||||
- * This is not part of The 2.6.37 kernel yet but we
|
|
||||||
- * we use it to optimize the backport code we
|
|
||||||
- * need to implement. Instead of using ifdefs
|
|
||||||
- * to check what version of the check we use
|
|
||||||
- * we just replace all checks on current code
|
|
||||||
- * with this. I'll submit this upstream too, that
|
|
||||||
- * way all we'd have to do is to implement this
|
|
||||||
- * for older kernels, then we would not have to
|
|
||||||
- * edit the upstrema code for backport efforts.
|
|
||||||
- */
|
|
||||||
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
|
|
||||||
-#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT)
|
|
||||||
-#else
|
|
||||||
-#define br_port_exists(dev) (dev->br_port)
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
/* rename member in struct mmc_host in include/linux/mmc/host.h */
|
|
||||||
#define max_segs max_hw_segs
|
|
||||||
|
|
||||||
--- a/include/linux/compat-2.6.h
|
|
||||||
+++ b/include/linux/compat-2.6.h
|
|
||||||
@@ -32,4 +32,21 @@
|
|
||||||
#include <linux/compat-2.6.37.h>
|
|
||||||
#include <linux/compat-2.6.38.h>
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * This is not part of The 2.6.37 kernel yet but we
|
|
||||||
+ * we use it to optimize the backport code we
|
|
||||||
+ * need to implement. Instead of using ifdefs
|
|
||||||
+ * to check what version of the check we use
|
|
||||||
+ * we just replace all checks on current code
|
|
||||||
+ * with this. I'll submit this upstream too, that
|
|
||||||
+ * way all we'd have to do is to implement this
|
|
||||||
+ * for older kernels, then we would not have to
|
|
||||||
+ * edit the upstrema code for backport efforts.
|
|
||||||
+ */
|
|
||||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
|
|
||||||
+#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT)
|
|
||||||
+#else
|
|
||||||
+#define br_port_exists(dev) (dev->br_port)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#endif /* LINUX_26_COMPAT_H */
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||||
@@ -1200,6 +1200,12 @@ int ath9k_init_debug(struct ath_hw *ah)
|
@@ -1091,6 +1091,12 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||||
sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
|
sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@
|
|||||||
struct ar5416IniArray iniCommon;
|
struct ar5416IniArray iniCommon;
|
||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -1175,6 +1175,20 @@ static bool ath9k_hw_channel_change(stru
|
@@ -1213,6 +1213,20 @@ static bool ath9k_hw_channel_change(stru
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@
|
|||||||
bool ath9k_hw_check_alive(struct ath_hw *ah)
|
bool ath9k_hw_check_alive(struct ath_hw *ah)
|
||||||
{
|
{
|
||||||
int count = 50;
|
int count = 50;
|
||||||
@@ -1463,6 +1477,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
@@ -1501,6 +1515,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||||
if (AR_SREV_9300_20_OR_LATER(ah))
|
if (AR_SREV_9300_20_OR_LATER(ah))
|
||||||
ar9003_hw_bb_watchdog_config(ah);
|
ar9003_hw_bb_watchdog_config(ah);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/regd.c
|
--- a/drivers/net/wireless/ath/regd.c
|
||||||
+++ b/drivers/net/wireless/ath/regd.c
|
+++ b/drivers/net/wireless/ath/regd.c
|
||||||
@@ -185,6 +185,10 @@ ath_reg_apply_beaconing_flags(struct wip
|
@@ -192,6 +192,10 @@ ath_reg_apply_beaconing_flags(struct wip
|
||||||
u32 bandwidth = 0;
|
u32 bandwidth = 0;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||||
|
|
||||||
if (!wiphy->bands[band])
|
if (!wiphy->bands[band])
|
||||||
@@ -244,6 +248,10 @@ ath_reg_apply_active_scan_flags(struct w
|
@@ -251,6 +255,10 @@ ath_reg_apply_active_scan_flags(struct w
|
||||||
u32 bandwidth = 0;
|
u32 bandwidth = 0;
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
sband = wiphy->bands[IEEE80211_BAND_2GHZ];
|
sband = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -291,6 +299,10 @@ static void ath_reg_apply_radar_flags(st
|
@@ -298,6 +306,10 @@ static void ath_reg_apply_radar_flags(st
|
||||||
struct ieee80211_channel *ch;
|
struct ieee80211_channel *ch;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
@ -33,7 +33,7 @@
|
|||||||
if (!wiphy->bands[IEEE80211_BAND_5GHZ])
|
if (!wiphy->bands[IEEE80211_BAND_5GHZ])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -457,6 +469,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
@@ -464,6 +476,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||||
{
|
{
|
||||||
const struct ieee80211_regdomain *regd;
|
const struct ieee80211_regdomain *regd;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||||
@@ -1007,6 +1007,53 @@ static const struct file_operations fops
|
@@ -1027,6 +1027,53 @@ static const struct file_operations fops
|
||||||
.llseek = default_llseek,
|
.llseek = default_llseek,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -54,7 +54,7 @@
|
|||||||
int ath9k_init_debug(struct ath_hw *ah)
|
int ath9k_init_debug(struct ath_hw *ah)
|
||||||
{
|
{
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
@@ -1077,6 +1124,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
@@ -1097,6 +1144,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||||
debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
|
debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
|
||||||
sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
|
sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||||
@@ -447,26 +447,20 @@ void ath9k_btcoex_timer_pause(struct ath
|
@@ -449,26 +449,20 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||||
|
|
||||||
#define ATH_LED_PIN_DEF 1
|
#define ATH_LED_PIN_DEF 1
|
||||||
#define ATH_LED_PIN_9287 8
|
#define ATH_LED_PIN_9287 8
|
||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
/* Antenna diversity/combining */
|
/* Antenna diversity/combining */
|
||||||
#define ATH_ANT_RX_CURRENT_SHIFT 4
|
#define ATH_ANT_RX_CURRENT_SHIFT 4
|
||||||
@@ -618,15 +612,11 @@ struct ath_softc {
|
@@ -620,15 +614,11 @@ struct ath_softc {
|
||||||
struct ath_beacon beacon;
|
struct ath_beacon beacon;
|
||||||
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
|
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
|
||||||
|
|
||||||
@ -253,7 +253,7 @@
|
|||||||
/* Rfkill */
|
/* Rfkill */
|
||||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||||
@@ -1259,9 +1259,6 @@ static void ath9k_stop(struct ieee80211_
|
@@ -1204,9 +1204,6 @@ static void ath9k_stop(struct ieee80211_
|
||||||
|
|
||||||
mutex_lock(&sc->mutex);
|
mutex_lock(&sc->mutex);
|
||||||
|
|
||||||
@ -261,8 +261,8 @@
|
|||||||
- cancel_delayed_work_sync(&sc->ath_led_blink_work);
|
- cancel_delayed_work_sync(&sc->ath_led_blink_work);
|
||||||
-
|
-
|
||||||
cancel_delayed_work_sync(&sc->tx_complete_work);
|
cancel_delayed_work_sync(&sc->tx_complete_work);
|
||||||
|
cancel_delayed_work_sync(&sc->hw_pll_work);
|
||||||
cancel_work_sync(&sc->paprd_work);
|
cancel_work_sync(&sc->paprd_work);
|
||||||
cancel_work_sync(&sc->hw_check_work);
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -145,6 +145,21 @@ static struct ieee80211_rate ath9k_legac
|
@@ -145,6 +145,21 @@ static struct ieee80211_rate ath9k_legac
|
||||||
@ -287,7 +287,7 @@
|
|||||||
static void ath9k_deinit_softc(struct ath_softc *sc);
|
static void ath9k_deinit_softc(struct ath_softc *sc);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -748,6 +763,13 @@ int ath9k_init_device(u16 devid, struct
|
@@ -746,6 +761,13 @@ int ath9k_init_device(u16 devid, struct
|
||||||
|
|
||||||
ath9k_init_txpower_limits(sc);
|
ath9k_init_txpower_limits(sc);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -1429,8 +1429,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
@@ -1467,8 +1467,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||||
REG_WRITE(ah, AR_OBS, 8);
|
REG_WRITE(ah, AR_OBS, 8);
|
||||||
|
|
||||||
if (ah->config.rx_intr_mitigation) {
|
if (ah->config.rx_intr_mitigation) {
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
--- a/net/mac80211/tx.c
|
|
||||||
+++ b/net/mac80211/tx.c
|
|
||||||
@@ -2241,6 +2241,9 @@ struct sk_buff *ieee80211_beacon_get_tim
|
|
||||||
|
|
||||||
sdata = vif_to_sdata(vif);
|
|
||||||
|
|
||||||
+ if (!ieee80211_sdata_running(sdata))
|
|
||||||
+ goto out;
|
|
||||||
+
|
|
||||||
if (tim_offset)
|
|
||||||
*tim_offset = 0;
|
|
||||||
if (tim_length)
|
|
@ -1,111 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
|
||||||
@@ -450,14 +450,15 @@ static const struct file_operations fops
|
|
||||||
.llseek = default_llseek,
|
|
||||||
};
|
|
||||||
|
|
||||||
+#define PR_QNUM(_n) sc->tx.txq_map[_n]->axq_qnum
|
|
||||||
#define PR(str, elem) \
|
|
||||||
do { \
|
|
||||||
len += snprintf(buf + len, size - len, \
|
|
||||||
"%s%13u%11u%10u%10u\n", str, \
|
|
||||||
- sc->debug.stats.txstats[WME_AC_BE].elem, \
|
|
||||||
- sc->debug.stats.txstats[WME_AC_BK].elem, \
|
|
||||||
- sc->debug.stats.txstats[WME_AC_VI].elem, \
|
|
||||||
- sc->debug.stats.txstats[WME_AC_VO].elem); \
|
|
||||||
+ sc->debug.stats.txstats[PR_QNUM(WME_AC_BE)].elem, \
|
|
||||||
+ sc->debug.stats.txstats[PR_QNUM(WME_AC_BK)].elem, \
|
|
||||||
+ sc->debug.stats.txstats[PR_QNUM(WME_AC_VI)].elem, \
|
|
||||||
+ sc->debug.stats.txstats[PR_QNUM(WME_AC_VO)].elem); \
|
|
||||||
if (len >= size) \
|
|
||||||
goto done; \
|
|
||||||
} while(0)
|
|
||||||
@@ -466,10 +467,10 @@ static const struct file_operations fops
|
|
||||||
do { \
|
|
||||||
len += snprintf(buf + len, size - len, \
|
|
||||||
"%s%13u%11u%10u%10u\n", str, \
|
|
||||||
- (unsigned int)(sc->tx.txq[ATH_TXQ_AC_BE].elem), \
|
|
||||||
- (unsigned int)(sc->tx.txq[ATH_TXQ_AC_BK].elem), \
|
|
||||||
- (unsigned int)(sc->tx.txq[ATH_TXQ_AC_VI].elem), \
|
|
||||||
- (unsigned int)(sc->tx.txq[ATH_TXQ_AC_VO].elem)); \
|
|
||||||
+ (unsigned int)(sc->tx.txq_map[WME_AC_BE]->elem), \
|
|
||||||
+ (unsigned int)(sc->tx.txq_map[WME_AC_BK]->elem), \
|
|
||||||
+ (unsigned int)(sc->tx.txq_map[WME_AC_VI]->elem), \
|
|
||||||
+ (unsigned int)(sc->tx.txq_map[WME_AC_VO]->elem)); \
|
|
||||||
if (len >= size) \
|
|
||||||
goto done; \
|
|
||||||
} while(0)
|
|
||||||
@@ -478,10 +479,10 @@ do { \
|
|
||||||
do { \
|
|
||||||
len += snprintf(buf + len, size - len, \
|
|
||||||
"%s%13i%11i%10i%10i\n", str, \
|
|
||||||
- list_empty(&sc->tx.txq[ATH_TXQ_AC_BE].elem), \
|
|
||||||
- list_empty(&sc->tx.txq[ATH_TXQ_AC_BK].elem), \
|
|
||||||
- list_empty(&sc->tx.txq[ATH_TXQ_AC_VI].elem), \
|
|
||||||
- list_empty(&sc->tx.txq[ATH_TXQ_AC_VO].elem)); \
|
|
||||||
+ list_empty(&sc->tx.txq_map[WME_AC_BE]->elem), \
|
|
||||||
+ list_empty(&sc->tx.txq_map[WME_AC_BK]->elem), \
|
|
||||||
+ list_empty(&sc->tx.txq_map[WME_AC_VI]->elem), \
|
|
||||||
+ list_empty(&sc->tx.txq_map[WME_AC_VO]->elem)); \
|
|
||||||
if (len >= size) \
|
|
||||||
goto done; \
|
|
||||||
} while (0)
|
|
||||||
@@ -528,10 +529,10 @@ static ssize_t read_file_xmit(struct fil
|
|
||||||
PR("hw-tx-proc-desc: ", txprocdesc);
|
|
||||||
len += snprintf(buf + len, size - len,
|
|
||||||
"%s%11p%11p%10p%10p\n", "txq-memory-address:",
|
|
||||||
- &(sc->tx.txq[ATH_TXQ_AC_BE]),
|
|
||||||
- &(sc->tx.txq[ATH_TXQ_AC_BK]),
|
|
||||||
- &(sc->tx.txq[ATH_TXQ_AC_VI]),
|
|
||||||
- &(sc->tx.txq[ATH_TXQ_AC_VO]));
|
|
||||||
+ &(sc->tx.txq_map[WME_AC_BE]),
|
|
||||||
+ &(sc->tx.txq_map[WME_AC_BK]),
|
|
||||||
+ &(sc->tx.txq_map[WME_AC_VI]),
|
|
||||||
+ &(sc->tx.txq_map[WME_AC_VO]));
|
|
||||||
if (len >= size)
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
@@ -751,9 +752,9 @@ static ssize_t read_file_misc(struct fil
|
|
||||||
}
|
|
||||||
|
|
||||||
void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
|
|
||||||
- struct ath_tx_status *ts)
|
|
||||||
+ struct ath_tx_status *ts, struct ath_txq *txq)
|
|
||||||
{
|
|
||||||
- int qnum = skb_get_queue_mapping(bf->bf_mpdu);
|
|
||||||
+ int qnum = txq->axq_qnum;
|
|
||||||
|
|
||||||
TX_STAT_INC(qnum, tx_pkts_all);
|
|
||||||
sc->debug.stats.txstats[qnum].tx_bytes_all += bf->bf_mpdu->len;
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/debug.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/debug.h
|
|
||||||
@@ -175,7 +175,7 @@ int ath9k_init_debug(struct ath_hw *ah);
|
|
||||||
|
|
||||||
void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
|
|
||||||
void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
|
|
||||||
- struct ath_tx_status *ts);
|
|
||||||
+ struct ath_tx_status *ts, struct ath_txq *txq);
|
|
||||||
void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs);
|
|
||||||
|
|
||||||
#else
|
|
||||||
@@ -192,7 +192,8 @@ static inline void ath_debug_stat_interr
|
|
||||||
|
|
||||||
static inline void ath_debug_stat_tx(struct ath_softc *sc,
|
|
||||||
struct ath_buf *bf,
|
|
||||||
- struct ath_tx_status *ts)
|
|
||||||
+ struct ath_tx_status *ts,
|
|
||||||
+ struct ath_txq *txq)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
|
||||||
@@ -1913,7 +1913,7 @@ static void ath_tx_complete_buf(struct a
|
|
||||||
else
|
|
||||||
complete(&sc->paprd_complete);
|
|
||||||
} else {
|
|
||||||
- ath_debug_stat_tx(sc, bf, ts);
|
|
||||||
+ ath_debug_stat_tx(sc, bf, ts, txq);
|
|
||||||
ath_tx_complete(sc, skb, tx_flags,
|
|
||||||
bf->bf_state.bfs_ftype, txq);
|
|
||||||
}
|
|
@ -1,200 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
||||||
@@ -1291,6 +1291,11 @@ static void ath9k_stop(struct ieee80211_
|
|
||||||
} else
|
|
||||||
sc->rx.rxlink = NULL;
|
|
||||||
|
|
||||||
+ if (sc->rx.frag) {
|
|
||||||
+ dev_kfree_skb_any(sc->rx.frag);
|
|
||||||
+ sc->rx.frag = NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/* disable HAL and put h/w to sleep */
|
|
||||||
ath9k_hw_disable(ah);
|
|
||||||
ath9k_hw_configpcipowersave(ah, 1, 1);
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
|
||||||
@@ -209,11 +209,6 @@ static int ath_rx_edma_init(struct ath_s
|
|
||||||
int error = 0, i;
|
|
||||||
u32 size;
|
|
||||||
|
|
||||||
-
|
|
||||||
- common->rx_bufsize = roundup(IEEE80211_MAX_MPDU_LEN +
|
|
||||||
- ah->caps.rx_status_len,
|
|
||||||
- min(common->cachelsz, (u16)64));
|
|
||||||
-
|
|
||||||
ath9k_hw_set_rx_bufsize(ah, common->rx_bufsize -
|
|
||||||
ah->caps.rx_status_len);
|
|
||||||
|
|
||||||
@@ -300,12 +295,12 @@ int ath_rx_init(struct ath_softc *sc, in
|
|
||||||
sc->sc_flags &= ~SC_OP_RXFLUSH;
|
|
||||||
spin_lock_init(&sc->rx.rxbuflock);
|
|
||||||
|
|
||||||
+ common->rx_bufsize = IEEE80211_MAX_MPDU_LEN / 2 +
|
|
||||||
+ sc->sc_ah->caps.rx_status_len;
|
|
||||||
+
|
|
||||||
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
|
|
||||||
return ath_rx_edma_init(sc, nbufs);
|
|
||||||
} else {
|
|
||||||
- common->rx_bufsize = roundup(IEEE80211_MAX_MPDU_LEN,
|
|
||||||
- min(common->cachelsz, (u16)64));
|
|
||||||
-
|
|
||||||
ath_dbg(common, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n",
|
|
||||||
common->cachelsz, common->rx_bufsize);
|
|
||||||
|
|
||||||
@@ -815,15 +810,9 @@ static bool ath9k_rx_accept(struct ath_c
|
|
||||||
if (rx_stats->rs_datalen > (common->rx_bufsize - rx_status_len))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
- /*
|
|
||||||
- * rs_more indicates chained descriptors which can be used
|
|
||||||
- * to link buffers together for a sort of scatter-gather
|
|
||||||
- * operation.
|
|
||||||
- * reject the frame, we don't support scatter-gather yet and
|
|
||||||
- * the frame is probably corrupt anyway
|
|
||||||
- */
|
|
||||||
+ /* Only use error bits from the last fragment */
|
|
||||||
if (rx_stats->rs_more)
|
|
||||||
- return false;
|
|
||||||
+ return true;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The rx_stats->rs_status will not be set until the end of the
|
|
||||||
@@ -981,6 +970,10 @@ static int ath9k_rx_skb_preprocess(struc
|
|
||||||
if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
+ /* Only use status info from the last fragment */
|
|
||||||
+ if (rx_stats->rs_more)
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
ath9k_process_rssi(common, hw, hdr, rx_stats);
|
|
||||||
|
|
||||||
if (ath9k_process_rate(common, hw, rx_stats, rx_status))
|
|
||||||
@@ -1582,7 +1575,7 @@ div_comb_done:
|
|
||||||
int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
|
|
||||||
{
|
|
||||||
struct ath_buf *bf;
|
|
||||||
- struct sk_buff *skb = NULL, *requeue_skb;
|
|
||||||
+ struct sk_buff *skb = NULL, *requeue_skb, *hdr_skb;
|
|
||||||
struct ieee80211_rx_status *rxs;
|
|
||||||
struct ath_hw *ah = sc->sc_ah;
|
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
|
||||||
@@ -1633,8 +1626,17 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
|
||||||
if (!skb)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
- hdr = (struct ieee80211_hdr *) (skb->data + rx_status_len);
|
|
||||||
- rxs = IEEE80211_SKB_RXCB(skb);
|
|
||||||
+ /*
|
|
||||||
+ * Take frame header from the first fragment and RX status from
|
|
||||||
+ * the last one.
|
|
||||||
+ */
|
|
||||||
+ if (sc->rx.frag)
|
|
||||||
+ hdr_skb = sc->rx.frag;
|
|
||||||
+ else
|
|
||||||
+ hdr_skb = skb;
|
|
||||||
+
|
|
||||||
+ hdr = (struct ieee80211_hdr *) (hdr_skb->data + rx_status_len);
|
|
||||||
+ rxs = IEEE80211_SKB_RXCB(hdr_skb);
|
|
||||||
|
|
||||||
ath_debug_stat_rx(sc, &rs);
|
|
||||||
|
|
||||||
@@ -1643,12 +1645,12 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
|
||||||
* chain it back at the queue without processing it.
|
|
||||||
*/
|
|
||||||
if (flush)
|
|
||||||
- goto requeue;
|
|
||||||
+ goto requeue_drop_frag;
|
|
||||||
|
|
||||||
retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
|
|
||||||
rxs, &decrypt_error);
|
|
||||||
if (retval)
|
|
||||||
- goto requeue;
|
|
||||||
+ goto requeue_drop_frag;
|
|
||||||
|
|
||||||
rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp;
|
|
||||||
if (rs.rs_tstamp > tsf_lower &&
|
|
||||||
@@ -1668,7 +1670,7 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
|
||||||
* skb and put it at the tail of the sc->rx.rxbuf list for
|
|
||||||
* processing. */
|
|
||||||
if (!requeue_skb)
|
|
||||||
- goto requeue;
|
|
||||||
+ goto requeue_drop_frag;
|
|
||||||
|
|
||||||
/* Unmap the frame */
|
|
||||||
dma_unmap_single(sc->dev, bf->bf_buf_addr,
|
|
||||||
@@ -1679,8 +1681,9 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
|
||||||
if (ah->caps.rx_status_len)
|
|
||||||
skb_pull(skb, ah->caps.rx_status_len);
|
|
||||||
|
|
||||||
- ath9k_rx_skb_postprocess(common, skb, &rs,
|
|
||||||
- rxs, decrypt_error);
|
|
||||||
+ if (!rs.rs_more)
|
|
||||||
+ ath9k_rx_skb_postprocess(common, hdr_skb, &rs,
|
|
||||||
+ rxs, decrypt_error);
|
|
||||||
|
|
||||||
/* We will now give hardware our shiny new allocated skb */
|
|
||||||
bf->bf_mpdu = requeue_skb;
|
|
||||||
@@ -1697,6 +1700,38 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (rs.rs_more) {
|
|
||||||
+ /*
|
|
||||||
+ * rs_more indicates chained descriptors which can be
|
|
||||||
+ * used to link buffers together for a sort of
|
|
||||||
+ * scatter-gather operation.
|
|
||||||
+ */
|
|
||||||
+ if (sc->rx.frag) {
|
|
||||||
+ /* too many fragments - cannot handle frame */
|
|
||||||
+ dev_kfree_skb_any(sc->rx.frag);
|
|
||||||
+ dev_kfree_skb_any(skb);
|
|
||||||
+ skb = NULL;
|
|
||||||
+ }
|
|
||||||
+ sc->rx.frag = skb;
|
|
||||||
+ goto requeue;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (sc->rx.frag) {
|
|
||||||
+ int space = skb->len - skb_tailroom(hdr_skb);
|
|
||||||
+
|
|
||||||
+ sc->rx.frag = NULL;
|
|
||||||
+
|
|
||||||
+ if (pskb_expand_head(hdr_skb, 0, space, GFP_ATOMIC) < 0) {
|
|
||||||
+ dev_kfree_skb(skb);
|
|
||||||
+ goto requeue_drop_frag;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ skb_copy_from_linear_data(skb, skb_put(hdr_skb, skb->len),
|
|
||||||
+ skb->len);
|
|
||||||
+ dev_kfree_skb_any(skb);
|
|
||||||
+ skb = hdr_skb;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* change the default rx antenna if rx diversity chooses the
|
|
||||||
* other antenna 3 times in a row.
|
|
||||||
@@ -1722,6 +1757,11 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
|
||||||
|
|
||||||
ieee80211_rx(hw, skb);
|
|
||||||
|
|
||||||
+requeue_drop_frag:
|
|
||||||
+ if (sc->rx.frag) {
|
|
||||||
+ dev_kfree_skb_any(sc->rx.frag);
|
|
||||||
+ sc->rx.frag = NULL;
|
|
||||||
+ }
|
|
||||||
requeue:
|
|
||||||
if (edma) {
|
|
||||||
list_add_tail(&bf->list, &sc->rx.rxbuf);
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
|
||||||
@@ -311,6 +311,8 @@ struct ath_rx {
|
|
||||||
struct ath_descdma rxdma;
|
|
||||||
struct ath_buf *rx_bufptr;
|
|
||||||
struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX];
|
|
||||||
+
|
|
||||||
+ struct sk_buff *frag;
|
|
||||||
};
|
|
||||||
|
|
||||||
int ath_startrecv(struct ath_softc *sc);
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/net/mac80211/rx.c
|
|
||||||
+++ b/net/mac80211/rx.c
|
|
||||||
@@ -798,7 +798,7 @@ ieee80211_rx_h_check(struct ieee80211_rx
|
|
||||||
rx->local->dot11FrameDuplicateCount++;
|
|
||||||
rx->sta->num_duplicates++;
|
|
||||||
}
|
|
||||||
- return RX_DROP_MONITOR;
|
|
||||||
+ return RX_DROP_UNUSABLE;
|
|
||||||
} else
|
|
||||||
rx->sta->last_seq_ctrl[rx->queue] = hdr->seq_ctrl;
|
|
||||||
}
|
|
@ -1,109 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
||||||
@@ -177,7 +177,12 @@ static void ath_update_survey_nf(struct
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void ath_update_survey_stats(struct ath_softc *sc)
|
|
||||||
+/*
|
|
||||||
+ * Updates the survey statistics and returns the busy time since last
|
|
||||||
+ * update in %, if the measurement duration was long enough for the
|
|
||||||
+ * result to be useful, -1 otherwise.
|
|
||||||
+ */
|
|
||||||
+static int ath_update_survey_stats(struct ath_softc *sc)
|
|
||||||
{
|
|
||||||
struct ath_hw *ah = sc->sc_ah;
|
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
|
||||||
@@ -185,9 +190,10 @@ static void ath_update_survey_stats(stru
|
|
||||||
struct survey_info *survey = &sc->survey[pos];
|
|
||||||
struct ath_cycle_counters *cc = &common->cc_survey;
|
|
||||||
unsigned int div = common->clockrate * 1000;
|
|
||||||
+ int ret = 0;
|
|
||||||
|
|
||||||
if (!ah->curchan)
|
|
||||||
- return;
|
|
||||||
+ return -1;
|
|
||||||
|
|
||||||
if (ah->power_mode == ATH9K_PM_AWAKE)
|
|
||||||
ath_hw_cycle_counters_update(common);
|
|
||||||
@@ -202,9 +208,18 @@ static void ath_update_survey_stats(stru
|
|
||||||
survey->channel_time_rx += cc->rx_frame / div;
|
|
||||||
survey->channel_time_tx += cc->tx_frame / div;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ if (cc->cycles < div)
|
|
||||||
+ return -1;
|
|
||||||
+
|
|
||||||
+ if (cc->cycles > 0)
|
|
||||||
+ ret = cc->rx_busy * 100 / cc->cycles;
|
|
||||||
+
|
|
||||||
memset(cc, 0, sizeof(*cc));
|
|
||||||
|
|
||||||
ath_update_survey_nf(sc, pos);
|
|
||||||
+
|
|
||||||
+ return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -226,6 +241,8 @@ int ath_set_channel(struct ath_softc *sc
|
|
||||||
if (sc->sc_flags & SC_OP_INVALID)
|
|
||||||
return -EIO;
|
|
||||||
|
|
||||||
+ sc->hw_busy_count = 0;
|
|
||||||
+
|
|
||||||
del_timer_sync(&common->ani.timer);
|
|
||||||
cancel_work_sync(&sc->paprd_work);
|
|
||||||
cancel_work_sync(&sc->hw_check_work);
|
|
||||||
@@ -584,17 +601,25 @@ static void ath_node_detach(struct ath_s
|
|
||||||
void ath_hw_check(struct work_struct *work)
|
|
||||||
{
|
|
||||||
struct ath_softc *sc = container_of(work, struct ath_softc, hw_check_work);
|
|
||||||
- int i;
|
|
||||||
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
|
||||||
+ unsigned long flags;
|
|
||||||
+ int busy;
|
|
||||||
|
|
||||||
ath9k_ps_wakeup(sc);
|
|
||||||
+ if (ath9k_hw_check_alive(sc->sc_ah))
|
|
||||||
+ goto out;
|
|
||||||
|
|
||||||
- for (i = 0; i < 3; i++) {
|
|
||||||
- if (ath9k_hw_check_alive(sc->sc_ah))
|
|
||||||
- goto out;
|
|
||||||
+ spin_lock_irqsave(&common->cc_lock, flags);
|
|
||||||
+ busy = ath_update_survey_stats(sc);
|
|
||||||
+ spin_unlock_irqrestore(&common->cc_lock, flags);
|
|
||||||
|
|
||||||
- msleep(1);
|
|
||||||
- }
|
|
||||||
- ath_reset(sc, true);
|
|
||||||
+ ath_dbg(common, ATH_DBG_RESET, "Possible baseband hang, "
|
|
||||||
+ "busy=%d (try %d)\n", busy, sc->hw_busy_count + 1);
|
|
||||||
+ if (busy >= 99) {
|
|
||||||
+ if (++sc->hw_busy_count >= 3)
|
|
||||||
+ ath_reset(sc, true);
|
|
||||||
+ } else if (busy >= 0)
|
|
||||||
+ sc->hw_busy_count = 0;
|
|
||||||
|
|
||||||
out:
|
|
||||||
ath9k_ps_restore(sc);
|
|
||||||
@@ -988,6 +1013,8 @@ int ath_reset(struct ath_softc *sc, bool
|
|
||||||
struct ieee80211_hw *hw = sc->hw;
|
|
||||||
int r;
|
|
||||||
|
|
||||||
+ sc->hw_busy_count = 0;
|
|
||||||
+
|
|
||||||
/* Stop ANI */
|
|
||||||
del_timer_sync(&common->ani.timer);
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
|
||||||
@@ -598,6 +598,8 @@ struct ath_softc {
|
|
||||||
struct completion paprd_complete;
|
|
||||||
bool paprd_pending;
|
|
||||||
|
|
||||||
+ unsigned int hw_busy_count;
|
|
||||||
+
|
|
||||||
u32 intrstatus;
|
|
||||||
u32 sc_flags; /* SC_OP_* */
|
|
||||||
u16 ps_flags; /* PS_* */
|
|
@ -1,12 +0,0 @@
|
|||||||
--- a/net/mac80211/rx.c
|
|
||||||
+++ b/net/mac80211/rx.c
|
|
||||||
@@ -2609,7 +2609,8 @@ static int prepare_for_handlers(struct i
|
|
||||||
return 0;
|
|
||||||
if (!multicast &&
|
|
||||||
compare_ether_addr(sdata->vif.addr, hdr->addr1) != 0) {
|
|
||||||
- if (!(sdata->dev->flags & IFF_PROMISC))
|
|
||||||
+ if (!(sdata->dev->flags & IFF_PROMISC) ||
|
|
||||||
+ sdata->u.mgd.use_4addr)
|
|
||||||
return 0;
|
|
||||||
status->rx_flags &= ~IEEE80211_RX_RA_MATCH;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/net/mac80211/tx.c
|
|
||||||
+++ b/net/mac80211/tx.c
|
|
||||||
@@ -1547,7 +1547,7 @@ static int ieee80211_skb_resize(struct i
|
|
||||||
skb_orphan(skb);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (skb_header_cloned(skb))
|
|
||||||
+ if (skb_cloned(skb))
|
|
||||||
I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
|
|
||||||
else if (head_need || tail_need)
|
|
||||||
I802_DEBUG_INC(local->tx_expand_skb_head);
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||||
@@ -209,6 +209,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
@@ -196,6 +196,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
|
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
|
||||||
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
* PCI driver handlers.
|
* PCI driver handlers.
|
||||||
*/
|
*/
|
||||||
@@ -388,6 +389,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
@@ -372,6 +373,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||||
@@ -277,8 +277,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
|
@@ -261,8 +261,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
|
||||||
|
|
||||||
pci_set_master(pci_dev);
|
pci_set_master(pci_dev);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user