ip17xx: Introduce indirection of low-level operations
authorGabor Juhos <juhosg@openwrt.org>
Tue, 8 Jun 2010 20:18:20 +0000 (20:18 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Tue, 8 Jun 2010 20:18:20 +0000 (20:18 +0000)
commit52b6a57669fbecfbd371cf4b27b9f9a4c1ff5a57
tree4e79b64d984586f66fb57ad139b2c6a62ae74914
parent7136ccf0907192b697f625b2d2f6ed1c2c94e294
ip17xx: Introduce indirection of low-level operations

This patch introduces seperation between low-level and high-level parts
of the driver. The low-level functions are now called via pointers stored
in struct ip175c_regs.

The only functional changes are:

  o  correct_vlan_state() is now called as a part of every update_state().

  o  The order of setting of MODE_REG and resetting switch ports
     has changed. (These are independent actions, so it should not matter.)

  o  ip175c_set_tagged() sets the tags via update_state() instead of writing
     directly to the registers.

  o  The same for ip175c_set_pvid().

The only gaps in this abstraction are operations on ports (get_port_speed
and friends), which access PHY registers directly.

Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
SVN-Revision: 21714
target/linux/generic-2.6/files/drivers/net/phy/ip175c.c