mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
wil6210: allow flashless boot when OTP is empty
Use random MAC address for non wmi_only firmware. Change-Id: Iab8f0aa494528d12051f103a94c6049187e79505 Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org> Signed-off-by: Lior David <liord@codeaurora.org>
This commit is contained in:
parent
7ce702f31b
commit
bc997e94d3
1 changed files with 8 additions and 2 deletions
|
|
@ -1425,8 +1425,14 @@ static int wil_get_otp_info(struct wil6210_priv *wil)
|
|||
}
|
||||
|
||||
if (!is_valid_ether_addr(mac)) {
|
||||
wil_err(wil, "Invalid MAC %pM\n", mac);
|
||||
return -EINVAL;
|
||||
u8 dummy_mac[ETH_ALEN] = {
|
||||
0x00, 0xde, 0xad, 0x12, 0x34, 0x56,
|
||||
};
|
||||
if (!test_bit(WMI_FW_CAPABILITY_WMI_ONLY, wil->fw_capabilities))
|
||||
get_random_bytes(dummy_mac + 3, 3);
|
||||
wil_err(wil, "Invalid MAC %pM, using random %pM\n", mac,
|
||||
dummy_mac);
|
||||
ether_addr_copy(mac, dummy_mac);
|
||||
}
|
||||
|
||||
ether_addr_copy(ndev->perm_addr, mac);
|
||||
|
|
|
|||
Loading…
Reference in a new issue