diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-08 14:15:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-08 14:15:23 -0400 |
commit | f2d7499be1b1fe1cd8a5e6a01c1f44173894a241 (patch) | |
tree | 64d341a90d8cb831a5097e365d303367906f1373 /drivers/net/wan/hdlc_cisco.c | |
parent | 8d659f5e43c5db2630e85f507b7384365e9e1c1e (diff) | |
parent | 76aab2c1eae491a5d73ac83deec97dd28ebac584 (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: (99 commits)
pkt_sched: Fix actions referencing
bnx2x: fix logical op
tcp: (whitespace only) fix confusing indentation
pkt_sched: Fix qdisc config when link is down.
[Bluetooth] Add full quirk implementation for btusb driver
[Bluetooth] Removal of unnecessary ignore module parameter
[Bluetooth] Add parameters to control BNEP header compression
ath9k: Revamp wireless mode usage
ath9k: More unused macros
ath9k: Remove a few unused macros and fix indentation
ath9k: Use mac80211's band macros and remove enum hal_freq_band
ath9k: Remove redundant data structure ath9k_txq_info
ath9k: Cleanup data structures related to HW capabilities
ath9k: work around gcc ICEs
ath9k: Add new Atheros IEEE 802.11n driver
ath5k: remove Atheros 11n devices from supported list
list.h: add list_cut_position()
list.h: Add list_splice_tail() and list_splice_tail_init()
p54: swap short slot time dcf values
rt2x00: Block all unsupported modes
...
Diffstat (limited to 'drivers/net/wan/hdlc_cisco.c')
-rw-r--r-- | drivers/net/wan/hdlc_cisco.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index 849819c2552d..44e64b15dbd1 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c | |||
@@ -9,19 +9,18 @@ | |||
9 | * as published by the Free Software Foundation. | 9 | * as published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/slab.h> | ||
15 | #include <linux/poll.h> | ||
16 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/hdlc.h> | ||
17 | #include <linux/if_arp.h> | 14 | #include <linux/if_arp.h> |
15 | #include <linux/inetdevice.h> | ||
18 | #include <linux/init.h> | 16 | #include <linux/init.h> |
19 | #include <linux/skbuff.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | ||
20 | #include <linux/pkt_sched.h> | 19 | #include <linux/pkt_sched.h> |
21 | #include <linux/inetdevice.h> | 20 | #include <linux/poll.h> |
22 | #include <linux/lapb.h> | ||
23 | #include <linux/rtnetlink.h> | 21 | #include <linux/rtnetlink.h> |
24 | #include <linux/hdlc.h> | 22 | #include <linux/skbuff.h> |
23 | #include <linux/slab.h> | ||
25 | 24 | ||
26 | #undef DEBUG_HARD_HEADER | 25 | #undef DEBUG_HARD_HEADER |
27 | 26 | ||
@@ -68,9 +67,9 @@ struct cisco_state { | |||
68 | static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr); | 67 | static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr); |
69 | 68 | ||
70 | 69 | ||
71 | static inline struct cisco_state * state(hdlc_device *hdlc) | 70 | static inline struct cisco_state* state(hdlc_device *hdlc) |
72 | { | 71 | { |
73 | return(struct cisco_state *)(hdlc->state); | 72 | return (struct cisco_state *)hdlc->state; |
74 | } | 73 | } |
75 | 74 | ||
76 | 75 | ||
@@ -172,7 +171,7 @@ static int cisco_rx(struct sk_buff *skb) | |||
172 | data->address != CISCO_UNICAST) | 171 | data->address != CISCO_UNICAST) |
173 | goto rx_error; | 172 | goto rx_error; |
174 | 173 | ||
175 | switch(ntohs(data->protocol)) { | 174 | switch (ntohs(data->protocol)) { |
176 | case CISCO_SYS_INFO: | 175 | case CISCO_SYS_INFO: |
177 | /* Packet is not needed, drop it. */ | 176 | /* Packet is not needed, drop it. */ |
178 | dev_kfree_skb_any(skb); | 177 | dev_kfree_skb_any(skb); |
@@ -336,7 +335,7 @@ static struct hdlc_proto proto = { | |||
336 | static const struct header_ops cisco_header_ops = { | 335 | static const struct header_ops cisco_header_ops = { |
337 | .create = cisco_hard_header, | 336 | .create = cisco_hard_header, |
338 | }; | 337 | }; |
339 | 338 | ||
340 | static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr) | 339 | static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr) |
341 | { | 340 | { |
342 | cisco_proto __user *cisco_s = ifr->ifr_settings.ifs_ifsu.cisco; | 341 | cisco_proto __user *cisco_s = ifr->ifr_settings.ifs_ifsu.cisco; |
@@ -359,10 +358,10 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr) | |||
359 | return 0; | 358 | return 0; |
360 | 359 | ||
361 | case IF_PROTO_CISCO: | 360 | case IF_PROTO_CISCO: |
362 | if(!capable(CAP_NET_ADMIN)) | 361 | if (!capable(CAP_NET_ADMIN)) |
363 | return -EPERM; | 362 | return -EPERM; |
364 | 363 | ||
365 | if(dev->flags & IFF_UP) | 364 | if (dev->flags & IFF_UP) |
366 | return -EBUSY; | 365 | return -EBUSY; |
367 | 366 | ||
368 | if (copy_from_user(&new_settings, cisco_s, size)) | 367 | if (copy_from_user(&new_settings, cisco_s, size)) |
@@ -372,7 +371,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr) | |||
372 | new_settings.timeout < 2) | 371 | new_settings.timeout < 2) |
373 | return -EINVAL; | 372 | return -EINVAL; |
374 | 373 | ||
375 | result=hdlc->attach(dev, ENCODING_NRZ,PARITY_CRC16_PR1_CCITT); | 374 | result = hdlc->attach(dev, ENCODING_NRZ,PARITY_CRC16_PR1_CCITT); |
376 | if (result) | 375 | if (result) |
377 | return result; | 376 | return result; |
378 | 377 | ||