mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 06:49:29 -04:00
wifi: rtw89: 8851b: Accept USB devices and load their MAC address
Make rtw8851b_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/6b2a1382-3be4-4038-8005-cf96922e4332@gmail.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
58f1510a8b
commit
4b6ea5a381
@@ -461,14 +461,6 @@ static int rtw8851b_pwr_off_func(struct rtw89_dev *rtwdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rtw8851b_efuse_parsing(struct rtw89_efuse *efuse,
|
||||
struct rtw8851b_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 rtw8851b_efuse_parsing_tssi(struct rtw89_dev *rtwdev,
|
||||
struct rtw8851b_efuse *map)
|
||||
{
|
||||
@@ -549,12 +541,18 @@ static int rtw8851b_read_efuse(struct rtw89_dev *rtwdev, u8 *log_map,
|
||||
|
||||
switch (rtwdev->hci.type) {
|
||||
case RTW89_HCI_TYPE_PCIE:
|
||||
rtw8851b_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;
|
||||
|
||||
Reference in New Issue
Block a user