From: Ping-Ke Shih <pkshih@realtek.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Yan-Hsuan Chuang <tony0620emma@gmail.com>,
Kalle Valo <kvalo@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Chris Morgan <macroalpha82@gmail.com>,
"Nitin Gupta" <nitin.gupta981@gmail.com>,
Neo Jou <neojou@gmail.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Subject: RE: [RFC PATCH v1 06/19] rtw88: rtw8821c: Add support for parsing the RTL8821CS (SDIO) efuse
Date: Wed, 28 Dec 2022 06:21:27 +0000 [thread overview]
Message-ID: <695c976e02ed44a2b2345a3ceb226fc4@realtek.com> (raw)
In-Reply-To: <20221227233020.284266-7-martin.blumenstingl@googlemail.com>
> -----Original Message-----
> From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Sent: Wednesday, December 28, 2022 7:30 AM
> To: linux-wireless@vger.kernel.org
> Cc: Yan-Hsuan Chuang <tony0620emma@gmail.com>; Kalle Valo <kvalo@kernel.org>; Ulf Hansson
> <ulf.hansson@linaro.org>; linux-kernel@vger.kernel.org; netdev@vger.kernel.org;
> linux-mmc@vger.kernel.org; Chris Morgan <macroalpha82@gmail.com>; Nitin Gupta <nitin.gupta981@gmail.com>;
> Neo Jou <neojou@gmail.com>; Ping-Ke Shih <pkshih@realtek.com>; Jernej Skrabec <jernej.skrabec@gmail.com>;
> Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Subject: [RFC PATCH v1 06/19] rtw88: rtw8821c: Add support for parsing the RTL8821CS (SDIO) efuse
>
> The efuse of the SDIO RTL8821CS chip has only one known member: the mac
> address is at offset 0x11a. Add a struct rtw8821cs_efuse describing this
> and use it for copying the mac address when the SDIO bus is used.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> drivers/net/wireless/realtek/rtw88/rtw8821c.c | 9 +++++++++
> drivers/net/wireless/realtek/rtw88/rtw8821c.h | 6 ++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
> b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
> index 17f800f6efbd..dd01b22f9770 100644
> --- a/drivers/net/wireless/realtek/rtw88/rtw8821c.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.c
> @@ -26,6 +26,12 @@ static void rtw8821ce_efuse_parsing(struct rtw_efuse *efuse,
> ether_addr_copy(efuse->addr, map->e.mac_addr);
> }
>
> +static void rtw8821cs_efuse_parsing(struct rtw_efuse *efuse,
> + struct rtw8821c_efuse *map)
> +{
> + ether_addr_copy(efuse->addr, map->s.mac_addr);
> +}
> +
> static void rtw8821cu_efuse_parsing(struct rtw_efuse *efuse,
> struct rtw8821c_efuse *map)
> {
> @@ -74,6 +80,9 @@ static int rtw8821c_read_efuse(struct rtw_dev *rtwdev, u8 *log_map)
> case RTW_HCI_TYPE_PCIE:
> rtw8821ce_efuse_parsing(efuse, map);
> break;
> + case RTW_HCI_TYPE_SDIO:
> + rtw8821cs_efuse_parsing(efuse, map);
> + break;
> case RTW_HCI_TYPE_USB:
> rtw8821cu_efuse_parsing(efuse, map);
> break;
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8821c.h
> b/drivers/net/wireless/realtek/rtw88/rtw8821c.h
> index 1c81260f3a54..1deea54575b5 100644
> --- a/drivers/net/wireless/realtek/rtw88/rtw8821c.h
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8821c.h
> @@ -65,6 +65,11 @@ struct rtw8821ce_efuse {
> u8 res7;
> };
>
> +struct rtw8821cs_efuse {
> + u8 res4[0x4a]; /* 0xd0 */
> + u8 mac_addr[ETH_ALEN]; /* 0x11a */
> +};
> +
This struct should be __packed, as well as rtw8821c_efuse.
Would you mind to create additional patch to add __packed to these struct of
efuse layout?
> struct rtw8821c_efuse {
> __le16 rtl_id;
> u8 res0[0x0e];
> @@ -93,6 +98,7 @@ struct rtw8821c_efuse {
> u8 res[3];
> union {
> struct rtw8821ce_efuse e;
> + struct rtw8821cs_efuse s;
> struct rtw8821cu_efuse u;
> };
> };
> --
> 2.39.0
next prev parent reply other threads:[~2022-12-28 6:21 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-27 23:30 [RFC PATCH v1 00/19] rtw88: Add SDIO support Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 01/19] rtw88: mac: Use existing interface mask macros in rtw_pwr_seq_parser() Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 02/19] rtw88: pci: Change type of rtw_hw_queue_mapping() and ac_to_hwq to enum Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 03/19] rtw88: pci: Change queue datatype from u8 to enum rtw_tx_queue_type Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 04/19] rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h} Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 05/19] mmc: sdio: add Realtek SDIO vendor ID and various wifi device IDs Martin Blumenstingl
2023-01-03 11:41 ` Ulf Hansson
2022-12-27 23:30 ` [RFC PATCH v1 06/19] rtw88: rtw8821c: Add support for parsing the RTL8821CS (SDIO) efuse Martin Blumenstingl
2022-12-28 6:21 ` Ping-Ke Shih [this message]
2022-12-27 23:30 ` [RFC PATCH v1 07/19] rtw88: rtw8822b: Add support for parsing the RTL8822BS " Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 08/19] rtw88: rtw8822c: Add support for parsing the RTL8822CS " Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 09/19] rtw88: hci: Add an optional power_switch() callback to rtw_hci_ops Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 10/19] rtw88: mac: Add support for the SDIO HCI in rtw_pwr_seq_parser() Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 11/19] rtw88: mac: Add support for the SDIO HCI in the TX/page table setup Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 12/19] rtw88: sdio: Add HCI implementation for SDIO based chipsets Martin Blumenstingl
2022-12-28 9:39 ` Ping-Ke Shih
2022-12-28 11:59 ` Martin Blumenstingl
2022-12-29 0:50 ` Ping-Ke Shih
2023-01-03 11:42 ` Ulf Hansson
2022-12-27 23:30 ` [RFC PATCH v1 13/19] rtw88: mac: Add support for SDIO specifics in the power on sequence Martin Blumenstingl
2022-12-29 1:14 ` Ping-Ke Shih
2022-12-29 10:49 ` Martin Blumenstingl
2022-12-29 11:24 ` Ping-Ke Shih
2022-12-27 23:30 ` [RFC PATCH v1 14/19] rtw88: main: Add the rpwm_addr and cpwm_addr for SDIO based chipsets Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 15/19] rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO based cards Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 16/19] rtw88: ps: Increase LEAVE_LPS_TRY_CNT for SDIO based chipsets Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 17/19] rtw88: Add support for the SDIO based RTL8822BS chipset Martin Blumenstingl
2022-12-27 23:30 ` [RFC PATCH v1 18/19] rtw88: Add support for the SDIO based RTL8822CS chipset Martin Blumenstingl
2022-12-29 1:40 ` Ping-Ke Shih
2022-12-27 23:30 ` [RFC PATCH v1 19/19] rtw88: Add support for the SDIO based RTL8821CS chipset Martin Blumenstingl
2023-01-03 23:01 ` Chris Morgan
2023-01-04 15:40 ` Martin Blumenstingl
2023-01-04 17:05 ` Chris Morgan
2023-01-04 17:23 ` Martin Blumenstingl
2023-01-04 22:45 ` Chris Morgan
2023-01-04 19:59 ` Bitterblue Smith
2023-01-04 20:06 ` Felix Schwarz
2023-01-04 20:14 ` Larry Finger
2023-01-07 14:53 ` Bitterblue Smith
2023-01-05 8:01 ` Sascha Hauer
2023-01-05 15:38 ` Bitterblue Smith
2022-12-29 4:19 ` [RFC PATCH v1 00/19] rtw88: Add SDIO support Ping-Ke Shih
2022-12-29 23:18 ` Martin Blumenstingl
2022-12-30 0:06 ` Ping-Ke Shih
2023-01-16 16:01 ` Kalle Valo
2023-01-17 17:21 ` Jakub Kicinski
2023-01-17 18:01 ` Kalle Valo
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=695c976e02ed44a2b2345a3ceb226fc4@realtek.com \
--to=pkshih@realtek.com \
--cc=jernej.skrabec@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=macroalpha82@gmail.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=neojou@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nitin.gupta981@gmail.com \
--cc=tony0620emma@gmail.com \
--cc=ulf.hansson@linaro.org \
/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).