r8152: move the setting for the default speed
authorhayeswang <hayeswang@realtek.com>
Mon, 13 Jun 2016 09:49:37 +0000 (17:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jun 2016 05:37:48 +0000 (22:37 -0700)
commit9d21c0d83ea3def89b9cd33222b1c44c1af44b4d
tree75edc64b67ddbf06b29e09dbbdf566dec518323f
parenta028a9e003f299cf427d98501861bbbb4f5ba7a5
r8152: move the setting for the default speed

Move calling set_speed() from open() to rtl_hw_phy_work_func_t().
Then, we would set the default speed only for first initialization
or after resuming.

Besides, the set_speed() could handle the flag of PHY_RESET which
would be set in rtl_ops.hw_phy_cfg().

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c