aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2007-02-05 21:07:27 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-08 15:38:54 -0500
commit97353cb4c05c2edf260e9d1b19a29d3cc0060a09 (patch)
tree6e1499853f6b45b6d33ec8830a0b06c98c9e96c0
parent84ff602efba2664762070add0600aa5c870a2659 (diff)
[NET] net/wanrouter/wanmain.c: cleanups
This patch contains the following cleanups: - make the following needlessly global functions static: - lock_adapter_irq() - unlock_adapter_irq() - #if 0 the following unused global functions: - wanrouter_encapsulate() - wanrouter_type_trans() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/wanrouter.h8
-rw-r--r--net/wanrouter/wanmain.c17
2 files changed, 8 insertions, 17 deletions
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h
index 2cd05013edfc..3add87465b1f 100644
--- a/include/linux/wanrouter.h
+++ b/include/linux/wanrouter.h
@@ -516,9 +516,6 @@ struct wan_device {
516/* Public functions available for device drivers */ 516/* Public functions available for device drivers */
517extern int register_wan_device(struct wan_device *wandev); 517extern int register_wan_device(struct wan_device *wandev);
518extern int unregister_wan_device(char *name); 518extern int unregister_wan_device(char *name);
519__be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev);
520int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev,
521 unsigned short type);
522 519
523/* Proc interface functions. These must not be called by the drivers! */ 520/* Proc interface functions. These must not be called by the drivers! */
524extern int wanrouter_proc_init(void); 521extern int wanrouter_proc_init(void);
@@ -527,11 +524,6 @@ extern int wanrouter_proc_add(struct wan_device *wandev);
527extern int wanrouter_proc_delete(struct wan_device *wandev); 524extern int wanrouter_proc_delete(struct wan_device *wandev);
528extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); 525extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg);
529 526
530extern void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
531extern void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
532
533
534
535/* Public Data */ 527/* Public Data */
536/* list of registered devices */ 528/* list of registered devices */
537extern struct wan_device *wanrouter_router_devlist; 529extern struct wan_device *wanrouter_router_devlist;
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
index 769cdd62c1bb..4d90a179aeda 100644
--- a/net/wanrouter/wanmain.c
+++ b/net/wanrouter/wanmain.c
@@ -86,8 +86,8 @@ static int wanrouter_device_del_if(struct wan_device *wandev,
86 86
87static struct wan_device *wanrouter_find_device(char *name); 87static struct wan_device *wanrouter_find_device(char *name);
88static int wanrouter_delete_interface(struct wan_device *wandev, char *name); 88static int wanrouter_delete_interface(struct wan_device *wandev, char *name);
89void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); 89static void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
90void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); 90static void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags);
91 91
92 92
93 93
@@ -104,8 +104,8 @@ struct wan_device* wanrouter_router_devlist; /* list of registered devices */
104 * Organize Unique Identifiers for encapsulation/decapsulation 104 * Organize Unique Identifiers for encapsulation/decapsulation
105 */ 105 */
106 106
107static unsigned char wanrouter_oui_ether[] = { 0x00, 0x00, 0x00 };
108#if 0 107#if 0
108static unsigned char wanrouter_oui_ether[] = { 0x00, 0x00, 0x00 };
109static unsigned char wanrouter_oui_802_2[] = { 0x00, 0x80, 0xC2 }; 109static unsigned char wanrouter_oui_802_2[] = { 0x00, 0x80, 0xC2 };
110#endif 110#endif
111 111
@@ -246,6 +246,8 @@ int unregister_wan_device(char *name)
246 return 0; 246 return 0;
247} 247}
248 248
249#if 0
250
249/* 251/*
250 * Encapsulate packet. 252 * Encapsulate packet.
251 * 253 *
@@ -341,6 +343,7 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev)
341 return ethertype; 343 return ethertype;
342} 344}
343 345
346#endif /* 0 */
344 347
345/* 348/*
346 * WAN device IOCTL. 349 * WAN device IOCTL.
@@ -799,23 +802,19 @@ static int wanrouter_delete_interface(struct wan_device *wandev, char *name)
799 return 0; 802 return 0;
800} 803}
801 804
802void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags) 805static void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags)
803{ 806{
804 spin_lock_irqsave(lock, *smp_flags); 807 spin_lock_irqsave(lock, *smp_flags);
805} 808}
806 809
807 810
808void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags) 811static void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags)
809{ 812{
810 spin_unlock_irqrestore(lock, *smp_flags); 813 spin_unlock_irqrestore(lock, *smp_flags);
811} 814}
812 815
813EXPORT_SYMBOL(register_wan_device); 816EXPORT_SYMBOL(register_wan_device);
814EXPORT_SYMBOL(unregister_wan_device); 817EXPORT_SYMBOL(unregister_wan_device);
815EXPORT_SYMBOL(wanrouter_encapsulate);
816EXPORT_SYMBOL(wanrouter_type_trans);
817EXPORT_SYMBOL(lock_adapter_irq);
818EXPORT_SYMBOL(unlock_adapter_irq);
819 818
820MODULE_LICENSE("GPL"); 819MODULE_LICENSE("GPL");
821 820