Date: Sun, 3 Feb 2019 04:31:50 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343699 - head/sys/net80211 Message-ID: <201902030431.x134VoY4091654@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Sun Feb 3 04:31:50 2019 New Revision: 343699 URL: https://svnweb.freebsd.org/changeset/base/343699 Log: net80211(4): do not setup Tx parameters for unsupported modes. That should shorten 'ifconfig <wlan> list txparam' output since unsupported modes will not be shown. Checked with RTL8188EE, STA mode. MFC after: 2 weeks Modified: head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_tdma.c Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Sun Feb 3 03:02:59 2019 (r343698) +++ head/sys/net80211/ieee80211_proto.c Sun Feb 3 04:31:50 2019 (r343699) @@ -347,6 +347,9 @@ ieee80211_proto_vattach(struct ieee80211vap *vap) * driver and/or user applications. */ for (i = IEEE80211_MODE_11A; i < IEEE80211_MODE_MAX; i++) { + if (isclr(ic->ic_modecaps, i)) + continue; + const struct ieee80211_rateset *rs = &ic->ic_sup_rates[i]; vap->iv_txparms[i].ucastrate = IEEE80211_FIXED_RATE_NONE; Modified: head/sys/net80211/ieee80211_tdma.c ============================================================================== --- head/sys/net80211/ieee80211_tdma.c Sun Feb 3 03:02:59 2019 (r343698) +++ head/sys/net80211/ieee80211_tdma.c Sun Feb 3 04:31:50 2019 (r343699) @@ -127,6 +127,9 @@ static int tdma_process_params(struct ieee80211_node * static void settxparms(struct ieee80211vap *vap, enum ieee80211_phymode mode, int rate) { + if (isclr(vap->iv_ic->ic_modecaps, mode)) + return; + vap->iv_txparms[mode].ucastrate = rate; vap->iv_txparms[mode].mcastrate = rate; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902030431.x134VoY4091654>