Deleted Added
full compact
27c27
< * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 297010 2016-03-18 04:22:07Z adrian $
---
> * $FreeBSD: head/sbin/ifconfig/ifieee80211.c 298252 2016-04-19 05:17:43Z adrian $
2575a2576,2608
> printvhtpwrenv(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
> {
> printf("%s", tag);
> static const char *txpwrmap[] = {
> "20",
> "40",
> "80",
> "160",
> };
> if (verbose) {
> const struct ieee80211_ie_vht_txpwrenv *vhtpwr =
> (const struct ieee80211_ie_vht_txpwrenv *) ie;
> int i, n;
> const char *sep = "";
>
> /* Get count; trim at ielen */
> n = (vhtpwr->tx_info &
> IEEE80211_VHT_TXPWRENV_INFO_COUNT_MASK) + 1;
> /* Trim at ielen */
> if (n > ielen - 3)
> n = ielen - 3;
> printf("<tx_info 0x%02x pwr:[", vhtpwr->tx_info);
> for (i = 0; i < n; i++) {
> printf("%s%s:%.2f", sep, txpwrmap[i],
> ((float) ((int8_t) ie[i+3])) / 2.0);
> sep = " ";
> }
>
> printf("]>");
> }
> }
>
> static void
3154d3186
< case IEEE80211_ELEMID_VHT_PWR_ENV: return " VHTPWRENV";
3224a3257,3259
> case IEEE80211_ELEMID_VHT_PWR_ENV:
> printvhtpwrenv(" VHTPWRENV", vp, 2+vp[1], maxcols);
> break;