[NET] IRDA: Fix whitespace errors.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YOSHIFUJI Hideaki
2007-02-09 23:24:53 +09:00
committed by David S. Miller
parent 981c0ff690
commit 6819bc2e1e
40 changed files with 1441 additions and 1441 deletions

View File

@@ -138,7 +138,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
sk->sk_shutdown |= SEND_SHUTDOWN; sk->sk_shutdown |= SEND_SHUTDOWN;
sk->sk_state_change(sk); sk->sk_state_change(sk);
sock_orphan(sk); sock_orphan(sk);
release_sock(sk); release_sock(sk);
/* Close our TSAP. /* Close our TSAP.
@@ -158,7 +158,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
irttp_close_tsap(self->tsap); irttp_close_tsap(self->tsap);
self->tsap = NULL; self->tsap = NULL;
} }
} }
/* Note : once we are there, there is not much you want to do /* Note : once we are there, there is not much you want to do
* with the socket anymore, apart from closing it. * with the socket anymore, apart from closing it.
@@ -1211,7 +1211,7 @@ static int irda_release(struct socket *sock)
IRDA_DEBUG(2, "%s()\n", __FUNCTION__); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if (sk == NULL) if (sk == NULL)
return 0; return 0;
lock_sock(sk); lock_sock(sk);
@@ -1259,7 +1259,7 @@ static int irda_release(struct socket *sock)
* memory leak is now gone... - Jean II * memory leak is now gone... - Jean II
*/ */
return 0; return 0;
} }
/* /*
@@ -1714,7 +1714,7 @@ static int irda_shutdown(struct socket *sock, int how)
self->daddr = DEV_ADDR_ANY; /* Until we get re-connected */ self->daddr = DEV_ADDR_ANY; /* Until we get re-connected */
self->saddr = 0x0; /* so IrLMP assign us any link */ self->saddr = 0x0; /* so IrLMP assign us any link */
return 0; return 0;
} }
/* /*

View File

@@ -334,7 +334,7 @@ static inline discovery_t *discovery_seq_idx(loff_t pos)
static void *discovery_seq_start(struct seq_file *seq, loff_t *pos) static void *discovery_seq_start(struct seq_file *seq, loff_t *pos)
{ {
spin_lock_irq(&irlmp->cachelog->hb_spinlock); spin_lock_irq(&irlmp->cachelog->hb_spinlock);
return *pos ? discovery_seq_idx(*pos - 1) : SEQ_START_TOKEN; return *pos ? discovery_seq_idx(*pos - 1) : SEQ_START_TOKEN;
} }
static void *discovery_seq_next(struct seq_file *seq, void *v, loff_t *pos) static void *discovery_seq_next(struct seq_file *seq, void *v, loff_t *pos)

View File

@@ -196,7 +196,7 @@ int ircomm_close(struct ircomm_cb *self)
IRDA_ASSERT(entry == self, return -1;); IRDA_ASSERT(entry == self, return -1;);
return __ircomm_close(self); return __ircomm_close(self);
} }
EXPORT_SYMBOL(ircomm_close); EXPORT_SYMBOL(ircomm_close);

View File

@@ -60,21 +60,21 @@ char *ircomm_state[] = {
#ifdef CONFIG_IRDA_DEBUG #ifdef CONFIG_IRDA_DEBUG
static char *ircomm_event[] = { static char *ircomm_event[] = {
"IRCOMM_CONNECT_REQUEST", "IRCOMM_CONNECT_REQUEST",
"IRCOMM_CONNECT_RESPONSE", "IRCOMM_CONNECT_RESPONSE",
"IRCOMM_TTP_CONNECT_INDICATION", "IRCOMM_TTP_CONNECT_INDICATION",
"IRCOMM_LMP_CONNECT_INDICATION", "IRCOMM_LMP_CONNECT_INDICATION",
"IRCOMM_TTP_CONNECT_CONFIRM", "IRCOMM_TTP_CONNECT_CONFIRM",
"IRCOMM_LMP_CONNECT_CONFIRM", "IRCOMM_LMP_CONNECT_CONFIRM",
"IRCOMM_LMP_DISCONNECT_INDICATION", "IRCOMM_LMP_DISCONNECT_INDICATION",
"IRCOMM_TTP_DISCONNECT_INDICATION", "IRCOMM_TTP_DISCONNECT_INDICATION",
"IRCOMM_DISCONNECT_REQUEST", "IRCOMM_DISCONNECT_REQUEST",
"IRCOMM_TTP_DATA_INDICATION", "IRCOMM_TTP_DATA_INDICATION",
"IRCOMM_LMP_DATA_INDICATION", "IRCOMM_LMP_DATA_INDICATION",
"IRCOMM_DATA_REQUEST", "IRCOMM_DATA_REQUEST",
"IRCOMM_CONTROL_REQUEST", "IRCOMM_CONTROL_REQUEST",
"IRCOMM_CONTROL_INDICATION", "IRCOMM_CONTROL_INDICATION",
}; };
#endif /* CONFIG_IRDA_DEBUG */ #endif /* CONFIG_IRDA_DEBUG */

View File

