mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-16 21:58:27 +00:00
kboot: Forward WiFi cal blob from ADT to DT
This calibration blob is stored in the WiFi chipset SROM on other platforms, but Apple decided to move it to sysconfig instead... Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
36954d51fd
commit
3e4db747eb
1 changed files with 10 additions and 2 deletions
12
src/kboot.c
12
src/kboot.c
|
@ -293,7 +293,7 @@ static int dt_set_mac_addresses(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int dt_set_antenna(void)
|
||||
static int dt_set_wifi(void)
|
||||
{
|
||||
int anode = adt_path_offset(adt, "/arm-io/wlan");
|
||||
|
||||
|
@ -316,6 +316,14 @@ static int dt_set_antenna(void)
|
|||
memcpy(antenna, &info[8], sizeof(antenna));
|
||||
fdt_setprop_string(dt, node, "apple,antenna-sku", antenna);
|
||||
|
||||
u32 len;
|
||||
const u8 *cal_blob = adt_getprop(adt, anode, "wifi-calibration-msf", &len);
|
||||
|
||||
if (!cal_blob || !len)
|
||||
bail("ADT: Failed to get wifi-calibration-msf");
|
||||
|
||||
fdt_setprop(dt, node, "brcm,cal-blob", cal_blob, len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -477,7 +485,7 @@ int kboot_prepare_dt(void *fdt)
|
|||
return -1;
|
||||
if (dt_set_mac_addresses())
|
||||
return -1;
|
||||
if (dt_set_antenna())
|
||||
if (dt_set_wifi())
|
||||
return -1;
|
||||
if (dt_disable_missing_devs("usb-drd", "usb@", 8))
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue