add some madwifi fixes and enhancements by Sven-Ola, refresh patches

SVN-Revision: 11848
This commit is contained in:
Felix Fietkau 2008-07-16 16:30:03 +00:00
parent 7ac73f8362
commit 0fb8aa363f
29 changed files with 2739 additions and 77 deletions

View file

@ -118,7 +118,7 @@ ifeq ($(findstring PCI,$(BUS)),PCI)
MADWIFI_AUTOLOAD+= ath_pci MADWIFI_AUTOLOAD+= ath_pci
endif endif
MADWIFI_APPLETS:=80211stats,athchans,athctrl,athkey,athstats,wlanconfig MADWIFI_APPLETS:=80211stats,athchans,athctrl,athkey,athstats,wlanconfig,ath_info
ifdef CONFIG_MADWIFI_DEBUG ifdef CONFIG_MADWIFI_DEBUG
MADWIFI_APPLETS:=$(strip $(MADWIFI_APPLETS)),athdebug,80211debug MADWIFI_APPLETS:=$(strip $(MADWIFI_APPLETS)),athdebug,80211debug
endif endif

View file

@ -0,0 +1,204 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -453,8 +453,8 @@
MODULE_PARM_DESC(ratectl, "Rate control algorithm [amrr|minstrel|onoe|sample], "
"defaults to '" DEF_RATE_CTL "'");
-static int ath_debug = 0;
#ifdef AR_DEBUG
+static int ath_debug = 0;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
MODULE_PARM(ath_debug, "i");
#else
@@ -465,8 +465,8 @@
static void ath_printtxbuf(const struct ath_buf *, int);
#endif /* defined(AR_DEBUG) */
-static int ieee80211_debug = 0;
#ifdef AR_DEBUG
+static int ieee80211_debug = 0;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
MODULE_PARM(ieee80211_debug, "i");
#else
@@ -1565,7 +1565,9 @@
void
ath_suspend(struct net_device *dev)
{
+#ifdef AR_DEBUG
struct ath_softc *sc = dev->priv;
+#endif
DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
ath_stop(dev);
@@ -1574,7 +1576,9 @@
void
ath_resume(struct net_device *dev)
{
+#ifdef AR_DEBUG
struct ath_softc *sc = dev->priv;
+#endif
DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags);
ath_init(dev);
@@ -4019,7 +4023,9 @@
ath_key_update_begin(struct ieee80211vap *vap)
{
struct net_device *dev = vap->iv_ic->ic_dev;
+#ifdef AR_DEBUG
struct ath_softc *sc = dev->priv;
+#endif
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "Begin\n");
/*
@@ -4040,7 +4046,9 @@
ath_key_update_end(struct ieee80211vap *vap)
{
struct net_device *dev = vap->iv_ic->ic_dev;
+#ifdef AR_DEBUG
struct ath_softc *sc = dev->priv;
+#endif
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
netif_wake_queue(dev);
@@ -6218,7 +6226,9 @@
struct sk_buff *skb, int subtype, int rssi, u_int64_t rtsf)
{
struct ath_softc *sc = vap->iv_ic->ic_dev->priv;
+#ifdef AR_DEBUG
struct ieee80211_frame *wh = (struct ieee80211_frame *)skb->data;
+#endif
struct ieee80211_node * ni = ni_or_null;
u_int64_t hw_tsf, beacon_tsf;
u_int32_t hw_tu, beacon_tu, intval;
@@ -8382,7 +8392,9 @@
static void
ath_tx_draintxq(struct ath_softc *sc, struct ath_txq *txq)
{
+#ifdef AR_DEBUG
struct ath_hal *ah = sc->sc_ah;
+#endif
struct ath_buf *bf;
/*
* NB: this assumes output has been stopped and
@@ -11002,6 +11014,7 @@
strncat(m, b, MLEN);
}
strncat(m, "\n", MLEN);
+#ifdef AR_DEBUG
if (1 /* bootverbose */) {
unsigned int i;
for (i = 0; i <= WME_AC_VO; i++) {
@@ -11014,6 +11027,7 @@
sc->sc_cabq->axq_qnum);
IPRINTF(sc, "Use hw queue %u for beacons\n", sc->sc_bhalq);
}
+#endif
#undef HAL_MODE_DUALBAND
}
--- a/ath/if_ath_radar.c
+++ b/ath/if_ath_radar.c
@@ -156,7 +156,9 @@
#endif
};
+#ifdef AR_DEBUG
static u_int32_t interval_to_frequency(u_int32_t pri);
+#endif
/* Returns true if radar detection is enabled. */
int ath_radar_is_enabled(struct ath_softc *sc)
@@ -229,7 +231,9 @@
{
struct ath_hal *ah = sc->sc_ah;
+#ifdef AR_DEBUG
struct net_device *dev = sc->sc_dev;
+#endif
struct ieee80211com *ic = &sc->sc_ic;
int required = 0;
@@ -366,6 +370,7 @@
#define MR_FAIL_MIN_PERIOD 4
#define MR_FAIL_MAX_PERIOD 5
+#ifdef AR_DEBUG
static const char* get_match_result_desc(u_int32_t code) {
switch (code) {
case MR_MATCH:
@@ -384,6 +389,7 @@
return "unknown";
}
}
+#endif
static int32_t match_radar(
u_int32_t matched,
@@ -775,7 +781,10 @@
struct ath_softc *sc, struct ath_rp *last_pulse,
u_int32_t *index, u_int32_t *pri, u_int32_t *matching_pulses,
u_int32_t *missed_pulses, u_int32_t *noise_pulses)
-{ struct net_device *dev = sc->sc_dev;
+{
+#ifdef AR_DEBUG
+ struct net_device *dev = sc->sc_dev;
+#endif
int i;
int best_index = -1;
unsigned int best_matched = 0;
@@ -1217,6 +1226,7 @@
return (-1 != best_index) ? AH_TRUE : AH_FALSE;
}
+#ifdef AR_DEBUG
static u_int32_t interval_to_frequency(u_int32_t interval)
{
/* Calculate BRI from PRI */
@@ -1224,6 +1234,7 @@
/* Round to nearest multiple of 50 */
return frequency + ((frequency % 50) >= 25 ? 50 : 0) - (frequency % 50);
}
+#endif
#ifdef ATH_RADAR_LONG_PULSE
static const char* get_longpulse_desc(int lp) {
@@ -1580,7 +1591,9 @@
void ath_rp_record(struct ath_softc *sc, u_int64_t tsf, u_int8_t rssi,
u_int8_t width, HAL_BOOL is_simulated)
{
+#ifdef AR_DEBUG
struct net_device *dev = sc->sc_dev;
+#endif
struct ath_rp *pulse;
DPRINTF(sc, ATH_DEBUG_DOTHPULSES, "%s: ath_rp_record: "
--- a/ath_rate/minstrel/minstrel.c
+++ b/ath_rate/minstrel/minstrel.c
@@ -931,7 +931,9 @@
(struct ieee80211_node_table *) &vap->iv_ic->ic_sta;
unsigned int x = 0;
unsigned int this_tp, this_prob, this_eprob;
+#ifdef AR_DEBUG
struct ath_softc *sc = vap->iv_ic->ic_dev->priv;;
+#endif
IEEE80211_NODE_TABLE_LOCK_IRQ(nt);
TAILQ_FOREACH(ni, &nt->nt_node, ni_list) {
--- a/net80211/ieee80211_scan_ap.c
+++ b/net80211/ieee80211_scan_ap.c
@@ -731,6 +731,7 @@
sort(chans, ss_last, sizeof(*chans), pc_cmp, pc_swap);
+#ifdef IEEE80211_DEBUG
for (i = 0; i < ss_last; i++) {
int chan = ieee80211_chan2ieee(ic, chans[i].chan);
@@ -742,6 +743,7 @@
!!IEEE80211_ARE_CHANS_SAME_MODE(chans[i].chan,
ic->ic_bsschan));
}
+#endif
best = NULL;
best_rssi = 0xff; /* If signal is bigger than 0xff, we'd be melting. */

View file

@ -44,7 +44,7 @@
#ifdef USE_HEADERLEN_RESV #ifdef USE_HEADERLEN_RESV
dev->hard_header_len += sizeof(struct ieee80211_qosframe) + dev->hard_header_len += sizeof(struct ieee80211_qosframe) +
sizeof(struct llc) + sizeof(struct llc) +
@@ -2216,6 +2228,7 @@ @@ -2220,6 +2232,7 @@
(status & HAL_INT_GLOBAL) ? " HAL_INT_GLOBAL" : "" (status & HAL_INT_GLOBAL) ? " HAL_INT_GLOBAL" : ""
); );
@ -52,7 +52,7 @@
status &= sc->sc_imask; /* discard unasked for bits */ status &= sc->sc_imask; /* discard unasked for bits */
/* As soon as we know we have a real interrupt we intend to service, /* As soon as we know we have a real interrupt we intend to service,
* we will check to see if we need an initial hardware TSF reading. * we will check to see if we need an initial hardware TSF reading.
@@ -2273,7 +2286,23 @@ @@ -2277,7 +2290,23 @@
} }
if (status & (HAL_INT_RX | HAL_INT_RXPHY)) { if (status & (HAL_INT_RX | HAL_INT_RXPHY)) {
ath_uapsd_processtriggers(sc, hw_tsf); ath_uapsd_processtriggers(sc, hw_tsf);
@ -77,7 +77,7 @@
} }
if (status & HAL_INT_TX) { if (status & HAL_INT_TX) {
#ifdef ATH_SUPERG_DYNTURBO #ifdef ATH_SUPERG_DYNTURBO
@@ -2299,6 +2328,11 @@ @@ -2303,6 +2332,11 @@
} }
} }
#endif #endif
@ -89,7 +89,7 @@
ATH_SCHEDULE_TQUEUE(&sc->sc_txtq, &needmark); ATH_SCHEDULE_TQUEUE(&sc->sc_txtq, &needmark);
} }
if (status & HAL_INT_BMISS) { if (status & HAL_INT_BMISS) {
@@ -2511,6 +2545,7 @@ @@ -2515,6 +2549,7 @@
if (sc->sc_tx99 != NULL) if (sc->sc_tx99 != NULL)
sc->sc_tx99->start(sc->sc_tx99); sc->sc_tx99->start(sc->sc_tx99);
#endif #endif
@ -97,7 +97,7 @@
done: done:
ATH_UNLOCK(sc); ATH_UNLOCK(sc);
@@ -2551,6 +2586,9 @@ @@ -2555,6 +2590,9 @@
if (sc->sc_tx99 != NULL) if (sc->sc_tx99 != NULL)
sc->sc_tx99->stop(sc->sc_tx99); sc->sc_tx99->stop(sc->sc_tx99);
#endif #endif
@ -107,7 +107,7 @@
netif_stop_queue(dev); /* XXX re-enabled by ath_newstate */ netif_stop_queue(dev); /* XXX re-enabled by ath_newstate */
dev->flags &= ~IFF_RUNNING; /* NB: avoid recursion */ dev->flags &= ~IFF_RUNNING; /* NB: avoid recursion */
ieee80211_stop_running(ic); /* stop all VAPs */ ieee80211_stop_running(ic); /* stop all VAPs */
@@ -4009,6 +4047,39 @@ @@ -4013,6 +4051,39 @@
return ath_keyset(sc, k, mac, vap->iv_bss); return ath_keyset(sc, k, mac, vap->iv_bss);
} }
@ -147,7 +147,7 @@
/* /*
* Block/unblock tx+rx processing while a key change is done. * Block/unblock tx+rx processing while a key change is done.
* We assume the caller serializes key management operations * We assume the caller serializes key management operations
@@ -4026,13 +4097,7 @@ @@ -4032,13 +4103,7 @@
* When called from the rx tasklet we cannot use * When called from the rx tasklet we cannot use
* tasklet_disable because it will block waiting * tasklet_disable because it will block waiting
* for us to complete execution. * for us to complete execution.
@ -161,8 +161,8 @@
netif_stop_queue(dev); netif_stop_queue(dev);
} }
@@ -4043,9 +4108,9 @@ @@ -4051,9 +4116,9 @@
struct ath_softc *sc = dev->priv; #endif
DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n"); DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n");
- netif_wake_queue(dev); - netif_wake_queue(dev);
@ -174,7 +174,7 @@
} }
/* /*
@@ -6350,15 +6415,25 @@ @@ -6360,15 +6425,25 @@
sc->sc_rxotherant = 0; sc->sc_rxotherant = 0;
} }
@ -204,7 +204,7 @@
struct ieee80211com *ic = &sc->sc_ic; struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc ? sc->sc_ah : NULL; struct ath_hal *ah = sc ? sc->sc_ah : NULL;
struct ath_desc *ds; struct ath_desc *ds;
@@ -6368,8 +6443,10 @@ @@ -6378,8 +6453,10 @@
unsigned int len; unsigned int len;
int type; int type;
u_int phyerr; u_int phyerr;
@ -215,7 +215,7 @@
do { do {
bf = STAILQ_FIRST(&sc->sc_rxbuf); bf = STAILQ_FIRST(&sc->sc_rxbuf);
if (bf == NULL) { /* XXX ??? can this happen */ if (bf == NULL) { /* XXX ??? can this happen */
@@ -6393,6 +6470,15 @@ @@ -6403,6 +6480,15 @@
/* NB: never process the self-linked entry at the end */ /* NB: never process the self-linked entry at the end */
break; break;
} }
@ -231,7 +231,7 @@
skb = bf->bf_skb; skb = bf->bf_skb;
if (skb == NULL) { if (skb == NULL) {
EPRINTF(sc, "Dropping; buffer contains NULL skbuff.\n"); EPRINTF(sc, "Dropping; buffer contains NULL skbuff.\n");
@@ -6440,6 +6526,7 @@ @@ -6450,6 +6536,7 @@
sc->sc_stats.ast_rx_phyerr++; sc->sc_stats.ast_rx_phyerr++;
phyerr = rs->rs_phyerr & 0x1f; phyerr = rs->rs_phyerr & 0x1f;
sc->sc_stats.ast_rx_phy[phyerr]++; sc->sc_stats.ast_rx_phy[phyerr]++;
@ -239,7 +239,7 @@
} }
if (rs->rs_status & HAL_RXERR_DECRYPT) { if (rs->rs_status & HAL_RXERR_DECRYPT) {
/* /*
@@ -6635,9 +6722,43 @@ @@ -6645,9 +6732,43 @@
STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list);
ATH_RXBUF_UNLOCK_IRQ(sc); ATH_RXBUF_UNLOCK_IRQ(sc);
} while (ath_rxbuf_init(sc, bf) == 0); } while (ath_rxbuf_init(sc, bf) == 0);
@ -283,7 +283,7 @@
#undef PA2DESC #undef PA2DESC
} }
@@ -8288,12 +8409,24 @@ @@ -8298,12 +8419,24 @@
{ {
struct net_device *dev = (struct net_device *)data; struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv; struct ath_softc *sc = dev->priv;
@ -308,7 +308,7 @@
netif_wake_queue(dev); netif_wake_queue(dev);
if (sc->sc_softled) if (sc->sc_softled)
@@ -8309,7 +8442,9 @@ @@ -8319,7 +8452,9 @@
{ {
struct net_device *dev = (struct net_device *)data; struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv; struct ath_softc *sc = dev->priv;
@ -318,7 +318,7 @@
/* /*
* Process each active queue. * Process each active queue.
*/ */
@@ -8330,6 +8465,16 @@ @@ -8340,6 +8475,16 @@
if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum)) if (sc->sc_uapsdq && txqactive(sc->sc_ah, sc->sc_uapsdq->axq_qnum))
ath_tx_processq(sc, sc->sc_uapsdq); ath_tx_processq(sc, sc->sc_uapsdq);
@ -335,7 +335,7 @@
netif_wake_queue(dev); netif_wake_queue(dev);
if (sc->sc_softled) if (sc->sc_softled)
@@ -8345,13 +8490,25 @@ @@ -8355,13 +8500,25 @@
struct net_device *dev = (struct net_device *)data; struct net_device *dev = (struct net_device *)data;
struct ath_softc *sc = dev->priv; struct ath_softc *sc = dev->priv;
unsigned int i; unsigned int i;
@ -361,7 +361,7 @@
netif_wake_queue(dev); netif_wake_queue(dev);
if (sc->sc_softled) if (sc->sc_softled)
@@ -10284,9 +10441,9 @@ @@ -10296,9 +10453,9 @@
dev->mtu = mtu; dev->mtu = mtu;
if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) { if ((dev->flags & IFF_RUNNING) && !sc->sc_invalid) {
/* NB: the rx buffers may need to be reallocated */ /* NB: the rx buffers may need to be reallocated */

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -4149,7 +4149,9 @@ @@ -4157,7 +4157,9 @@
rfilt |= HAL_RX_FILTER_PROM; rfilt |= HAL_RX_FILTER_PROM;
if (ic->ic_opmode == IEEE80211_M_STA || if (ic->ic_opmode == IEEE80211_M_STA ||
sc->sc_opmode == HAL_M_IBSS || /* NB: AHDEMO too */ sc->sc_opmode == HAL_M_IBSS || /* NB: AHDEMO too */

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -6446,6 +6446,7 @@ @@ -6456,6 +6456,7 @@
int type; int type;
u_int phyerr; u_int phyerr;
u_int processed = 0, early_stop = 0; u_int processed = 0, early_stop = 0;
@ -8,7 +8,7 @@
DPRINTF(sc, ATH_DEBUG_RX_PROC, "invoked\n"); DPRINTF(sc, ATH_DEBUG_RX_PROC, "invoked\n");
process_rx_again: process_rx_again:
@@ -6547,24 +6548,8 @@ @@ -6557,24 +6558,8 @@
} }
if (rs->rs_status & HAL_RXERR_MIC) { if (rs->rs_status & HAL_RXERR_MIC) {
sc->sc_stats.ast_rx_badmic++; sc->sc_stats.ast_rx_badmic++;
@ -35,7 +35,7 @@
} }
/* /*
* Reject error frames if we have no vaps that * Reject error frames if we have no vaps that
@@ -6603,8 +6588,9 @@ @@ -6613,8 +6598,9 @@
/* /*
* Finished monitor mode handling, now reject * Finished monitor mode handling, now reject
* error frames before passing to other vaps * error frames before passing to other vaps
@ -46,7 +46,7 @@
ieee80211_dev_kfree_skb(&skb); ieee80211_dev_kfree_skb(&skb);
goto rx_next; goto rx_next;
} }
@@ -6612,6 +6598,26 @@ @@ -6622,6 +6608,26 @@
/* remove the CRC */ /* remove the CRC */
skb_trim(skb, skb->len - IEEE80211_CRC_LEN); skb_trim(skb, skb->len - IEEE80211_CRC_LEN);
@ -73,7 +73,7 @@
/* /*
* From this point on we assume the frame is at least * From this point on we assume the frame is at least
* as large as ieee80211_frame_min; verify that. * as large as ieee80211_frame_min; verify that.
@@ -6624,6 +6630,7 @@ @@ -6634,6 +6640,7 @@
goto rx_next; goto rx_next;
} }

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -1695,8 +1695,6 @@ @@ -1699,8 +1699,6 @@
* get to reality. This value is used in monitor mode and by tools like * get to reality. This value is used in monitor mode and by tools like
* Wireshark and Kismet. * Wireshark and Kismet.
*/ */
@ -9,7 +9,7 @@
ATH_RXBUF_LOCK_IRQ(sc); ATH_RXBUF_LOCK_IRQ(sc);
if (sc->sc_rxbufcur == NULL) if (sc->sc_rxbufcur == NULL)
sc->sc_rxbufcur = STAILQ_FIRST(&sc->sc_rxbuf); sc->sc_rxbufcur = STAILQ_FIRST(&sc->sc_rxbuf);
@@ -8966,6 +8964,7 @@ @@ -8978,6 +8976,7 @@
sc->sc_curchan.channel); sc->sc_curchan.channel);
sc->sc_stats.ast_per_calfail++; sc->sc_stats.ast_per_calfail++;
} }
@ -17,7 +17,7 @@
ath_hal_process_noisefloor(ah); ath_hal_process_noisefloor(ah);
if (isIQdone == AH_TRUE) { if (isIQdone == AH_TRUE) {
@@ -9034,6 +9033,7 @@ @@ -9046,6 +9045,7 @@
struct ath_softc *sc = dev->priv; struct ath_softc *sc = dev->priv;
(void) ath_chan_set(sc, ic->ic_curchan); (void) ath_chan_set(sc, ic->ic_curchan);
@ -25,7 +25,7 @@
/* /*
* If we are returning to our bss channel then mark state * If we are returning to our bss channel then mark state
* so the next recv'd beacon's TSF will be used to sync the * so the next recv'd beacon's TSF will be used to sync the
@@ -9302,6 +9302,7 @@ @@ -9314,6 +9314,7 @@
} }
ath_hal_process_noisefloor(ah); ath_hal_process_noisefloor(ah);

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -8680,6 +8680,10 @@ @@ -8692,6 +8692,10 @@
sc->sc_rxbufcur = NULL; sc->sc_rxbufcur = NULL;

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -1774,17 +1774,14 @@ @@ -1778,17 +1778,14 @@
* may have occurred in the intervening timeframe. */ * may have occurred in the intervening timeframe. */
bf->bf_channoise = ic->ic_channoise; bf->bf_channoise = ic->ic_channoise;
@ -27,7 +27,7 @@
bus_dma_sync_single(sc->sc_bdev, bf->bf_skbaddr, bus_dma_sync_single(sc->sc_bdev, bf->bf_skbaddr,
--- a/ath/if_ath_radar.c --- a/ath/if_ath_radar.c
+++ b/ath/if_ath_radar.c +++ b/ath/if_ath_radar.c
@@ -261,7 +261,7 @@ @@ -265,7 +265,7 @@
unsigned int new_rxfilt = old_rxfilt; unsigned int new_rxfilt = old_rxfilt;
ath_hal_intrset(ah, old_ier & ~HAL_INT_GLOBAL); ath_hal_intrset(ah, old_ier & ~HAL_INT_GLOBAL);

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -9783,7 +9783,9 @@ @@ -9795,7 +9795,9 @@
/* /*
* Convert HAL channels to ieee80211 ones. * Convert HAL channels to ieee80211 ones.
*/ */
@ -10,7 +10,7 @@
for (i = 0; i < nchan; i++) { for (i = 0; i < nchan; i++) {
HAL_CHANNEL *c = &chans[i]; HAL_CHANNEL *c = &chans[i];
struct ieee80211_channel *ichan = &ic->ic_channels[i]; struct ieee80211_channel *ichan = &ic->ic_channels[i];
@@ -9810,6 +9812,7 @@ @@ -9822,6 +9824,7 @@
ic->ic_chan_non_occupy[i].tv_sec = 0; ic->ic_chan_non_occupy[i].tv_sec = 0;
ic->ic_chan_non_occupy[i].tv_usec = 0; ic->ic_chan_non_occupy[i].tv_usec = 0;
@ -18,7 +18,7 @@
IPRINTF(sc, "Channel %3d (%4d MHz) Max Tx Power %d dBm%s " IPRINTF(sc, "Channel %3d (%4d MHz) Max Tx Power %d dBm%s "
"[%d hw %d reg] Flags%s%s%s%s%s%s%s%s%s%s%s%s%" "[%d hw %d reg] Flags%s%s%s%s%s%s%s%s%s%s%s%s%"
"s%s%s%s%s%s%s%s%s%s%s%s\n", "s%s%s%s%s%s%s%s%s%s%s%s\n",
@@ -9898,6 +9901,7 @@ @@ -9910,6 +9913,7 @@
(c->privFlags & 0x0080 ? (c->privFlags & 0x0080 ?
" PF & (1 << 7)" : "") " PF & (1 << 7)" : "")
); );

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -8431,8 +8431,6 @@ @@ -8441,8 +8441,6 @@
ath_hal_intrset(sc->sc_ah, sc->sc_imask); ath_hal_intrset(sc->sc_ah, sc->sc_imask);
local_irq_restore(flags); local_irq_restore(flags);
@ -9,7 +9,7 @@
if (sc->sc_softled) if (sc->sc_softled)
ath_led_event(sc, ATH_LED_TX); ath_led_event(sc, ATH_LED_TX);
} }
@@ -8479,8 +8477,6 @@ @@ -8489,8 +8487,6 @@
ath_hal_intrset(sc->sc_ah, sc->sc_imask); ath_hal_intrset(sc->sc_ah, sc->sc_imask);
local_irq_restore(flags); local_irq_restore(flags);
@ -18,7 +18,7 @@
if (sc->sc_softled) if (sc->sc_softled)
ath_led_event(sc, ATH_LED_TX); ath_led_event(sc, ATH_LED_TX);
} }
@@ -8513,8 +8509,6 @@ @@ -8523,8 +8519,6 @@
ath_hal_intrset(sc->sc_ah, sc->sc_imask); ath_hal_intrset(sc->sc_ah, sc->sc_imask);
local_irq_restore(flags); local_irq_restore(flags);

View file

@ -24,7 +24,7 @@
module_param(countrycode, int, 0600); module_param(countrycode, int, 0600);
module_param(maxvaps, int, 0600); module_param(maxvaps, int, 0600);
module_param(outdoor, int, 0600); module_param(outdoor, int, 0600);
@@ -2598,7 +2601,8 @@ @@ -2602,7 +2605,8 @@
} }
if (!sc->sc_invalid) { if (!sc->sc_invalid) {
del_timer_sync(&sc->sc_dfs_cac_timer); del_timer_sync(&sc->sc_dfs_cac_timer);
@ -34,7 +34,7 @@
} }
ath_draintxq(sc); ath_draintxq(sc);
if (!sc->sc_invalid) { if (!sc->sc_invalid) {
@@ -2615,6 +2619,20 @@ @@ -2619,6 +2623,20 @@
return 0; return 0;
} }
@ -55,7 +55,7 @@
/* /*
* Stop the device, grabbing the top-level lock to protect * Stop the device, grabbing the top-level lock to protect
* against concurrent entry through ath_init (which can happen * against concurrent entry through ath_init (which can happen
@@ -2740,6 +2758,12 @@ @@ -2744,6 +2762,12 @@
HAL_STATUS status; HAL_STATUS status;
/* /*
@ -68,7 +68,7 @@
* Convert to a HAL channel description with the flags * Convert to a HAL channel description with the flags
* constrained to reflect the current operating mode. * constrained to reflect the current operating mode.
*/ */
@@ -5145,6 +5169,8 @@ @@ -5153,6 +5177,8 @@
"Invoking ath_hal_txstart with sc_bhalq: %d\n", "Invoking ath_hal_txstart with sc_bhalq: %d\n",
sc->sc_bhalq); sc->sc_bhalq);
ath_hal_txstart(ah, sc->sc_bhalq); ath_hal_txstart(ah, sc->sc_bhalq);
@ -77,7 +77,7 @@
sc->sc_stats.ast_be_xmit++; /* XXX per-VAP? */ sc->sc_stats.ast_be_xmit++; /* XXX per-VAP? */
} }
@@ -5394,6 +5420,7 @@ @@ -5402,6 +5428,7 @@
ath_hal_beacontimers(ah, &bs); ath_hal_beacontimers(ah, &bs);
sc->sc_imask |= HAL_INT_BMISS; sc->sc_imask |= HAL_INT_BMISS;
ath_hal_intrset(ah, sc->sc_imask); ath_hal_intrset(ah, sc->sc_imask);
@ -85,7 +85,7 @@
} else { } else {
ath_hal_intrset(ah, 0); ath_hal_intrset(ah, 0);
if (reset_tsf) if (reset_tsf)
@@ -5405,8 +5432,11 @@ @@ -5413,8 +5440,11 @@
*/ */
intval |= HAL_BEACON_ENA; intval |= HAL_BEACON_ENA;
sc->sc_imask |= HAL_INT_SWBA; sc->sc_imask |= HAL_INT_SWBA;
@ -98,7 +98,7 @@
#ifdef ATH_SUPERG_DYNTURBO #ifdef ATH_SUPERG_DYNTURBO
ath_beacon_dturbo_config(vap, intval & ath_beacon_dturbo_config(vap, intval &
~(HAL_BEACON_RESET_TSF | HAL_BEACON_ENA)); ~(HAL_BEACON_RESET_TSF | HAL_BEACON_ENA));
@@ -8870,6 +8900,9 @@ @@ -8882,6 +8912,9 @@
/* Enter DFS wait period */ /* Enter DFS wait period */
mod_timer(&sc->sc_dfs_cac_timer, mod_timer(&sc->sc_dfs_cac_timer,
jiffies + (sc->sc_dfs_cac_period * HZ)); jiffies + (sc->sc_dfs_cac_period * HZ));
@ -108,7 +108,7 @@
} }
/* /*
* re configure beacons when it is a turbo mode switch. * re configure beacons when it is a turbo mode switch.
@@ -8979,8 +9012,11 @@ @@ -8991,8 +9024,11 @@
sc->sc_curchan.channel, sc->sc_curchan.channelFlags, sc->sc_curchan.channel, sc->sc_curchan.channelFlags,
isIQdone ? "done" : "not done"); isIQdone ? "done" : "not done");
@ -122,7 +122,7 @@
} }
static void static void
@@ -9087,7 +9123,8 @@ @@ -9099,7 +9135,8 @@
ieee80211_state_name[vap->iv_state], ieee80211_state_name[vap->iv_state],
ieee80211_state_name[nstate]); ieee80211_state_name[nstate]);
@ -132,7 +132,7 @@
ath_hal_setledstate(ah, leds[nstate]); /* set LED */ ath_hal_setledstate(ah, leds[nstate]); /* set LED */
netif_stop_queue(dev); /* before we do anything else */ netif_stop_queue(dev); /* before we do anything else */
@@ -9312,7 +9349,8 @@ @@ -9324,7 +9361,8 @@
"VAP -> DFSWAIT_PENDING \n"); "VAP -> DFSWAIT_PENDING \n");
/* start calibration timer with a really small value /* start calibration timer with a really small value
* 1/10 sec */ * 1/10 sec */
@ -142,7 +142,7 @@
/* wake the receiver */ /* wake the receiver */
netif_wake_queue(dev); netif_wake_queue(dev);
/* don't do the other usual stuff... */ /* don't do the other usual stuff... */
@@ -9355,7 +9393,7 @@ @@ -9367,7 +9405,7 @@
error = avp->av_newstate(vap, nstate, arg); error = avp->av_newstate(vap, nstate, arg);
/* Finally, start any timers. */ /* Finally, start any timers. */

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -3318,17 +3318,18 @@ @@ -3322,17 +3322,18 @@
* without affecting any other bridge ports. */ * without affecting any other bridge ports. */
if (skb_cloned(skb)) { if (skb_cloned(skb)) {
/* Remember the original SKB so we can free up our references */ /* Remember the original SKB so we can free up our references */
@ -25,7 +25,7 @@
eh = (struct ether_header *)skb->data; eh = (struct ether_header *)skb->data;
#ifdef ATH_SUPERG_FF #ifdef ATH_SUPERG_FF
@@ -3599,6 +3600,8 @@ @@ -3603,6 +3604,8 @@
sc->sc_stats.ast_tx_mgmt++; sc->sc_stats.ast_tx_mgmt++;
return 0; return 0;
bad: bad:

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -8911,7 +8911,7 @@ @@ -8923,7 +8923,7 @@
* re configure beacons when it is a turbo mode switch. * re configure beacons when it is a turbo mode switch.
* HW seems to turn off beacons during turbo mode switch. * HW seems to turn off beacons during turbo mode switch.
*/ */

View file

@ -1,6 +1,6 @@
--- a/net80211/ieee80211_scan_ap.c --- a/net80211/ieee80211_scan_ap.c
+++ b/net80211/ieee80211_scan_ap.c +++ b/net80211/ieee80211_scan_ap.c
@@ -781,12 +781,6 @@ @@ -783,12 +783,6 @@
/* break the loop as the subsequent chans won't be /* break the loop as the subsequent chans won't be
* better */ * better */
break; break;

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -3237,7 +3237,6 @@ @@ -3241,7 +3241,6 @@
struct ath_softc *sc = dev->priv; struct ath_softc *sc = dev->priv;
struct ieee80211_node *ni = NULL; struct ieee80211_node *ni = NULL;
struct ath_buf *bf = NULL; struct ath_buf *bf = NULL;
@ -8,7 +8,7 @@
ath_bufhead bf_head; ath_bufhead bf_head;
struct ath_buf *tbf, *tempbf; struct ath_buf *tbf, *tempbf;
struct sk_buff *tskb; struct sk_buff *tskb;
@@ -3249,6 +3248,7 @@ @@ -3253,6 +3252,7 @@
*/ */
int requeue = 0; int requeue = 0;
#ifdef ATH_SUPERG_FF #ifdef ATH_SUPERG_FF
@ -16,7 +16,7 @@
unsigned int pktlen; unsigned int pktlen;
struct ieee80211com *ic = &sc->sc_ic; struct ieee80211com *ic = &sc->sc_ic;
struct ath_node *an; struct ath_node *an;
@@ -3314,27 +3314,9 @@ @@ -3318,27 +3318,9 @@
requeue = 1; requeue = 1;
goto hardstart_fail; goto hardstart_fail;
} }

