diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 00:49:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 01:42:38 -0500 |
commit | a2dbb88210b9877f1c53d3798fd5d717a4d45256 (patch) | |
tree | db296b53a801dc5e4f8c25d82a7aebee0309abf6 /net/bridge/br_device.c | |
parent | 8dfcdf342d9e8294a3292005f9158022289dfd67 (diff) |
bridge: convert to net_device_ops
Convert to net_device_ops function table.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r-- | net/bridge/br_device.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 6c023f0f8252..920ce3348398 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -147,7 +147,7 @@ static int br_set_tx_csum(struct net_device *dev, u32 data) | |||
147 | return 0; | 147 | return 0; |
148 | } | 148 | } |
149 | 149 | ||
150 | static struct ethtool_ops br_ethtool_ops = { | 150 | static const struct ethtool_ops br_ethtool_ops = { |
151 | .get_drvinfo = br_getinfo, | 151 | .get_drvinfo = br_getinfo, |
152 | .get_link = ethtool_op_get_link, | 152 | .get_link = ethtool_op_get_link, |
153 | .get_tx_csum = ethtool_op_get_tx_csum, | 153 | .get_tx_csum = ethtool_op_get_tx_csum, |
@@ -160,21 +160,25 @@ static struct ethtool_ops br_ethtool_ops = { | |||
160 | .get_flags = ethtool_op_get_flags, | 160 | .get_flags = ethtool_op_get_flags, |
161 | }; | 161 | }; |
162 | 162 | ||
163 | static const struct net_device_ops br_netdev_ops = { | ||
164 | .ndo_open = br_dev_open, | ||
165 | .ndo_stop = br_dev_stop, | ||
166 | .ndo_set_mac_address = br_set_mac_address, | ||
167 | .ndo_set_multicast_list = br_dev_set_multicast_list, | ||
168 | .ndo_change_mtu = br_change_mtu, | ||
169 | .ndo_do_ioctl = br_dev_ioctl, | ||
170 | }; | ||
171 | |||
163 | void br_dev_setup(struct net_device *dev) | 172 | void br_dev_setup(struct net_device *dev) |
164 | { | 173 | { |
165 | random_ether_addr(dev->dev_addr); | 174 | random_ether_addr(dev->dev_addr); |
166 | ether_setup(dev); | 175 | ether_setup(dev); |
167 | 176 | ||
168 | dev->do_ioctl = br_dev_ioctl; | 177 | dev->netdev_ops = &br_netdev_ops; |
169 | dev->hard_start_xmit = br_dev_xmit; | 178 | dev->hard_start_xmit = br_dev_xmit; |
170 | dev->open = br_dev_open; | ||
171 | dev->set_multicast_list = br_dev_set_multicast_list; | ||
172 | dev->change_mtu = br_change_mtu; | ||
173 | dev->destructor = free_netdev; | 179 | dev->destructor = free_netdev; |
174 | SET_ETHTOOL_OPS(dev, &br_ethtool_ops); | 180 | SET_ETHTOOL_OPS(dev, &br_ethtool_ops); |
175 | dev->stop = br_dev_stop; | ||
176 | dev->tx_queue_len = 0; | 181 | dev->tx_queue_len = 0; |
177 | dev->set_mac_address = br_set_mac_address; | ||
178 | dev->priv_flags = IFF_EBRIDGE; | 182 | dev->priv_flags = IFF_EBRIDGE; |
179 | 183 | ||
180 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | | 184 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | |