WAN: cosmetic changes to generic HDLC
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
This commit is contained in:
parent
d6f8aa8586
commit
4dfce4075a
@ -22,20 +22,19 @@
|
|||||||
* - proto->start() and stop() are called with spin_lock_irq held.
|
* - proto->start() and stop() are called with spin_lock_irq held.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/poll.h>
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/if_arp.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
#include <linux/inetdevice.h>
|
|
||||||
#include <linux/lapb.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/notifier.h>
|
|
||||||
#include <linux/hdlc.h>
|
#include <linux/hdlc.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
#include <linux/inetdevice.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/notifier.h>
|
||||||
|
#include <linux/pkt_sched.h>
|
||||||
|
#include <linux/poll.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
#include <net/net_namespace.h>
|
#include <net/net_namespace.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,19 +9,18 @@
|
|||||||
* as published by the Free Software Foundation.
|
* as published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/poll.h>
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/if_arp.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
#include <linux/inetdevice.h>
|
|
||||||
#include <linux/lapb.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/hdlc.h>
|
#include <linux/hdlc.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
#include <linux/inetdevice.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/pkt_sched.h>
|
||||||
|
#include <linux/poll.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#undef DEBUG_HARD_HEADER
|
#undef DEBUG_HARD_HEADER
|
||||||
|
|
||||||
@ -68,9 +67,9 @@ struct cisco_state {
|
|||||||
static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr);
|
static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr);
|
||||||
|
|
||||||
|
|
||||||
static inline struct cisco_state * state(hdlc_device *hdlc)
|
static inline struct cisco_state* state(hdlc_device *hdlc)
|
||||||
{
|
{
|
||||||
return(struct cisco_state *)(hdlc->state);
|
return (struct cisco_state *)hdlc->state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -172,7 +171,7 @@ static int cisco_rx(struct sk_buff *skb)
|
|||||||
data->address != CISCO_UNICAST)
|
data->address != CISCO_UNICAST)
|
||||||
goto rx_error;
|
goto rx_error;
|
||||||
|
|
||||||
switch(ntohs(data->protocol)) {
|
switch (ntohs(data->protocol)) {
|
||||||
case CISCO_SYS_INFO:
|
case CISCO_SYS_INFO:
|
||||||
/* Packet is not needed, drop it. */
|
/* Packet is not needed, drop it. */
|
||||||
dev_kfree_skb_any(skb);
|
dev_kfree_skb_any(skb);
|
||||||
@ -359,10 +358,10 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case IF_PROTO_CISCO:
|
case IF_PROTO_CISCO:
|
||||||
if(!capable(CAP_NET_ADMIN))
|
if (!capable(CAP_NET_ADMIN))
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
if(dev->flags & IFF_UP)
|
if (dev->flags & IFF_UP)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
if (copy_from_user(&new_settings, cisco_s, size))
|
if (copy_from_user(&new_settings, cisco_s, size))
|
||||||
@ -372,7 +371,7 @@ static int cisco_ioctl(struct net_device *dev, struct ifreq *ifr)
|
|||||||
new_settings.timeout < 2)
|
new_settings.timeout < 2)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
result=hdlc->attach(dev, ENCODING_NRZ,PARITY_CRC16_PR1_CCITT);
|
result = hdlc->attach(dev, ENCODING_NRZ,PARITY_CRC16_PR1_CCITT);
|
||||||
if (result)
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
@ -33,20 +33,19 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/poll.h>
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/if_arp.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
#include <linux/inetdevice.h>
|
|
||||||
#include <linux/lapb.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
#include <linux/hdlc.h>
|
#include <linux/hdlc.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
#include <linux/inetdevice.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/pkt_sched.h>
|
||||||
|
#include <linux/poll.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#undef DEBUG_PKT
|
#undef DEBUG_PKT
|
||||||
#undef DEBUG_ECN
|
#undef DEBUG_ECN
|
||||||
|
@ -9,19 +9,18 @@
|
|||||||
* as published by the Free Software Foundation.
|
* as published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/poll.h>
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/if_arp.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
#include <linux/inetdevice.h>
|
|
||||||
#include <linux/lapb.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/hdlc.h>
|
#include <linux/hdlc.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
#include <linux/inetdevice.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/pkt_sched.h>
|
||||||
|
#include <linux/poll.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
#include <net/syncppp.h>
|
#include <net/syncppp.h>
|
||||||
|
|
||||||
struct ppp_state {
|
struct ppp_state {
|
||||||
|
@ -9,19 +9,18 @@
|
|||||||
* as published by the Free Software Foundation.
|
* as published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/poll.h>
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/if_arp.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
#include <linux/inetdevice.h>
|
|
||||||
#include <linux/lapb.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/hdlc.h>
|
#include <linux/hdlc.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
#include <linux/inetdevice.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/pkt_sched.h>
|
||||||
|
#include <linux/poll.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
|
||||||
|
|
||||||
static int raw_ioctl(struct net_device *dev, struct ifreq *ifr);
|
static int raw_ioctl(struct net_device *dev, struct ifreq *ifr);
|
||||||
|
@ -9,20 +9,19 @@
|
|||||||
* as published by the Free Software Foundation.
|
* as published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/poll.h>
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/if_arp.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
#include <linux/inetdevice.h>
|
|
||||||
#include <linux/lapb.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
#include <linux/hdlc.h>
|
#include <linux/hdlc.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
#include <linux/inetdevice.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/pkt_sched.h>
|
||||||
|
#include <linux/poll.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
|
||||||
static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr);
|
static int raw_eth_ioctl(struct net_device *dev, struct ifreq *ifr);
|
||||||
|
|
||||||
|
@ -9,20 +9,19 @@
|
|||||||
* as published by the Free Software Foundation.
|
* as published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/kernel.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
#include <linux/poll.h>
|
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/if_arp.h>
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/skbuff.h>
|
|
||||||
#include <linux/pkt_sched.h>
|
|
||||||
#include <linux/inetdevice.h>
|
|
||||||
#include <linux/lapb.h>
|
|
||||||
#include <linux/rtnetlink.h>
|
|
||||||
#include <linux/hdlc.h>
|
#include <linux/hdlc.h>
|
||||||
|
#include <linux/if_arp.h>
|
||||||
|
#include <linux/inetdevice.h>
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/lapb.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/pkt_sched.h>
|
||||||
|
#include <linux/poll.h>
|
||||||
|
#include <linux/rtnetlink.h>
|
||||||
|
#include <linux/skbuff.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
#include <net/x25device.h>
|
#include <net/x25device.h>
|
||||||
|
|
||||||
static int x25_ioctl(struct net_device *dev, struct ifreq *ifr);
|
static int x25_ioctl(struct net_device *dev, struct ifreq *ifr);
|
||||||
|
Loading…
Reference in New Issue
Block a user