View file

@ -2,7 +2,7 @@ Merged from madwifi trunk r3551, r3552
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -8244,6 +8244,17 @@ @@ -8254,6 +8254,17 @@
goto bf_fail; goto bf_fail;
} }

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -8094,6 +8094,7 @@ @@ -8104,6 +8104,7 @@
ath_hal_setupxtxdesc(sc->sc_ah, ds, mrr.rate1, mrr.retries1, ath_hal_setupxtxdesc(sc->sc_ah, ds, mrr.rate1, mrr.retries1,
mrr.rate2, mrr.retries2, mrr.rate2, mrr.retries2,
mrr.rate3, mrr.retries3); mrr.rate3, mrr.retries3);

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -10265,11 +10265,11 @@ @@ -10277,11 +10277,11 @@
sc->sc_currates = rt; sc->sc_currates = rt;
sc->sc_curmode = mode; sc->sc_curmode = mode;
/* /*

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -2721,6 +2721,9 @@ @@ -2725,6 +2725,9 @@
static int static int
ath_set_ack_bitrate(struct ath_softc *sc, int high) ath_set_ack_bitrate(struct ath_softc *sc, int high)
{ {
@ -10,7 +10,7 @@
if (ar_device(sc->devid) == 5212 || ar_device(sc->devid) == 5213) { if (ar_device(sc->devid) == 5212 || ar_device(sc->devid) == 5213) {
/* set ack to be sent at low bit-rate */ /* set ack to be sent at low bit-rate */
/* registers taken from the OpenBSD 5212 HAL */ /* registers taken from the OpenBSD 5212 HAL */
@@ -10780,8 +10783,13 @@ @@ -10792,8 +10795,13 @@
break; break;
#endif #endif
case ATH_ACKRATE: case ATH_ACKRATE:

