svn commit: r344225 - stable/11/sys/net80211

Andriy Voskoboinyk avos at FreeBSD.org
Sun Feb 17 03:21:44 UTC 2019


Author: avos
Date: Sun Feb 17 03:21:42 2019
New Revision: 344225
URL: https://svnweb.freebsd.org/changeset/base/344225

Log:
  MFC r343699:
  net80211: do not setup Tx parameters for unsupported modes.
  
  That should shorten 'ifconfig <wlan> list txparam' output since
  unsupported modes will not be shown.

Modified:
  stable/11/sys/net80211/ieee80211_proto.c
  stable/11/sys/net80211/ieee80211_tdma.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/net80211/ieee80211_proto.c
==============================================================================
--- stable/11/sys/net80211/ieee80211_proto.c	Sun Feb 17 03:21:18 2019	(r344224)
+++ stable/11/sys/net80211/ieee80211_proto.c	Sun Feb 17 03:21:42 2019	(r344225)
@@ -345,6 +345,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: stable/11/sys/net80211/ieee80211_tdma.c
==============================================================================
--- stable/11/sys/net80211/ieee80211_tdma.c	Sun Feb 17 03:21:18 2019	(r344224)
+++ stable/11/sys/net80211/ieee80211_tdma.c	Sun Feb 17 03:21:42 2019	(r344225)
@@ -125,6 +125,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;
 }


More information about the svn-src-all mailing list