--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
-@@ -167,6 +167,149 @@ static void qca955x_wmac_setup(void)
+@@ -166,6 +166,149 @@ static void qca955x_wmac_setup(void)
ath79_wmac_data.is_clk_25mhz = true;
}
+
+ BUG_ON(!soc_is_ar933x() && !soc_is_ar934x());
+ base = ioremap_nocache(AR93XX_WMAC_BASE, AR93XX_WMAC_SIZE);
-+ while (addr > sizeof(hdr)) {
-+ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr)))
++ while (addr > sizeof(hdr_u32)) {
++ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr_u32)))
+ break;
+
+ if (hdr_u32 == 0 || hdr_u32 == ~0)