From nobody Wed Nov 29 16:38:27 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 4SgQ4M4HTMz52wvL; Wed, 29 Nov 2023 16:38:27 +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 4SgQ4M3GB3z3Jg4; Wed, 29 Nov 2023 16:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275907; 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=zgpVldTQ5V5CuPQJ9xDdB9lmQKD5Y+aUeU+0zAEuD/s=; b=sOO3qqx+4gUGROiMokBdkdMsFmdFmRdV4uCqiIkBaKBg3XQhXcAK6eDz4Q00zLAozUO+H0 jGSJlm7gHbDDBP737CMomy2dowfeR1FcYrJaahNPcUhVEfjl1pux0VYMppqwVZWFOeeX/9 ThjpnYv+1JwzI8pbhasAjP7cEparIrz12eWXdVTTnlb5I8ZZO68I8qTdEKSaVVLAooH2rn 0olAEChYo0eX9QrR7tfHNHlNKI+0DOhyuVFa05eFVLMdr0cOKnoSCE+jX2yc3Le+htLrUT 1agifeIbuKzADcznhPlG16VErL6yqG44AX5tM13n1aQfnNyTAHJ0orBPjswqsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701275907; 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=zgpVldTQ5V5CuPQJ9xDdB9lmQKD5Y+aUeU+0zAEuD/s=; b=S20/+jzS5+zYsYGKgg9qmwhFbG5/YRG0kr3vQXJxVVl/0BZ+r1oUIBrfZwy70sP3Xdy/NR ka7o8dyDGnsT8HkcXH6iKIyKfnUtF8xt/V7tO+q9fHiYsfPOLGwgjutFqshPwO9fgJoP4k rGhat6i9j7i/Ik7FczyJ8U8DTjcjW325IXAEcv76ih7mzTTtItoJxk5m6DFNrGe9UAkCB0 b30Pzw+dDrVKhaq8Wmd2oajzZoigeM4hYB1YgRgzYrTz2WReOY9sh0g2a065o+Iv8iTBbV 2qGg0nxf9CRL3FMVoDb+ZtOdzpTQ6xD7b6hzrc5VrNHJd1N9+3zAmOwp4c98iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701275907; a=rsa-sha256; cv=none; b=nDWSLGcmhIbkAkJUgApLdxyurGv2hvC3SLGmXSC6FH5n3S2oXO12edcvQvuy8ZeQ8GnGw5 NvXZ5Tp/BC5Xwxf2z/YAl8+iD+34v+/qfiRZdW+uHRjpPapDT02MurWfm7YqeQ4fH9jJZD EL3N0FanX0Dr9Hge+0IbW/fpmOINlHOqUvTzytcSd4u8nk303vCzEea96HpL6lHzAt6LPP AQ7wECrTjuCifJD4fJihu6MPH7kMNX1E6lje3sWLWsnqHNNTbC8byOnMH89TSwZ2o0CbgM OKnGUW1q+bNv/IqMr/SnyhdkNtU6tTsfNwPjGAYUS8jEwBXopV69jHQ4b6dKdA== 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 4SgQ4M2JW8z1C48; Wed, 29 Nov 2023 16:38:27 +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 3ATGcRnx045848; Wed, 29 Nov 2023 16:38:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ATGcRIx045845; Wed, 29 Nov 2023 16:38:27 GMT (envelope-from git) Date: Wed, 29 Nov 2023 16:38:27 GMT Message-Id: <202311291638.3ATGcRIx045845@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: 70f3472c36e0 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 70f3472c36e0d809f6b9bb657c7edab2b2d7079e Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=70f3472c36e0d809f6b9bb657c7edab2b2d7079e commit 70f3472c36e0d809f6b9bb657c7edab2b2d7079e Author: Bjoern A. Zeeb AuthorDate: 2023-09-21 12:36:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-11-29 16:36:08 +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 fa22a0fce826..1785fb077145 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 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);