git: 68e1e25baf2e - stable/14 - LinuxKPI: 802.11: inialize tx queue params
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Oct 2023 14:25:11 UTC
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=68e1e25baf2e5576011ed532d5a30e70997d488c commit 68e1e25baf2e5576011ed532d5a30e70997d488c Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2023-09-21 12:36:38 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2023-10-06 12:47:40 +0000 LinuxKPI: 802.11: inialize tx queue params When adding a VAP (vif) initialize its tx queue parameters calling mo_conf_tx(). I could not spot net80211 providing some of the values needed before having a node so currrently we use hard-coded values with a comment with a reference on how to properly calculate the values in the future (e.g., in case of 11b or other cases). Sponsored by: The FreeBSD Foundation (cherry picked from commit a6042e17c8999c4965bd4d762c4564b322f1ae7b) --- sys/compat/linuxkpi/common/src/linux_80211.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 04ee75eb2c68..1e7ae261779c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2245,9 +2245,11 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], struct lkpi_vif *lvif; struct ieee80211vap *vap; struct ieee80211_vif *vif; + struct ieee80211_tx_queue_params txqp; enum ieee80211_bss_changed changed; size_t len; int error, i; + uint16_t ac; if (!TAILQ_EMPTY(&ic->ic_vaps)) /* 1 so far. Add <n> once this works. */ return (NULL); @@ -2346,7 +2348,24 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], changed = 0; lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, changed); - /* conf_tx setup; default WME? */ + /* Configure tx queues (conf_tx), default WME & send BSS_CHANGED_QOS. */ + IMPROVE("Hardcoded values; to fix see 802.11-2016, 9.4.2.29 EDCA Parameter Set element"); + LKPI_80211_LHW_LOCK(lhw); + for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { + + bzero(&txqp, sizeof(txqp)); + txqp.cw_min = 15; + txqp.cw_max = 1023; + txqp.txop = 0; + txqp.aifs = 2; + error = lkpi_80211_mo_conf_tx(hw, vif, /* link_id */0, ac, &txqp); + if (error != 0) + ic_printf(ic, "%s: conf_tx ac %u failed %d\n", + __func__, ac, error); + } + LKPI_80211_LHW_UNLOCK(lhw); + changed = BSS_CHANGED_QOS; + lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, changed); /* Force MC init. */ lkpi_update_mcast_filter(ic, true);