From nobody Mon Oct 09 23:16:19 2023 X-Original-To: dev-commits-src-branches@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 4S4FJz5r28z4wh0W; Mon, 9 Oct 2023 23:16:19 +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 4S4FJz3mqsz3QmW; Mon, 9 Oct 2023 23:16:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696893379; 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=SBTwtJYFGdJZ5UguOtAbsN37Pf6E7o4U6yRLn/WAL6A=; b=nF8ZHLHe/Cm4MSkLVL275k7Bys+NK+AG7lTiFj/SA1HexMR9fPmfrO87kH2fuFn22ji04U 1WIZjSHSZNdvVhQzxbsvcFP3R8Sbtp+TLz3NOeF4NWRORBP6pF348zIKNOsJ0/78j9T0M/ usgYCf5nGIAnz8uN94pbjmR38z7Usw4AoxLizVxPyozXgfobtFA2BQ14z1aVsHPE4DtWdG HzjX0eZwieXhvwaW3qRQZZsd8XI6NeTBKMkDufu0fgXlMpQmpSeWKQyeB6MS8ys+4o/l/r rOKpGJVYKR883X/uJaf7vBXk6ZYuxfMEtHHuHEKIMfyplo1Z7Mqf+xVyO2lOvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696893379; a=rsa-sha256; cv=none; b=Hva0AtShyXXZ0+qnyZOUMiUEJhKL023/vwbsQuSRjwkyV0cS9G/XGGizPq0u5gErbZjXOa cvfLAROQJVocYaUovZ2K/4Ldh3/RIE8HUVQYHo7oUBkv8zK+6JLPoc9F/zJgNn8abaPwTr C5+iGv8/chDwS6ogjTsKW97StPeMPVt+deMXYzCdtYo17MaIkzYGVFC3DMAzWORiqTUH1B +MCvn9WT5K5osecl/EAQRsAI3Mm+rH3QJ8nTRVuVPaemMWBYsmJ6uTxk4JWu9pyqIPpsdL f3kX1PTzRLF9m5AJ+wNqtxCb8Elz+vhU/7HCdV+01bdlqpi4LdD8Om2PmiLynQ== 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=1696893379; 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=SBTwtJYFGdJZ5UguOtAbsN37Pf6E7o4U6yRLn/WAL6A=; b=pFnzYNDLJK2MA9PRrtWK6RynLS0BNJ6oKUr+wY6KjNiS+Rg3lTpeStxM7MNPTQikF2b7cO d7tDrkktfLkSFc1liDyI+H2s58bfxv1MhSBUamkK/gMV1Nr8EoAE2VrStDVEpdX5RKlFLP 2W5b5fv5TID4JO5aQF/H4PU9mMumU3snjMcXWAMIvfMIAm377WFz0ep3+ew96KvPyzeonx dinduUW7JAsT2KcJLQO8wZ9IPd1d1IzXORvllbeL81iek8uUIX7eJmpIHFICebMOPmB5tl hA5H8u+K2HOPUbrN3C9J2guDLazFkhjfhH6kryXInFHoalFZrYe3zZSzLyJVcg== 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 4S4FJz2tTQz19R; Mon, 9 Oct 2023 23:16:19 +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 399NGJsD071471; Mon, 9 Oct 2023 23:16:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 399NGJk7071468; Mon, 9 Oct 2023 23:16:19 GMT (envelope-from git) Date: Mon, 9 Oct 2023 23:16:19 GMT Message-Id: <202310092316.399NGJk7071468@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: c77b9b40fda8 - releng/14.0 - LinuxKPI: 802.11: pass non-0/NULL arguments to MO functions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c77b9b40fda8f93efc6dee84440e1ff65e381cc5 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c77b9b40fda8f93efc6dee84440e1ff65e381cc5 commit c77b9b40fda8f93efc6dee84440e1ff65e381cc5 Author: Bjoern A. Zeeb AuthorDate: 2023-09-16 13:10:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2023-10-09 23:14:53 +0000 LinuxKPI: 802.11: pass non-0/NULL arguments to MO functions In [1] we updated the KPI for various mac80211 ops functions to deal with MLD code. Newer iwlwifi driver and firmware supports these functions so we need to pass non-dummy (0, NULL) arguments to them. Start extending the internel MO functions by these arguments and pass down values from LinuxKPI 802.11 code. It is assumed that further work will be needed to have all the right fields available to at least work in the lgeacy way of a single link. Sponsored by: The FreeBSD Foundation Improves: 549198b1ab95 (update mac80211 KPI) [1] Approved by: re (gjb) (cherry picked from commit 6854154638a2c04ab59da43aedbe2c0ee8ef71a5) (cherry picked from commit be5f1d2e7138eb680db400813af54d9f33d9b252) --- sys/compat/linuxkpi/common/src/linux_80211.c | 11 ++++++----- sys/compat/linuxkpi/common/src/linux_80211.h | 6 +++--- sys/compat/linuxkpi/common/src/linux_80211_macops.c | 21 ++++++++++++--------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ab79fd36ca14..ac43b1248536 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -991,7 +991,8 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } /* Assign vif chanctx. */ if (error == 0) - error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, conf); + error = lkpi_80211_mo_assign_vif_chanctx(hw, vif, + &vif->bss_conf, conf); if (error == EOPNOTSUPP) error = 0; if (error != 0) { @@ -1172,7 +1173,7 @@ lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int conf = vif->chanctx_conf; /* Remove vif context. */ - lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->chanctx_conf); + lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ /* Remove chan ctx. */ @@ -1447,7 +1448,7 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i conf = vif->chanctx_conf; /* Remove vif context. */ - lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->chanctx_conf); + lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ /* Remove chan ctx. */ @@ -1909,7 +1910,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int conf = vif->chanctx_conf; /* Remove vif context. */ - lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->chanctx_conf); + lkpi_80211_mo_unassign_vif_chanctx(hw, vif, &vif->bss_conf, &vif->chanctx_conf); /* NB: vif->chanctx_conf is NULL now. */ /* Remove chan ctx. */ @@ -2200,7 +2201,7 @@ lkpi_wme_update(struct lkpi_hw *lhw, struct ieee80211vap *vap, bool planned) txqp.cw_max = wmep->wmep_logcwmax; txqp.txop = wmep->wmep_txopLimit; txqp.aifs = wmep->wmep_aifsn; - error = lkpi_80211_mo_conf_tx(hw, vif, ac, &txqp); + 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); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 42b4192bac63..22a5f5a6377c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -276,9 +276,9 @@ int lkpi_80211_mo_sta_state(struct ieee80211_hw *, struct ieee80211_vif *, struct lkpi_sta *, enum ieee80211_sta_state); int lkpi_80211_mo_config(struct ieee80211_hw *, uint32_t); int lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *, struct ieee80211_vif *, - struct ieee80211_chanctx_conf *); + struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf *); void lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *, struct ieee80211_vif *, - struct ieee80211_chanctx_conf **); + struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf **); int lkpi_80211_mo_add_chanctx(struct ieee80211_hw *, struct ieee80211_chanctx_conf *); void lkpi_80211_mo_change_chanctx(struct ieee80211_hw *, struct ieee80211_chanctx_conf *, uint32_t); @@ -287,7 +287,7 @@ void lkpi_80211_mo_remove_chanctx(struct ieee80211_hw *, void lkpi_80211_mo_bss_info_changed(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *, uint64_t); int lkpi_80211_mo_conf_tx(struct ieee80211_hw *, struct ieee80211_vif *, - uint16_t, const struct ieee80211_tx_queue_params *); + uint32_t, uint16_t, const struct ieee80211_tx_queue_params *); void lkpi_80211_mo_flush(struct ieee80211_hw *, struct ieee80211_vif *, uint32_t, bool); void lkpi_80211_mo_mgd_prepare_tx(struct ieee80211_hw *, struct ieee80211_vif *, diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index 97a72a95e418..b3b53d23f62e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -444,7 +444,7 @@ out: int lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_chanctx_conf *chanctx_conf) + struct ieee80211_bss_conf *conf, struct ieee80211_chanctx_conf *chanctx_conf) { struct lkpi_hw *lhw; int error; @@ -455,8 +455,9 @@ lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif * goto out; } - LKPI_80211_TRACE_MO("hw %p vif %p chanctx_conf %p", hw, vif, chanctx_conf); - error = lhw->ops->assign_vif_chanctx(hw, vif, NULL, chanctx_conf); + LKPI_80211_TRACE_MO("hw %p vif %p bss_conf %p chanctx_conf %p", + hw, vif, conf, chanctx_conf); + error = lhw->ops->assign_vif_chanctx(hw, vif, conf, chanctx_conf); if (error == 0) vif->chanctx_conf = chanctx_conf; @@ -466,7 +467,7 @@ out: void lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_chanctx_conf **chanctx_conf) + struct ieee80211_bss_conf *conf, struct ieee80211_chanctx_conf **chanctx_conf) { struct lkpi_hw *lhw; @@ -477,8 +478,9 @@ lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif if (*chanctx_conf == NULL) return; - LKPI_80211_TRACE_MO("hw %p vif %p chanctx_conf %p", hw, vif, *chanctx_conf); - lhw->ops->unassign_vif_chanctx(hw, vif, NULL, *chanctx_conf); + LKPI_80211_TRACE_MO("hw %p vif %p bss_conf %p chanctx_conf %p", + hw, vif, conf, *chanctx_conf); + lhw->ops->unassign_vif_chanctx(hw, vif, conf, *chanctx_conf); *chanctx_conf = NULL; } @@ -551,7 +553,7 @@ lkpi_80211_mo_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vi int lkpi_80211_mo_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - uint16_t ac, const struct ieee80211_tx_queue_params *txqp) + uint32_t link_id, uint16_t ac, const struct ieee80211_tx_queue_params *txqp) { struct lkpi_hw *lhw; int error; @@ -562,8 +564,9 @@ lkpi_80211_mo_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, goto out; } - LKPI_80211_TRACE_MO("hw %p vif %p ac %u txpq %p", hw, vif, ac, txqp); - error = lhw->ops->conf_tx(hw, vif, 0, ac, txqp); + LKPI_80211_TRACE_MO("hw %p vif %p link_id %u ac %u txpq %p", + hw, vif, link_id, ac, txqp); + error = lhw->ops->conf_tx(hw, vif, link_id, ac, txqp); out: return (error);