ar71xx: fix kernel Oops in at803x_link_change_notify

r45954 ("ar71xx: fix 100/10mbps ethernet link issues on mynet range
extender") introduced a pdata based modification of the tx_clk_dly. But it
was not checked if pdata actually existed. This caused a page fault on all
devices which didn't have at803x_platform_data specified for an at803x
based device.

Signed-off-by: Sven Eckelmann <sven@open-mesh.com>

SVN-Revision: 46200
This commit is contained in:
Felix Fietkau 2015-07-06 17:27:29 +00:00
parent f58c9613f7
commit 67c428a9f6

View file

@ -141,7 +141,7 @@
priv->phy_reset = false; priv->phy_reset = false;
} }
} }
+ if (pdata->fixup_rgmii_tx_delay && + if (pdata && pdata->fixup_rgmii_tx_delay &&
+ phydev->speed != priv->prev_speed) { + phydev->speed != priv->prev_speed) {
+ switch (phydev->speed) { + switch (phydev->speed) {
+ case SPEED_10: + case SPEED_10: