Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2023 12:08:36 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0a5256166e7d - stable/13 - LinuxKPI: 802.11: use ic_printf more consistently
Message-ID:  <202306261208.35QC8aeF083086@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=0a5256166e7d2475834962fe806b49398e7a6a8e

commit 0a5256166e7d2475834962fe806b49398e7a6a8e
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2023-03-31 07:10:37 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2023-06-26 09:13:16 +0000

    LinuxKPI: 802.11: use ic_printf more consistently
    
    Rather than printing ic_name ourselves (or not at all) use ic_printf()
    as a common function from net80211 where possible.
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 3f0083c4e30ab41fad1e93e4138767df42dbdf20)
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 06b52ebaec88..7d0fc75e751d 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -2172,7 +2172,7 @@ lkpi_wme_update(struct lkpi_hw *lhw, struct ieee80211vap *vap, bool planned)
 		txqp.aifs = wmep->wmep_aifsn;
 		error = lkpi_80211_mo_conf_tx(hw, vif, ac, &txqp);
 		if (error != 0)
-			printf("%s: conf_tx ac %u failed %d\n",
+			ic_printf(ic, "%s: conf_tx ac %u failed %d\n",
 			    __func__, ac, error);
 	}
 	LKPI_80211_LHW_UNLOCK(lhw);
@@ -2291,7 +2291,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
 
 	error = lkpi_80211_mo_start(hw);
 	if (error != 0) {
-		printf("%s: failed to start hw: %d\n", __func__, error);
+		ic_printf(ic, "%s: failed to start hw: %d\n", __func__, error);
 		mtx_destroy(&lvif->mtx);
 		free(lvif, M_80211_VAP);
 		return (NULL);
@@ -2300,7 +2300,7 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
 	error = lkpi_80211_mo_add_interface(hw, vif);
 	if (error != 0) {
 		IMPROVE();	/* XXX-BZ mo_stop()? */
-		printf("%s: failed to add interface: %d\n", __func__, error);
+		ic_printf(ic, "%s: failed to add interface: %d\n", __func__, error);
 		mtx_destroy(&lvif->mtx);
 		free(lvif, M_80211_VAP);
 		return (NULL);
@@ -3100,7 +3100,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m)
 	 */
 	skb = dev_alloc_skb(hw->extra_tx_headroom + m->m_pkthdr.len);
 	if (skb == NULL) {
-		printf("XXX ERROR %s: skb alloc failed\n", __func__);
+		ic_printf(ic, "ERROR %s: skb alloc failed\n", __func__);
 		ieee80211_free_node(ni);
 		m_freem(m);
 		return;
@@ -3288,8 +3288,8 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan,
 			int cflags = chan_flags;
 
 			if (channels[i].flags & IEEE80211_CHAN_DISABLED) {
-				printf("%s: %s: Skipping disabled chan "
-				    "[%u/%u/%#x]\n", ic->ic_name, __func__,
+				ic_printf(ic, "%s: Skipping disabled chan "
+				    "[%u/%u/%#x]\n", __func__,
 				    channels[i].hw_value,
 				    channels[i].center_freq, channels[i].flags);
 				continue;
@@ -3312,8 +3312,8 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan,
 			    nflags, bands, chan_flags);
 			/* net80211::ENOBUFS: *n >= maxchans */
 			if (error != 0 && error != ENOBUFS)
-				printf("%s: %s: Adding chan %u/%u/%#x/%#x/%#x/%#x "
-				    "returned error %d\n", ic->ic_name,
+				ic_printf(ic, "%s: Adding chan %u/%u/%#x/%#x/%#x/%#x "
+				    "returned error %d\n",
 				    __func__, channels[i].hw_value,
 				    channels[i].center_freq, channels[i].flags,
 				    nflags, chan_flags, cflags, error);
@@ -3358,8 +3358,8 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan,
 			int cflags = chan_flags;
 
 			if (channels[i].flags & IEEE80211_CHAN_DISABLED) {
-				printf("%s: %s: Skipping disabled chan "
-				    "[%u/%u/%#x]\n", ic->ic_name, __func__,
+				ic_printf(ic, "%s: Skipping disabled chan "
+				    "[%u/%u/%#x]\n", __func__,
 				    channels[i].hw_value,
 				    channels[i].center_freq, channels[i].flags);
 				continue;
@@ -3382,8 +3382,8 @@ lkpi_ic_getradiocaps(struct ieee80211com *ic, int maxchan,
 			    nflags, bands, chan_flags);
 			/* net80211::ENOBUFS: *n >= maxchans */
 			if (error != 0 && error != ENOBUFS)
-				printf("%s: %s: Adding chan %u/%u/%#x/%#x/%#x/%#x "
-				    "returned error %d\n", ic->ic_name,
+				ic_printf(ic, "%s: Adding chan %u/%u/%#x/%#x/%#x/%#x "
+				    "returned error %d\n",
 				    __func__, channels[i].hw_value,
 				    channels[i].center_freq, channels[i].flags,
 				    nflags, chan_flags, cflags, error);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306261208.35QC8aeF083086>