@@ -109,12 +109,12 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self,
struct sk_buff *userdata, struct sk_buff *userdata,
struct ircomm_info *info) struct ircomm_info *info)
{ {
struct sk_buff *tx_skb; struct sk_buff *tx_skb;
int ret; int ret;
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
if (!userdata) { if (!userdata) {
tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
if (!tx_skb) if (!tx_skb)
return -ENOMEM; return -ENOMEM;
@@ -151,26 +151,26 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb)
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
line = cb->line; line = cb->line;
self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL);
if (!self) { if (!self) {
IRDA_DEBUG(2, "%s(), didn't find myself\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), didn't find myself\n", __FUNCTION__ );
return; return;
} }
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
self->pkt_count--; self->pkt_count--;
if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) {
IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __FUNCTION__ );
self->flow_status = FLOW_START; self->flow_status = FLOW_START;
if (self->notify.flow_indication) if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance, self->notify.flow_indication(self->notify.instance,
self, FLOW_START); self, FLOW_START);
} }
} }
/* /*
@@ -190,7 +190,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
cb = (struct irda_skb_cb *) skb->cb; cb = (struct irda_skb_cb *) skb->cb;
cb->line = self->line; cb->line = self->line;
IRDA_DEBUG(4, "%s(), sending frame\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s(), sending frame\n", __FUNCTION__ );
@@ -199,13 +199,13 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
skb->destructor = ircomm_lmp_flow_control; skb->destructor = ircomm_lmp_flow_control;
if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) {
IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __FUNCTION__ );
self->flow_status = FLOW_STOP; self->flow_status = FLOW_STOP;
if (self->notify.flow_indication) if (self->notify.flow_indication)
self->notify.flow_indication(self->notify.instance, self->notify.flow_indication(self->notify.instance,
self, FLOW_STOP); self, FLOW_STOP);
} }
ret = irlmp_data_request(self->lsap, skb); ret = irlmp_data_request(self->lsap, skb);
if (ret) { if (ret) {
IRDA_ERROR("%s(), failed\n", __FUNCTION__); IRDA_ERROR("%s(), failed\n", __FUNCTION__);

View File

@@ -85,7 +85,7 @@ static pi_minor_info_t pi_minor_call_table_9_wire[] = {
static pi_major_info_t pi_major_call_table[] = { static pi_major_info_t pi_major_call_table[] = {
{ pi_minor_call_table_common, 3 }, { pi_minor_call_table_common, 3 },
{ pi_minor_call_table_non_raw, 6 }, { pi_minor_call_table_non_raw, 6 },
{ pi_minor_call_table_9_wire, 3 } { pi_minor_call_table_9_wire, 3 }
/* { pi_minor_call_table_centronics } */ /* { pi_minor_call_table_centronics } */
}; };
@@ -203,7 +203,7 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param,
/* /*
* Now the line is ready for some communication. Check if we are a * Now the line is ready for some communication. Check if we are a
* server, and send over some initial parameters. * server, and send over some initial parameters.
* Client do it in ircomm_tty_state_setup(). * Client do it in ircomm_tty_state_setup().
* Note : we may get called from ircomm_tty_getvalue_confirm(), * Note : we may get called from ircomm_tty_getvalue_confirm(),
* therefore before we even have open any socket. And self->client * therefore before we even have open any socket. And self->client

View File

@@ -166,8 +166,8 @@ static void __exit ircomm_tty_cleanup(void)
IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
ret = tty_unregister_driver(driver); ret = tty_unregister_driver(driver);
if (ret) { if (ret) {
IRDA_ERROR("%s(), failed to unregister driver\n", IRDA_ERROR("%s(), failed to unregister driver\n",
__FUNCTION__); __FUNCTION__);
return; return;
} }
@@ -203,12 +203,12 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
/* These callbacks we must handle ourselves */ /* These callbacks we must handle ourselves */
notify.data_indication = ircomm_tty_data_indication; notify.data_indication = ircomm_tty_data_indication;
notify.udata_indication = ircomm_tty_control_indication; notify.udata_indication = ircomm_tty_control_indication;
notify.flow_indication = ircomm_tty_flow_indication; notify.flow_indication = ircomm_tty_flow_indication;
/* Use the ircomm_tty interface for these ones */ /* Use the ircomm_tty interface for these ones */
notify.disconnect_indication = ircomm_tty_disconnect_indication; notify.disconnect_indication = ircomm_tty_disconnect_indication;
notify.connect_confirm = ircomm_tty_connect_confirm; notify.connect_confirm = ircomm_tty_connect_confirm;
notify.connect_indication = ircomm_tty_connect_indication; notify.connect_indication = ircomm_tty_connect_indication;
strlcpy(notify.name, "ircomm_tty", sizeof(notify.name)); strlcpy(notify.name, "ircomm_tty", sizeof(notify.name));
notify.instance = self; notify.instance = self;
@@ -316,11 +316,11 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
* specified, we cannot return before the IrCOMM link is * specified, we cannot return before the IrCOMM link is
* ready * ready
*/ */
if (!test_bit(ASYNC_B_CLOSING, &self->flags) && if (!test_bit(ASYNC_B_CLOSING, &self->flags) &&
(do_clocal || (self->settings.dce & IRCOMM_CD)) && (do_clocal || (self->settings.dce & IRCOMM_CD)) &&
self->state == IRCOMM_TTY_READY) self->state == IRCOMM_TTY_READY)
{ {
break; break;
} }
if (signal_pending(current)) { if (signal_pending(current)) {
@@ -398,7 +398,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
/* Init some important stuff */ /* Init some important stuff */
init_timer(&self->watchdog_timer); init_timer(&self->watchdog_timer);
init_waitqueue_head(&self->open_wait); init_waitqueue_head(&self->open_wait);
init_waitqueue_head(&self->close_wait); init_waitqueue_head(&self->close_wait);
spin_lock_init(&self->spinlock); spin_lock_init(&self->spinlock);
/* /*
@@ -899,7 +899,7 @@ static void ircomm_tty_throttle(struct tty_struct *tty)
ircomm_param_request(self, IRCOMM_DTE, TRUE); ircomm_param_request(self, IRCOMM_DTE, TRUE);
} }
ircomm_flow_request(self->ircomm, FLOW_STOP); ircomm_flow_request(self->ircomm, FLOW_STOP);
} }
/* /*
@@ -930,7 +930,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
ircomm_param_request(self, IRCOMM_DTE, TRUE); ircomm_param_request(self, IRCOMM_DTE, TRUE);
IRDA_DEBUG(1, "%s(), FLOW_START\n", __FUNCTION__ ); IRDA_DEBUG(1, "%s(), FLOW_START\n", __FUNCTION__ );
} }
ircomm_flow_request(self->ircomm, FLOW_START); ircomm_flow_request(self->ircomm, FLOW_START);
} }
/* /*
@@ -1247,7 +1247,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
static int ircomm_tty_line_info(struct ircomm_tty_cb *self, char *buf) static int ircomm_tty_line_info(struct ircomm_tty_cb *self, char *buf)
{ {
int ret=0; int ret=0;
ret += sprintf(buf+ret, "State: %s\n", ircomm_tty_state[self->state]); ret += sprintf(buf+ret, "State: %s\n", ircomm_tty_state[self->state]);
@@ -1260,31 +1260,31 @@ static int ircomm_tty_line_info(struct ircomm_tty_cb *self, char *buf)
ret += sprintf(buf+ret, "3_WIRE_RAW"); ret += sprintf(buf+ret, "3_WIRE_RAW");
else else
ret += sprintf(buf+ret, "No common service type!\n"); ret += sprintf(buf+ret, "No common service type!\n");
ret += sprintf(buf+ret, "\n"); ret += sprintf(buf+ret, "\n");
ret += sprintf(buf+ret, "Port name: %s\n", self->settings.port_name); ret += sprintf(buf+ret, "Port name: %s\n", self->settings.port_name);
ret += sprintf(buf+ret, "DTE status: "); ret += sprintf(buf+ret, "DTE status: ");
if (self->settings.dte & IRCOMM_RTS) if (self->settings.dte & IRCOMM_RTS)
ret += sprintf(buf+ret, "RTS|"); ret += sprintf(buf+ret, "RTS|");
if (self->settings.dte & IRCOMM_DTR) if (self->settings.dte & IRCOMM_DTR)
ret += sprintf(buf+ret, "DTR|"); ret += sprintf(buf+ret, "DTR|");
if (self->settings.dte) if (self->settings.dte)
ret--; /* remove the last | */ ret--; /* remove the last | */
ret += sprintf(buf+ret, "\n"); ret += sprintf(buf+ret, "\n");
ret += sprintf(buf+ret, "DCE status: "); ret += sprintf(buf+ret, "DCE status: ");
if (self->settings.dce & IRCOMM_CTS) if (self->settings.dce & IRCOMM_CTS)
ret += sprintf(buf+ret, "CTS|"); ret += sprintf(buf+ret, "CTS|");
if (self->settings.dce & IRCOMM_DSR) if (self->settings.dce & IRCOMM_DSR)
ret += sprintf(buf+ret, "DSR|"); ret += sprintf(buf+ret, "DSR|");
if (self->settings.dce & IRCOMM_CD) if (self->settings.dce & IRCOMM_CD)
ret += sprintf(buf+ret, "CD|"); ret += sprintf(buf+ret, "CD|");
if (self->settings.dce & IRCOMM_RI) if (self->settings.dce & IRCOMM_RI)
ret += sprintf(buf+ret, "RI|"); ret += sprintf(buf+ret, "RI|");
if (self->settings.dce) if (self->settings.dce)
ret--; /* remove the last | */ ret--; /* remove the last | */
ret += sprintf(buf+ret, "\n"); ret += sprintf(buf+ret, "\n");
ret += sprintf(buf+ret, "Configuration: "); ret += sprintf(buf+ret, "Configuration: ");
if (!self->settings.null_modem) if (!self->settings.null_modem)
@@ -1314,7 +1314,7 @@ static int ircomm_tty_line_info(struct ircomm_tty_cb *self, char *buf)
ret += sprintf(buf+ret, "ENQ_ACK_OUT|"); ret += sprintf(buf+ret, "ENQ_ACK_OUT|");
if (self->settings.flow_control) if (self->settings.flow_control)
ret--; /* remove the last | */ ret--; /* remove the last | */
ret += sprintf(buf+ret, "\n"); ret += sprintf(buf+ret, "\n");
ret += sprintf(buf+ret, "Flags: "); ret += sprintf(buf+ret, "Flags: ");
if (self->flags & ASYNC_CTS_FLOW) if (self->flags & ASYNC_CTS_FLOW)
@@ -1343,8 +1343,8 @@ static int ircomm_tty_line_info(struct ircomm_tty_cb *self, char *buf)
ret += sprintf(buf+ret, "Hardware: %s\n", ret += sprintf(buf+ret, "Hardware: %s\n",
self->tty->hw_stopped ? "Stopped" : "Running"); self->tty->hw_stopped ? "Stopped" : "Running");
ret += sprintf(buf+ret, "\n"); ret += sprintf(buf+ret, "\n");
return ret; return ret;
} }
@@ -1359,8 +1359,8 @@ static int ircomm_tty_read_proc(char *buf, char **start, off_t offset, int len,
int *eof, void *unused) int *eof, void *unused)
{ {
struct ircomm_tty_cb *self; struct ircomm_tty_cb *self;
int count = 0, l; int count = 0, l;
off_t begin = 0; off_t begin = 0;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&ircomm_tty->hb_spinlock, flags); spin_lock_irqsave(&ircomm_tty->hb_spinlock, flags);
@@ -1370,25 +1370,25 @@ static int ircomm_tty_read_proc(char *buf, char **start, off_t offset, int len,
if (self->magic != IRCOMM_TTY_MAGIC) if (self->magic != IRCOMM_TTY_MAGIC)
break; break;
l = ircomm_tty_line_info(self, buf + count); l = ircomm_tty_line_info(self, buf + count);
count += l; count += l;
if (count+begin > offset+len) if (count+begin > offset+len)
goto done; goto done;
if (count+begin < offset) { if (count+begin < offset) {
begin += count; begin += count;
count = 0; count = 0;
} }
self = (struct ircomm_tty_cb *) hashbin_get_next(ircomm_tty); self = (struct ircomm_tty_cb *) hashbin_get_next(ircomm_tty);
} }
*eof = 1; *eof = 1;
done: done:
spin_unlock_irqrestore(&ircomm_tty->hb_spinlock, flags); spin_unlock_irqrestore(&ircomm_tty->hb_spinlock, flags);
if (offset >= count+begin) if (offset >= count+begin)
return 0; return 0;
*start = buf + (offset-begin); *start = buf + (offset-begin);
return ((len < begin+count-offset) ? len : begin+count-offset); return ((len < begin+count-offset) ? len : begin+count-offset);
} }
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */

