parent
7ac73f8362
commit
0fb8aa363f
@ -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. */
|
@ -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));
|
@ -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
|
@ -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 &&
|
@ -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);
|
@ -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
Loading…
Reference in new issue