mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
wifi: rtw89: 8852a: Accept USB devices and load their MAC address
Make rtw8852a_read_efuse() accept USB devices and load the MAC address from the correct offset. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/97412e2c-ac98-403c-9056-9d9fe1ed9f28@gmail.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
c19b106609
commit
1dfd11e700
@@ -621,14 +621,6 @@ static const struct rtw89_edcca_regs rtw8852a_edcca_regs = {
|
||||
.tx_collision_t2r_st_mask = B_TX_COLLISION_T2R_ST_M,
|
||||
};
|
||||
|
||||
static void rtw8852ae_efuse_parsing(struct rtw89_efuse *efuse,
|
||||
struct rtw8852a_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 rtw8852a_efuse_parsing_tssi(struct rtw89_dev *rtwdev,
|
||||
struct rtw8852a_efuse *map)
|
||||
{
|
||||
@@ -674,12 +666,18 @@ static int rtw8852a_read_efuse(struct rtw89_dev *rtwdev, u8 *log_map,
|
||||
|
||||
switch (rtwdev->hci.type) {
|
||||
case RTW89_HCI_TYPE_PCIE:
|
||||
rtw8852ae_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 -ENOTSUPP;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user