Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: rtw88: rtw8723d: Implement RTL8723DS (SDIO) efuse parsing

The efuse of the SDIO RTL8723DS chip has only one known member: the mac
address is at offset 0x11a. Add a struct rtw8723ds_efuse describing this
and use it for copying the mac address when the SDIO bus is used.

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230522202425.1827005-3-martin.blumenstingl@googlemail.com

authored by

Martin Blumenstingl and committed by
Kalle Valo
9be20a82 e967229e

+15
+9
drivers/net/wireless/realtek/rtw88/rtw8723d.c
··· 216 216 ether_addr_copy(efuse->addr, map->u.mac_addr); 217 217 } 218 218 219 + static void rtw8723ds_efuse_parsing(struct rtw_efuse *efuse, 220 + struct rtw8723d_efuse *map) 221 + { 222 + ether_addr_copy(efuse->addr, map->s.mac_addr); 223 + } 224 + 219 225 static int rtw8723d_read_efuse(struct rtw_dev *rtwdev, u8 *log_map) 220 226 { 221 227 struct rtw_efuse *efuse = &rtwdev->efuse; ··· 253 247 break; 254 248 case RTW_HCI_TYPE_USB: 255 249 rtw8723du_efuse_parsing(efuse, map); 250 + break; 251 + case RTW_HCI_TYPE_SDIO: 252 + rtw8723ds_efuse_parsing(efuse, map); 256 253 break; 257 254 default: 258 255 /* unsupported now */
+6
drivers/net/wireless/realtek/rtw88/rtw8723d.h
··· 49 49 u8 mac_addr[ETH_ALEN]; /* 0x107 */ 50 50 }; 51 51 52 + struct rtw8723ds_efuse { 53 + u8 res4[0x4a]; /* 0xd0 */ 54 + u8 mac_addr[ETH_ALEN]; /* 0x11a */ 55 + }; 56 + 52 57 struct rtw8723d_efuse { 53 58 __le16 rtl_id; 54 59 u8 rsvd[2]; ··· 85 80 union { 86 81 struct rtw8723de_efuse e; 87 82 struct rtw8723du_efuse u; 83 + struct rtw8723ds_efuse s; 88 84 }; 89 85 }; 90 86