aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-09 12:38:59 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-09 12:38:59 -0500
commit99b48cff405333afe26ac603b37639c410a48e5d (patch)
tree31b427930317b1596ca6070585f66a108b722580 /drivers
parent200d018eff4be3a1fb9823441cfcebb7de86a677 (diff)
parentd3dcc077bf88806201093f86325ec656e4dbfbce (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETLINK]: Put {IFA,IFLA}_{RTA,PAYLOAD} macros back for userspace. [NET_SCHED] sch_htb: turn intermediate classes into leaves [NET_SCHED] sch_cbq: deactivating when grafting, purging etc. [XFRM]: Fix XFRMGRP_REPORT to use correct multicast group. [NET]: Force a cache line split in hh_cache in SMP. [NETPOLL]: make arp replies through netpoll use mac address of sender [NETLINK]: Restore API compatibility of address and neighbour bits [AX.25]: Fix default address and broadcast address initialization. [AX.25]: Constify ax25 utility functions [BNX2]: Add an error check. [NET]: Convert hh_lock to seqlock.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/hamradio/6pack.c9
-rw-r--r--drivers/net/hamradio/baycom_epp.c10
-rw-r--r--drivers/net/hamradio/bpqether.c9
-rw-r--r--drivers/net/hamradio/dmascc.c10
-rw-r--r--drivers/net/hamradio/hdlcdrv.c16
-rw-r--r--drivers/net/hamradio/mkiss.c9
-rw-r--r--drivers/net/hamradio/scc.c9
-rw-r--r--drivers/net/hamradio/yam.c9
9 files changed, 17 insertions, 66 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 5bacb7587df4..7d824cf8ee2d 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -2510,7 +2510,7 @@ bnx2_init_cpus(struct bnx2 *bp)
2510 if (CHIP_NUM(bp) == CHIP_NUM_5709) { 2510 if (CHIP_NUM(bp) == CHIP_NUM_5709) {
2511 fw = &bnx2_cp_fw_09; 2511 fw = &bnx2_cp_fw_09;
2512 2512
2513 load_cpu_fw(bp, &cpu_reg, fw); 2513 rc = load_cpu_fw(bp, &cpu_reg, fw);
2514 if (rc) 2514 if (rc)
2515 goto init_cpu_err; 2515 goto init_cpu_err;
2516 } 2516 }
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index 92420f007b97..760d04a671f9 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -325,11 +325,6 @@ static int sp_rebuild_header(struct sk_buff *skb)
325 325
326static void sp_setup(struct net_device *dev) 326static void sp_setup(struct net_device *dev)
327{ 327{
328 static char ax25_bcast[AX25_ADDR_LEN] =
329 {'Q'<<1,'S'<<1,'T'<<1,' '<<1,' '<<1,' '<<1,'0'<<1};
330 static char ax25_test[AX25_ADDR_LEN] =
331 {'L'<<1,'I'<<1,'N'<<1,'U'<<1,'X'<<1,' '<<1,'1'<<1};
332
333 /* Finish setting up the DEVICE info. */ 328 /* Finish setting up the DEVICE info. */
334 dev->mtu = SIXP_MTU; 329 dev->mtu = SIXP_MTU;
335 dev->hard_start_xmit = sp_xmit; 330 dev->hard_start_xmit = sp_xmit;
@@ -347,8 +342,8 @@ static void sp_setup(struct net_device *dev)
347 dev->tx_timeout = NULL; 342 dev->tx_timeout = NULL;
348 343
349 /* Only activated in AX.25 mode */ 344 /* Only activated in AX.25 mode */
350 memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); 345 memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
351 memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); 346 memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
352 347
353 SET_MODULE_OWNER(dev); 348 SET_MODULE_OWNER(dev);
354 349
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index 3c33d6f6a6a6..8a83db0fb3b7 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -1141,12 +1141,6 @@ static int baycom_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1141 */ 1141 */
1142static void baycom_probe(struct net_device *dev) 1142static void baycom_probe(struct net_device *dev)
1143{ 1143{
1144 static char ax25_bcast[AX25_ADDR_LEN] = {
1145 'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, '0' << 1
1146 };
1147 static char ax25_nocall[AX25_ADDR_LEN] = {
1148 'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1
1149 };
1150 const struct hdlcdrv_channel_params dflt_ch_params = { 1144 const struct hdlcdrv_channel_params dflt_ch_params = {
1151 20, 2, 10, 40, 0 1145 20, 2, 10, 40, 0
1152 }; 1146 };
@@ -1182,8 +1176,8 @@ static void baycom_probe(struct net_device *dev)
1182 dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN; 1176 dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN;
1183 dev->mtu = AX25_DEF_PACLEN; /* eth_mtu is the default */ 1177 dev->mtu = AX25_DEF_PACLEN; /* eth_mtu is the default */
1184 dev->addr_len = AX25_ADDR_LEN; /* sizeof an ax.25 address */ 1178 dev->addr_len = AX25_ADDR_LEN; /* sizeof an ax.25 address */
1185 memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); 1179 memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
1186 memcpy(dev->dev_addr, ax25_nocall, AX25_ADDR_LEN); 1180 memcpy(dev->dev_addr, &ax25_nocall, AX25_ADDR_LEN);
1187 dev->tx_queue_len = 16; 1181 dev->tx_queue_len = 16;
1188 1182
1189 /* New style flags */ 1183 /* New style flags */
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index 889f338132fa..5b788d84011f 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -88,11 +88,6 @@
88 88
89static char banner[] __initdata = KERN_INFO "AX.25: bpqether driver version 004\n"; 89static char banner[] __initdata = KERN_INFO "AX.25: bpqether driver version 004\n";
90 90
91static unsigned char ax25_bcast[AX25_ADDR_LEN] =
92 {'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, '0' << 1};
93static unsigned char ax25_defaddr[AX25_ADDR_LEN] =
94 {'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1};
95
96static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; 91static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
97 92
98static char bpq_eth_addr[6]; 93static char bpq_eth_addr[6];
@@ -487,8 +482,8 @@ static void bpq_setup(struct net_device *dev)
487 dev->do_ioctl = bpq_ioctl; 482 dev->do_ioctl = bpq_ioctl;
488 dev->destructor = free_netdev; 483 dev->destructor = free_netdev;
489 484
490 memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); 485 memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
491 memcpy(dev->dev_addr, ax25_defaddr, AX25_ADDR_LEN); 486 memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
492 487
493 dev->flags = 0; 488 dev->flags = 0;
494 489
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c
index e6e721aff6f6..0fbb414b5a4d 100644
--- a/drivers/net/hamradio/dmascc.c
+++ b/drivers/net/hamradio/dmascc.c
@@ -264,12 +264,6 @@ static int io[MAX_NUM_DEVS] __initdata = { 0, };
264 264
265/* Beware! hw[] is also used in cleanup_module(). */ 265/* Beware! hw[] is also used in cleanup_module(). */
266static struct scc_hardware hw[NUM_TYPES] __initdata_or_module = HARDWARE; 266static struct scc_hardware hw[NUM_TYPES] __initdata_or_module = HARDWARE;
267static char ax25_broadcast[7] __initdata =
268 { 'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1,
269'0' << 1 };
270static char ax25_test[7] __initdata =
271 { 'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1,
272'1' << 1 };
273 267
274 268
275/* Global variables */ 269/* Global variables */
@@ -443,8 +437,8 @@ static void __init dev_setup(struct net_device *dev)
443 dev->mtu = 1500; 437 dev->mtu = 1500;
444 dev->addr_len = AX25_ADDR_LEN; 438 dev->addr_len = AX25_ADDR_LEN;
445 dev->tx_queue_len = 64; 439 dev->tx_queue_len = 64;
446 memcpy(dev->broadcast, ax25_broadcast, AX25_ADDR_LEN); 440 memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
447 memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); 441 memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
448} 442}
449 443
450static int __init setup_adapter(int card_base, int type, int n) 444static int __init setup_adapter(int card_base, int type, int n)
diff --git a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c
index dacc7687b97f..452873e7c68f 100644
--- a/drivers/net/hamradio/hdlcdrv.c
+++ b/drivers/net/hamradio/hdlcdrv.c
@@ -63,18 +63,6 @@
63 63
64/* --------------------------------------------------------------------- */ 64/* --------------------------------------------------------------------- */
65 65
66/*
67 * The name of the card. Is used for messages and in the requests for
68 * io regions, irqs and dma channels
69 */
70
71static char ax25_bcast[AX25_ADDR_LEN] =
72{'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, '0' << 1};
73static char ax25_nocall[AX25_ADDR_LEN] =
74{'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1};
75
76/* --------------------------------------------------------------------- */
77
78#define KISS_VERBOSE 66#define KISS_VERBOSE
79 67
80/* --------------------------------------------------------------------- */ 68/* --------------------------------------------------------------------- */
@@ -709,8 +697,8 @@ static void hdlcdrv_setup(struct net_device *dev)
709 dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN; 697 dev->hard_header_len = AX25_MAX_HEADER_LEN + AX25_BPQ_HEADER_LEN;
710 dev->mtu = AX25_DEF_PACLEN; /* eth_mtu is the default */ 698 dev->mtu = AX25_DEF_PACLEN; /* eth_mtu is the default */
711 dev->addr_len = AX25_ADDR_LEN; /* sizeof an ax.25 address */ 699 dev->addr_len = AX25_ADDR_LEN; /* sizeof an ax.25 address */
712 memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); 700 memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
713 memcpy(dev->dev_addr, ax25_nocall, AX25_ADDR_LEN); 701 memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
714 dev->tx_queue_len = 16; 702 dev->tx_queue_len = 16;
715} 703}
716 704
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index d8715b200c17..d08fbc396648 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -672,11 +672,6 @@ static struct net_device_stats *ax_get_stats(struct net_device *dev)
672 672
673static void ax_setup(struct net_device *dev) 673static void ax_setup(struct net_device *dev)
674{ 674{
675 static char ax25_bcast[AX25_ADDR_LEN] =
676 {'Q'<<1,'S'<<1,'T'<<1,' '<<1,' '<<1,' '<<1,'0'<<1};
677 static char ax25_test[AX25_ADDR_LEN] =
678 {'L'<<1,'I'<<1,'N'<<1,'U'<<1,'X'<<1,' '<<1,'1'<<1};
679
680 /* Finish setting up the DEVICE info. */ 675 /* Finish setting up the DEVICE info. */
681 dev->mtu = AX_MTU; 676 dev->mtu = AX_MTU;
682 dev->hard_start_xmit = ax_xmit; 677 dev->hard_start_xmit = ax_xmit;
@@ -691,8 +686,8 @@ static void ax_setup(struct net_device *dev)
691 dev->hard_header = ax_header; 686 dev->hard_header = ax_header;
692 dev->rebuild_header = ax_rebuild_header; 687 dev->rebuild_header = ax_rebuild_header;
693 688
694 memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); 689 memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
695 memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); 690 memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
696 691
697 dev->flags = IFF_BROADCAST | IFF_MULTICAST; 692 dev->flags = IFF_BROADCAST | IFF_MULTICAST;
698} 693}
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index ec9b6d9b6f05..2ce047e9d262 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1540,11 +1540,6 @@ static int scc_net_alloc(const char *name, struct scc_channel *scc)
1540/* * Network driver methods * */ 1540/* * Network driver methods * */
1541/* ******************************************************************** */ 1541/* ******************************************************************** */
1542 1542
1543static unsigned char ax25_bcast[AX25_ADDR_LEN] =
1544{'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, '0' << 1};
1545static unsigned char ax25_nocall[AX25_ADDR_LEN] =
1546{'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1};
1547
1548/* ----> Initialize device <----- */ 1543/* ----> Initialize device <----- */
1549 1544
1550static void scc_net_setup(struct net_device *dev) 1545static void scc_net_setup(struct net_device *dev)
@@ -1562,8 +1557,8 @@ static void scc_net_setup(struct net_device *dev)
1562 dev->do_ioctl = scc_net_ioctl; 1557 dev->do_ioctl = scc_net_ioctl;
1563 dev->tx_timeout = NULL; 1558 dev->tx_timeout = NULL;
1564 1559
1565 memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); 1560 memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
1566 memcpy(dev->dev_addr, ax25_nocall, AX25_ADDR_LEN); 1561 memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
1567 1562
1568 dev->flags = 0; 1563 dev->flags = 0;
1569 1564
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 3c4455bd466d..6d74f08720d5 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -156,11 +156,6 @@ static struct net_device *yam_devs[NR_PORTS];
156 156
157static struct yam_mcs *yam_data; 157static struct yam_mcs *yam_data;
158 158
159static char ax25_bcast[7] =
160{'Q' << 1, 'S' << 1, 'T' << 1, ' ' << 1, ' ' << 1, ' ' << 1, '0' << 1};
161static char ax25_test[7] =
162{'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1};
163
164static DEFINE_TIMER(yam_timer, NULL, 0, 0); 159static DEFINE_TIMER(yam_timer, NULL, 0, 0);
165 160
166/* --------------------------------------------------------------------- */ 161/* --------------------------------------------------------------------- */
@@ -1115,8 +1110,8 @@ static void yam_setup(struct net_device *dev)
1115 dev->hard_header_len = AX25_MAX_HEADER_LEN; 1110 dev->hard_header_len = AX25_MAX_HEADER_LEN;
1116 dev->mtu = AX25_MTU; 1111 dev->mtu = AX25_MTU;
1117 dev->addr_len = AX25_ADDR_LEN; 1112 dev->addr_len = AX25_ADDR_LEN;
1118 memcpy(dev->broadcast, ax25_bcast, AX25_ADDR_LEN); 1113 memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
1119 memcpy(dev->dev_addr, ax25_test, AX25_ADDR_LEN); 1114 memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
1120} 1115}
1121 1116
1122static int __init yam_init_driver(void) 1117static int __init yam_init_driver(void)