aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r--drivers/net/hamradio/6pack.c6
-rw-r--r--drivers/net/hamradio/Kconfig2
-rw-r--r--drivers/net/hamradio/Makefile2
-rw-r--r--drivers/net/hamradio/baycom_epp.c2
-rw-r--r--drivers/net/hamradio/baycom_par.c2
-rw-r--r--drivers/net/hamradio/baycom_ser_fdx.c2
-rw-r--r--drivers/net/hamradio/baycom_ser_hdx.c2
-rw-r--r--drivers/net/hamradio/bpqether.c11
-rw-r--r--drivers/net/hamradio/hdlcdrv.c4
-rw-r--r--drivers/net/hamradio/mkiss.c6
-rw-r--r--drivers/net/hamradio/scc.c3
-rw-r--r--drivers/net/hamradio/yam.c6
12 files changed, 23 insertions, 25 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 4b52c767ad05..0d283781bc5e 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -608,7 +608,7 @@ static int sixpack_open(struct tty_struct *tty)
608 608
609 spin_lock_init(&sp->lock); 609 spin_lock_init(&sp->lock);
610 atomic_set(&sp->refcnt, 1); 610 atomic_set(&sp->refcnt, 1);
611 init_MUTEX_LOCKED(&sp->dead_sem); 611 sema_init(&sp->dead_sem, 0);
612 612
613 /* !!! length of the buffers. MTU is IP MTU, not PACLEN! */ 613 /* !!! length of the buffers. MTU is IP MTU, not PACLEN! */
614 614
@@ -692,10 +692,10 @@ static void sixpack_close(struct tty_struct *tty)
692{ 692{
693 struct sixpack *sp; 693 struct sixpack *sp;
694 694
695 write_lock(&disc_data_lock); 695 write_lock_bh(&disc_data_lock);
696 sp = tty->disc_data; 696 sp = tty->disc_data;
697 tty->disc_data = NULL; 697 tty->disc_data = NULL;
698 write_unlock(&disc_data_lock); 698 write_unlock_bh(&disc_data_lock);
699 if (!sp) 699 if (!sp)
700 return; 700 return;
701 701
diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig
index 62d5d5cfd6a6..95dbcfdf131d 100644
--- a/drivers/net/hamradio/Kconfig
+++ b/drivers/net/hamradio/Kconfig
@@ -73,7 +73,7 @@ config DMASCC
73 certain parameters, such as channel access timing, clock mode, and 73 certain parameters, such as channel access timing, clock mode, and
74 DMA channel. This is accomplished with a small utility program, 74 DMA channel. This is accomplished with a small utility program,
75 dmascc_cfg, available at 75 dmascc_cfg, available at
76 <http://cacofonix.nt.tuwien.ac.at/~oe1kib/Linux/>. Please be sure to 76 <http://www.linux-ax25.org/wiki/Ax25-tools>. Please be sure to
77 get at least version 1.27 of dmascc_cfg, as older versions will not 77 get at least version 1.27 of dmascc_cfg, as older versions will not
78 work with the current driver. 78 work with the current driver.
79 79
diff --git a/drivers/net/hamradio/Makefile b/drivers/net/hamradio/Makefile
index 9def86704a91..104096070026 100644
--- a/drivers/net/hamradio/Makefile
+++ b/drivers/net/hamradio/Makefile
@@ -3,7 +3,7 @@
3# 3#
4# 4#
5# 19971130 Moved the amateur radio related network drivers from 5# 19971130 Moved the amateur radio related network drivers from
6# drivers/net/ to drivers/hamradio for easier maintainance. 6# drivers/net/ to drivers/hamradio for easier maintenance.
7# Joerg Reuter DL1BKE <jreuter@yaina.de> 7# Joerg Reuter DL1BKE <jreuter@yaina.de>
8# 8#
9# 20000806 Rewritten to use lists instead of if-statements. 9# 20000806 Rewritten to use lists instead of if-statements.
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index a3c0dc9d8b98..9537aaa50c2f 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -69,7 +69,7 @@ static const char paranoia_str[] = KERN_ERR
69 69
70static const char bc_drvname[] = "baycom_epp"; 70static const char bc_drvname[] = "baycom_epp";
71static const char bc_drvinfo[] = KERN_INFO "baycom_epp: (C) 1998-2000 Thomas Sailer, HB9JNX/AE4WA\n" 71static const char bc_drvinfo[] = KERN_INFO "baycom_epp: (C) 1998-2000 Thomas Sailer, HB9JNX/AE4WA\n"
72"baycom_epp: version 0.7 compiled " __TIME__ " " __DATE__ "\n"; 72"baycom_epp: version 0.7\n";
73 73
74/* --------------------------------------------------------------------- */ 74/* --------------------------------------------------------------------- */
75 75
diff --git a/drivers/net/hamradio/baycom_par.c b/drivers/net/hamradio/baycom_par.c
index 5f5af9a606f8..279d2296290a 100644
--- a/drivers/net/hamradio/baycom_par.c
+++ b/drivers/net/hamradio/baycom_par.c
@@ -102,7 +102,7 @@
102 102
103static const char bc_drvname[] = "baycom_par"; 103static const char bc_drvname[] = "baycom_par";
104static const char bc_drvinfo[] = KERN_INFO "baycom_par: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n" 104static const char bc_drvinfo[] = KERN_INFO "baycom_par: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n"
105"baycom_par: version 0.9 compiled " __TIME__ " " __DATE__ "\n"; 105"baycom_par: version 0.9\n";
106 106
107/* --------------------------------------------------------------------- */ 107/* --------------------------------------------------------------------- */
108 108
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c
index 3e25f10cabd6..99cdce33df8b 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -92,7 +92,7 @@
92 92
93static const char bc_drvname[] = "baycom_ser_fdx"; 93static const char bc_drvname[] = "baycom_ser_fdx";
94static const char bc_drvinfo[] = KERN_INFO "baycom_ser_fdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n" 94static const char bc_drvinfo[] = KERN_INFO "baycom_ser_fdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n"
95"baycom_ser_fdx: version 0.10 compiled " __TIME__ " " __DATE__ "\n"; 95"baycom_ser_fdx: version 0.10\n";
96 96
97/* --------------------------------------------------------------------- */ 97/* --------------------------------------------------------------------- */
98 98
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c b/drivers/net/hamradio/baycom_ser_hdx.c
index 1686f6dcbbce..d92fe6ca788f 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -80,7 +80,7 @@
80 80
81static const char bc_drvname[] = "baycom_ser_hdx"; 81static const char bc_drvname[] = "baycom_ser_hdx";
82static const char bc_drvinfo[] = KERN_INFO "baycom_ser_hdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n" 82static const char bc_drvinfo[] = KERN_INFO "baycom_ser_hdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n"
83"baycom_ser_hdx: version 0.10 compiled " __TIME__ " " __DATE__ "\n"; 83"baycom_ser_hdx: version 0.10\n";
84 84
85/* --------------------------------------------------------------------- */ 85/* --------------------------------------------------------------------- */
86 86
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 14f01d156db9..18d8affecd1b 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -168,7 +168,7 @@ static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev)
168 168
169static inline int dev_is_ethdev(struct net_device *dev) 169static inline int dev_is_ethdev(struct net_device *dev)
170{ 170{
171 return (dev->type == ARPHRD_ETHER && strncmp(dev->name, "dummy", 5)); 171 return dev->type == ARPHRD_ETHER && strncmp(dev->name, "dummy", 5);
172} 172}
173 173
174/* ------------------------------------------------------------------------ */ 174/* ------------------------------------------------------------------------ */
@@ -400,13 +400,14 @@ static void *bpq_seq_start(struct seq_file *seq, loff_t *pos)
400static void *bpq_seq_next(struct seq_file *seq, void *v, loff_t *pos) 400static void *bpq_seq_next(struct seq_file *seq, void *v, loff_t *pos)
401{ 401{
402 struct list_head *p; 402 struct list_head *p;
403 struct bpqdev *bpqdev = v;
403 404
404 ++*pos; 405 ++*pos;
405 406
406 if (v == SEQ_START_TOKEN) 407 if (v == SEQ_START_TOKEN)
407 p = rcu_dereference(bpq_devices.next); 408 p = rcu_dereference(list_next_rcu(&bpq_devices));
408 else 409 else
409 p = rcu_dereference(((struct bpqdev *)v)->bpq_list.next); 410 p = rcu_dereference(list_next_rcu(&bpqdev->bpq_list));
410 411
411 return (p == &bpq_devices) ? NULL 412 return (p == &bpq_devices) ? NULL
412 : list_entry(p, struct bpqdev, bpq_list); 413 : list_entry(p, struct bpqdev, bpq_list);
@@ -515,10 +516,6 @@ static int bpq_new_device(struct net_device *edev)
515 memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr)); 516 memcpy(bpq->dest_addr, bcast_addr, sizeof(bpq_eth_addr));
516 memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr)); 517 memcpy(bpq->acpt_addr, bcast_addr, sizeof(bpq_eth_addr));
517 518
518 err = dev_alloc_name(ndev, ndev->name);
519 if (err < 0)
520 goto error;
521
522 err = register_netdevice(ndev); 519 err = register_netdevice(ndev);
523 if (err) 520 if (err)
524 goto error; 521 goto error;
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index b8bdf9d51cd4..a4a3516b6bbf 100644
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -110,7 +110,7 @@ static int calc_crc_ccitt(const unsigned char *buf, int cnt)
110 for (; cnt > 0; cnt--) 110 for (; cnt > 0; cnt--)
111 crc = (crc >> 8) ^ crc_ccitt_table[(crc ^ *buf++) & 0xff]; 111 crc = (crc >> 8) ^ crc_ccitt_table[(crc ^ *buf++) & 0xff];
112 crc ^= 0xffff; 112 crc ^= 0xffff;
113 return (crc & 0xffff); 113 return crc & 0xffff;
114} 114}
115#endif 115#endif
116 116
@@ -749,7 +749,7 @@ EXPORT_SYMBOL(hdlcdrv_unregister);
749static int __init hdlcdrv_init_driver(void) 749static int __init hdlcdrv_init_driver(void)
750{ 750{
751 printk(KERN_INFO "hdlcdrv: (C) 1996-2000 Thomas Sailer HB9JNX/AE4WA\n"); 751 printk(KERN_INFO "hdlcdrv: (C) 1996-2000 Thomas Sailer HB9JNX/AE4WA\n");
752 printk(KERN_INFO "hdlcdrv: version 0.8 compiled " __TIME__ " " __DATE__ "\n"); 752 printk(KERN_INFO "hdlcdrv: version 0.8\n");
753 return 0; 753 return 0;
754} 754}
755 755
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 66e88bd59caa..bc02968cee16 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -747,7 +747,7 @@ static int mkiss_open(struct tty_struct *tty)
747 747
748 spin_lock_init(&ax->buflock); 748 spin_lock_init(&ax->buflock);
749 atomic_set(&ax->refcnt, 1); 749 atomic_set(&ax->refcnt, 1);
750 init_MUTEX_LOCKED(&ax->dead_sem); 750 sema_init(&ax->dead_sem, 0);
751 751
752 ax->tty = tty; 752 ax->tty = tty;
753 tty->disc_data = ax; 753 tty->disc_data = ax;
@@ -813,10 +813,10 @@ static void mkiss_close(struct tty_struct *tty)
813{ 813{
814 struct mkiss *ax; 814 struct mkiss *ax;
815 815
816 write_lock(&disc_data_lock); 816 write_lock_bh(&disc_data_lock);
817 ax = tty->disc_data; 817 ax = tty->disc_data;
818 tty->disc_data = NULL; 818 tty->disc_data = NULL;
819 write_unlock(&disc_data_lock); 819 write_unlock_bh(&disc_data_lock);
820 820
821 if (!ax) 821 if (!ax)
822 return; 822 return;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 9f64c8637208..33655814448e 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1069,7 +1069,8 @@ static void scc_tx_done(struct scc_channel *scc)
1069 case KISS_DUPLEX_LINK: 1069 case KISS_DUPLEX_LINK:
1070 scc->stat.tx_state = TXS_IDLE2; 1070 scc->stat.tx_state = TXS_IDLE2;
1071 if (scc->kiss.idletime != TIMER_OFF) 1071 if (scc->kiss.idletime != TIMER_OFF)
1072 scc_start_tx_timer(scc, t_idle, scc->kiss.idletime*100); 1072 scc_start_tx_timer(scc, t_idle,
1073 scc->kiss.idletime*100);
1073 break; 1074 break;
1074 case KISS_DUPLEX_OPTIMA: 1075 case KISS_DUPLEX_OPTIMA:
1075 scc_notify(scc, HWEV_ALL_SENT); 1076 scc_notify(scc, HWEV_ALL_SENT);
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 4e7d1d0a2340..96a98d2ff151 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -30,7 +30,7 @@
30 * 0.1 F1OAT 07.06.98 Add timer polling routine for channel arbitration 30 * 0.1 F1OAT 07.06.98 Add timer polling routine for channel arbitration
31 * 0.2 F6FBB 08.06.98 Added delay after FPGA programming 31 * 0.2 F6FBB 08.06.98 Added delay after FPGA programming
32 * 0.3 F6FBB 29.07.98 Delayed PTT implementation for dupmode=2 32 * 0.3 F6FBB 29.07.98 Delayed PTT implementation for dupmode=2
33 * 0.4 F6FBB 30.07.98 Added TxTail, Slottime and Persistance 33 * 0.4 F6FBB 30.07.98 Added TxTail, Slottime and Persistence
34 * 0.5 F6FBB 01.08.98 Shared IRQs, /proc/net and network statistics 34 * 0.5 F6FBB 01.08.98 Shared IRQs, /proc/net and network statistics
35 * 0.6 F6FBB 25.08.98 Added 1200Bds format 35 * 0.6 F6FBB 25.08.98 Added 1200Bds format
36 * 0.7 F6FBB 12.09.98 Added to the kernel configuration 36 * 0.7 F6FBB 12.09.98 Added to the kernel configuration
@@ -396,7 +396,7 @@ static unsigned char *add_mcs(unsigned char *bits, int bitrate,
396 while (p) { 396 while (p) {
397 if (p->bitrate == bitrate) { 397 if (p->bitrate == bitrate) {
398 memcpy(p->bits, bits, YAM_FPGA_SIZE); 398 memcpy(p->bits, bits, YAM_FPGA_SIZE);
399 return p->bits; 399 goto out;
400 } 400 }
401 p = p->next; 401 p = p->next;
402 } 402 }
@@ -411,7 +411,7 @@ static unsigned char *add_mcs(unsigned char *bits, int bitrate,
411 p->bitrate = bitrate; 411 p->bitrate = bitrate;
412 p->next = yam_data; 412 p->next = yam_data;
413 yam_data = p; 413 yam_data = p;
414 414 out:
415 release_firmware(fw); 415 release_firmware(fw);
416 return p->bits; 416 return p->bits;
417} 417}