View File

@@ -135,7 +135,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self)
IRDA_ASSERT(self != NULL, return -1;); IRDA_ASSERT(self != NULL, return -1;);
IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
/* Check if somebody has already connected to us */ /* Check if somebody has already connected to us */
if (ircomm_is_connected(self->ircomm)) { if (ircomm_is_connected(self->ircomm)) {
IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ ); IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ );
return 0; return 0;
@@ -454,7 +454,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id,
} }
switch (value->type) { switch (value->type) {
case IAS_OCT_SEQ: case IAS_OCT_SEQ:
IRDA_DEBUG(2, "%s(), got octet sequence\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), got octet sequence\n", __FUNCTION__ );
irda_param_extract_all(self, value->t.oct_seq, value->len, irda_param_extract_all(self, value->t.oct_seq, value->len,

View File

@@ -134,7 +134,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self)
self->settings.data_format = cval; self->settings.data_format = cval;
ircomm_param_request(self, IRCOMM_DATA_FORMAT, FALSE); ircomm_param_request(self, IRCOMM_DATA_FORMAT, FALSE);
ircomm_param_request(self, IRCOMM_FLOW_CONTROL, TRUE); ircomm_param_request(self, IRCOMM_FLOW_CONTROL, TRUE);
} }
/* /*
@@ -277,9 +277,9 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self,
info.closing_wait = self->closing_wait; info.closing_wait = self->closing_wait;
/* For compatibility */ /* For compatibility */
info.type = PORT_16550A; info.type = PORT_16550A;
info.port = 0; info.port = 0;
info.irq = 0; info.irq = 0;
info.xmit_fifo_size = 0; info.xmit_fifo_size = 0;
info.hub6 = 0; info.hub6 = 0;
info.custom_divisor = 0; info.custom_divisor = 0;

View File

@@ -341,11 +341,11 @@ static void irda_task_timer_expired(void *data)
*/ */
static void irda_device_setup(struct net_device *dev) static void irda_device_setup(struct net_device *dev)
{ {
dev->hard_header_len = 0; dev->hard_header_len = 0;
dev->addr_len = LAP_ALEN; dev->addr_len = LAP_ALEN;
dev->type = ARPHRD_IRDA; dev->type = ARPHRD_IRDA;
dev->tx_queue_len = 8; /* Window size + 1 s-frame */ dev->tx_queue_len = 8; /* Window size + 1 s-frame */
memset(dev->broadcast, 0xff, LAP_ALEN); memset(dev->broadcast, 0xff, LAP_ALEN);
@@ -440,13 +440,13 @@ int irda_device_register_dongle(struct dongle_reg *new)
if (hashbin_find(dongles, new->type, NULL)) { if (hashbin_find(dongles, new->type, NULL)) {
IRDA_MESSAGE("%s: Dongle type %x already registered\n", IRDA_MESSAGE("%s: Dongle type %x already registered\n",
__FUNCTION__, new->type); __FUNCTION__, new->type);
} else { } else {
/* Insert IrDA dongle into hashbin */ /* Insert IrDA dongle into hashbin */
hashbin_insert(dongles, (irda_queue_t *) new, new->type, NULL); hashbin_insert(dongles, (irda_queue_t *) new, new->type, NULL);
} }
spin_unlock(&dongles->hb_spinlock); spin_unlock(&dongles->hb_spinlock);
return 0; return 0;
} }
EXPORT_SYMBOL(irda_device_register_dongle); EXPORT_SYMBOL(irda_device_register_dongle);

View File

@@ -57,8 +57,8 @@ static char *strndup(char *str, size_t max)
len = max; len = max;
/* Allocate new string */ /* Allocate new string */
new_str = kmalloc(len + 1, GFP_ATOMIC); new_str = kmalloc(len + 1, GFP_ATOMIC);
if (new_str == NULL) { if (new_str == NULL) {
IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__); IRDA_WARNING("%s: Unable to kmalloc!\n", __FUNCTION__);
return NULL; return NULL;
} }
@@ -78,7 +78,7 @@ static char *strndup(char *str, size_t max)
*/ */
struct ias_object *irias_new_object( char *name, int id) struct ias_object *irias_new_object( char *name, int id)
{ {
struct ias_object *obj; struct ias_object *obj;
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);

View File

@@ -81,7 +81,7 @@ static void irlan_client_kick_timer_expired(void *data)
* If we are in peer mode, the client may not have got the discovery * If we are in peer mode, the client may not have got the discovery
* indication it needs to make progress. If the client is still in * indication it needs to make progress. If the client is still in
* IDLE state, we must kick it to, but only if the provider is not IDLE * IDLE state, we must kick it to, but only if the provider is not IDLE
*/ */
if ((self->provider.access_type == ACCESS_PEER) && if ((self->provider.access_type == ACCESS_PEER) &&
(self->client.state == IRLAN_IDLE) && (self->client.state == IRLAN_IDLE) &&
(self->provider.state != IRLAN_IDLE)) { (self->provider.state != IRLAN_IDLE)) {
@@ -235,7 +235,7 @@ static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap,
IRDA_ASSERT(tsap == self->client.tsap_ctrl, return;); IRDA_ASSERT(tsap == self->client.tsap_ctrl, return;);
/* Remove frames queued on the control channel */ /* Remove frames queued on the control channel */
while ((skb = skb_dequeue(&self->client.txq)) != NULL) { while ((skb = skb_dequeue(&self->client.txq)) != NULL) {
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
@@ -369,8 +369,8 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
int ret; int ret;
__u16 val_len; __u16 val_len;
int i; int i;
char *name; char *name;
char *value; char *value;
IRDA_ASSERT(skb != NULL, return;); IRDA_ASSERT(skb != NULL, return;);
@@ -410,7 +410,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
ptr = frame+2; ptr = frame+2;
/* For all parameters */ /* For all parameters */
for (i=0; i<count;i++) { for (i=0; i<count;i++) {
ret = irlan_extract_param(ptr, name, value, &val_len); ret = irlan_extract_param(ptr, name, value, &val_len);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ );
@@ -418,7 +418,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
} }
ptr += ret; ptr += ret;
irlan_check_response_param(self, name, value, val_len); irlan_check_response_param(self, name, value, val_len);
} }
/* Cleanup */ /* Cleanup */
kfree(name); kfree(name);
kfree(value); kfree(value);

View File

@@ -317,7 +317,7 @@ static int irlan_client_state_open(struct irlan_cb *self, IRLAN_EVENT event,
* Check if we have got the remote TSAP for data * Check if we have got the remote TSAP for data
* communications * communications
*/ */
IRDA_ASSERT(self->dtsap_sel_data != 0, return -1;); IRDA_ASSERT(self->dtsap_sel_data != 0, return -1;);
/* Check which access type we are dealing with */ /* Check which access type we are dealing with */
switch (self->client.access_type) { switch (self->client.access_type) {

View File

@@ -389,8 +389,8 @@ static void irlan_connect_confirm(void *instance, void *sap,
irlan_open_unicast_addr(self); irlan_open_unicast_addr(self);
/* Open broadcast and multicast filter by default */ /* Open broadcast and multicast filter by default */
irlan_set_broadcast_filter(self, TRUE); irlan_set_broadcast_filter(self, TRUE);
irlan_set_multicast_filter(self, TRUE); irlan_set_multicast_filter(self, TRUE);
/* Ready to transfer Ethernet frames */ /* Ready to transfer Ethernet frames */
netif_start_queue(self->dev); netif_start_queue(self->dev);
@@ -485,7 +485,7 @@ void irlan_open_data_tsap(struct irlan_cb *self)
notify.udata_indication = irlan_eth_receive; notify.udata_indication = irlan_eth_receive;
notify.connect_indication = irlan_connect_indication; notify.connect_indication = irlan_connect_indication;
notify.connect_confirm = irlan_connect_confirm; notify.connect_confirm = irlan_connect_confirm;
notify.flow_indication = irlan_eth_flow_indication; notify.flow_indication = irlan_eth_flow_indication;
notify.disconnect_indication = irlan_disconnect_indication; notify.disconnect_indication = irlan_disconnect_indication;
notify.instance = self; notify.instance = self;
strlcpy(notify.name, "IrLAN data", sizeof(notify.name)); strlcpy(notify.name, "IrLAN data", sizeof(notify.name));
@@ -561,8 +561,8 @@ void irlan_ias_register(struct irlan_cb *self, __u8 tsap_sel)
new_value); new_value);
} }
/* Register PnP object only if not registered before */ /* Register PnP object only if not registered before */
if (!irias_find_object("PnP")) { if (!irias_find_object("PnP")) {
obj = irias_new_object("PnP", IAS_PNP_ID); obj = irias_new_object("PnP", IAS_PNP_ID);
#if 0 #if 0
irias_add_string_attrib(obj, "Name", sysctl_devname, irias_add_string_attrib(obj, "Name", sysctl_devname,
@@ -664,7 +664,7 @@ void irlan_get_provider_info(struct irlan_cb *self)
frame = skb->data; frame = skb->data;
frame[0] = CMD_GET_PROVIDER_INFO; frame[0] = CMD_GET_PROVIDER_INFO;
frame[1] = 0x00; /* Zero parameters */ frame[1] = 0x00; /* Zero parameters */
irlan_ctrl_data_request(self, skb); irlan_ctrl_data_request(self, skb);
@@ -699,7 +699,7 @@ void irlan_open_data_channel(struct irlan_cb *self)
frame = skb->data; frame = skb->data;
/* Build frame */ /* Build frame */
frame[0] = CMD_OPEN_DATA_CHANNEL; frame[0] = CMD_OPEN_DATA_CHANNEL;
frame[1] = 0x02; /* Two parameters */ frame[1] = 0x02; /* Two parameters */
irlan_insert_string_param(skb, "MEDIA", "802.3"); irlan_insert_string_param(skb, "MEDIA", "802.3");
@@ -737,7 +737,7 @@ void irlan_close_data_channel(struct irlan_cb *self)
frame = skb->data; frame = skb->data;
/* Build frame */ /* Build frame */
frame[0] = CMD_CLOSE_DATA_CHAN; frame[0] = CMD_CLOSE_DATA_CHAN;
frame[1] = 0x01; /* One parameter */ frame[1] = 0x01; /* One parameter */
irlan_insert_byte_param(skb, "DATA_CHAN", self->dtsap_sel_data); irlan_insert_byte_param(skb, "DATA_CHAN", self->dtsap_sel_data);
@@ -776,11 +776,11 @@ static void irlan_open_unicast_addr(struct irlan_cb *self)
frame = skb->data; frame = skb->data;
frame[0] = CMD_FILTER_OPERATION; frame[0] = CMD_FILTER_OPERATION;
frame[1] = 0x03; /* Three parameters */ frame[1] = 0x03; /* Three parameters */
irlan_insert_byte_param(skb, "DATA_CHAN" , self->dtsap_sel_data); irlan_insert_byte_param(skb, "DATA_CHAN" , self->dtsap_sel_data);
irlan_insert_string_param(skb, "FILTER_TYPE", "DIRECTED"); irlan_insert_string_param(skb, "FILTER_TYPE", "DIRECTED");
irlan_insert_string_param(skb, "FILTER_MODE", "FILTER"); irlan_insert_string_param(skb, "FILTER_MODE", "FILTER");
irlan_ctrl_data_request(self, skb); irlan_ctrl_data_request(self, skb);
} }
@@ -804,7 +804,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status)
IRDA_ASSERT(self != NULL, return;); IRDA_ASSERT(self != NULL, return;);
IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
skb = alloc_skb(IRLAN_MAX_HEADER + IRLAN_CMD_HEADER + skb = alloc_skb(IRLAN_MAX_HEADER + IRLAN_CMD_HEADER +
IRLAN_BYTE_PARAMETER_LEN("DATA_CHAN") + IRLAN_BYTE_PARAMETER_LEN("DATA_CHAN") +
IRLAN_STRING_PARAMETER_LEN("FILTER_TYPE", "BROADCAST") + IRLAN_STRING_PARAMETER_LEN("FILTER_TYPE", "BROADCAST") +
/* We may waste one byte here...*/ /* We may waste one byte here...*/
@@ -819,10 +819,10 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status)
frame = skb->data; frame = skb->data;
frame[0] = CMD_FILTER_OPERATION; frame[0] = CMD_FILTER_OPERATION;
frame[1] = 0x03; /* Three parameters */ frame[1] = 0x03; /* Three parameters */
irlan_insert_byte_param(skb, "DATA_CHAN", self->dtsap_sel_data); irlan_insert_byte_param(skb, "DATA_CHAN", self->dtsap_sel_data);
irlan_insert_string_param(skb, "FILTER_TYPE", "BROADCAST"); irlan_insert_string_param(skb, "FILTER_TYPE", "BROADCAST");
if (status) if (status)
irlan_insert_string_param(skb, "FILTER_MODE", "FILTER"); irlan_insert_string_param(skb, "FILTER_MODE", "FILTER");
else else
@@ -863,10 +863,10 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status)
frame = skb->data; frame = skb->data;
frame[0] = CMD_FILTER_OPERATION; frame[0] = CMD_FILTER_OPERATION;
frame[1] = 0x03; /* Three parameters */ frame[1] = 0x03; /* Three parameters */
irlan_insert_byte_param(skb, "DATA_CHAN", self->dtsap_sel_data); irlan_insert_byte_param(skb, "DATA_CHAN", self->dtsap_sel_data);
irlan_insert_string_param(skb, "FILTER_TYPE", "MULTICAST"); irlan_insert_string_param(skb, "FILTER_TYPE", "MULTICAST");
if (status) if (status)
irlan_insert_string_param(skb, "FILTER_MODE", "ALL"); irlan_insert_string_param(skb, "FILTER_MODE", "ALL");
else else
@@ -908,11 +908,11 @@ static void irlan_get_unicast_addr(struct irlan_cb *self)
frame = skb->data; frame = skb->data;
frame[0] = CMD_FILTER_OPERATION; frame[0] = CMD_FILTER_OPERATION;
frame[1] = 0x03; /* Three parameters */ frame[1] = 0x03; /* Three parameters */
irlan_insert_byte_param(skb, "DATA_CHAN", self->dtsap_sel_data); irlan_insert_byte_param(skb, "DATA_CHAN", self->dtsap_sel_data);
irlan_insert_string_param(skb, "FILTER_TYPE", "DIRECTED"); irlan_insert_string_param(skb, "FILTER_TYPE", "DIRECTED");
irlan_insert_string_param(skb, "FILTER_OPERATION", "DYNAMIC"); irlan_insert_string_param(skb, "FILTER_OPERATION", "DYNAMIC");
irlan_ctrl_data_request(self, skb); irlan_ctrl_data_request(self, skb);
} }
@@ -947,7 +947,7 @@ void irlan_get_media_char(struct irlan_cb *self)
frame = skb->data; frame = skb->data;
/* Build frame */ /* Build frame */
frame[0] = CMD_GET_MEDIA_CHAR; frame[0] = CMD_GET_MEDIA_CHAR;
frame[1] = 0x01; /* One parameter */ frame[1] = 0x01; /* One parameter */
irlan_insert_string_param(skb, "MEDIA", "802.3"); irlan_insert_string_param(skb, "MEDIA", "802.3");

View File

@@ -108,7 +108,7 @@ static int irlan_eth_open(struct net_device *dev)
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
/* Ready to play! */ /* Ready to play! */
netif_stop_queue(dev); /* Wait until data link is ready */ netif_stop_queue(dev); /* Wait until data link is ready */
/* We are now open, so time to do some work */ /* We are now open, so time to do some work */
self->disconnect_reason = 0; self->disconnect_reason = 0;
@@ -333,7 +333,7 @@ out:
#define HW_MAX_ADDRS 4 /* Must query to get it! */ #define HW_MAX_ADDRS 4 /* Must query to get it! */
static void irlan_eth_set_multicast_list(struct net_device *dev) static void irlan_eth_set_multicast_list(struct net_device *dev)
{ {
struct irlan_cb *self = netdev_priv(dev); struct irlan_cb *self = netdev_priv(dev);
IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );

View File

@@ -231,7 +231,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
__u16 val_len; __u16 val_len;
int i; int i;
char *name; char *name;
char *value; char *value;
int ret = RSP_SUCCESS; int ret = RSP_SUCCESS;
IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;); IRDA_ASSERT(skb != NULL, return -RSP_PROTOCOL_ERROR;);
@@ -263,7 +263,7 @@ int irlan_provider_parse_command(struct irlan_cb *self, int cmd,
ptr = frame+2; ptr = frame+2;
/* For all parameters */ /* For all parameters */
for (i=0; i<count;i++) { for (i=0; i<count;i++) {
ret = irlan_extract_param(ptr, name, value, &val_len); ret = irlan_extract_param(ptr, name, value, &val_len);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ ); IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ );

View File

@@ -87,7 +87,7 @@ int __init irlap_init(void)
/* Allocate master array */ /* Allocate master array */
irlap = hashbin_new(HB_LOCK); irlap = hashbin_new(HB_LOCK);
if (irlap == NULL) { if (irlap == NULL) {
IRDA_ERROR("%s: can't allocate irlap hashbin!\n", IRDA_ERROR("%s: can't allocate irlap hashbin!\n",
__FUNCTION__); __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
@@ -701,8 +701,8 @@ void irlap_update_nr_received(struct irlap_cb *self, int nr)
int count = 0; int count = 0;
/* /*
* Remove all the ack-ed frames from the window queue. * Remove all the ack-ed frames from the window queue.
*/ */
/* /*
* Optimize for the common case. It is most likely that the receiver * Optimize for the common case. It is most likely that the receiver

View File

@@ -864,7 +864,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
* between 15 msecs and 45 msecs. * between 15 msecs and 45 msecs.
*/ */
irlap_start_backoff_timer(self, msecs_to_jiffies(20 + irlap_start_backoff_timer(self, msecs_to_jiffies(20 +
(jiffies % 30))); (jiffies % 30)));
} else { } else {
/* Always switch state before calling upper layers */ /* Always switch state before calling upper layers */
irlap_next_state(self, LAP_NDM); irlap_next_state(self, LAP_NDM);

View File

@@ -892,7 +892,7 @@ void irlmp_discovery_request(int nslots)
/* /*
* Start a single discovery operation if discovery is not already * Start a single discovery operation if discovery is not already
* running * running
*/ */
if (!sysctl_discovery) { if (!sysctl_discovery) {
/* Check if user wants to override the default */ /* Check if user wants to override the default */
@@ -1528,12 +1528,12 @@ int irlmp_unregister_service(void *handle)
/* Refresh current hint bits */ /* Refresh current hint bits */
spin_lock_irqsave(&irlmp->services->hb_spinlock, flags); spin_lock_irqsave(&irlmp->services->hb_spinlock, flags);
service = (irlmp_service_t *) hashbin_get_first(irlmp->services); service = (irlmp_service_t *) hashbin_get_first(irlmp->services);
while (service) { while (service) {
irlmp->hints.word |= service->hints.word; irlmp->hints.word |= service->hints.word;
service = (irlmp_service_t *)hashbin_get_next(irlmp->services); service = (irlmp_service_t *)hashbin_get_next(irlmp->services);
} }
spin_unlock_irqrestore(&irlmp->services->hb_spinlock, flags); spin_unlock_irqrestore(&irlmp->services->hb_spinlock, flags);
return 0; return 0;
} }

View File

@@ -278,7 +278,7 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap,
lap->reason = reason; lap->reason = reason;
lap->daddr = DEV_ADDR_ANY; lap->daddr = DEV_ADDR_ANY;
/* FIXME: must do something with the skb if any */ /* FIXME: must do something with the skb if any */
/* /*
* Inform station state machine * Inform station state machine

View File

@@ -104,16 +104,16 @@ static int __init irda_init(void)
IRDA_DEBUG(0, "%s()\n", __FUNCTION__); IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
/* Lower layer of the stack */ /* Lower layer of the stack */
irlmp_init(); irlmp_init();
irlap_init(); irlap_init();
/* Higher layers of the stack */ /* Higher layers of the stack */
iriap_init(); iriap_init();
irttp_init(); irttp_init();
irsock_init(); irsock_init();
/* Add IrDA packet type (Start receiving packets) */ /* Add IrDA packet type (Start receiving packets) */
dev_add_pack(&irda_packet_type); dev_add_pack(&irda_packet_type);
/* External APIs */ /* External APIs */
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
@@ -124,7 +124,7 @@ static int __init irda_init(void)
#endif #endif
/* Driver/dongle support */ /* Driver/dongle support */
irda_device_init(); irda_device_init();
return 0; return 0;
} }
@@ -146,7 +146,7 @@ static void __exit irda_cleanup(void)
#endif #endif
/* Remove IrDA packet type (stop receiving packets) */ /* Remove IrDA packet type (stop receiving packets) */
dev_remove_pack(&irda_packet_type); dev_remove_pack(&irda_packet_type);
/* Remove higher layers */ /* Remove higher layers */
irsock_cleanup(); irsock_cleanup();

View File

@@ -88,13 +88,13 @@ void __exit irda_proc_unregister(void)
{ {
int i; int i;
if (proc_irda) { if (proc_irda) {
for (i=0; i<ARRAY_SIZE(irda_dirs); i++) for (i=0; i<ARRAY_SIZE(irda_dirs); i++)
remove_proc_entry(irda_dirs[i].name, proc_irda); remove_proc_entry(irda_dirs[i].name, proc_irda);
remove_proc_entry("irda", proc_net); remove_proc_entry("irda", proc_net);
proc_irda = NULL; proc_irda = NULL;
} }
} }

View File

@@ -111,7 +111,7 @@ static ctl_table irda_table[] = {
.strategy = &sysctl_string .strategy = &sysctl_string
}, },
#ifdef CONFIG_IRDA_DEBUG #ifdef CONFIG_IRDA_DEBUG
{ {
.ctl_name = DEBUG, .ctl_name = DEBUG,
.procname = "debug", .procname = "debug",
.data = &irda_debug, .data = &irda_debug,
@@ -121,7 +121,7 @@ static ctl_table irda_table[] = {
}, },
#endif #endif
#ifdef CONFIG_IRDA_FAST_RR #ifdef CONFIG_IRDA_FAST_RR
{ {
.ctl_name = FAST_POLL, .ctl_name = FAST_POLL,
.procname = "fast_poll_increase", .procname = "fast_poll_increase",
.data = &sysctl_fast_poll_increase, .data = &sysctl_fast_poll_increase,

View File

@@ -940,7 +940,7 @@ static int irttp_data_indication(void *instance, void *sap,
/* /*
* If the peer device has given us some credits and we didn't have * If the peer device has given us some credits and we didn't have
* anyone from before, then we need to shedule the tx queue. * anyone from before, then we need to shedule the tx queue.
* We need to do that because our Tx have stopped (so we may not * We need to do that because our Tx have stopped (so we may not
* get any LAP flow indication) and the user may be stopped as * get any LAP flow indication) and the user may be stopped as
* well. - Jean II * well. - Jean II