summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/net/hamradio
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/net/hamradio')
-rw-r--r--kernel/drivers/net/hamradio/6pack.c12
-rw-r--r--kernel/drivers/net/hamradio/baycom_epp.c2
-rw-r--r--kernel/drivers/net/hamradio/bpqether.c2
-rw-r--r--kernel/drivers/net/hamradio/mkiss.c16
4 files changed, 22 insertions, 10 deletions
diff --git a/kernel/drivers/net/hamradio/6pack.c b/kernel/drivers/net/hamradio/6pack.c
index 7c4a4151e..5a1e98547 100644
--- a/kernel/drivers/net/hamradio/6pack.c
+++ b/kernel/drivers/net/hamradio/6pack.c
@@ -683,14 +683,20 @@ static void sixpack_close(struct tty_struct *tty)
if (!atomic_dec_and_test(&sp->refcnt))
down(&sp->dead_sem);
- unregister_netdev(sp->dev);
+ /* We must stop the queue to avoid potentially scribbling
+ * on the free buffers. The sp->dead_sem is not sufficient
+ * to protect us from sp->xbuff access.
+ */
+ netif_stop_queue(sp->dev);
- del_timer(&sp->tx_t);
- del_timer(&sp->resync_t);
+ del_timer_sync(&sp->tx_t);
+ del_timer_sync(&sp->resync_t);
/* Free all 6pack frame buffers. */
kfree(sp->rbuff);
kfree(sp->xbuff);
+
+ unregister_netdev(sp->dev);
}
/* Perform I/O control on an active 6pack channel. */
diff --git a/kernel/drivers/net/hamradio/baycom_epp.c b/kernel/drivers/net/hamradio/baycom_epp.c
index 83c7cce0d..72c9f1f35 100644
--- a/kernel/drivers/net/hamradio/baycom_epp.c
+++ b/kernel/drivers/net/hamradio/baycom_epp.c
@@ -638,7 +638,7 @@ static int receive(struct net_device *dev, int cnt)
#define GETTICK(x) \
({ \
if (cpu_has_tsc) \
- rdtscl(x); \
+ x = (unsigned int)rdtsc(); \
})
#else /* __i386__ */
#define GETTICK(x)
diff --git a/kernel/drivers/net/hamradio/bpqether.c b/kernel/drivers/net/hamradio/bpqether.c
index 63ff08a26..d95a50ae9 100644
--- a/kernel/drivers/net/hamradio/bpqether.c
+++ b/kernel/drivers/net/hamradio/bpqether.c
@@ -76,7 +76,6 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/stat.h>
-#include <linux/netfilter.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/rtnetlink.h>
@@ -483,6 +482,7 @@ static void bpq_setup(struct net_device *dev)
memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
dev->flags = 0;
+ dev->features = NETIF_F_LLTX; /* Allow recursion */
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
dev->header_ops = &ax25_header_ops;
diff --git a/kernel/drivers/net/hamradio/mkiss.c b/kernel/drivers/net/hamradio/mkiss.c
index 2ffbf1347..85828f153 100644
--- a/kernel/drivers/net/hamradio/mkiss.c
+++ b/kernel/drivers/net/hamradio/mkiss.c
@@ -728,11 +728,12 @@ static int mkiss_open(struct tty_struct *tty)
dev->type = ARPHRD_AX25;
/* Perform the low-level AX25 initialization. */
- if ((err = ax_open(ax->dev))) {
+ err = ax_open(ax->dev);
+ if (err)
goto out_free_netdev;
- }
- if (register_netdev(dev))
+ err = register_netdev(dev);
+ if (err)
goto out_free_buffers;
/* after register_netdev() - because else printk smashes the kernel */
@@ -796,14 +797,19 @@ static void mkiss_close(struct tty_struct *tty)
*/
if (!atomic_dec_and_test(&ax->refcnt))
down(&ax->dead_sem);
-
- unregister_netdev(ax->dev);
+ /*
+ * Halt the transmit queue so that a new transmit cannot scribble
+ * on our buffers
+ */
+ netif_stop_queue(ax->dev);
/* Free all AX25 frame buffers. */
kfree(ax->rbuff);
kfree(ax->xbuff);
ax->tty = NULL;
+
+ unregister_netdev(ax->dev);
}
/* Perform I/O control on an active ax25 channel. */