diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2007-02-09 09:24:53 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-11 02:19:47 -0500 |
commit | 6819bc2e1e46c71711a8dddf4040e706b02973c0 (patch) | |
tree | 6baa6c808fd70a01d5e95c77b02d0a6c5409cc9e /net/irda/irlan/irlan_client.c | |
parent | 981c0ff6900c981668a798fe9e0bc5ba32ee3fd4 (diff) |
[NET] IRDA: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irlan/irlan_client.c')
-rw-r--r-- | net/irda/irlan/irlan_client.c | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c index 95cf1234ea17..a4c1c9545827 100644 --- a/net/irda/irlan/irlan_client.c +++ b/net/irda/irlan/irlan_client.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /********************************************************************* | 1 | /********************************************************************* |
2 | * | 2 | * |
3 | * Filename: irlan_client.c | 3 | * Filename: irlan_client.c |
4 | * Version: 0.9 | 4 | * Version: 0.9 |
5 | * Description: IrDA LAN Access Protocol (IrLAN) Client | 5 | * Description: IrDA LAN Access Protocol (IrLAN) Client |
@@ -11,17 +11,17 @@ | |||
11 | * Sources: skeleton.c by Donald Becker <becker@CESDIS.gsfc.nasa.gov> | 11 | * Sources: skeleton.c by Donald Becker <becker@CESDIS.gsfc.nasa.gov> |
12 | * slip.c by Laurence Culhane, <loz@holmes.demon.co.uk> | 12 | * slip.c by Laurence Culhane, <loz@holmes.demon.co.uk> |
13 | * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> | 13 | * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> |
14 | * | 14 | * |
15 | * Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>, | 15 | * Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>, |
16 | * All Rights Reserved. | 16 | * All Rights Reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * Neither Dag Brattli nor University of Tromsų admit liability nor | 23 | * Neither Dag Brattli nor University of Tromsų admit liability nor |
24 | * provide warranty for any of this software. This material is | 24 | * provide warranty for any of this software. This material is |
25 | * provided "AS-IS" and at no charge. | 25 | * provided "AS-IS" and at no charge. |
26 | * | 26 | * |
27 | ********************************************************************/ | 27 | ********************************************************************/ |
@@ -54,35 +54,35 @@ | |||
54 | 54 | ||
55 | #undef CONFIG_IRLAN_GRATUITOUS_ARP | 55 | #undef CONFIG_IRLAN_GRATUITOUS_ARP |
56 | 56 | ||
57 | static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, | 57 | static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, |
58 | LM_REASON reason, | 58 | LM_REASON reason, |
59 | struct sk_buff *); | 59 | struct sk_buff *); |
60 | static int irlan_client_ctrl_data_indication(void *instance, void *sap, | 60 | static int irlan_client_ctrl_data_indication(void *instance, void *sap, |
61 | struct sk_buff *skb); | 61 | struct sk_buff *skb); |
62 | static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, | 62 | static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, |
63 | struct qos_info *qos, | 63 | struct qos_info *qos, |
64 | __u32 max_sdu_size, | 64 | __u32 max_sdu_size, |
65 | __u8 max_header_size, | 65 | __u8 max_header_size, |
66 | struct sk_buff *); | 66 | struct sk_buff *); |
67 | static void irlan_check_response_param(struct irlan_cb *self, char *param, | 67 | static void irlan_check_response_param(struct irlan_cb *self, char *param, |
68 | char *value, int val_len); | 68 | char *value, int val_len); |
69 | static void irlan_client_open_ctrl_tsap(struct irlan_cb *self); | 69 | static void irlan_client_open_ctrl_tsap(struct irlan_cb *self); |
70 | 70 | ||
71 | static void irlan_client_kick_timer_expired(void *data) | 71 | static void irlan_client_kick_timer_expired(void *data) |
72 | { | 72 | { |
73 | struct irlan_cb *self = (struct irlan_cb *) data; | 73 | struct irlan_cb *self = (struct irlan_cb *) data; |
74 | 74 | ||
75 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 75 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); |
76 | 76 | ||
77 | IRDA_ASSERT(self != NULL, return;); | 77 | IRDA_ASSERT(self != NULL, return;); |
78 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 78 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * If we are in peer mode, the client may not have got the discovery | 81 | * If we are in peer mode, the client may not have got the discovery |
82 | * indication it needs to make progress. If the client is still in | 82 | * indication it needs to make progress. If the client is still in |
83 | * IDLE state, we must kick it to, but only if the provider is not IDLE | 83 | * IDLE state, we must kick it to, but only if the provider is not IDLE |
84 | */ | 84 | */ |
85 | if ((self->provider.access_type == ACCESS_PEER) && | 85 | if ((self->provider.access_type == ACCESS_PEER) && |
86 | (self->client.state == IRLAN_IDLE) && | 86 | (self->client.state == IRLAN_IDLE) && |
87 | (self->provider.state != IRLAN_IDLE)) { | 87 | (self->provider.state != IRLAN_IDLE)) { |
88 | irlan_client_wakeup(self, self->saddr, self->daddr); | 88 | irlan_client_wakeup(self, self->saddr, self->daddr); |
@@ -92,8 +92,8 @@ static void irlan_client_kick_timer_expired(void *data) | |||
92 | static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) | 92 | static void irlan_client_start_kick_timer(struct irlan_cb *self, int timeout) |
93 | { | 93 | { |
94 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 94 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); |
95 | 95 | ||
96 | irda_start_timer(&self->client.kick_timer, timeout, (void *) self, | 96 | irda_start_timer(&self->client.kick_timer, timeout, (void *) self, |
97 | irlan_client_kick_timer_expired); | 97 | irlan_client_kick_timer_expired); |
98 | } | 98 | } |
99 | 99 | ||
@@ -110,11 +110,11 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) | |||
110 | IRDA_ASSERT(self != NULL, return;); | 110 | IRDA_ASSERT(self != NULL, return;); |
111 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 111 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
112 | 112 | ||
113 | /* | 113 | /* |
114 | * Check if we are already awake, or if we are a provider in direct | 114 | * Check if we are already awake, or if we are a provider in direct |
115 | * mode (in that case we must leave the client idle | 115 | * mode (in that case we must leave the client idle |
116 | */ | 116 | */ |
117 | if ((self->client.state != IRLAN_IDLE) || | 117 | if ((self->client.state != IRLAN_IDLE) || |
118 | (self->provider.access_type == ACCESS_DIRECT)) | 118 | (self->provider.access_type == ACCESS_DIRECT)) |
119 | { | 119 | { |
120 | IRDA_DEBUG(0, "%s(), already awake!\n", __FUNCTION__ ); | 120 | IRDA_DEBUG(0, "%s(), already awake!\n", __FUNCTION__ ); |
@@ -135,7 +135,7 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) | |||
135 | irlan_open_data_tsap(self); | 135 | irlan_open_data_tsap(self); |
136 | 136 | ||
137 | irlan_do_client_event(self, IRLAN_DISCOVERY_INDICATION, NULL); | 137 | irlan_do_client_event(self, IRLAN_DISCOVERY_INDICATION, NULL); |
138 | 138 | ||
139 | /* Start kick timer */ | 139 | /* Start kick timer */ |
140 | irlan_client_start_kick_timer(self, 2*HZ); | 140 | irlan_client_start_kick_timer(self, 2*HZ); |
141 | } | 141 | } |
@@ -148,11 +148,11 @@ void irlan_client_wakeup(struct irlan_cb *self, __u32 saddr, __u32 daddr) | |||
148 | */ | 148 | */ |
149 | void irlan_client_discovery_indication(discinfo_t *discovery, | 149 | void irlan_client_discovery_indication(discinfo_t *discovery, |
150 | DISCOVERY_MODE mode, | 150 | DISCOVERY_MODE mode, |
151 | void *priv) | 151 | void *priv) |
152 | { | 152 | { |
153 | struct irlan_cb *self; | 153 | struct irlan_cb *self; |
154 | __u32 saddr, daddr; | 154 | __u32 saddr, daddr; |
155 | 155 | ||
156 | IRDA_DEBUG(1, "%s()\n", __FUNCTION__ ); | 156 | IRDA_DEBUG(1, "%s()\n", __FUNCTION__ ); |
157 | 157 | ||
158 | IRDA_ASSERT(discovery != NULL, return;); | 158 | IRDA_ASSERT(discovery != NULL, return;); |
@@ -177,35 +177,35 @@ void irlan_client_discovery_indication(discinfo_t *discovery, | |||
177 | 177 | ||
178 | IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __FUNCTION__ , | 178 | IRDA_DEBUG(1, "%s(), Found instance (%08x)!\n", __FUNCTION__ , |
179 | daddr); | 179 | daddr); |
180 | 180 | ||
181 | irlan_client_wakeup(self, saddr, daddr); | 181 | irlan_client_wakeup(self, saddr, daddr); |
182 | } | 182 | } |
183 | IRDA_ASSERT_LABEL(out:) | 183 | IRDA_ASSERT_LABEL(out:) |
184 | rcu_read_unlock(); | 184 | rcu_read_unlock(); |
185 | } | 185 | } |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * Function irlan_client_data_indication (handle, skb) | 188 | * Function irlan_client_data_indication (handle, skb) |
189 | * | 189 | * |
190 | * This function gets the data that is received on the control channel | 190 | * This function gets the data that is received on the control channel |
191 | * | 191 | * |
192 | */ | 192 | */ |
193 | static int irlan_client_ctrl_data_indication(void *instance, void *sap, | 193 | static int irlan_client_ctrl_data_indication(void *instance, void *sap, |
194 | struct sk_buff *skb) | 194 | struct sk_buff *skb) |
195 | { | 195 | { |
196 | struct irlan_cb *self; | 196 | struct irlan_cb *self; |
197 | 197 | ||
198 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 198 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); |
199 | 199 | ||
200 | self = (struct irlan_cb *) instance; | 200 | self = (struct irlan_cb *) instance; |
201 | 201 | ||
202 | IRDA_ASSERT(self != NULL, return -1;); | 202 | IRDA_ASSERT(self != NULL, return -1;); |
203 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); | 203 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return -1;); |
204 | IRDA_ASSERT(skb != NULL, return -1;); | 204 | IRDA_ASSERT(skb != NULL, return -1;); |
205 | |||
206 | irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); | ||
207 | 205 | ||
208 | /* Ready for a new command */ | 206 | irlan_do_client_event(self, IRLAN_DATA_INDICATION, skb); |
207 | |||
208 | /* Ready for a new command */ | ||
209 | IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __FUNCTION__ ); | 209 | IRDA_DEBUG(2, "%s(), clearing tx_busy\n", __FUNCTION__ ); |
210 | self->client.tx_busy = FALSE; | 210 | self->client.tx_busy = FALSE; |
211 | 211 | ||
@@ -215,27 +215,27 @@ static int irlan_client_ctrl_data_indication(void *instance, void *sap, | |||
215 | return 0; | 215 | return 0; |
216 | } | 216 | } |
217 | 217 | ||
218 | static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, | 218 | static void irlan_client_ctrl_disconnect_indication(void *instance, void *sap, |
219 | LM_REASON reason, | 219 | LM_REASON reason, |
220 | struct sk_buff *userdata) | 220 | struct sk_buff *userdata) |
221 | { | 221 | { |
222 | struct irlan_cb *self; | 222 | struct irlan_cb *self; |
223 | struct tsap_cb *tsap; | 223 | struct tsap_cb *tsap; |
224 | struct sk_buff *skb; | 224 | struct sk_buff *skb; |
225 | 225 | ||
226 | IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason); | 226 | IRDA_DEBUG(4, "%s(), reason=%d\n", __FUNCTION__ , reason); |
227 | 227 | ||
228 | self = (struct irlan_cb *) instance; | 228 | self = (struct irlan_cb *) instance; |
229 | tsap = (struct tsap_cb *) sap; | 229 | tsap = (struct tsap_cb *) sap; |
230 | 230 | ||
231 | IRDA_ASSERT(self != NULL, return;); | 231 | IRDA_ASSERT(self != NULL, return;); |
232 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 232 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
233 | IRDA_ASSERT(tsap != NULL, return;); | 233 | IRDA_ASSERT(tsap != NULL, return;); |
234 | IRDA_ASSERT(tsap->magic == TTP_TSAP_MAGIC, return;); | 234 | IRDA_ASSERT(tsap->magic == TTP_TSAP_MAGIC, return;); |
235 | 235 | ||
236 | IRDA_ASSERT(tsap == self->client.tsap_ctrl, return;); | 236 | IRDA_ASSERT(tsap == self->client.tsap_ctrl, return;); |
237 | 237 | ||
238 | /* Remove frames queued on the control channel */ | 238 | /* Remove frames queued on the control channel */ |
239 | while ((skb = skb_dequeue(&self->client.txq)) != NULL) { | 239 | while ((skb = skb_dequeue(&self->client.txq)) != NULL) { |
240 | dev_kfree_skb(skb); | 240 | dev_kfree_skb(skb); |
241 | } | 241 | } |
@@ -272,7 +272,7 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self) | |||
272 | notify.disconnect_indication = irlan_client_ctrl_disconnect_indication; | 272 | notify.disconnect_indication = irlan_client_ctrl_disconnect_indication; |
273 | notify.instance = self; | 273 | notify.instance = self; |
274 | strlcpy(notify.name, "IrLAN ctrl (c)", sizeof(notify.name)); | 274 | strlcpy(notify.name, "IrLAN ctrl (c)", sizeof(notify.name)); |
275 | 275 | ||
276 | tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify); | 276 | tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify); |
277 | if (!tsap) { | 277 | if (!tsap) { |
278 | IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); | 278 | IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); |
@@ -287,11 +287,11 @@ static void irlan_client_open_ctrl_tsap(struct irlan_cb *self) | |||
287 | * Connection to peer IrLAN laye confirmed | 287 | * Connection to peer IrLAN laye confirmed |
288 | * | 288 | * |
289 | */ | 289 | */ |
290 | static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, | 290 | static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, |
291 | struct qos_info *qos, | 291 | struct qos_info *qos, |
292 | __u32 max_sdu_size, | 292 | __u32 max_sdu_size, |
293 | __u8 max_header_size, | 293 | __u8 max_header_size, |
294 | struct sk_buff *skb) | 294 | struct sk_buff *skb) |
295 | { | 295 | { |
296 | struct irlan_cb *self; | 296 | struct irlan_cb *self; |
297 | 297 | ||
@@ -316,7 +316,7 @@ static void irlan_client_ctrl_connect_confirm(void *instance, void *sap, | |||
316 | * Print return code of request to peer IrLAN layer. | 316 | * Print return code of request to peer IrLAN layer. |
317 | * | 317 | * |
318 | */ | 318 | */ |
319 | static void print_ret_code(__u8 code) | 319 | static void print_ret_code(__u8 code) |
320 | { | 320 | { |
321 | switch(code) { | 321 | switch(code) { |
322 | case 0: | 322 | case 0: |
@@ -358,7 +358,7 @@ static void print_ret_code(__u8 code) | |||
358 | /* | 358 | /* |
359 | * Function irlan_client_parse_response (self, skb) | 359 | * Function irlan_client_parse_response (self, skb) |
360 | * | 360 | * |
361 | * Extract all parameters from received buffer, then feed them to | 361 | * Extract all parameters from received buffer, then feed them to |
362 | * check_params for parsing | 362 | * check_params for parsing |
363 | */ | 363 | */ |
364 | void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) | 364 | void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) |
@@ -369,30 +369,30 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) | |||
369 | int ret; | 369 | int ret; |
370 | __u16 val_len; | 370 | __u16 val_len; |
371 | int i; | 371 | int i; |
372 | char *name; | 372 | char *name; |
373 | char *value; | 373 | char *value; |
374 | |||
375 | IRDA_ASSERT(skb != NULL, return;); | ||
374 | 376 | ||
375 | IRDA_ASSERT(skb != NULL, return;); | ||
376 | |||
377 | IRDA_DEBUG(4, "%s() skb->len=%d\n", __FUNCTION__ , (int) skb->len); | 377 | IRDA_DEBUG(4, "%s() skb->len=%d\n", __FUNCTION__ , (int) skb->len); |
378 | 378 | ||
379 | IRDA_ASSERT(self != NULL, return;); | 379 | IRDA_ASSERT(self != NULL, return;); |
380 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 380 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
381 | 381 | ||
382 | if (!skb) { | 382 | if (!skb) { |
383 | IRDA_ERROR("%s(), Got NULL skb!\n", __FUNCTION__); | 383 | IRDA_ERROR("%s(), Got NULL skb!\n", __FUNCTION__); |
384 | return; | 384 | return; |
385 | } | 385 | } |
386 | frame = skb->data; | 386 | frame = skb->data; |
387 | 387 | ||
388 | /* | 388 | /* |
389 | * Check return code and print it if not success | 389 | * Check return code and print it if not success |
390 | */ | 390 | */ |
391 | if (frame[0]) { | 391 | if (frame[0]) { |
392 | print_ret_code(frame[0]); | 392 | print_ret_code(frame[0]); |
393 | return; | 393 | return; |
394 | } | 394 | } |
395 | 395 | ||
396 | name = kmalloc(255, GFP_ATOMIC); | 396 | name = kmalloc(255, GFP_ATOMIC); |
397 | if (!name) | 397 | if (!name) |
398 | return; | 398 | return; |
@@ -406,11 +406,11 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) | |||
406 | count = frame[1]; | 406 | count = frame[1]; |
407 | 407 | ||
408 | IRDA_DEBUG(4, "%s(), got %d parameters\n", __FUNCTION__ , count); | 408 | IRDA_DEBUG(4, "%s(), got %d parameters\n", __FUNCTION__ , count); |
409 | 409 | ||
410 | ptr = frame+2; | 410 | ptr = frame+2; |
411 | 411 | ||
412 | /* For all parameters */ | 412 | /* For all parameters */ |
413 | for (i=0; i<count;i++) { | 413 | for (i=0; i<count;i++) { |
414 | ret = irlan_extract_param(ptr, name, value, &val_len); | 414 | ret = irlan_extract_param(ptr, name, value, &val_len); |
415 | if (ret < 0) { | 415 | if (ret < 0) { |
416 | IRDA_DEBUG(2, "%s(), IrLAN, Error!\n", __FUNCTION__ ); | 416 | 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) | |||
418 | } | 418 | } |
419 | ptr += ret; | 419 | ptr += ret; |
420 | irlan_check_response_param(self, name, value, val_len); | 420 | irlan_check_response_param(self, name, value, val_len); |
421 | } | 421 | } |
422 | /* Cleanup */ | 422 | /* Cleanup */ |
423 | kfree(name); | 423 | kfree(name); |
424 | kfree(value); | 424 | kfree(value); |
@@ -430,8 +430,8 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb) | |||
430 | * Check which parameter is received and update local variables | 430 | * Check which parameter is received and update local variables |
431 | * | 431 | * |
432 | */ | 432 | */ |
433 | static void irlan_check_response_param(struct irlan_cb *self, char *param, | 433 | static void irlan_check_response_param(struct irlan_cb *self, char *param, |
434 | char *value, int val_len) | 434 | char *value, int val_len) |
435 | { | 435 | { |
436 | __u16 tmp_cpu; /* Temporary value in host order */ | 436 | __u16 tmp_cpu; /* Temporary value in host order */ |
437 | __u8 *bytes; | 437 | __u8 *bytes; |
@@ -465,7 +465,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, | |||
465 | self->client.filter_type |= IRLAN_BROADCAST; | 465 | self->client.filter_type |= IRLAN_BROADCAST; |
466 | else if (strcmp(value, "IPX_SOCKET") == 0) | 466 | else if (strcmp(value, "IPX_SOCKET") == 0) |
467 | self->client.filter_type |= IRLAN_IPX_SOCKET; | 467 | self->client.filter_type |= IRLAN_IPX_SOCKET; |
468 | 468 | ||
469 | } | 469 | } |
470 | if (strcmp(param, "ACCESS_TYPE") == 0) { | 470 | if (strcmp(param, "ACCESS_TYPE") == 0) { |
471 | if (strcmp(value, "DIRECT") == 0) | 471 | if (strcmp(value, "DIRECT") == 0) |
@@ -480,7 +480,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, | |||
480 | } | 480 | } |
481 | /* IRLAN version */ | 481 | /* IRLAN version */ |
482 | if (strcmp(param, "IRLAN_VER") == 0) { | 482 | if (strcmp(param, "IRLAN_VER") == 0) { |
483 | IRDA_DEBUG(4, "IrLAN version %d.%d\n", (__u8) value[0], | 483 | IRDA_DEBUG(4, "IrLAN version %d.%d\n", (__u8) value[0], |
484 | (__u8) value[1]); | 484 | (__u8) value[1]); |
485 | 485 | ||
486 | self->version[0] = value[0]; | 486 | self->version[0] = value[0]; |
@@ -497,17 +497,17 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, | |||
497 | memcpy(&tmp_cpu, value, 2); /* Align value */ | 497 | memcpy(&tmp_cpu, value, 2); /* Align value */ |
498 | le16_to_cpus(&tmp_cpu); /* Convert to host order */ | 498 | le16_to_cpus(&tmp_cpu); /* Convert to host order */ |
499 | self->client.recv_arb_val = tmp_cpu; | 499 | self->client.recv_arb_val = tmp_cpu; |
500 | IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __FUNCTION__ , | 500 | IRDA_DEBUG(2, "%s(), receive arb val=%d\n", __FUNCTION__ , |
501 | self->client.recv_arb_val); | 501 | self->client.recv_arb_val); |
502 | } | 502 | } |
503 | if (strcmp(param, "MAX_FRAME") == 0) { | 503 | if (strcmp(param, "MAX_FRAME") == 0) { |
504 | memcpy(&tmp_cpu, value, 2); /* Align value */ | 504 | memcpy(&tmp_cpu, value, 2); /* Align value */ |
505 | le16_to_cpus(&tmp_cpu); /* Convert to host order */ | 505 | le16_to_cpus(&tmp_cpu); /* Convert to host order */ |
506 | self->client.max_frame = tmp_cpu; | 506 | self->client.max_frame = tmp_cpu; |
507 | IRDA_DEBUG(4, "%s(), max frame=%d\n", __FUNCTION__ , | 507 | IRDA_DEBUG(4, "%s(), max frame=%d\n", __FUNCTION__ , |
508 | self->client.max_frame); | 508 | self->client.max_frame); |
509 | } | 509 | } |
510 | 510 | ||
511 | /* RECONNECT_KEY, in case the link goes down! */ | 511 | /* RECONNECT_KEY, in case the link goes down! */ |
512 | if (strcmp(param, "RECONNECT_KEY") == 0) { | 512 | if (strcmp(param, "RECONNECT_KEY") == 0) { |
513 | IRDA_DEBUG(4, "Got reconnect key: "); | 513 | IRDA_DEBUG(4, "Got reconnect key: "); |
@@ -521,9 +521,9 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, | |||
521 | if (strcmp(param, "FILTER_ENTRY") == 0) { | 521 | if (strcmp(param, "FILTER_ENTRY") == 0) { |
522 | bytes = value; | 522 | bytes = value; |
523 | IRDA_DEBUG(4, "Ethernet address = %02x:%02x:%02x:%02x:%02x:%02x\n", | 523 | IRDA_DEBUG(4, "Ethernet address = %02x:%02x:%02x:%02x:%02x:%02x\n", |
524 | bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], | 524 | bytes[0], bytes[1], bytes[2], bytes[3], bytes[4], |
525 | bytes[5]); | 525 | bytes[5]); |
526 | for (i = 0; i < 6; i++) | 526 | for (i = 0; i < 6; i++) |
527 | self->dev->dev_addr[i] = bytes[i]; | 527 | self->dev->dev_addr[i] = bytes[i]; |
528 | } | 528 | } |
529 | } | 529 | } |
@@ -534,11 +534,11 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param, | |||
534 | * Got results from remote LM-IAS | 534 | * Got results from remote LM-IAS |
535 | * | 535 | * |
536 | */ | 536 | */ |
537 | void irlan_client_get_value_confirm(int result, __u16 obj_id, | 537 | void irlan_client_get_value_confirm(int result, __u16 obj_id, |
538 | struct ias_value *value, void *priv) | 538 | struct ias_value *value, void *priv) |
539 | { | 539 | { |
540 | struct irlan_cb *self; | 540 | struct irlan_cb *self; |
541 | 541 | ||
542 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 542 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); |
543 | 543 | ||
544 | IRDA_ASSERT(priv != NULL, return;); | 544 | IRDA_ASSERT(priv != NULL, return;); |
@@ -553,7 +553,7 @@ void irlan_client_get_value_confirm(int result, __u16 obj_id, | |||
553 | /* Check if request succeeded */ | 553 | /* Check if request succeeded */ |
554 | if (result != IAS_SUCCESS) { | 554 | if (result != IAS_SUCCESS) { |
555 | IRDA_DEBUG(2, "%s(), got NULL value!\n", __FUNCTION__ ); | 555 | IRDA_DEBUG(2, "%s(), got NULL value!\n", __FUNCTION__ ); |
556 | irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, | 556 | irlan_do_client_event(self, IRLAN_IAS_PROVIDER_NOT_AVAIL, |
557 | NULL); | 557 | NULL); |
558 | return; | 558 | return; |
559 | } | 559 | } |