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/qos.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/qos.c')
-rw-r--r-- | net/irda/qos.c | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/net/irda/qos.c b/net/irda/qos.c index 95a69c013ee8..349012c926b7 100644 --- a/net/irda/qos.c +++ b/net/irda/qos.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /********************************************************************* | 1 | /********************************************************************* |
2 | * | 2 | * |
3 | * Filename: qos.c | 3 | * Filename: qos.c |
4 | * Version: 1.0 | 4 | * Version: 1.0 |
5 | * Description: IrLAP QoS parameter negotiation | 5 | * Description: IrLAP QoS parameter negotiation |
@@ -8,26 +8,26 @@ | |||
8 | * Created at: Tue Sep 9 00:00:26 1997 | 8 | * Created at: Tue Sep 9 00:00:26 1997 |
9 | * Modified at: Sun Jan 30 14:29:16 2000 | 9 | * Modified at: Sun Jan 30 14:29:16 2000 |
10 | * Modified by: Dag Brattli <dagb@cs.uit.no> | 10 | * Modified by: Dag Brattli <dagb@cs.uit.no> |
11 | * | 11 | * |
12 | * Copyright (c) 1998-2000 Dag Brattli <dagb@cs.uit.no>, | 12 | * Copyright (c) 1998-2000 Dag Brattli <dagb@cs.uit.no>, |
13 | * All Rights Reserved. | 13 | * All Rights Reserved. |
14 | * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com> | 14 | * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com> |
15 | * | 15 | * |
16 | * This program is free software; you can redistribute it and/or | 16 | * This program is free software; you can redistribute it and/or |
17 | * modify it under the terms of the GNU General Public License as | 17 | * modify it under the terms of the GNU General Public License as |
18 | * published by the Free Software Foundation; either version 2 of | 18 | * published by the Free Software Foundation; either version 2 of |
19 | * the License, or (at your option) any later version. | 19 | * the License, or (at your option) any later version. |
20 | * | 20 | * |
21 | * This program is distributed in the hope that it will be useful, | 21 | * This program is distributed in the hope that it will be useful, |
22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
24 | * GNU General Public License for more details. | 24 | * GNU General Public License for more details. |
25 | * | 25 | * |
26 | * You should have received a copy of the GNU General Public License | 26 | * You should have received a copy of the GNU General Public License |
27 | * along with this program; if not, write to the Free Software | 27 | * along with this program; if not, write to the Free Software |
28 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 28 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
29 | * MA 02111-1307 USA | 29 | * MA 02111-1307 USA |
30 | * | 30 | * |
31 | ********************************************************************/ | 31 | ********************************************************************/ |
32 | 32 | ||
33 | #include <asm/byteorder.h> | 33 | #include <asm/byteorder.h> |
@@ -84,16 +84,16 @@ unsigned sysctl_max_tx_data_size = 2042; | |||
84 | unsigned sysctl_max_tx_window = 7; | 84 | unsigned sysctl_max_tx_window = 7; |
85 | 85 | ||
86 | static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get); | 86 | static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get); |
87 | static int irlap_param_link_disconnect(void *instance, irda_param_t *parm, | 87 | static int irlap_param_link_disconnect(void *instance, irda_param_t *parm, |
88 | int get); | 88 | int get); |
89 | static int irlap_param_max_turn_time(void *instance, irda_param_t *param, | 89 | static int irlap_param_max_turn_time(void *instance, irda_param_t *param, |
90 | int get); | 90 | int get); |
91 | static int irlap_param_data_size(void *instance, irda_param_t *param, int get); | 91 | static int irlap_param_data_size(void *instance, irda_param_t *param, int get); |
92 | static int irlap_param_window_size(void *instance, irda_param_t *param, | 92 | static int irlap_param_window_size(void *instance, irda_param_t *param, |
93 | int get); | 93 | int get); |
94 | static int irlap_param_additional_bofs(void *instance, irda_param_t *parm, | 94 | static int irlap_param_additional_bofs(void *instance, irda_param_t *parm, |
95 | int get); | 95 | int get); |
96 | static int irlap_param_min_turn_time(void *instance, irda_param_t *param, | 96 | static int irlap_param_min_turn_time(void *instance, irda_param_t *param, |
97 | int get); | 97 | int get); |
98 | 98 | ||
99 | #ifndef CONFIG_IRDA_DYNAMIC_WINDOW | 99 | #ifndef CONFIG_IRDA_DYNAMIC_WINDOW |
@@ -101,7 +101,7 @@ static __u32 irlap_requested_line_capacity(struct qos_info *qos); | |||
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | static __u32 min_turn_times[] = { 10000, 5000, 1000, 500, 100, 50, 10, 0 }; /* us */ | 103 | static __u32 min_turn_times[] = { 10000, 5000, 1000, 500, 100, 50, 10, 0 }; /* us */ |
104 | static __u32 baud_rates[] = { 2400, 9600, 19200, 38400, 57600, 115200, 576000, | 104 | static __u32 baud_rates[] = { 2400, 9600, 19200, 38400, 57600, 115200, 576000, |
105 | 1152000, 4000000, 16000000 }; /* bps */ | 105 | 1152000, 4000000, 16000000 }; /* bps */ |
106 | static __u32 data_sizes[] = { 64, 128, 256, 512, 1024, 2048 }; /* bytes */ | 106 | static __u32 data_sizes[] = { 64, 128, 256, 512, 1024, 2048 }; /* bytes */ |
107 | static __u32 add_bofs[] = { 48, 24, 12, 5, 3, 2, 1, 0 }; /* bytes */ | 107 | static __u32 add_bofs[] = { 48, 24, 12, 5, 3, 2, 1, 0 }; /* bytes */ |
@@ -165,7 +165,7 @@ static pi_param_info_t irlap_param_info = { pi_major_call_table, 2, 0x7f, 7 }; | |||
165 | static inline int value_index(__u32 value, __u32 *array, int size) | 165 | static inline int value_index(__u32 value, __u32 *array, int size) |
166 | { | 166 | { |
167 | int i; | 167 | int i; |
168 | 168 | ||
169 | for (i=0; i < size; i++) | 169 | for (i=0; i < size; i++) |
170 | if (array[i] == value) | 170 | if (array[i] == value) |
171 | break; | 171 | break; |
@@ -178,7 +178,7 @@ static inline int value_index(__u32 value, __u32 *array, int size) | |||
178 | * Returns value to index in array, easy! | 178 | * Returns value to index in array, easy! |
179 | * | 179 | * |
180 | */ | 180 | */ |
181 | static inline __u32 index_value(int index, __u32 *array) | 181 | static inline __u32 index_value(int index, __u32 *array) |
182 | { | 182 | { |
183 | return array[index]; | 183 | return array[index]; |
184 | } | 184 | } |
@@ -189,7 +189,7 @@ static inline __u32 index_value(int index, __u32 *array) | |||
189 | * Returns index to most significant bit (MSB) in word | 189 | * Returns index to most significant bit (MSB) in word |
190 | * | 190 | * |
191 | */ | 191 | */ |
192 | static int msb_index (__u16 word) | 192 | static int msb_index (__u16 word) |
193 | { | 193 | { |
194 | __u16 msb = 0x8000; | 194 | __u16 msb = 0x8000; |
195 | int index = 15; /* Current MSB */ | 195 | int index = 15; /* Current MSB */ |
@@ -298,12 +298,12 @@ void irda_qos_compute_intersection(struct qos_info *qos, struct qos_info *new) | |||
298 | * | 298 | * |
299 | * The purpose of this function is for layers and drivers to be able to | 299 | * The purpose of this function is for layers and drivers to be able to |
300 | * set the maximum QoS possible and then "and in" their own limitations | 300 | * set the maximum QoS possible and then "and in" their own limitations |
301 | * | 301 | * |
302 | */ | 302 | */ |
303 | void irda_init_max_qos_capabilies(struct qos_info *qos) | 303 | void irda_init_max_qos_capabilies(struct qos_info *qos) |
304 | { | 304 | { |
305 | int i; | 305 | int i; |
306 | /* | 306 | /* |
307 | * These are the maximum supported values as specified on pages | 307 | * These are the maximum supported values as specified on pages |
308 | * 39-43 in IrLAP | 308 | * 39-43 in IrLAP |
309 | */ | 309 | */ |
@@ -361,25 +361,25 @@ static void irlap_adjust_qos_settings(struct qos_info *qos) | |||
361 | qos->min_turn_time.value = sysctl_min_tx_turn_time; | 361 | qos->min_turn_time.value = sysctl_min_tx_turn_time; |
362 | } | 362 | } |
363 | 363 | ||
364 | /* | 364 | /* |
365 | * Not allowed to use a max turn time less than 500 ms if the baudrate | 365 | * Not allowed to use a max turn time less than 500 ms if the baudrate |
366 | * is less than 115200 | 366 | * is less than 115200 |
367 | */ | 367 | */ |
368 | if ((qos->baud_rate.value < 115200) && | 368 | if ((qos->baud_rate.value < 115200) && |
369 | (qos->max_turn_time.value < 500)) | 369 | (qos->max_turn_time.value < 500)) |
370 | { | 370 | { |
371 | IRDA_DEBUG(0, | 371 | IRDA_DEBUG(0, |
372 | "%s(), adjusting max turn time from %d to 500 ms\n", | 372 | "%s(), adjusting max turn time from %d to 500 ms\n", |
373 | __FUNCTION__, qos->max_turn_time.value); | 373 | __FUNCTION__, qos->max_turn_time.value); |
374 | qos->max_turn_time.value = 500; | 374 | qos->max_turn_time.value = 500; |
375 | } | 375 | } |
376 | 376 | ||
377 | /* | 377 | /* |
378 | * The data size must be adjusted according to the baud rate and max | 378 | * The data size must be adjusted according to the baud rate and max |
379 | * turn time | 379 | * turn time |
380 | */ | 380 | */ |
381 | index = value_index(qos->data_size.value, data_sizes, 6); | 381 | index = value_index(qos->data_size.value, data_sizes, 6); |
382 | line_capacity = irlap_max_line_capacity(qos->baud_rate.value, | 382 | line_capacity = irlap_max_line_capacity(qos->baud_rate.value, |
383 | qos->max_turn_time.value); | 383 | qos->max_turn_time.value); |
384 | 384 | ||
385 | #ifdef CONFIG_IRDA_DYNAMIC_WINDOW | 385 | #ifdef CONFIG_IRDA_DYNAMIC_WINDOW |
@@ -427,32 +427,32 @@ static void irlap_adjust_qos_settings(struct qos_info *qos) | |||
427 | * We just set the QoS capabilities for the peer station | 427 | * We just set the QoS capabilities for the peer station |
428 | * | 428 | * |
429 | */ | 429 | */ |
430 | int irlap_qos_negotiate(struct irlap_cb *self, struct sk_buff *skb) | 430 | int irlap_qos_negotiate(struct irlap_cb *self, struct sk_buff *skb) |
431 | { | 431 | { |
432 | int ret; | 432 | int ret; |
433 | 433 | ||
434 | ret = irda_param_extract_all(self, skb->data, skb->len, | 434 | ret = irda_param_extract_all(self, skb->data, skb->len, |
435 | &irlap_param_info); | 435 | &irlap_param_info); |
436 | 436 | ||
437 | /* Convert the negotiated bits to values */ | 437 | /* Convert the negotiated bits to values */ |
438 | irda_qos_bits_to_value(&self->qos_tx); | 438 | irda_qos_bits_to_value(&self->qos_tx); |
439 | irda_qos_bits_to_value(&self->qos_rx); | 439 | irda_qos_bits_to_value(&self->qos_rx); |
440 | 440 | ||
441 | irlap_adjust_qos_settings(&self->qos_tx); | 441 | irlap_adjust_qos_settings(&self->qos_tx); |
442 | 442 | ||
443 | IRDA_DEBUG(2, "Setting BAUD_RATE to %d bps.\n", | 443 | IRDA_DEBUG(2, "Setting BAUD_RATE to %d bps.\n", |
444 | self->qos_tx.baud_rate.value); | 444 | self->qos_tx.baud_rate.value); |
445 | IRDA_DEBUG(2, "Setting DATA_SIZE to %d bytes\n", | 445 | IRDA_DEBUG(2, "Setting DATA_SIZE to %d bytes\n", |
446 | self->qos_tx.data_size.value); | 446 | self->qos_tx.data_size.value); |
447 | IRDA_DEBUG(2, "Setting WINDOW_SIZE to %d\n", | 447 | IRDA_DEBUG(2, "Setting WINDOW_SIZE to %d\n", |
448 | self->qos_tx.window_size.value); | 448 | self->qos_tx.window_size.value); |
449 | IRDA_DEBUG(2, "Setting XBOFS to %d\n", | 449 | IRDA_DEBUG(2, "Setting XBOFS to %d\n", |
450 | self->qos_tx.additional_bofs.value); | 450 | self->qos_tx.additional_bofs.value); |
451 | IRDA_DEBUG(2, "Setting MAX_TURN_TIME to %d ms.\n", | 451 | IRDA_DEBUG(2, "Setting MAX_TURN_TIME to %d ms.\n", |
452 | self->qos_tx.max_turn_time.value); | 452 | self->qos_tx.max_turn_time.value); |
453 | IRDA_DEBUG(2, "Setting MIN_TURN_TIME to %d usecs.\n", | 453 | IRDA_DEBUG(2, "Setting MIN_TURN_TIME to %d usecs.\n", |
454 | self->qos_tx.min_turn_time.value); | 454 | self->qos_tx.min_turn_time.value); |
455 | IRDA_DEBUG(2, "Setting LINK_DISC to %d secs.\n", | 455 | IRDA_DEBUG(2, "Setting LINK_DISC to %d secs.\n", |
456 | self->qos_tx.link_disc_time.value); | 456 | self->qos_tx.link_disc_time.value); |
457 | return ret; | 457 | return ret; |
458 | } | 458 | } |
@@ -463,55 +463,55 @@ int irlap_qos_negotiate(struct irlap_cb *self, struct sk_buff *skb) | |||
463 | * Insert QoS negotiaion pararameters into frame | 463 | * Insert QoS negotiaion pararameters into frame |
464 | * | 464 | * |
465 | */ | 465 | */ |
466 | int irlap_insert_qos_negotiation_params(struct irlap_cb *self, | 466 | int irlap_insert_qos_negotiation_params(struct irlap_cb *self, |
467 | struct sk_buff *skb) | 467 | struct sk_buff *skb) |
468 | { | 468 | { |
469 | int ret; | 469 | int ret; |
470 | 470 | ||
471 | /* Insert data rate */ | 471 | /* Insert data rate */ |
472 | ret = irda_param_insert(self, PI_BAUD_RATE, skb->tail, | 472 | ret = irda_param_insert(self, PI_BAUD_RATE, skb->tail, |
473 | skb_tailroom(skb), &irlap_param_info); | 473 | skb_tailroom(skb), &irlap_param_info); |
474 | if (ret < 0) | 474 | if (ret < 0) |
475 | return ret; | 475 | return ret; |
476 | skb_put(skb, ret); | 476 | skb_put(skb, ret); |
477 | 477 | ||
478 | /* Insert max turnaround time */ | 478 | /* Insert max turnaround time */ |
479 | ret = irda_param_insert(self, PI_MAX_TURN_TIME, skb->tail, | 479 | ret = irda_param_insert(self, PI_MAX_TURN_TIME, skb->tail, |
480 | skb_tailroom(skb), &irlap_param_info); | 480 | skb_tailroom(skb), &irlap_param_info); |
481 | if (ret < 0) | 481 | if (ret < 0) |
482 | return ret; | 482 | return ret; |
483 | skb_put(skb, ret); | 483 | skb_put(skb, ret); |
484 | 484 | ||
485 | /* Insert data size */ | 485 | /* Insert data size */ |
486 | ret = irda_param_insert(self, PI_DATA_SIZE, skb->tail, | 486 | ret = irda_param_insert(self, PI_DATA_SIZE, skb->tail, |
487 | skb_tailroom(skb), &irlap_param_info); | 487 | skb_tailroom(skb), &irlap_param_info); |
488 | if (ret < 0) | 488 | if (ret < 0) |
489 | return ret; | 489 | return ret; |
490 | skb_put(skb, ret); | 490 | skb_put(skb, ret); |
491 | 491 | ||
492 | /* Insert window size */ | 492 | /* Insert window size */ |
493 | ret = irda_param_insert(self, PI_WINDOW_SIZE, skb->tail, | 493 | ret = irda_param_insert(self, PI_WINDOW_SIZE, skb->tail, |
494 | skb_tailroom(skb), &irlap_param_info); | 494 | skb_tailroom(skb), &irlap_param_info); |
495 | if (ret < 0) | 495 | if (ret < 0) |
496 | return ret; | 496 | return ret; |
497 | skb_put(skb, ret); | 497 | skb_put(skb, ret); |
498 | 498 | ||
499 | /* Insert additional BOFs */ | 499 | /* Insert additional BOFs */ |
500 | ret = irda_param_insert(self, PI_ADD_BOFS, skb->tail, | 500 | ret = irda_param_insert(self, PI_ADD_BOFS, skb->tail, |
501 | skb_tailroom(skb), &irlap_param_info); | 501 | skb_tailroom(skb), &irlap_param_info); |
502 | if (ret < 0) | 502 | if (ret < 0) |
503 | return ret; | 503 | return ret; |
504 | skb_put(skb, ret); | 504 | skb_put(skb, ret); |
505 | 505 | ||
506 | /* Insert minimum turnaround time */ | 506 | /* Insert minimum turnaround time */ |
507 | ret = irda_param_insert(self, PI_MIN_TURN_TIME, skb->tail, | 507 | ret = irda_param_insert(self, PI_MIN_TURN_TIME, skb->tail, |
508 | skb_tailroom(skb), &irlap_param_info); | 508 | skb_tailroom(skb), &irlap_param_info); |
509 | if (ret < 0) | 509 | if (ret < 0) |
510 | return ret; | 510 | return ret; |
511 | skb_put(skb, ret); | 511 | skb_put(skb, ret); |
512 | 512 | ||
513 | /* Insert link disconnect/threshold time */ | 513 | /* Insert link disconnect/threshold time */ |
514 | ret = irda_param_insert(self, PI_LINK_DISC, skb->tail, | 514 | ret = irda_param_insert(self, PI_LINK_DISC, skb->tail, |
515 | skb_tailroom(skb), &irlap_param_info); | 515 | skb_tailroom(skb), &irlap_param_info); |
516 | if (ret < 0) | 516 | if (ret < 0) |
517 | return ret; | 517 | return ret; |
@@ -537,12 +537,12 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get) | |||
537 | 537 | ||
538 | if (get) { | 538 | if (get) { |
539 | param->pv.i = self->qos_rx.baud_rate.bits; | 539 | param->pv.i = self->qos_rx.baud_rate.bits; |
540 | IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n", | 540 | IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n", |
541 | __FUNCTION__, param->pv.i); | 541 | __FUNCTION__, param->pv.i); |
542 | } else { | 542 | } else { |
543 | /* | 543 | /* |
544 | * Stations must agree on baud rate, so calculate | 544 | * Stations must agree on baud rate, so calculate |
545 | * intersection | 545 | * intersection |
546 | */ | 546 | */ |
547 | IRDA_DEBUG(2, "Requested BAUD_RATE: 0x%04x\n", (__u16) param->pv.i); | 547 | IRDA_DEBUG(2, "Requested BAUD_RATE: 0x%04x\n", (__u16) param->pv.i); |
548 | final = (__u16) param->pv.i & self->qos_rx.baud_rate.bits; | 548 | final = (__u16) param->pv.i & self->qos_rx.baud_rate.bits; |
@@ -558,24 +558,24 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get) | |||
558 | /* | 558 | /* |
559 | * Function irlap_param_link_disconnect (instance, param, get) | 559 | * Function irlap_param_link_disconnect (instance, param, get) |
560 | * | 560 | * |
561 | * Negotiate link disconnect/threshold time. | 561 | * Negotiate link disconnect/threshold time. |
562 | * | 562 | * |
563 | */ | 563 | */ |
564 | static int irlap_param_link_disconnect(void *instance, irda_param_t *param, | 564 | static int irlap_param_link_disconnect(void *instance, irda_param_t *param, |
565 | int get) | 565 | int get) |
566 | { | 566 | { |
567 | __u16 final; | 567 | __u16 final; |
568 | 568 | ||
569 | struct irlap_cb *self = (struct irlap_cb *) instance; | 569 | struct irlap_cb *self = (struct irlap_cb *) instance; |
570 | 570 | ||
571 | IRDA_ASSERT(self != NULL, return -1;); | 571 | IRDA_ASSERT(self != NULL, return -1;); |
572 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 572 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
573 | 573 | ||
574 | if (get) | 574 | if (get) |
575 | param->pv.i = self->qos_rx.link_disc_time.bits; | 575 | param->pv.i = self->qos_rx.link_disc_time.bits; |
576 | else { | 576 | else { |
577 | /* | 577 | /* |
578 | * Stations must agree on link disconnect/threshold | 578 | * Stations must agree on link disconnect/threshold |
579 | * time. | 579 | * time. |
580 | */ | 580 | */ |
581 | IRDA_DEBUG(2, "LINK_DISC: %02x\n", (__u8) param->pv.i); | 581 | IRDA_DEBUG(2, "LINK_DISC: %02x\n", (__u8) param->pv.i); |
@@ -595,14 +595,14 @@ static int irlap_param_link_disconnect(void *instance, irda_param_t *param, | |||
595 | * will be negotiated independently for each station | 595 | * will be negotiated independently for each station |
596 | * | 596 | * |
597 | */ | 597 | */ |
598 | static int irlap_param_max_turn_time(void *instance, irda_param_t *param, | 598 | static int irlap_param_max_turn_time(void *instance, irda_param_t *param, |
599 | int get) | 599 | int get) |
600 | { | 600 | { |
601 | struct irlap_cb *self = (struct irlap_cb *) instance; | 601 | struct irlap_cb *self = (struct irlap_cb *) instance; |
602 | 602 | ||
603 | IRDA_ASSERT(self != NULL, return -1;); | 603 | IRDA_ASSERT(self != NULL, return -1;); |
604 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 604 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
605 | 605 | ||
606 | if (get) | 606 | if (get) |
607 | param->pv.i = self->qos_rx.max_turn_time.bits; | 607 | param->pv.i = self->qos_rx.max_turn_time.bits; |
608 | else | 608 | else |
@@ -621,10 +621,10 @@ static int irlap_param_max_turn_time(void *instance, irda_param_t *param, | |||
621 | static int irlap_param_data_size(void *instance, irda_param_t *param, int get) | 621 | static int irlap_param_data_size(void *instance, irda_param_t *param, int get) |
622 | { | 622 | { |
623 | struct irlap_cb *self = (struct irlap_cb *) instance; | 623 | struct irlap_cb *self = (struct irlap_cb *) instance; |
624 | 624 | ||
625 | IRDA_ASSERT(self != NULL, return -1;); | 625 | IRDA_ASSERT(self != NULL, return -1;); |
626 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 626 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
627 | 627 | ||
628 | if (get) | 628 | if (get) |
629 | param->pv.i = self->qos_rx.data_size.bits; | 629 | param->pv.i = self->qos_rx.data_size.bits; |
630 | else | 630 | else |
@@ -640,14 +640,14 @@ static int irlap_param_data_size(void *instance, irda_param_t *param, int get) | |||
640 | * will be negotiated independently for each station | 640 | * will be negotiated independently for each station |
641 | * | 641 | * |
642 | */ | 642 | */ |
643 | static int irlap_param_window_size(void *instance, irda_param_t *param, | 643 | static int irlap_param_window_size(void *instance, irda_param_t *param, |
644 | int get) | 644 | int get) |
645 | { | 645 | { |
646 | struct irlap_cb *self = (struct irlap_cb *) instance; | 646 | struct irlap_cb *self = (struct irlap_cb *) instance; |
647 | 647 | ||
648 | IRDA_ASSERT(self != NULL, return -1;); | 648 | IRDA_ASSERT(self != NULL, return -1;); |
649 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 649 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
650 | 650 | ||
651 | if (get) | 651 | if (get) |
652 | param->pv.i = self->qos_rx.window_size.bits; | 652 | param->pv.i = self->qos_rx.window_size.bits; |
653 | else | 653 | else |
@@ -665,10 +665,10 @@ static int irlap_param_window_size(void *instance, irda_param_t *param, | |||
665 | static int irlap_param_additional_bofs(void *instance, irda_param_t *param, int get) | 665 | static int irlap_param_additional_bofs(void *instance, irda_param_t *param, int get) |
666 | { | 666 | { |
667 | struct irlap_cb *self = (struct irlap_cb *) instance; | 667 | struct irlap_cb *self = (struct irlap_cb *) instance; |
668 | 668 | ||
669 | IRDA_ASSERT(self != NULL, return -1;); | 669 | IRDA_ASSERT(self != NULL, return -1;); |
670 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 670 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
671 | 671 | ||
672 | if (get) | 672 | if (get) |
673 | param->pv.i = self->qos_rx.additional_bofs.bits; | 673 | param->pv.i = self->qos_rx.additional_bofs.bits; |
674 | else | 674 | else |
@@ -683,14 +683,14 @@ static int irlap_param_additional_bofs(void *instance, irda_param_t *param, int | |||
683 | * Negotiate the minimum turn around time. This is a type 1 parameter and | 683 | * Negotiate the minimum turn around time. This is a type 1 parameter and |
684 | * will be negotiated independently for each station | 684 | * will be negotiated independently for each station |
685 | */ | 685 | */ |
686 | static int irlap_param_min_turn_time(void *instance, irda_param_t *param, | 686 | static int irlap_param_min_turn_time(void *instance, irda_param_t *param, |
687 | int get) | 687 | int get) |
688 | { | 688 | { |
689 | struct irlap_cb *self = (struct irlap_cb *) instance; | 689 | struct irlap_cb *self = (struct irlap_cb *) instance; |
690 | 690 | ||
691 | IRDA_ASSERT(self != NULL, return -1;); | 691 | IRDA_ASSERT(self != NULL, return -1;); |
692 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 692 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
693 | 693 | ||
694 | if (get) | 694 | if (get) |
695 | param->pv.i = self->qos_rx.min_turn_time.bits; | 695 | param->pv.i = self->qos_rx.min_turn_time.bits; |
696 | else | 696 | else |
@@ -721,9 +721,9 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time) | |||
721 | 721 | ||
722 | line_capacity = max_line_capacities[i][j]; | 722 | line_capacity = max_line_capacities[i][j]; |
723 | 723 | ||
724 | IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n", | 724 | IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n", |
725 | __FUNCTION__, line_capacity); | 725 | __FUNCTION__, line_capacity); |
726 | 726 | ||
727 | return line_capacity; | 727 | return line_capacity; |
728 | } | 728 | } |
729 | 729 | ||
@@ -749,7 +749,7 @@ void irda_qos_bits_to_value(struct qos_info *qos) | |||
749 | int index; | 749 | int index; |
750 | 750 | ||
751 | IRDA_ASSERT(qos != NULL, return;); | 751 | IRDA_ASSERT(qos != NULL, return;); |
752 | 752 | ||
753 | index = msb_index(qos->baud_rate.bits); | 753 | index = msb_index(qos->baud_rate.bits); |
754 | qos->baud_rate.value = baud_rates[index]; | 754 | qos->baud_rate.value = baud_rates[index]; |
755 | 755 | ||
@@ -761,13 +761,13 @@ void irda_qos_bits_to_value(struct qos_info *qos) | |||
761 | 761 | ||
762 | index = msb_index(qos->min_turn_time.bits); | 762 | index = msb_index(qos->min_turn_time.bits); |
763 | qos->min_turn_time.value = min_turn_times[index]; | 763 | qos->min_turn_time.value = min_turn_times[index]; |
764 | 764 | ||
765 | index = msb_index(qos->max_turn_time.bits); | 765 | index = msb_index(qos->max_turn_time.bits); |
766 | qos->max_turn_time.value = max_turn_times[index]; | 766 | qos->max_turn_time.value = max_turn_times[index]; |
767 | 767 | ||
768 | index = msb_index(qos->link_disc_time.bits); | 768 | index = msb_index(qos->link_disc_time.bits); |
769 | qos->link_disc_time.value = link_disc_times[index]; | 769 | qos->link_disc_time.value = link_disc_times[index]; |
770 | 770 | ||
771 | index = msb_index(qos->additional_bofs.bits); | 771 | index = msb_index(qos->additional_bofs.bits); |
772 | qos->additional_bofs.value = add_bofs[index]; | 772 | qos->additional_bofs.value = add_bofs[index]; |
773 | } | 773 | } |