linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH rtw-next 1/6] wifi: rtw89: 8852bx: Accept USB devices and load their MAC address
Date: Tue, 1 Jul 2025 19:02:02 +0300	[thread overview]
Message-ID: <b4ab007f-078e-4e06-965e-d6e4dd43124f@gmail.com> (raw)
In-Reply-To: <6f7333ac-17ad-445a-b273-c45e3f0542fa@gmail.com>

Make __rtw8852bx_read_efuse() accept USB devices and load the MAC
address from the correct offset.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
 .../net/wireless/realtek/rtw89/rtw8852b_common.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852b_common.c b/drivers/net/wireless/realtek/rtw89/rtw8852b_common.c
index 0cf03f18cbb1..3fb2972ae6f6 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852b_common.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852b_common.c
@@ -172,14 +172,6 @@ static const struct rtw89_reg3_def rtw8852bx_btc_preagc_dis_defs[] = {
 
 static DECLARE_PHY_REG3_TBL(rtw8852bx_btc_preagc_dis_defs);
 
-static void rtw8852be_efuse_parsing(struct rtw89_efuse *efuse,
-				    struct rtw8852bx_efuse *map)
-{
-	ether_addr_copy(efuse->addr, map->e.mac_addr);
-	efuse->rfe_type = map->rfe_type;
-	efuse->xtal_cap = map->xtal_k;
-}
-
 static void rtw8852bx_efuse_parsing_tssi(struct rtw89_dev *rtwdev,
 					 struct rtw8852bx_efuse *map)
 {
@@ -261,12 +253,18 @@ static int __rtw8852bx_read_efuse(struct rtw89_dev *rtwdev, u8 *log_map,
 
 	switch (rtwdev->hci.type) {
 	case RTW89_HCI_TYPE_PCIE:
-		rtw8852be_efuse_parsing(efuse, map);
+		ether_addr_copy(efuse->addr, map->e.mac_addr);
+		break;
+	case RTW89_HCI_TYPE_USB:
+		ether_addr_copy(efuse->addr, map->u.mac_addr);
 		break;
 	default:
 		return -EOPNOTSUPP;
 	}
 
+	efuse->rfe_type = map->rfe_type;
+	efuse->xtal_cap = map->xtal_k;
+
 	rtw89_info(rtwdev, "chip rfe_type is %d\n", efuse->rfe_type);
 
 	return 0;
-- 
2.49.0


  reply	other threads:[~2025-07-01 16:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 16:00 [PATCH rtw-next 0/6] wifi: rtw89: Add support for RTL8852BU Bitterblue Smith
2025-07-01 16:02 ` Bitterblue Smith [this message]
2025-07-04  5:28   ` [PATCH rtw-next 1/6] wifi: rtw89: 8852bx: Accept USB devices and load their MAC address Ping-Ke Shih
2025-07-01 16:02 ` [PATCH rtw-next 2/6] wifi: rtw89: 8852b: Fix rtw8852b_pwr_{on,off}_func() for USB Bitterblue Smith
2025-07-04  5:30   ` Ping-Ke Shih
2025-07-01 16:03 ` [PATCH rtw-next 3/6] wifi: rtw89: 8852b: Add rtw8852b_dle_mem_usb3 Bitterblue Smith
2025-07-04  5:31   ` Ping-Ke Shih
2025-07-01 16:03 ` [PATCH rtw-next 4/6] wifi: rtw89: 8852b: Add rtw8852b_hfc_param_ini_usb Bitterblue Smith
2025-07-04  5:31   ` Ping-Ke Shih
2025-07-01 16:04 ` [PATCH rtw-next 5/6] wifi: rtw89: Add rtw8852bu.c Bitterblue Smith
2025-07-04  5:32   ` Ping-Ke Shih
2025-07-01 16:05 ` [PATCH rtw-next 6/6] wifi: rtw89: Enable the new rtw89_8852bu module Bitterblue Smith
2025-07-04  5:34   ` Ping-Ke Shih
2025-07-01 17:44 ` [PATCH rtw-next 0/6] wifi: rtw89: Add support for RTL8852BU Shengyu Qu
2025-07-02 21:13   ` Bitterblue Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4ab007f-078e-4e06-965e-d6e4dd43124f@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).