git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
hamradio
/
scc.c
diff --git
a/drivers/net/hamradio/scc.c
b/drivers/net/hamradio/scc.c
index
ece1b1a
..
2ce047e
100644
(file)
--- a/
drivers/net/hamradio/scc.c
+++ b/
drivers/net/hamradio/scc.c
@@
-148,7
+148,6
@@
/* ----------------------------------------------------------------------- */
/* ----------------------------------------------------------------------- */
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
@@
-201,7
+200,7
@@
static void z8530_init(void);
static void init_channel(struct scc_channel *scc);
static void scc_key_trx (struct scc_channel *scc, char tx);
static void init_channel(struct scc_channel *scc);
static void scc_key_trx (struct scc_channel *scc, char tx);
-static irqreturn_t scc_isr(int irq, void *dev_id
, struct pt_regs *regs
);
+static irqreturn_t scc_isr(int irq, void *dev_id);
static void scc_init_timer(struct scc_channel *scc);
static int scc_net_alloc(const char *name, struct scc_channel *scc);
static void scc_init_timer(struct scc_channel *scc);
static int scc_net_alloc(const char *name, struct scc_channel *scc);
@@
-304,7
+303,7
@@
static inline void scc_discard_buffers(struct scc_channel *scc)
scc->tx_buff = NULL;
}
scc->tx_buff = NULL;
}
- while (
skb_queue_len
(&scc->tx_queue))
+ while (
!skb_queue_empty
(&scc->tx_queue))
dev_kfree_skb(skb_dequeue(&scc->tx_queue));
spin_unlock_irqrestore(&scc->lock, flags);
dev_kfree_skb(skb_dequeue(&scc->tx_queue));
spin_unlock_irqrestore(&scc->lock, flags);
@@
-627,7
+626,7
@@
static void scc_isr_dispatch(struct scc_channel *scc, int vector)
#define SCC_IRQTIMEOUT 30000
#define SCC_IRQTIMEOUT 30000
-static irqreturn_t scc_isr(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t scc_isr(int irq, void *dev_id)
{
unsigned char vector;
struct scc_channel *scc;
{
unsigned char vector;
struct scc_channel *scc;
@@
-1126,8
+1125,7
@@
static void t_dwait(unsigned long channel)
if (scc->stat.tx_state == TXS_WAIT) /* maxkeyup or idle timeout */
{
if (scc->stat.tx_state == TXS_WAIT) /* maxkeyup or idle timeout */
{
- if (skb_queue_len(&scc->tx_queue) == 0) /* nothing to send */
- {
+ if (skb_queue_empty(&scc->tx_queue)) { /* nothing to send */
scc->stat.tx_state = TXS_IDLE;
netif_wake_queue(scc->dev); /* t_maxkeyup locked it. */
return;
scc->stat.tx_state = TXS_IDLE;
netif_wake_queue(scc->dev); /* t_maxkeyup locked it. */
return;
@@
-1542,31
+1540,25
@@
static int scc_net_alloc(const char *name, struct scc_channel *scc)
/* * Network driver methods * */
/* ******************************************************************** */
/* * Network driver methods * */
/* ******************************************************************** */
-static unsigned char ax25_bcast[AX25_ADDR_LEN] =
-{'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, '0' << 1};
-static unsigned char ax25_nocall[AX25_ADDR_LEN] =
-{'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1};
-
/* ----> Initialize device <----- */
static void scc_net_setup(struct net_device *dev)
{
/* ----> Initialize device <----- */
static void scc_net_setup(struct net_device *dev)
{
- SET_MODULE_OWNER(dev);
dev->tx_queue_len = 16; /* should be enough... */
dev->open = scc_net_open;
dev->stop = scc_net_close;
dev->hard_start_xmit = scc_net_tx;
dev->tx_queue_len = 16; /* should be enough... */
dev->open = scc_net_open;
dev->stop = scc_net_close;
dev->hard_start_xmit = scc_net_tx;
- dev->hard_header = ax25_
encapsulate
;
+ dev->hard_header = ax25_
hard_header
;
dev->rebuild_header = ax25_rebuild_header;
dev->set_mac_address = scc_net_set_mac_address;
dev->get_stats = scc_net_get_stats;
dev->do_ioctl = scc_net_ioctl;
dev->tx_timeout = NULL;
dev->rebuild_header = ax25_rebuild_header;
dev->set_mac_address = scc_net_set_mac_address;
dev->get_stats = scc_net_get_stats;
dev->do_ioctl = scc_net_ioctl;
dev->tx_timeout = NULL;
- memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN);
- memcpy(dev->dev_addr,
ax25_nocall
, AX25_ADDR_LEN);
+ memcpy(dev->broadcast,
&
ax25_bcast, AX25_ADDR_LEN);
+ memcpy(dev->dev_addr,
&ax25_defaddr
, AX25_ADDR_LEN);
dev->flags = 0;
dev->flags = 0;
@@
-1739,7
+1731,7
@@
static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
if (!Ivec[hwcfg.irq].used && hwcfg.irq)
{
if (!Ivec[hwcfg.irq].used && hwcfg.irq)
{
- if (request_irq(hwcfg.irq, scc_isr,
SA_INTERRUPT
, "AX.25 SCC", NULL))
+ if (request_irq(hwcfg.irq, scc_isr,
IRQF_DISABLED
, "AX.25 SCC", NULL))
printk(KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n", hwcfg.irq);
else
Ivec[hwcfg.irq].used = 1;
printk(KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n", hwcfg.irq);
else
Ivec[hwcfg.irq].used = 1;