aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/irda/irlap.h3
-rw-r--r--net/irda/irda_device.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h
index f55e86e75030..2127cae1e0a6 100644
--- a/include/net/irda/irlap.h
+++ b/include/net/irda/irlap.h
@@ -50,6 +50,9 @@
50/* May be different when we get VFIR */ 50/* May be different when we get VFIR */
51#define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER) 51#define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER)
52 52
53/* Each IrDA device gets a random 32 bits IRLAP device address */
54#define LAP_ALEN 4
55
53#define BROADCAST 0xffffffff /* Broadcast device address */ 56#define BROADCAST 0xffffffff /* Broadcast device address */
54#define CBROADCAST 0xfe /* Connection broadcast address */ 57#define CBROADCAST 0xfe /* Connection broadcast address */
55#define XID_FORMAT 0x01 /* Discovery XID format */ 58#define XID_FORMAT 0x01 /* Discovery XID format */
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
index 890bac0d4a56..e3debbdb67f5 100644
--- a/net/irda/irda_device.c
+++ b/net/irda/irda_device.c
@@ -343,12 +343,12 @@ static void irda_task_timer_expired(void *data)
343static void irda_device_setup(struct net_device *dev) 343static void irda_device_setup(struct net_device *dev)
344{ 344{
345 dev->hard_header_len = 0; 345 dev->hard_header_len = 0;
346 dev->addr_len = 0; 346 dev->addr_len = LAP_ALEN;
347 347
348 dev->type = ARPHRD_IRDA; 348 dev->type = ARPHRD_IRDA;
349 dev->tx_queue_len = 8; /* Window size + 1 s-frame */ 349 dev->tx_queue_len = 8; /* Window size + 1 s-frame */
350 350
351 memset(dev->broadcast, 0xff, 4); 351 memset(dev->broadcast, 0xff, LAP_ALEN);
352 352
353 dev->mtu = 2048; 353 dev->mtu = 2048;
354 dev->flags = IFF_NOARP; 354 dev->flags = IFF_NOARP;