View file

@ -1,6 +1,6 @@
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -8853,8 +8853,7 @@ @@ -8865,8 +8865,7 @@
* needed to do the reset with chanchange = AH_FALSE in order * needed to do the reset with chanchange = AH_FALSE in order
* to receive traffic when peforming high velocity channel * to receive traffic when peforming high velocity channel
* changes. */ * changes. */

View file

@ -640,7 +640,7 @@
ss->ss_next = 0; ss->ss_next = 0;
/* XXX tunables */ /* XXX tunables */
ss->ss_mindwell = msecs_to_jiffies(200); /* 200ms */ ss->ss_mindwell = msecs_to_jiffies(200); /* 200ms */
@@ -759,13 +538,6 @@ @@ -761,13 +540,6 @@
if (IEEE80211_IS_CHAN_RADAR(c->chan)) if (IEEE80211_IS_CHAN_RADAR(c->chan))
continue; continue;

View file

@ -23,7 +23,7 @@
return 0; return 0;
bad3: bad3:
ieee80211_ifdetach(ic); ieee80211_ifdetach(ic);
@@ -2347,16 +2350,6 @@ @@ -2351,16 +2354,6 @@
} }
if (status & HAL_INT_MIB) { if (status & HAL_INT_MIB) {
sc->sc_stats.ast_mib++; sc->sc_stats.ast_mib++;
@ -40,7 +40,7 @@
/* Let the HAL handle the event. */ /* Let the HAL handle the event. */
ath_hal_mibevent(ah, &sc->sc_halstats); ath_hal_mibevent(ah, &sc->sc_halstats);
} }
@@ -2426,6 +2419,43 @@ @@ -2430,6 +2423,43 @@
return flags; return flags;
} }
@ -84,7 +84,7 @@
/* /*
* Context: process context * Context: process context
*/ */
@@ -2491,8 +2521,7 @@ @@ -2495,8 +2525,7 @@
if (sc->sc_softled) if (sc->sc_softled)
ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); ath_hal_gpioCfgOutput(ah, sc->sc_ledpin);
@ -94,7 +94,7 @@
/* /*
* This is needed only to setup initial state * This is needed only to setup initial state
@@ -2528,7 +2557,7 @@ @@ -2532,7 +2561,7 @@
* Enable MIB interrupts when there are hardware phy counters. * Enable MIB interrupts when there are hardware phy counters.
* Note we only do this (at the moment) for station mode. * Note we only do this (at the moment) for station mode.
*/ */
@ -103,7 +103,7 @@
sc->sc_imask |= HAL_INT_MIB; sc->sc_imask |= HAL_INT_MIB;
ath_hal_intrset(ah, sc->sc_imask); ath_hal_intrset(ah, sc->sc_imask);
@@ -2785,9 +2814,7 @@ @@ -2789,9 +2818,7 @@
EPRINTF(sc, "Unable to reset hardware: '%s' (HAL status %u)\n", EPRINTF(sc, "Unable to reset hardware: '%s' (HAL status %u)\n",
ath_get_hal_status_desc(status), status); ath_get_hal_status_desc(status), status);
@ -114,7 +114,7 @@
ath_update_txpow(sc); /* update tx power state */ ath_update_txpow(sc); /* update tx power state */
ath_radar_update(sc); ath_radar_update(sc);
ath_setdefantenna(sc, sc->sc_defant); ath_setdefantenna(sc, sc->sc_defant);
@@ -4165,6 +4192,8 @@ @@ -4173,6 +4200,8 @@
if (sc->sc_nmonvaps > 0) if (sc->sc_nmonvaps > 0)
rfilt |= (HAL_RX_FILTER_CONTROL | HAL_RX_FILTER_BEACON | rfilt |= (HAL_RX_FILTER_CONTROL | HAL_RX_FILTER_BEACON |
HAL_RX_FILTER_PROBEREQ | HAL_RX_FILTER_PROM); HAL_RX_FILTER_PROBEREQ | HAL_RX_FILTER_PROM);
@ -123,7 +123,7 @@
if (sc->sc_curchan.privFlags & CHANNEL_DFS) if (sc->sc_curchan.privFlags & CHANNEL_DFS)
rfilt |= (HAL_RX_FILTER_PHYERR | HAL_RX_FILTER_PHYRADAR); rfilt |= (HAL_RX_FILTER_PHYERR | HAL_RX_FILTER_PHYRADAR);
return rfilt; return rfilt;
@@ -6513,9 +6542,6 @@ @@ -6523,9 +6552,6 @@
rs->rs_rssi = 0; rs->rs_rssi = 0;
len = rs->rs_datalen; len = rs->rs_datalen;
@ -133,7 +133,7 @@
if (rs->rs_more) { if (rs->rs_more) {
/* /*
@@ -8865,9 +8891,7 @@ @@ -8877,9 +8903,7 @@
if (sc->sc_softled) if (sc->sc_softled)
ath_hal_gpioCfgOutput(ah, sc->sc_ledpin); ath_hal_gpioCfgOutput(ah, sc->sc_ledpin);
@ -144,7 +144,7 @@
sc->sc_curchan = hchan; sc->sc_curchan = hchan;
ath_update_txpow(sc); /* update tx power state */ ath_update_txpow(sc); /* update tx power state */
ath_radar_update(sc); ath_radar_update(sc);
@@ -10644,9 +10668,54 @@ @@ -10656,9 +10680,54 @@
ATH_RP_IGNORED = 24, ATH_RP_IGNORED = 24,
ATH_RADAR_IGNORED = 25, ATH_RADAR_IGNORED = 25,
ATH_MAXVAPS = 26, ATH_MAXVAPS = 26,
@ -199,7 +199,7 @@
ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos) ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
{ {
struct ath_softc *sc = ctl->extra1; struct ath_softc *sc = ctl->extra1;
@@ -10832,6 +10901,11 @@ @@ -10844,6 +10913,11 @@
case ATH_RADAR_IGNORED: case ATH_RADAR_IGNORED:
sc->sc_radar_ignored = val; sc->sc_radar_ignored = val;
break; break;
@ -211,7 +211,7 @@
default: default:
ret = -EINVAL; ret = -EINVAL;
break; break;
@@ -10898,6 +10972,11 @@ @@ -10910,6 +10984,11 @@
case ATH_RADAR_IGNORED: case ATH_RADAR_IGNORED:
val = sc->sc_radar_ignored; val = sc->sc_radar_ignored;
break; break;
@ -223,7 +223,7 @@
default: default:
ret = -EINVAL; ret = -EINVAL;
break; break;
@@ -11075,6 +11154,24 @@ @@ -11087,6 +11166,24 @@
.proc_handler = ath_sysctl_halparam, .proc_handler = ath_sysctl_halparam,
.extra2 = (void *)ATH_RADAR_IGNORED, .extra2 = (void *)ATH_RADAR_IGNORED,
}, },

View file

@ -5,7 +5,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
--- a/ath/if_ath.c --- a/ath/if_ath.c
+++ b/ath/if_ath.c +++ b/ath/if_ath.c
@@ -8315,6 +8315,18 @@ @@ -8325,6 +8325,18 @@
#endif #endif
if (ts->ts_status & HAL_TXERR_XRETRY) { if (ts->ts_status & HAL_TXERR_XRETRY) {
sc->sc_stats.ast_tx_xretries++; sc->sc_stats.ast_tx_xretries++;

View file

@ -0,0 +1,11 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -4914,7 +4914,7 @@
* capability info and arrange for a mode change
* if needed.
*/
- if (sc->sc_dturbo) {
+ if (sc->sc_dturbo && NULL != avp->av_boff.bo_tim) {
u_int8_t dtim;
dtim = ((avp->av_boff.bo_tim[2] == 1) ||
(avp->av_boff.bo_tim[3] == 1));

View file

@ -0,0 +1,13 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -539,8 +539,8 @@
/* Allocate space for dynamically determined maximum VAP count */
sc->sc_bslot =
- kmalloc(ath_maxvaps * sizeof(struct ieee80211vap), GFP_KERNEL);
- memset(sc->sc_bslot, 0, ath_maxvaps * sizeof(struct ieee80211vap));
+ kmalloc(ath_maxvaps * sizeof(struct ieee80211vap*), GFP_KERNEL);
+ memset(sc->sc_bslot, 0, ath_maxvaps * sizeof(struct ieee80211vap*));
/*
* Cache line size is used to size and align various

View file

@ -0,0 +1,10 @@
--- a/net80211/ieee80211.c
+++ b/net80211/ieee80211.c
@@ -684,6 +684,7 @@
int i;
/* Brute force search */
+ flags &= IEEE80211_CHAN_ALLTURBO;
for (i = 0; i < ic->ic_nchans; i++) {
c = &ic->ic_channels[i];
if (c->ic_freq == freq &&

View file

@ -0,0 +1,52 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -389,6 +389,7 @@
static int ath_outdoor = AH_FALSE; /* enable outdoor use */
static int ath_xchanmode = AH_TRUE; /* enable extended channels */
static int ath_maxvaps = ATH_MAXVAPS_DEFAULT; /* set default maximum vaps */
+static int bstuck_thresh = BSTUCK_THRESH; /* Stuck beacon count required for reset */
static char *autocreate = NULL;
static char *ratectl = DEF_RATE_CTL;
static int rfkill = 0;
@@ -432,6 +433,7 @@
#ifdef ATH_CAP_TPC
MODULE_PARM(tpc, "i");
#endif
+MODULE_PARM(bstuck_thresh, "i");
MODULE_PARM(autocreate, "s");
MODULE_PARM(ratectl, "s");
#else
@@ -445,6 +447,7 @@
#ifdef ATH_CAP_TPC
module_param(tpc, int, 0600);
#endif
+module_param(bstuck_thresh, int, 0600);
module_param(autocreate, charp, 0600);
module_param(ratectl, charp, 0600);
#endif
@@ -457,6 +460,7 @@
MODULE_PARM_DESC(tpc, "Enable/disable per-packet transmit power control (TPC) "
"capability");
#endif
+MODULE_PARM_DESC(bstuck_thresh, "Override default stuck beacon threshold");
MODULE_PARM_DESC(autocreate, "Create ath device in "
"[sta|ap|wds|adhoc|ahdemo|monitor] mode. defaults to sta, use "
"'none' to disable");
@@ -5061,7 +5065,7 @@
DPRINTF(sc, ATH_DEBUG_BEACON_PROC,
"Missed %u consecutive beacons (n_beacon=%u)\n",
sc->sc_bmisscount, n_beacon);
- if (sc->sc_bmisscount > BSTUCK_THRESH)
+ if (sc->sc_bmisscount > bstuck_thresh)
ATH_SCHEDULE_TQUEUE(&sc->sc_bstucktq, needmark);
return;
}
@@ -5217,7 +5221,7 @@
* check will be true, in which case return
* without resetting the driver.
*/
- if (sc->sc_bmisscount <= BSTUCK_THRESH)
+ if (sc->sc_bmisscount <= bstuck_thresh)
return;
EPRINTF(sc, "Stuck beacon; resetting (beacon miss count: %u)\n",
sc->sc_bmisscount);

View file

@ -0,0 +1,20 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -6321,7 +6321,7 @@
/* Never copy the SKB, as it is ours on the RX side, and this is the
* last process on the TX side and we only modify our own headers. */
- tskb = ath_skb_removepad(skb, 0 /* Copy SKB */);
+ tskb = ath_skb_removepad(skb, !tx /* Copy SKB */);
if (tskb == NULL) {
DPRINTF(sc, ATH_DEBUG_ANY,
"Dropping; ath_skb_removepad failed!\n");
@@ -6329,6 +6329,8 @@
}
ieee80211_input_monitor(ic, tskb, bf, tx, tsf, sc);
+ if (tskb != skb)
+ ieee80211_dev_kfree_skb(&tskb);
}
/*

File diff suppressed because it is too large Load diff