Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_ddb.c
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
static void _db_show_node_table(const char *tag, | static void _db_show_node_table(const char *tag, | ||||
const struct ieee80211_node_table *); | const struct ieee80211_node_table *); | ||||
static void _db_show_channel(const char *tag, const struct ieee80211_channel *); | static void _db_show_channel(const char *tag, const struct ieee80211_channel *); | ||||
static void _db_show_ssid(const char *tag, int ix, int len, const uint8_t *); | static void _db_show_ssid(const char *tag, int ix, int len, const uint8_t *); | ||||
static void _db_show_appie(const char *tag, const struct ieee80211_appie *); | static void _db_show_appie(const char *tag, const struct ieee80211_appie *); | ||||
static void _db_show_key(const char *tag, int ix, const struct ieee80211_key *); | static void _db_show_key(const char *tag, int ix, const struct ieee80211_key *); | ||||
static void _db_show_roamparams(const char *tag, const void *arg, | static void _db_show_roamparams(const char *tag, const void *arg, | ||||
const struct ieee80211_roamparam *rp); | const struct ieee80211_roamparam_vht *rp); | ||||
static void _db_show_txparams(const char *tag, const void *arg, | static void _db_show_txparams(const char *tag, const void *arg, | ||||
const struct ieee80211_txparam *tp); | const struct ieee80211_txparam_vht *tp); | ||||
static void _db_show_ageq(const char *tag, const struct ieee80211_ageq *q); | static void _db_show_ageq(const char *tag, const struct ieee80211_ageq *q); | ||||
static void _db_show_stats(const struct ieee80211_stats *); | static void _db_show_stats(const struct ieee80211_stats *); | ||||
#ifdef IEEE80211_SUPPORT_MESH | #ifdef IEEE80211_SUPPORT_MESH | ||||
static void _db_show_mesh(const struct ieee80211_mesh_state *); | static void _db_show_mesh(const struct ieee80211_mesh_state *); | ||||
#endif | #endif | ||||
DB_SHOW_COMMAND(sta, db_show_sta) | DB_SHOW_COMMAND(sta, db_show_sta) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 717 Lines • ▼ Show 20 Lines | if (cip->ic_cipher != IEEE80211_CIPHER_WEP && | ||||
wk->wk_keytsc != 0) | wk->wk_keytsc != 0) | ||||
db_printf(" tsc %ju", (uintmax_t)wk->wk_keytsc); | db_printf(" tsc %ju", (uintmax_t)wk->wk_keytsc); | ||||
db_printf(" flags=%b", wk->wk_flags, IEEE80211_KEY_BITS); | db_printf(" flags=%b", wk->wk_flags, IEEE80211_KEY_BITS); | ||||
} | } | ||||
db_printf("\n"); | db_printf("\n"); | ||||
} | } | ||||
static void | static void | ||||
printrate(const char *tag, int v) | printrate(const char *tag, uint16_t idx) | ||||
{ | { | ||||
if (v == IEEE80211_FIXED_RATE_NONE) | char buf[40]; | ||||
if (idx >= IEEE80211_RATES_COUNT) { | |||||
db_printf(" %s <none>", tag); | db_printf(" %s <none>", tag); | ||||
else if (v == 11) | return; | ||||
db_printf(" %s 5.5", tag); | |||||
else if (v & IEEE80211_RATE_MCS) | |||||
db_printf(" %s MCS%d", tag, v &~ IEEE80211_RATE_MCS); | |||||
else | |||||
db_printf(" %s %d", tag, v/2); | |||||
} | } | ||||
db_printf(" %s: %s", tag, | |||||
ieee80211_rate_to_string(idx, 0, 0, buf, sizeof(buf))); | |||||
} | |||||
static void | static void | ||||
_db_show_roamparams(const char *tag, const void *arg, | _db_show_roamparams(const char *tag, const void *arg, | ||||
const struct ieee80211_roamparam *rp) | const struct ieee80211_roamparam_vht *rp) | ||||
{ | { | ||||
db_printf(tag, arg); | db_printf(tag, arg); | ||||
if (rp->rssi & 1) | if (rp->rssi & 1) | ||||
db_printf(" rssi %u.5", rp->rssi/2); | db_printf(" rssi %u.5", rp->rssi/2); | ||||
else | else | ||||
db_printf(" rssi %u", rp->rssi/2); | db_printf(" rssi %u", rp->rssi/2); | ||||
printrate("rate", rp->rate); | printrate("rate", rp->rate); | ||||
} | } | ||||
static void | static void | ||||
_db_show_txparams(const char *tag, const void *arg, | _db_show_txparams(const char *tag, const void *arg, | ||||
const struct ieee80211_txparam *tp) | const struct ieee80211_txparam_vht *tp) | ||||
{ | { | ||||
db_printf(tag, arg); | db_printf(tag, arg); | ||||
printrate("ucastrate", tp->ucastrate); | printrate("ucastrate", tp->ucastrate); | ||||
printrate("mcastrate", tp->mcastrate); | printrate("mcastrate", tp->mcastrate); | ||||
printrate("mgmtrate", tp->mgmtrate); | printrate("mgmtrate", tp->mgmtrate); | ||||
db_printf(" maxretry %d", tp->maxretry); | db_printf(" maxretry %d", tp->maxretry); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |