socsvn commit: r257067 - in soc2013/ccqin/head/sys: dev/ath net80211
ccqin at FreeBSD.org
ccqin at FreeBSD.org
Sat Sep 7 09:37:45 UTC 2013
Author: ccqin
Date: Sat Sep 7 09:37:45 2013
New Revision: 257067
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=257067
Log:
add some debug stuff.
* blank call to ath_rate_newassoc(), replace to ieee80211_ratectl_node_init(ni)
* add some IEEE80211_NOTE to ieee80211 ratectl.
* enable IEEE80211_MSG_RATECTL.
Modified:
soc2013/ccqin/head/sys/dev/ath/if_ath.c
soc2013/ccqin/head/sys/dev/ath/if_ath_tx.c
soc2013/ccqin/head/sys/net80211/ieee80211_amrr.c
soc2013/ccqin/head/sys/net80211/ieee80211_freebsd.c
soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.c
soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h
Modified: soc2013/ccqin/head/sys/dev/ath/if_ath.c
==============================================================================
--- soc2013/ccqin/head/sys/dev/ath/if_ath.c Sat Sep 7 07:58:29 2013 (r257066)
+++ soc2013/ccqin/head/sys/dev/ath/if_ath.c Sat Sep 7 09:37:45 2013 (r257067)
@@ -1391,6 +1391,7 @@
caps |= IEEE80211_RATECTL_CAP_MULTXCHAIN;
ieee80211_ratectl_init(vap, caps);
+
/* complete setup */
ieee80211_vap_attach(vap, ath_media_change, ieee80211_media_status);
return vap;
@@ -5601,8 +5602,10 @@
an->an_mcastrix = ath_tx_findrix(sc, tp->mcastrate);
an->an_mgmtrix = ath_tx_findrix(sc, tp->mgmtrate);
-
+#if 0
ath_rate_newassoc(sc, an, isnew);
+#endif
+ ieee80211_ratectl_node_init(ni);
if (isnew &&
(vap->iv_flags & IEEE80211_F_PRIVACY) == 0 && sc->sc_hasclrkey &&
Modified: soc2013/ccqin/head/sys/dev/ath/if_ath_tx.c
==============================================================================
--- soc2013/ccqin/head/sys/dev/ath/if_ath_tx.c Sat Sep 7 07:58:29 2013 (r257066)
+++ soc2013/ccqin/head/sys/dev/ath/if_ath_tx.c Sat Sep 7 09:37:45 2013 (r257067)
@@ -1428,7 +1428,7 @@
/* XXX need some msg out here.*/
}
- rc_info = (struct ieee80211_rc_series*)(mtag + 1);
+ rc_info = (struct ieee80211_rc_info*)(mtag + 1);
rc = rc_info->iri_rc;
bzero(rc_info, sizeof(rc_info));
Modified: soc2013/ccqin/head/sys/net80211/ieee80211_amrr.c
==============================================================================
--- soc2013/ccqin/head/sys/net80211/ieee80211_amrr.c Sat Sep 7 07:58:29 2013 (r257066)
+++ soc2013/ccqin/head/sys/net80211/ieee80211_amrr.c Sat Sep 7 09:37:45 2013 (r257067)
@@ -191,9 +191,8 @@
amn->amn_ticks = ticks;
IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
- "AMRR: nrates=%d, initial rate %d",
- rs->rs_nrates,
- rate);
+ "%s: AMRR: nrates=%d, initial rate %d",
+ __func__, rs->rs_nrates, rate);
}
static void
@@ -215,8 +214,8 @@
IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
- "AMRR: current rate %d, txcnt=%d, retrycnt=%d",
- rs->rs_rates[rix] & IEEE80211_RATE_VAL,
+ "%s: AMRR: current rate %d, txcnt=%d, retrycnt=%d",
+ __func__, rs->rs_rates[rix] & IEEE80211_RATE_VAL,
amn->amn_txcnt,
amn->amn_retrycnt);
@@ -236,8 +235,8 @@
amn->amn_success = 0;
rix++;
IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
- "AMRR increasing rate %d (txcnt=%d retrycnt=%d)",
- rs->rs_rates[rix] & IEEE80211_RATE_VAL,
+ "%s: AMRR increasing rate %d (txcnt=%d retrycnt=%d)",
+ __func__, rs->rs_rates[rix] & IEEE80211_RATE_VAL,
amn->amn_txcnt, amn->amn_retrycnt);
} else {
amn->amn_recovery = 0;
@@ -257,8 +256,8 @@
}
rix--;
IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
- "AMRR decreasing rate %d (txcnt=%d retrycnt=%d)",
- rs->rs_rates[rix] & IEEE80211_RATE_VAL,
+ "%s: AMRR decreasing rate %d (txcnt=%d retrycnt=%d)",
+ __func__, rs->rs_rates[rix] & IEEE80211_RATE_VAL,
amn->amn_txcnt, amn->amn_retrycnt);
}
amn->amn_recovery = 0;
@@ -360,6 +359,13 @@
rc[3].rix = 0;
}
}
+ IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
+ "%s: AMRR rate sets(rix, tries). rc[0]:(%d, %d), rc[1]:(%d, %d), "
+ "rc[2]:(%d, %d), rc[3]:(%d, %d)", __func__,
+ rc[0].rix, rc[0].tries,
+ rc[1].rix, rc[1].tries,
+ rc[2].rix, rc[2].tries,
+ rc[3].rix, rc[3].tries);
#undef RATE
#undef MCS
}
@@ -381,6 +387,12 @@
amn->amn_txcnt += rc_info->iri_txcnt;
amn->amn_success += (rc_info->iri_txcnt - rc_info->iri_failcnt);
amn->amn_retrycnt += rc_info->iri_retrycnt;
+
+ IEEE80211_NOTE(vap, IEEE80211_MSG_RATECTL, ni,
+ "%s: AMRR tx complete. txcnt=%d(%d) success=%d(%d) retrycnt=%d(%d)\n",
+ __func__, amn->amn_txcnt, rc_info->iri_txcnt,
+ amn->amn_success, (rc_info->iri_txcnt - rc_info->iri_failcnt),
+ amn->amn_retrycnt, rc_info->iri_retrycnt);
}
/*
@@ -398,6 +410,9 @@
amn->amn_txcnt = txcnt;
amn->amn_success = success;
amn->amn_retrycnt = retrycnt;
+ IEEE80211_NOTE(vap, IEEE80211_MSG_RATECTL, ni,
+ "%s: AMRR tx update. txcnt=%d success=%d retrycnt=%d\n",
+ __func__, txcnt, success, retrycnt);
}
static int
Modified: soc2013/ccqin/head/sys/net80211/ieee80211_freebsd.c
==============================================================================
--- soc2013/ccqin/head/sys/net80211/ieee80211_freebsd.c Sat Sep 7 07:58:29 2013 (r257066)
+++ soc2013/ccqin/head/sys/net80211/ieee80211_freebsd.c Sat Sep 7 09:37:45 2013 (r257067)
@@ -262,7 +262,9 @@
"driver_caps", CTLFLAG_RW, &vap->iv_caps, 0,
"driver capabilities");
#ifdef IEEE80211_DEBUG
+ ieee80211_debug |= IEEE80211_MSG_RATECTL;
vap->iv_debug = ieee80211_debug;
+ if_printf(ifp, "%s: iv_debug=0x%x\n", __func__, vap->iv_debug);
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
"debug", CTLFLAG_RW, &vap->iv_debug, 0,
"control debugging printfs");
Modified: soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.c
==============================================================================
--- soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.c Sat Sep 7 07:58:29 2013 (r257066)
+++ soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.c Sat Sep 7 09:37:45 2013 (r257067)
@@ -106,6 +106,9 @@
if (vap->iv_rate == ratectls[IEEE80211_RATECTL_NONE])
ieee80211_ratectl_set(vap, IEEE80211_RATECTL_AMRR);
vap->iv_rate->ir_init(vap, capabilities);
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_RATECTL,
+ "%s: ratectl initialized. caps=0x%08x\n",
+ __func__, capabilities);
}
void
Modified: soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h
==============================================================================
--- soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h Sat Sep 7 07:58:29 2013 (r257066)
+++ soc2013/ccqin/head/sys/net80211/ieee80211_ratectl.h Sat Sep 7 09:37:45 2013 (r257067)
@@ -161,6 +161,8 @@
const struct ieee80211vap *vap = ni->ni_vap;
vap->iv_rate->ir_node_init(ni);
+ IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_RATECTL,
+ "%s: net80211 ratectl node inited.\n", __func__);
}
static void __inline
@@ -262,9 +264,18 @@
__inline static const struct ieee80211_rateset *
ieee80211_ratectl_get_rateset(const struct ieee80211_node *ni)
{
- return ieee80211_ratectl_node_is11n(ni) ?
- (struct ieee80211_rateset *) &ni->ni_htrates :
- &ni->ni_rates;
+ const struct ieee80211_rateset *rs = NULL;
+ /* 11n or not? Pick the right rateset */
+ if (ieee80211_ratectl_node_is11n(ni)) {
+ IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
+ "%s: 11n node", __func__);
+ rs = (struct ieee80211_rateset *) &ni->ni_htrates;
+ } else {
+ IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_RATECTL, ni,
+ "%s: non-11n node", __func__);
+ rs = &ni->ni_rates;
+ }
+ return rs;
}
static void __inline
More information about the svn-soc-all
mailing list