From nobody Sun Aug 24 14:38:57 2025 X-Original-To: dev-commits-src-main@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 4c8xPt1KFWz65XjF; Sun, 24 Aug 2025 14:38:58 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c8xPs5Cn5z3Wnf; Sun, 24 Aug 2025 14:38:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756046337; 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=4JM/Kkx/LcCyQsNPJgKsY8nQ6t98zE2ZVWfqun1Bgsw=; b=sg19SjO1YmsjY69Krly5BRhkqOhwOInVnbhkfyeiTm0ENdM4vGb14gJZPFbC7l3h8s3cky 6mkO9wKmBPM0n//+U3bmNGAseSnaHPHv/H/hhgNBU9xDA0QEe4/TVDgAmWOK61GswYqRbS Uhvu//4mFci3Ti+DsKVOe/IGUoIpYNzRLREZcps+8USfCirfaLsFGi4W2Ui/w1O2mRDCw3 5gK/FTwk82CZesRHsixOgiBCCQBedTZeZ7tzPp1mYZbrJmRcvExu+Nj/dnDg4ZnxEX5+K2 a7e7zwzB1WZH7rnkVQqmlkHc8ll6R3bmnLtMUUExxgjBtv73qmR1ZX5KSkq/zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756046337; 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=4JM/Kkx/LcCyQsNPJgKsY8nQ6t98zE2ZVWfqun1Bgsw=; b=gNO7mn+qvddcm7oySX/FKJ8kX6GL+5rmg7Qy1XO08BU+JX+fbJI4OlK1jIh79fIy5tSy7H VKs1kGuLC0pZEvkv/frhrh0gQ6vaKid4iHmVkftBk4dzD8Wd7MzdkLQJ0O9BKybsXuBhaf UtpSFhPiV8t0r3vQH/8C5e/ZYfyCyTPvIfbs4dryDhO7SyPn8BKTh683w/VRqyNOcpQUMj x7NNoJAoiLO264P1TQ5GhjWgMVn0TeVOm7p680w3Cmz2NBfPRjGExTynDogH3GryWzjNn1 VodasZtBuTNIvQ2ReubrzX4L14HLng76cOovn/Kbme6TW96t+LpWnOF0M41YXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1756046337; a=rsa-sha256; cv=none; b=Im+FZoLZ27kwudhlimqp3ymU/ht2yjGzm0BMukBpfO6VGh9JidnmfCTSfds2QxdLaV1iLa lYYGZxm78jmHmDFVfMNcqpE72y3DGz1pdePpMfoaCrsTuMhLbzlmekvTC4895EIf/qyS1c 26q/lTPJNprTxMP5p3E9nT44Fqv9JZVu0lj3aovk4WfX5HS0lITvuLa8jYyl/Q76CytRQH h2PkcHly2QzyouwSWVHGOj47JsxoPTyU0RtWa2ield273lsvAAuISYzkEafcGJRsBf9m+m 8+PucKfgH+tT7BuCPYo+uRyE7TseBijwwy6iOfJ+370sDRO+sAErv0EQSdpofQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c8xPs4kv6z15j5; Sun, 24 Aug 2025 14:38:57 +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 57OEcvsE040673; Sun, 24 Aug 2025 14:38:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57OEcv0F040670; Sun, 24 Aug 2025 14:38:57 GMT (envelope-from git) Date: Sun, 24 Aug 2025 14:38:57 GMT Message-Id: <202508241438.57OEcv0F040670@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: 60307068cf64 - main - LinuxKPi: 802.11: adjust linuxkpi_set_ieee80211_dev() to set ic_name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 60307068cf64700f5379c782ad98336d4d0f7390 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=60307068cf64700f5379c782ad98336d4d0f7390 commit 60307068cf64700f5379c782ad98336d4d0f7390 Author: Bjoern A. Zeeb AuthorDate: 2025-07-07 07:02:35 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-08-24 10:26:39 +0000 LinuxKPi: 802.11: adjust linuxkpi_set_ieee80211_dev() to set ic_name While we used to pass in the dev_name(), we now use wiphy_dev() inside the implementation to get the dev and the name. This is for two reasons: (1) ath1xk also unset the dev and we need to check once we add support, and (2) in preparation for future work, which needs to hook into that point. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/include/net/mac80211.h | 4 ++-- sys/compat/linuxkpi/common/src/linux_80211.c | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 2ed595095f9e..c667ddea1085 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1135,7 +1135,7 @@ extern const struct cfg80211_ops linuxkpi_mac80211cfgops; struct ieee80211_hw *linuxkpi_ieee80211_alloc_hw(size_t, const struct ieee80211_ops *); void linuxkpi_ieee80211_iffree(struct ieee80211_hw *); -void linuxkpi_set_ieee80211_dev(struct ieee80211_hw *, char *); +void linuxkpi_set_ieee80211_dev(struct ieee80211_hw *); int linuxkpi_ieee80211_ifattach(struct ieee80211_hw *); void linuxkpi_ieee80211_ifdetach(struct ieee80211_hw *); void linuxkpi_ieee80211_unregister_hw(struct ieee80211_hw *); @@ -1255,7 +1255,7 @@ SET_IEEE80211_DEV(struct ieee80211_hw *hw, struct device *dev) { set_wiphy_dev(hw->wiphy, dev); - linuxkpi_set_ieee80211_dev(hw, dev_name(dev)); + linuxkpi_set_ieee80211_dev(hw); IMPROVE(); } diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 45e4aa1639ab..eb270fe7c8f6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -6048,17 +6048,30 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) } void -linuxkpi_set_ieee80211_dev(struct ieee80211_hw *hw, char *name) +linuxkpi_set_ieee80211_dev(struct ieee80211_hw *hw) { struct lkpi_hw *lhw; struct ieee80211com *ic; + struct device *dev; lhw = HW_TO_LHW(hw); ic = lhw->ic; - /* Now set a proper name before ieee80211_ifattach(). */ + /* Save the backpointer from net80211 to LinuxKPI. */ ic->ic_softc = lhw; - ic->ic_name = name; + + /* + * Set a proper name before ieee80211_ifattach() if dev is set. + * ath1xk also unset the dev so we need to check. + */ + dev = wiphy_dev(hw->wiphy); + if (dev != NULL) { + ic->ic_name = dev_name(dev); + } else { + TODO("adjust arguments to still have the old dev or go through " + "the hoops of getting the bsddev from hw and detach; " + "or do in XXX; check ath1kx drivers"); + } /* XXX-BZ do we also need to set wiphy name? */ }