From nobody Wed Sep 07 23:55:47 2022 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 4MNJzl6xPpz4bTkQ; Wed, 7 Sep 2022 23:55:47 +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 4MNJzl43lWz3kGD; Wed, 7 Sep 2022 23:55:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662594947; 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=78sbyt3gVP8DB8KILsk/CYvygWsrmt0NoVsZ5XLmSkU=; b=jl+hVFzfRhlKNdn21P3hfu4st+a2xTmDtNu+8mu2p+nP09sCy+BzcSKlrwfCL2RBIAvCRi jnT5IHN7WhxVDvzQg0+mM6rlWjCKCS7W0jjeAi1pI41DT/WAWZ6VVhEJJSG3fK7KdMvLwI dXcPpmBD8Ub+KLt8bnQ6f0KDbBky3e6XnaNZvX3m0M/9rsM20DeGRMu96p15bee0Y1WF3b hoyyAw83xaYC3h+FQEuCmXv0MnaTYRr512ZZqn4zJQDxfc74iMfFenkf2RiAy05Db2TTZT Hjbc7Yq7xVvPG10favg4L3wWs6TJV8JcbzlaJ7fW9yICUraogEbXw4S05V82tg== 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 4MNJzl37b9zhX5; Wed, 7 Sep 2022 23:55:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 287NtlFR054732; Wed, 7 Sep 2022 23:55:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 287NtlUI054731; Wed, 7 Sep 2022 23:55:47 GMT (envelope-from git) Date: Wed, 7 Sep 2022 23:55:47 GMT Message-Id: <202209072355.287NtlUI054731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 549198b1ab95 - main - LinuxKPI, dev: 80211 update mac80211 KPI 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/main X-Git-Reftype: branch X-Git-Commit: 549198b1ab95139fb26470cf22ce894907c361b8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662594947; 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=78sbyt3gVP8DB8KILsk/CYvygWsrmt0NoVsZ5XLmSkU=; b=RpHx3ppLmNaiYNegPwgAnJt6k6otHVQNNTO1vVODZRaKpQdud0gjbh+fq2tLnR3m4FUKIB ptfNGbTQ2klqdwGS0ksIRlYanjF8EQd0NczMFtyGn+mAB15M/pK6U90A5nCKX9PQuuLfvs +Zvj+nDYa1BYRgbuAnZv1lUMVL98zwhkjxgVJldMkeMYH0upHjdRbC9QNI/2SR7RX7t3v/ 7HMEq0T1ZILqzkRd5hQOjgA1F1rJEbB4tgqkLyqmmV/nXLQvnhhcHOBsHBsUsSWZzUI0Nx 4e249+346QA2OzllERLb4O9pvSNDLzXlNzwWdokk0pBkEySNlFL4+2okRMaxPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662594947; a=rsa-sha256; cv=none; b=BY48n80WP3fdtE/eDFwBjtpjwHiiNPLmf5k69vWx7f8OuHUnTKF+yw9EED5HaOmRSGIkJc NH+FvD3UUnd5ofq0spOswRKw4GGDyaExDmk2YGPzcbAfQScwU3NspOR3/CrDoHymMdXHjv pPWLk/UoFZZpkqaY/oCiHs+b+nHBfr6xAMM/xZ7KdkAyVzLIiJH+OAHbyayKrZGj4pW1vx SJ1BqviXFgozoJCIVBmVHCoYAs3yFcQsmlIoxvstQKiIhOyTQJLkDJuTEBQ2ZslZEx0Jcp oEwa4o+PaRwd0nza0IHCQUviyFsANzVN4z3fKnCUsmJePibCYY9yFBaLlJamsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=549198b1ab95139fb26470cf22ce894907c361b8 commit 549198b1ab95139fb26470cf22ce894907c361b8 Author: Bjoern A. Zeeb AuthorDate: 2022-09-07 23:38:54 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-09-07 23:38:54 +0000 LinuxKPI, dev: 80211 update mac80211 KPI Update the mac80211 ops KPI for (*conf_tx), (*assign_vif_chanctx), (*unassign_vif_chanctx), (*start_ap), and (*stop_ap), as well as ieee80211_beacon_get_tim() and ieee80211_beacon_get_template(). Update in-tree drivers iwlwifi and rtw88 accordingly based on upstream changes (as well as out-of-tree ones). This was triggered by trying to synchronize more drivers to a common state. MFC after: 1 week --- sys/compat/linuxkpi/common/include/net/mac80211.h | 14 +++---- .../linuxkpi/common/src/linux_80211_macops.c | 6 +-- sys/contrib/dev/iwlwifi/mvm/mac80211.c | 45 ++++++++++++++++++---- sys/contrib/dev/rtw88/fw.c | 2 +- sys/contrib/dev/rtw88/mac80211.c | 7 +++- 5 files changed, 54 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 03bef9fbb97d..66fc8c14e905 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -827,7 +827,7 @@ struct ieee80211_ops { int (*hw_scan)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_scan_request *); void (*cancel_hw_scan)(struct ieee80211_hw *, struct ieee80211_vif *); - int (*conf_tx)(struct ieee80211_hw *, struct ieee80211_vif *, u16, const struct ieee80211_tx_queue_params *); + int (*conf_tx)(struct ieee80211_hw *, struct ieee80211_vif *, u32, u16, const struct ieee80211_tx_queue_params *); void (*tx)(struct ieee80211_hw *, struct ieee80211_tx_control *, struct sk_buff *); int (*tx_last_beacon)(struct ieee80211_hw *); void (*wake_tx_queue)(struct ieee80211_hw *, struct ieee80211_txq *); @@ -876,8 +876,8 @@ struct ieee80211_ops { int (*add_chanctx)(struct ieee80211_hw *, struct ieee80211_chanctx_conf *); void (*remove_chanctx)(struct ieee80211_hw *, struct ieee80211_chanctx_conf *); void (*change_chanctx)(struct ieee80211_hw *, struct ieee80211_chanctx_conf *, u32); - int (*assign_vif_chanctx)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_chanctx_conf *); - void (*unassign_vif_chanctx)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_chanctx_conf *); + int (*assign_vif_chanctx)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf *); + void (*unassign_vif_chanctx)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *, struct ieee80211_chanctx_conf *); int (*switch_vif_chanctx)(struct ieee80211_hw *, struct ieee80211_vif_chanctx_switch *, int, enum ieee80211_chanctx_switch_mode); int (*get_antenna)(struct ieee80211_hw *, u32 *, u32 *); @@ -910,8 +910,8 @@ struct ieee80211_ops { int (*start_pmsr)(struct ieee80211_hw *, struct ieee80211_vif *, struct cfg80211_pmsr_request *); void (*abort_pmsr)(struct ieee80211_hw *, struct ieee80211_vif *, struct cfg80211_pmsr_request *); - int (*start_ap)(struct ieee80211_hw *, struct ieee80211_vif *); - void (*stop_ap)(struct ieee80211_hw *, struct ieee80211_vif *); + int (*start_ap)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *link_conf); + void (*stop_ap)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *link_conf); int (*join_ibss)(struct ieee80211_hw *, struct ieee80211_vif *); void (*leave_ibss)(struct ieee80211_hw *, struct ieee80211_vif *); @@ -1457,7 +1457,7 @@ ieee80211_get_tid(struct ieee80211_hdr *hdr) static __inline struct sk_buff * ieee80211_beacon_get_tim(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - uint16_t *tim_offset, uint16_t *tim_len) + uint16_t *tim_offset, uint16_t *tim_len, uint32_t link_id) { if (tim_offset != NULL) @@ -1549,7 +1549,7 @@ ieee80211_vif_to_wdev(struct ieee80211_vif *vif) static __inline struct sk_buff * ieee80211_beacon_get_template(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_mutable_offsets *offs, - int x) + uint32_t link_id) { TODO(); return (NULL); diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index 547b94be66c2..4fede921f017 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -425,7 +425,7 @@ lkpi_80211_mo_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif * goto out; } - error = lhw->ops->assign_vif_chanctx(hw, vif, chanctx_conf); + error = lhw->ops->assign_vif_chanctx(hw, vif, NULL, chanctx_conf); if (error == 0) vif->chanctx_conf = chanctx_conf; @@ -446,7 +446,7 @@ lkpi_80211_mo_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif if (*chanctx_conf == NULL) return; - lhw->ops->unassign_vif_chanctx(hw, vif, *chanctx_conf); + lhw->ops->unassign_vif_chanctx(hw, vif, NULL, *chanctx_conf); *chanctx_conf = NULL; } @@ -523,7 +523,7 @@ lkpi_80211_mo_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, goto out; } - error = lhw->ops->conf_tx(hw, vif, ac, txqp); + error = lhw->ops->conf_tx(hw, vif, 0, ac, txqp); out: return (error); diff --git a/sys/contrib/dev/iwlwifi/mvm/mac80211.c b/sys/contrib/dev/iwlwifi/mvm/mac80211.c index 4f40a9f64ee3..f8ddf87f3eaa 100644 --- a/sys/contrib/dev/iwlwifi/mvm/mac80211.c +++ b/sys/contrib/dev/iwlwifi/mvm/mac80211.c @@ -2432,7 +2432,8 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm, } static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); @@ -2558,8 +2559,22 @@ out_unlock: return ret; } +static int iwl_mvm_start_ap(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf) +{ + return iwl_mvm_start_ap_ibss(hw, vif, link_conf); +} + +static int iwl_mvm_start_ibss(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) +{ + return iwl_mvm_start_ap_ibss(hw, vif, &vif->bss_conf); +} + static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); @@ -2622,6 +2637,19 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw, mutex_unlock(&mvm->mutex); } +static void iwl_mvm_stop_ap(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf) +{ + iwl_mvm_stop_ap_ibss(hw, vif, link_conf); +} + +static void iwl_mvm_stop_ibss(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) +{ + iwl_mvm_stop_ap_ibss(hw, vif, &vif->bss_conf); +} + static void iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm, struct ieee80211_vif *vif, @@ -3357,7 +3385,8 @@ static void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, } static int iwl_mvm_mac_conf_tx(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, u16 ac, + struct ieee80211_vif *vif, + unsigned int link_id, u16 ac, const struct ieee80211_tx_queue_params *params) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); @@ -4271,6 +4300,7 @@ out: } static int iwl_mvm_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf, struct ieee80211_chanctx_conf *ctx) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); @@ -4344,6 +4374,7 @@ out: static void iwl_mvm_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf, struct ieee80211_chanctx_conf *ctx) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); @@ -5442,10 +5473,10 @@ const struct ieee80211_ops iwl_mvm_hw_ops = { .unassign_vif_chanctx = iwl_mvm_unassign_vif_chanctx, .switch_vif_chanctx = iwl_mvm_switch_vif_chanctx, - .start_ap = iwl_mvm_start_ap_ibss, - .stop_ap = iwl_mvm_stop_ap_ibss, - .join_ibss = iwl_mvm_start_ap_ibss, - .leave_ibss = iwl_mvm_stop_ap_ibss, + .start_ap = iwl_mvm_start_ap, + .stop_ap = iwl_mvm_stop_ap, + .join_ibss = iwl_mvm_start_ibss, + .leave_ibss = iwl_mvm_stop_ibss, .tx_last_beacon = iwl_mvm_tx_last_beacon, diff --git a/sys/contrib/dev/rtw88/fw.c b/sys/contrib/dev/rtw88/fw.c index 44b03f5a4769..9bc419f71ed6 100644 --- a/sys/contrib/dev/rtw88/fw.c +++ b/sys/contrib/dev/rtw88/fw.c @@ -1070,7 +1070,7 @@ static struct sk_buff *rtw_get_rsvd_page_skb(struct ieee80211_hw *hw, switch (rsvd_pkt->type) { case RSVD_BEACON: - skb_new = ieee80211_beacon_get_tim(hw, vif, &tim_offset, NULL); + skb_new = ieee80211_beacon_get_tim(hw, vif, &tim_offset, NULL, 0); rsvd_pkt->tim_offset = tim_offset; break; case RSVD_PS_POLL: diff --git a/sys/contrib/dev/rtw88/mac80211.c b/sys/contrib/dev/rtw88/mac80211.c index 73c5d9535d72..643ce2900d0a 100644 --- a/sys/contrib/dev/rtw88/mac80211.c +++ b/sys/contrib/dev/rtw88/mac80211.c @@ -442,7 +442,9 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw, mutex_unlock(&rtwdev->mutex); } -static int rtw_ops_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +static int rtw_ops_start_ap(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf) { struct rtw_dev *rtwdev = hw->priv; struct rtw_chip_info *chip = rtwdev->chip; @@ -455,7 +457,8 @@ static int rtw_ops_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) } static int rtw_ops_conf_tx(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, u16 ac, + struct ieee80211_vif *vif, + unsigned int link_id, u16 ac, const struct ieee80211_tx_queue_params *params) { struct rtw_dev *rtwdev = hw->priv;