diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 17:25:41 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 17:25:41 -0500 |
commit | 5fbbf5f648a9c4ef99276854f05b2255d1b004d3 (patch) | |
tree | 59c9ae762c3df2800e894001b3de58c5f1972486 /net/bluetooth/bnep/netdev.c | |
parent | ce279e6ec91c49f2c5f59f7492e19d39edbf8bbd (diff) | |
parent | 56cf391a9462a4897ea660a6af3662dda5ae8c84 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (84 commits)
wimax: fix kernel-doc for debufs_dentry member of struct wimax_dev
net: convert pegasus driver to net_device_ops
bnx2x: Prevent eeprom set when driver is down
net: switch kaweth driver to netdevops
pcnet32: round off carrier watch timer
i2400m/usb: wrap USB power saving in #ifdef CONFIG_PM
wimax: testing for rfkill support should also test for CONFIG_RFKILL_MODULE
wimax: fix kconfig interactions with rfkill and input layers
wimax: fix '#ifndef CONFIG_BUG' layout to avoid warning
r6040: bump release number to 0.20
r6040: warn about MAC address being unset
r6040: check PHY status when bringing interface up
r6040: make printks consistent with DRV_NAME
gianfar: Fixup use of BUS_ID_SIZE
mlx4_en: Returning real Max in get_ringparam
mlx4_en: Consider inline packets on completion
netdev: bfin_mac: enable bfin_mac net dev driver for BF51x
qeth: convert to net_device_ops
vlan: add neigh_setup
dm9601: warn on invalid mac address
...
Diffstat (limited to 'net/bluetooth/bnep/netdev.c')
-rw-r--r-- | net/bluetooth/bnep/netdev.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c index f897da6e0444..d7a0e9722def 100644 --- a/net/bluetooth/bnep/netdev.c +++ b/net/bluetooth/bnep/netdev.c | |||
@@ -55,12 +55,6 @@ static int bnep_net_close(struct net_device *dev) | |||
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | static struct net_device_stats *bnep_net_get_stats(struct net_device *dev) | ||
59 | { | ||
60 | struct bnep_session *s = netdev_priv(dev); | ||
61 | return &s->stats; | ||
62 | } | ||
63 | |||
64 | static void bnep_net_set_mc_list(struct net_device *dev) | 58 | static void bnep_net_set_mc_list(struct net_device *dev) |
65 | { | 59 | { |
66 | #ifdef CONFIG_BT_BNEP_MC_FILTER | 60 | #ifdef CONFIG_BT_BNEP_MC_FILTER |
@@ -128,11 +122,6 @@ static void bnep_net_timeout(struct net_device *dev) | |||
128 | netif_wake_queue(dev); | 122 | netif_wake_queue(dev); |
129 | } | 123 | } |
130 | 124 | ||
131 | static int bnep_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | ||
132 | { | ||
133 | return -EINVAL; | ||
134 | } | ||
135 | |||
136 | #ifdef CONFIG_BT_BNEP_MC_FILTER | 125 | #ifdef CONFIG_BT_BNEP_MC_FILTER |
137 | static inline int bnep_net_mc_filter(struct sk_buff *skb, struct bnep_session *s) | 126 | static inline int bnep_net_mc_filter(struct sk_buff *skb, struct bnep_session *s) |
138 | { | 127 | { |
@@ -217,6 +206,18 @@ static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev) | |||
217 | return 0; | 206 | return 0; |
218 | } | 207 | } |
219 | 208 | ||
209 | static const struct net_device_ops bnep_netdev_ops = { | ||
210 | .ndo_open = bnep_net_open, | ||
211 | .ndo_stop = bnep_net_close, | ||
212 | .ndo_start_xmit = bnep_net_xmit, | ||
213 | .ndo_validate_addr = eth_validate_addr, | ||
214 | .ndo_set_multicast_list = bnep_net_set_mc_list, | ||
215 | .ndo_set_mac_address = bnep_net_set_mac_addr, | ||
216 | .ndo_tx_timeout = bnep_net_timeout, | ||
217 | .ndo_change_mtu = eth_change_mtu, | ||
218 | |||
219 | }; | ||
220 | |||
220 | void bnep_net_setup(struct net_device *dev) | 221 | void bnep_net_setup(struct net_device *dev) |
221 | { | 222 | { |
222 | 223 | ||
@@ -224,15 +225,7 @@ void bnep_net_setup(struct net_device *dev) | |||
224 | dev->addr_len = ETH_ALEN; | 225 | dev->addr_len = ETH_ALEN; |
225 | 226 | ||
226 | ether_setup(dev); | 227 | ether_setup(dev); |
227 | 228 | dev->netdev_ops = &bnep_netdev_ops; | |
228 | dev->open = bnep_net_open; | ||
229 | dev->stop = bnep_net_close; | ||
230 | dev->hard_start_xmit = bnep_net_xmit; | ||
231 | dev->get_stats = bnep_net_get_stats; | ||
232 | dev->do_ioctl = bnep_net_ioctl; | ||
233 | dev->set_mac_address = bnep_net_set_mac_addr; | ||
234 | dev->set_multicast_list = bnep_net_set_mc_list; | ||
235 | 229 | ||
236 | dev->watchdog_timeo = HZ * 2; | 230 | dev->watchdog_timeo = HZ * 2; |
237 | dev->tx_timeout = bnep_net_timeout; | ||
238 | } | 231 | } |