mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 22:47:56 +00:00
rtl838x: Fix firmware handling
Fix wrong magic number verification for FW files. Correct handling of external RTL8218B firmware PHY name in firmware. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
This commit is contained in:
parent
953435795d
commit
076fdd9fec
@ -251,8 +251,8 @@ rtl838x_request_fw(struct phy_device *phydev, const struct firmware *fw,
|
||||
h = (struct fw_header *) fw->data;
|
||||
pr_info("Firmware loaded. Size %d, magic: %08x\n", fw->size, h->magic);
|
||||
|
||||
if (h->phy != 0x83800000) {
|
||||
pr_err("Wrong firmware file: PHY mismatch.\n");
|
||||
if (h->magic != 0x83808380) {
|
||||
pr_err("Wrong firmware file: MAGIC mismatch.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -415,7 +415,7 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
|
||||
if (!h)
|
||||
return -1;
|
||||
|
||||
if (h->phy != 0x8218b00) {
|
||||
if (h->phy != 0x8218b000) {
|
||||
phydev_err(phydev, "Wrong firmware file: PHY mismatch.\n");
|
||||
return -1;
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user