From nobody Fri Oct 06 14:25:11 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4S29gX0ZZRz4wgkP; Fri, 6 Oct 2023 14:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S29gW5fzKz3R59; Fri, 6 Oct 2023 14:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0GGoBhBfzcqCeu+IcK/3M5yZ4sWREeTwFcsqodL6Ux4=; b=QNU0ODyEIMpUJiBwoDvSQ8EIHAjoNiEg+3K+qiNyGEY5QTG93BW1VHjPjfBsqayHhttr6w uqpn8eP9G1EtsKpcbY43h+ZT+OBPpxkItHkKQan+Xanc5O9GCV+vJbQZGcvAnIUl7cPIAd FvXwmclV1haT+Okx8ljmg65egjC8yd64Goo6xi70vAd46TIqwgVKePIGAV2gDyFRvLmVP6 13Jo5gOGc6yhyKP+iv2nYnXY0IFpF9ckQxYmMVTkdqQmqoaKkKMnn7Nnt2HSCqtADX5QrT KnWiXnNsJ3zEsALHmbLJoA/vuiNUaKs/2uQ0pd4h+ke9nFwlYZY8nMmT/EgaBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696602311; a=rsa-sha256; cv=none; b=j1BjdSqKJbzWZV19FDYTvEpDDwmd6n5vo3TEYaj3NvI9td2yHrjTjKa2jQ7nEmNnPQmEF0 c8pXNaP+h10uPLEqwxGUatkH5CysBQgRtSl2RM6Gl9sTNMm+W9QHHQpNtET2GAeSrFhjP7 zy0jsIFAVkYQ2H2xfI4Au0tzjYdRjy2rSiun6rIRteEn7UeVaLVhlk5ys5HAGo2iJssXO9 BMeFrcM/R+5rqljmkEOMrH2GMqSj0Pwrd24LBL4klZCb7kOfL4lNUPQwYrIuO/wdqBkaDt cHryyNbQMXdTkbN20SI7nVm9h9mfIZj2n88IfmcjZyJGrr3Sl4Bfgn4QqlV8Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696602311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0GGoBhBfzcqCeu+IcK/3M5yZ4sWREeTwFcsqodL6Ux4=; b=qndGNay7+LVeHVqPWVDTvPmgK45eQ/xaluyt7BAB2JZEwIAJlJSGvGItiPvtvdstpGbNp/ sOImQr+pf18pCW+FxmouLBkJQBR1hUfqVg+Jy0rhwqrovlohHn56y6Bd+L+XdOl6UK+ob1 XKlky689epj5R/dOI9ySON8W8FRkBOduYzGWymeX12UNAlj+8oE3TABr37K1zrwqUWXnmv lOCSGxs5QlPgsVkKK9WxUKKPPKUCPl2oOHZb9vZS9yUS49BGh4VmM27jLvkKrjlMCR7qUZ +MUEhAKvQ6W29d3lcDoEbLc+SG/FA1SabuDbR7z9dClULoBznke6ozA0bjC12g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S29gW4dClzrtW; Fri, 6 Oct 2023 14:25:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 396EPBH1093344; Fri, 6 Oct 2023 14:25:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 396EPB5p093341; Fri, 6 Oct 2023 14:25:11 GMT (envelope-from git) Date: Fri, 6 Oct 2023 14:25:11 GMT Message-Id: <202310061425.396EPB5p093341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 68e1e25baf2e - stable/14 - LinuxKPI: 802.11: inialize tx queue params List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 68e1e25baf2e5576011ed532d5a30e70997d488c Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=68e1e25baf2e5576011ed532d5a30e70997d488c commit 68e1e25baf2e5576011ed532d5a30e70997d488c Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 12:36:38 +0000 Commit: Bjoern A. Zeeb 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 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);