aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2023-09-21 12:36:38 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2023-09-21 17:08:55 +0000
commita6042e17c8999c4965bd4d762c4564b322f1ae7b (patch)
tree7fd8bb9964f7b61d0751f093b8e63c277708db91
parent8d58a0578635dc7dd1025ab08b0479f2b383e1a4 (diff)
downloadsrc-a6042e17c8999c4965bd4d762c4564b322f1ae7b.tar.gz
src-a6042e17c8999c4965bd4d762c4564b322f1ae7b.zip
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 MFC after: 3 days
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index b97e1c196867..ffad61ba934a 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -2244,9 +2244,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);
@@ -2345,7 +2347,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);