From nobody Mon Oct 28 14:49:42 2024 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 4Xcbrl0C2fz5bRQD; Mon, 28 Oct 2024 14:49:43 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xcbrk6PQ4z4npH; Mon, 28 Oct 2024 14:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730126982; 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=dkHjABAbEJIQ9GT22vrN0eUIUYcH/Z4srrtPVNcbx88=; b=j7i5sRPuw9bPR6hg2VfytQRpGEz3/BNX82/FCTMw4Q9y4Gkwv2Hvb9ykYQmSoac2k5FTvA DpFaj7AgsQU1plWOEWKS4qig4M6ckva17iTllomBrXILQh02BO5VmQhwzW/LvEi9D3f15r Gx6QZ9sbSYbaf0LmoIp4wxNq498DjMmR/+8lfZznLwfOZk1u5R3k6ccXBr5HgISiW/hJsv fAFbkvNdnCMl8PNHuoOMeBuMPaUnN4j1mZVusgxpbqlJme4eUyM3JwL5ysrXqd01Gi1m5e 0l1tzm8n72B12yUHreErEkQm6qbr2sDVtCYnpR4v/Qo4kGvpsx49zsstxRBV3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730126982; 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=dkHjABAbEJIQ9GT22vrN0eUIUYcH/Z4srrtPVNcbx88=; b=WbBdzqDfsgZD1iPiU6stTfQw9MnxyfQvAVlUqmipZ5GohaprWn1C6LQ+shPBhBa6lJWPTO mC8gO+bagvwNfjVUMsHLv7gHMWI8bVMccb6NXf33k5u2m2DOjcDJ1JL5N8tWUcFK4c01S6 v3R+36GphqGcSC7pxRsX5U/MVse8+u5nm7aSsne1yaaf+pGGrsixqmau23KZ46N8he7xDE ghmfaoBEPDti8xk2Dm0+j/ARAj96umL+mY2naSodHstkuvTWDxsYfInsBxHrMvRdxiQMxC VrYBfwLZZfAooZB4+GYTg9Dts98aZfruT4NENnd9NhTNQqUsJHmqf3XeGkDTsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730126982; a=rsa-sha256; cv=none; b=IXtgGOCN10eqWvXQIY7jM7UHBIkVRusmSu7YWPfgW2N9vlMWgcTVfgIpLWF4Mq7k+XDI2K lM56wr2bZv55b4Sj1LidxyQ8oRgrEQJS7bCx0BIghYOEtAQO6H2sU92H/PaVyxcbSCXgXq TQwJuJctSgj0agk/ecYVZoKRBf8Obyzq/sDoINdIRxjMbwnpPGzrs0IoueSttzVfW26z39 DThHYPSfLtxy+XU0i8+oEzEaeoz1OIQ3UUIH2TDl5CxS0eYA7X1AH6sL7lMPRxGPGgnLD+ cDkmQN6kR9a9eXNciH158aMh78/EENgy5PMpuRUJLyUSOZa6i2o5TPMMVdu4LQ== 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 4Xcbrk4czmzjc4; Mon, 28 Oct 2024 14:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49SEngO4099081; Mon, 28 Oct 2024 14:49:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49SEngWu099078; Mon, 28 Oct 2024 14:49:42 GMT (envelope-from git) Date: Mon, 28 Oct 2024 14:49:42 GMT Message-Id: <202410281449.49SEngWu099078@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: 7b43f4d06419 - main - LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 7b43f4d064195bcf66816cb9fe350a1392fe24ce Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7b43f4d064195bcf66816cb9fe350a1392fe24ce commit 7b43f4d064195bcf66816cb9fe350a1392fe24ce Author: Bjoern A. Zeeb AuthorDate: 2024-10-28 12:15:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-10-28 12:16:06 +0000 LinuxKPI: 802.11: adjustments for v6.11 iwlwifi, rtw88 and rtw89 Bring in the LinuxKPI 802.11 compat bits which are altering the mac80211 KPI. * In struct ieee80211_bss_conf chandef -> chanreq. * Various struct ieee80211_ops gained a link_id arguemnt, stop gained a suspend flag. * Various functions gained a link_id argument. * ieee80211_tx_status() was renamed to ieee80211_tx_status_skb() Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/mac80211.h | 22 ++++++++++++---------- sys/compat/linuxkpi/common/src/linux_80211.c | 14 +++++++------- sys/compat/linuxkpi/common/src/linux_80211.h | 2 +- .../linuxkpi/common/src/linux_80211_macops.c | 6 +++--- 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 6dbf07c85bb8..dff152caf140 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -297,7 +297,7 @@ struct ieee80211_bss_conf { uint8_t transmitter_bssid[ETH_ALEN]; struct ieee80211_ftm_responder_params *ftmr_params; struct ieee80211_p2p_noa_attr p2p_noa_attr; - struct cfg80211_chan_def chandef; + struct ieee80211_chanreq chanreq; __be32 arp_addr_list[1]; /* XXX TODO */ struct ieee80211_rate *beacon_rate; struct { @@ -796,7 +796,9 @@ enum ieee80211_vif_driver_flags { IEEE80211_VIF_BEACON_FILTER = BIT(0), IEEE80211_VIF_SUPPORTS_CQM_RSSI = BIT(1), IEEE80211_VIF_SUPPORTS_UAPSD = BIT(2), +#if defined(LINUXKPI_VERSION) && (LINUXKPI_VERSION < 60600) /* v6.6 */ IEEE80211_VIF_DISABLE_SMPS_OVERRIDE = BIT(3), /* Renamed to IEEE80211_VIF_EML_ACTIVE. */ +#endif IEEE80211_VIF_EML_ACTIVE = BIT(4), IEEE80211_VIF_IGNORE_OFDMA_WIDER_BW = BIT(5), }; @@ -970,7 +972,7 @@ enum ieee80211_offload_flags { struct ieee80211_ops { /* TODO FIXME */ int (*start)(struct ieee80211_hw *); - void (*stop)(struct ieee80211_hw *); + void (*stop)(struct ieee80211_hw *, bool); int (*config)(struct ieee80211_hw *, u32); void (*reconfig_complete)(struct ieee80211_hw *, enum ieee80211_reconfig_type); @@ -993,7 +995,7 @@ struct ieee80211_ops { void (*mgd_prepare_tx)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_prep_tx_info *); void (*mgd_complete_tx)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_prep_tx_info *); - void (*mgd_protect_tdls_discover)(struct ieee80211_hw *, struct ieee80211_vif *); + void (*mgd_protect_tdls_discover)(struct ieee80211_hw *, struct ieee80211_vif *, unsigned int); void (*flush)(struct ieee80211_hw *, struct ieee80211_vif *, u32, bool); void (*flush_sta)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *); @@ -1024,10 +1026,10 @@ struct ieee80211_ops { bool (*can_aggregate_in_amsdu)(struct ieee80211_hw *, struct sk_buff *, struct sk_buff *); int (*pre_channel_switch)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_channel_switch *); - int (*post_channel_switch)(struct ieee80211_hw *, struct ieee80211_vif *); + int (*post_channel_switch)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *); void (*channel_switch)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_channel_switch *); void (*channel_switch_beacon)(struct ieee80211_hw *, struct ieee80211_vif *, struct cfg80211_chan_def *); - void (*abort_channel_switch)(struct ieee80211_hw *, struct ieee80211_vif *); + void (*abort_channel_switch)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_bss_conf *); void (*channel_switch_rx_beacon)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_channel_switch *); int (*tdls_channel_switch)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *, u8, struct cfg80211_chan_def *, struct sk_buff *, u32); void (*tdls_cancel_channel_switch)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *); @@ -1561,7 +1563,7 @@ ieee80211_beacon_loss(struct ieee80211_vif *vif) } static __inline void -ieee80211_chswitch_done(struct ieee80211_vif *vif, bool t) +ieee80211_chswitch_done(struct ieee80211_vif *vif, bool t, uint32_t link_id) { TODO(); } @@ -1587,7 +1589,7 @@ ieee80211_csa_update_counter(struct ieee80211_vif *vif) } static __inline void -ieee80211_csa_finish(struct ieee80211_vif *vif) +ieee80211_csa_finish(struct ieee80211_vif *vif, uint32_t link_id) { TODO(); } @@ -2111,7 +2113,7 @@ ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *w) } static __inline void -ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) +ieee80211_tx_status_skb(struct ieee80211_hw *hw, struct sk_buff *skb) { linuxkpi_ieee80211_tx_status(hw, skb); } @@ -2225,7 +2227,7 @@ ieee80211_beacon_set_cntdwn(struct ieee80211_vif *vif, u8 counter) } static __inline int -ieee80211_beacon_update_cntdwn(struct ieee80211_vif *vif) +ieee80211_beacon_update_cntdwn(struct ieee80211_vif *vif, uint32_t link_id) { TODO(); return (-1); @@ -2240,7 +2242,7 @@ ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *vht_cap, uint32_t chanwidth, } static __inline bool -ieee80211_beacon_cntdwn_is_complete(struct ieee80211_vif *vif) +ieee80211_beacon_cntdwn_is_complete(struct ieee80211_vif *vif, uint32_t link_id) { TODO(); return (true); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9e4c368617b6..6de5c42fe59d 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1267,9 +1267,9 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int } else { error = lkpi_80211_mo_add_chanctx(hw, chanctx_conf); if (error == 0 || error == EOPNOTSUPP) { - vif->bss_conf.chandef.chan = chanctx_conf->def.chan; - vif->bss_conf.chandef.width = chanctx_conf->def.width; - vif->bss_conf.chandef.center_freq1 = + vif->bss_conf.chanreq.oper.chan = chanctx_conf->def.chan; + vif->bss_conf.chanreq.oper.width = chanctx_conf->def.width; + vif->bss_conf.chanreq.oper.center_freq1 = chanctx_conf->def.center_freq1; #ifdef LKPI_80211_HT if (vif->bss_conf.chandef.width == NL80211_CHAN_WIDTH_40) { @@ -1280,7 +1280,7 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int vif->bss_conf.chandef.center_freq1 -= 10; } #endif - vif->bss_conf.chandef.center_freq2 = + vif->bss_conf.chanreq.oper.center_freq2 = chanctx_conf->def.center_freq2; } else { ic_printf(vap->iv_ic, "%s:%d: mo_add_chanctx " @@ -2833,7 +2833,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], lvif->lvif_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event, lkpi_vif_iflladdr, vif, EVENTHANDLER_PRI_ANY); vif->bss_conf.link_id = 0; /* Non-MLO operation. */ - vif->bss_conf.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; + vif->bss_conf.chanreq.oper.width = NL80211_CHAN_WIDTH_20_NOHT; vif->bss_conf.use_short_preamble = false; /* vap->iv_flags IEEE80211_F_SHPREAMBLE */ vif->bss_conf.use_short_slot = false; /* vap->iv_flags IEEE80211_F_SHSLOT */ vif->bss_conf.qos = false; @@ -3019,7 +3019,7 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) lkpi_80211_mo_remove_interface(hw, vif); /* Single VAP, so we can do this here. */ - lkpi_80211_mo_stop(hw); + lkpi_80211_mo_stop(hw, false); /* XXX SUSPEND */ mtx_destroy(&lvif->mtx); free(lvif, M_80211_VAP); @@ -3076,7 +3076,7 @@ lkpi_ic_parent(struct ieee80211com *ic) start_all = true; } else { #ifdef HW_START_STOP - lkpi_80211_mo_stop(hw); + lkpi_80211_mo_stop(hw, false); /* XXX SUSPEND */ #endif } LKPI_80211_LHW_UNLOCK(lhw); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index b6ac3e85f80f..8605ec86ad1b 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -392,7 +392,7 @@ struct lkpi_wiphy { mtx_assert(&(_ltxq)->ltxq_mtx, MA_NOTOWNED) int lkpi_80211_mo_start(struct ieee80211_hw *); -void lkpi_80211_mo_stop(struct ieee80211_hw *); +void lkpi_80211_mo_stop(struct ieee80211_hw *, bool); int lkpi_80211_mo_get_antenna(struct ieee80211_hw *, u32 *, u32 *); int lkpi_80211_mo_set_frag_threshold(struct ieee80211_hw *, uint32_t); int lkpi_80211_mo_set_rts_threshold(struct ieee80211_hw *, uint32_t); diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index 8cc885c037e3..246a0c84dfa8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -74,7 +74,7 @@ out: } void -lkpi_80211_mo_stop(struct ieee80211_hw *hw) +lkpi_80211_mo_stop(struct ieee80211_hw *hw, bool suspend) { struct lkpi_hw *lhw; @@ -82,8 +82,8 @@ lkpi_80211_mo_stop(struct ieee80211_hw *hw) if (lhw->ops->stop == NULL) return; - LKPI_80211_TRACE_MO("hw %p", hw); - lhw->ops->stop(hw); + LKPI_80211_TRACE_MO("hw %p suspend %d", hw, suspend); + lhw->ops->stop(hw, suspend); lhw->sc_flags &= ~LKPI_MAC80211_DRV_STARTED; }