diff options
author | Joe Perches <joe@perches.com> | 2012-02-19 22:52:38 -0500 |
---|---|---|
committer | Joe Perches <joe@perches.com> | 2012-02-21 12:04:01 -0500 |
commit | 475be4d85a274d0961593db41cf85689db1d583c (patch) | |
tree | b2b8931eb747794730522c3cf1898e46948527b9 /drivers/isdn/gigaset | |
parent | 0b0a635f79f91f3755b6518627ea06dd0dbfd523 (diff) |
isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style.
Update the coding style used on a per-line basis
so that git diff -w shows only elided blank lines
at EOF.
Done with emacs and some scripts and some typing.
Built x86 allyesconfig.
No detected change in objdump -d or size.
Signed-off-by: Joe Perches <joe@perches.com>
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r-- | drivers/isdn/gigaset/asyncdata.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 42 | ||||
-rw-r--r-- | drivers/isdn/gigaset/capi.c | 228 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 14 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 328 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 30 | ||||
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 8 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 20 | ||||
-rw-r--r-- | drivers/isdn/gigaset/isocdata.c | 192 | ||||
-rw-r--r-- | drivers/isdn/gigaset/proc.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ser-gigaset.c | 6 | ||||
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 8 |
12 files changed, 442 insertions, 442 deletions
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c index fddae72e3f98..c90dca5abeac 100644 --- a/drivers/isdn/gigaset/asyncdata.c +++ b/drivers/isdn/gigaset/asyncdata.c | |||
@@ -214,7 +214,7 @@ byte_stuff: | |||
214 | } else if (fcs != PPP_GOODFCS) { | 214 | } else if (fcs != PPP_GOODFCS) { |
215 | /* frame check error */ | 215 | /* frame check error */ |
216 | dev_err(cs->dev, | 216 | dev_err(cs->dev, |
217 | "Checksum failed, %u bytes corrupted!\n", | 217 | "Checksum failed, %u bytes corrupted!\n", |
218 | skb->len); | 218 | skb->len); |
219 | gigaset_isdn_rcv_err(bcs); | 219 | gigaset_isdn_rcv_err(bcs); |
220 | dev_kfree_skb_any(skb); | 220 | dev_kfree_skb_any(skb); |
@@ -543,7 +543,7 @@ static struct sk_buff *iraw_encode(struct sk_buff *skb) | |||
543 | /* size of new buffer (worst case = every byte must be stuffed): | 543 | /* size of new buffer (worst case = every byte must be stuffed): |
544 | * 2 * original size + room for link layer header | 544 | * 2 * original size + room for link layer header |
545 | */ | 545 | */ |
546 | iraw_skb = dev_alloc_skb(2*skb->len + skb->mac_len); | 546 | iraw_skb = dev_alloc_skb(2 * skb->len + skb->mac_len); |
547 | if (!iraw_skb) { | 547 | if (!iraw_skb) { |
548 | dev_kfree_skb_any(skb); | 548 | dev_kfree_skb_any(skb); |
549 | return NULL; | 549 | return NULL; |
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 3913f47ef86d..afa080258bfa 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -410,10 +410,10 @@ static void check_pending(struct bas_cardstate *ucs) | |||
410 | if (!(ucs->basstate & BS_RESETTING)) | 410 | if (!(ucs->basstate & BS_RESETTING)) |
411 | ucs->pending = 0; | 411 | ucs->pending = 0; |
412 | break; | 412 | break; |
413 | /* | 413 | /* |
414 | * HD_READ_ATMESSAGE and HD_WRITE_ATMESSAGE are handled separately | 414 | * HD_READ_ATMESSAGE and HD_WRITE_ATMESSAGE are handled separately |
415 | * and should never end up here | 415 | * and should never end up here |
416 | */ | 416 | */ |
417 | default: | 417 | default: |
418 | dev_warn(&ucs->interface->dev, | 418 | dev_warn(&ucs->interface->dev, |
419 | "unknown pending request 0x%02x cleared\n", | 419 | "unknown pending request 0x%02x cleared\n", |
@@ -491,7 +491,7 @@ static void read_ctrl_callback(struct urb *urb) | |||
491 | numbytes = urb->actual_length; | 491 | numbytes = urb->actual_length; |
492 | if (unlikely(numbytes != ucs->rcvbuf_size)) { | 492 | if (unlikely(numbytes != ucs->rcvbuf_size)) { |
493 | dev_warn(cs->dev, | 493 | dev_warn(cs->dev, |
494 | "control read: received %d chars, expected %d\n", | 494 | "control read: received %d chars, expected %d\n", |
495 | numbytes, ucs->rcvbuf_size); | 495 | numbytes, ucs->rcvbuf_size); |
496 | if (numbytes > ucs->rcvbuf_size) | 496 | if (numbytes > ucs->rcvbuf_size) |
497 | numbytes = ucs->rcvbuf_size; | 497 | numbytes = ucs->rcvbuf_size; |
@@ -710,7 +710,7 @@ static void read_int_callback(struct urb *urb) | |||
710 | } | 710 | } |
711 | 711 | ||
712 | l = (unsigned) ucs->int_in_buf[1] + | 712 | l = (unsigned) ucs->int_in_buf[1] + |
713 | (((unsigned) ucs->int_in_buf[2]) << 8); | 713 | (((unsigned) ucs->int_in_buf[2]) << 8); |
714 | 714 | ||
715 | gig_dbg(DEBUG_USBREQ, "<-------%d: 0x%02x (%u [0x%02x 0x%02x])", | 715 | gig_dbg(DEBUG_USBREQ, "<-------%d: 0x%02x (%u [0x%02x 0x%02x])", |
716 | urb->actual_length, (int)ucs->int_in_buf[0], l, | 716 | urb->actual_length, (int)ucs->int_in_buf[0], l, |
@@ -770,14 +770,14 @@ static void read_int_callback(struct urb *urb) | |||
770 | case HD_RECEIVEATDATA_ACK: /* AT response ready to be received */ | 770 | case HD_RECEIVEATDATA_ACK: /* AT response ready to be received */ |
771 | if (!l) { | 771 | if (!l) { |
772 | dev_warn(cs->dev, | 772 | dev_warn(cs->dev, |
773 | "HD_RECEIVEATDATA_ACK with length 0 ignored\n"); | 773 | "HD_RECEIVEATDATA_ACK with length 0 ignored\n"); |
774 | break; | 774 | break; |
775 | } | 775 | } |
776 | spin_lock_irqsave(&cs->lock, flags); | 776 | spin_lock_irqsave(&cs->lock, flags); |
777 | if (ucs->basstate & BS_ATRDPEND) { | 777 | if (ucs->basstate & BS_ATRDPEND) { |
778 | spin_unlock_irqrestore(&cs->lock, flags); | 778 | spin_unlock_irqrestore(&cs->lock, flags); |
779 | dev_warn(cs->dev, | 779 | dev_warn(cs->dev, |
780 | "HD_RECEIVEATDATA_ACK(%d) during HD_READ_ATMESSAGE(%d) ignored\n", | 780 | "HD_RECEIVEATDATA_ACK(%d) during HD_READ_ATMESSAGE(%d) ignored\n", |
781 | l, ucs->rcvbuf_size); | 781 | l, ucs->rcvbuf_size); |
782 | break; | 782 | break; |
783 | } | 783 | } |
@@ -878,7 +878,7 @@ static void read_iso_callback(struct urb *urb) | |||
878 | ubc->isoinlost += urb->iso_frame_desc[i].actual_length; | 878 | ubc->isoinlost += urb->iso_frame_desc[i].actual_length; |
879 | if (unlikely(urb->iso_frame_desc[i].status != 0 && | 879 | if (unlikely(urb->iso_frame_desc[i].status != 0 && |
880 | urb->iso_frame_desc[i].status != | 880 | urb->iso_frame_desc[i].status != |
881 | -EINPROGRESS)) | 881 | -EINPROGRESS)) |
882 | ubc->loststatus = urb->iso_frame_desc[i].status; | 882 | ubc->loststatus = urb->iso_frame_desc[i].status; |
883 | urb->iso_frame_desc[i].status = 0; | 883 | urb->iso_frame_desc[i].status = 0; |
884 | urb->iso_frame_desc[i].actual_length = 0; | 884 | urb->iso_frame_desc[i].actual_length = 0; |
@@ -891,7 +891,7 @@ static void read_iso_callback(struct urb *urb) | |||
891 | rc = usb_submit_urb(urb, GFP_ATOMIC); | 891 | rc = usb_submit_urb(urb, GFP_ATOMIC); |
892 | if (unlikely(rc != 0 && rc != -ENODEV)) { | 892 | if (unlikely(rc != 0 && rc != -ENODEV)) { |
893 | dev_err(bcs->cs->dev, | 893 | dev_err(bcs->cs->dev, |
894 | "could not resubmit isoc read URB: %s\n", | 894 | "could not resubmit isoc read URB: %s\n", |
895 | get_usb_rcmsg(rc)); | 895 | get_usb_rcmsg(rc)); |
896 | dump_urb(DEBUG_ISO, "isoc read", urb); | 896 | dump_urb(DEBUG_ISO, "isoc read", urb); |
897 | error_hangup(bcs); | 897 | error_hangup(bcs); |
@@ -1017,17 +1017,17 @@ static int starturbs(struct bc_state *bcs) | |||
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | /* keep one URB free, submit the others */ | 1019 | /* keep one URB free, submit the others */ |
1020 | for (k = 0; k < BAS_OUTURBS-1; ++k) { | 1020 | for (k = 0; k < BAS_OUTURBS - 1; ++k) { |
1021 | dump_urb(DEBUG_ISO, "Initial isoc write", urb); | 1021 | dump_urb(DEBUG_ISO, "Initial isoc write", urb); |
1022 | rc = usb_submit_urb(ubc->isoouturbs[k].urb, GFP_ATOMIC); | 1022 | rc = usb_submit_urb(ubc->isoouturbs[k].urb, GFP_ATOMIC); |
1023 | if (rc != 0) | 1023 | if (rc != 0) |
1024 | goto error; | 1024 | goto error; |
1025 | } | 1025 | } |
1026 | dump_urb(DEBUG_ISO, "Initial isoc write (free)", urb); | 1026 | dump_urb(DEBUG_ISO, "Initial isoc write (free)", urb); |
1027 | ubc->isooutfree = &ubc->isoouturbs[BAS_OUTURBS-1]; | 1027 | ubc->isooutfree = &ubc->isoouturbs[BAS_OUTURBS - 1]; |
1028 | ubc->isooutdone = ubc->isooutovfl = NULL; | 1028 | ubc->isooutdone = ubc->isooutovfl = NULL; |
1029 | return 0; | 1029 | return 0; |
1030 | error: | 1030 | error: |
1031 | stopurbs(ubc); | 1031 | stopurbs(ubc); |
1032 | return rc; | 1032 | return rc; |
1033 | } | 1033 | } |
@@ -1229,7 +1229,7 @@ static void write_iso_tasklet(unsigned long data) | |||
1229 | if (ifd->status || | 1229 | if (ifd->status || |
1230 | ifd->actual_length != ifd->length) { | 1230 | ifd->actual_length != ifd->length) { |
1231 | dev_warn(cs->dev, | 1231 | dev_warn(cs->dev, |
1232 | "isoc write: frame %d[%d/%d]: %s\n", | 1232 | "isoc write: frame %d[%d/%d]: %s\n", |
1233 | i, ifd->actual_length, | 1233 | i, ifd->actual_length, |
1234 | ifd->length, | 1234 | ifd->length, |
1235 | get_usb_statmsg(ifd->status)); | 1235 | get_usb_statmsg(ifd->status)); |
@@ -1316,7 +1316,7 @@ static void read_iso_tasklet(unsigned long data) | |||
1316 | ubc->isoindone = NULL; | 1316 | ubc->isoindone = NULL; |
1317 | if (unlikely(ubc->loststatus != -EINPROGRESS)) { | 1317 | if (unlikely(ubc->loststatus != -EINPROGRESS)) { |
1318 | dev_warn(cs->dev, | 1318 | dev_warn(cs->dev, |
1319 | "isoc read overrun, URB dropped (status: %s, %d bytes)\n", | 1319 | "isoc read overrun, URB dropped (status: %s, %d bytes)\n", |
1320 | get_usb_statmsg(ubc->loststatus), | 1320 | get_usb_statmsg(ubc->loststatus), |
1321 | ubc->isoinlost); | 1321 | ubc->isoinlost); |
1322 | ubc->loststatus = -EINPROGRESS; | 1322 | ubc->loststatus = -EINPROGRESS; |
@@ -1965,7 +1965,7 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb) | |||
1965 | int rc; | 1965 | int rc; |
1966 | 1966 | ||
1967 | gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? | 1967 | gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? |
1968 | DEBUG_TRANSCMD : DEBUG_LOCKCMD, | 1968 | DEBUG_TRANSCMD : DEBUG_LOCKCMD, |
1969 | "CMD Transmit", cb->len, cb->buf); | 1969 | "CMD Transmit", cb->len, cb->buf); |
1970 | 1970 | ||
1971 | /* translate "+++" escape sequence sent as a single separate command | 1971 | /* translate "+++" escape sequence sent as a single separate command |
@@ -2453,13 +2453,13 @@ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message) | |||
2453 | 2453 | ||
2454 | /* wait a bit for blocking conditions to go away */ | 2454 | /* wait a bit for blocking conditions to go away */ |
2455 | rc = wait_event_timeout(ucs->waitqueue, | 2455 | rc = wait_event_timeout(ucs->waitqueue, |
2456 | !(ucs->basstate & | 2456 | !(ucs->basstate & |
2457 | (BS_B1OPEN|BS_B2OPEN|BS_ATRDPEND|BS_ATWRPEND)), | 2457 | (BS_B1OPEN | BS_B2OPEN | BS_ATRDPEND | BS_ATWRPEND)), |
2458 | BAS_TIMEOUT*HZ/10); | 2458 | BAS_TIMEOUT * HZ / 10); |
2459 | gig_dbg(DEBUG_SUSPEND, "wait_event_timeout() -> %d", rc); | 2459 | gig_dbg(DEBUG_SUSPEND, "wait_event_timeout() -> %d", rc); |
2460 | 2460 | ||
2461 | /* check for conditions preventing suspend */ | 2461 | /* check for conditions preventing suspend */ |
2462 | if (ucs->basstate & (BS_B1OPEN|BS_B2OPEN|BS_ATRDPEND|BS_ATWRPEND)) { | 2462 | if (ucs->basstate & (BS_B1OPEN | BS_B2OPEN | BS_ATRDPEND | BS_ATWRPEND)) { |
2463 | dev_warn(cs->dev, "cannot suspend:\n"); | 2463 | dev_warn(cs->dev, "cannot suspend:\n"); |
2464 | if (ucs->basstate & BS_B1OPEN) | 2464 | if (ucs->basstate & BS_B1OPEN) |
2465 | dev_warn(cs->dev, " B channel 1 open\n"); | 2465 | dev_warn(cs->dev, " B channel 1 open\n"); |
@@ -2482,7 +2482,7 @@ static int gigaset_suspend(struct usb_interface *intf, pm_message_t message) | |||
2482 | return rc; | 2482 | return rc; |
2483 | } | 2483 | } |
2484 | wait_event_timeout(ucs->waitqueue, !ucs->pending, | 2484 | wait_event_timeout(ucs->waitqueue, !ucs->pending, |
2485 | BAS_TIMEOUT*HZ/10); | 2485 | BAS_TIMEOUT * HZ / 10); |
2486 | /* in case of timeout, proceed anyway */ | 2486 | /* in case of timeout, proceed anyway */ |
2487 | } | 2487 | } |
2488 | 2488 | ||
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index 6d5ceeece9f2..343b5c80cb7b 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c | |||
@@ -26,17 +26,17 @@ | |||
26 | #define CapiFacilitySpecificFunctionNotSupported 0x3011 | 26 | #define CapiFacilitySpecificFunctionNotSupported 0x3011 |
27 | 27 | ||
28 | /* missing from capicmd.h */ | 28 | /* missing from capicmd.h */ |
29 | #define CAPI_CONNECT_IND_BASELEN (CAPI_MSG_BASELEN+4+2+8*1) | 29 | #define CAPI_CONNECT_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 2 + 8 * 1) |
30 | #define CAPI_CONNECT_ACTIVE_IND_BASELEN (CAPI_MSG_BASELEN+4+3*1) | 30 | #define CAPI_CONNECT_ACTIVE_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 3 * 1) |
31 | #define CAPI_CONNECT_B3_IND_BASELEN (CAPI_MSG_BASELEN+4+1) | 31 | #define CAPI_CONNECT_B3_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 1) |
32 | #define CAPI_CONNECT_B3_ACTIVE_IND_BASELEN (CAPI_MSG_BASELEN+4+1) | 32 | #define CAPI_CONNECT_B3_ACTIVE_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 1) |
33 | #define CAPI_DATA_B3_REQ_LEN64 (CAPI_MSG_BASELEN+4+4+2+2+2+8) | 33 | #define CAPI_DATA_B3_REQ_LEN64 (CAPI_MSG_BASELEN + 4 + 4 + 2 + 2 + 2 + 8) |
34 | #define CAPI_DATA_B3_CONF_LEN (CAPI_MSG_BASELEN+4+2+2) | 34 | #define CAPI_DATA_B3_CONF_LEN (CAPI_MSG_BASELEN + 4 + 2 + 2) |
35 | #define CAPI_DISCONNECT_IND_LEN (CAPI_MSG_BASELEN+4+2) | 35 | #define CAPI_DISCONNECT_IND_LEN (CAPI_MSG_BASELEN + 4 + 2) |
36 | #define CAPI_DISCONNECT_B3_IND_BASELEN (CAPI_MSG_BASELEN+4+2+1) | 36 | #define CAPI_DISCONNECT_B3_IND_BASELEN (CAPI_MSG_BASELEN + 4 + 2 + 1) |
37 | #define CAPI_FACILITY_CONF_BASELEN (CAPI_MSG_BASELEN+4+2+2+1) | 37 | #define CAPI_FACILITY_CONF_BASELEN (CAPI_MSG_BASELEN + 4 + 2 + 2 + 1) |
38 | /* most _CONF messages contain only Controller/PLCI/NCCI and Info parameters */ | 38 | /* most _CONF messages contain only Controller/PLCI/NCCI and Info parameters */ |
39 | #define CAPI_STDCONF_LEN (CAPI_MSG_BASELEN+4+2) | 39 | #define CAPI_STDCONF_LEN (CAPI_MSG_BASELEN + 4 + 2) |
40 | 40 | ||
41 | #define CAPI_FACILITY_HANDSET 0x0000 | 41 | #define CAPI_FACILITY_HANDSET 0x0000 |
42 | #define CAPI_FACILITY_DTMF 0x0001 | 42 | #define CAPI_FACILITY_DTMF 0x0001 |
@@ -97,10 +97,10 @@ struct gigaset_capi_ctr { | |||
97 | /* two _cmsg structures possibly used concurrently: */ | 97 | /* two _cmsg structures possibly used concurrently: */ |
98 | _cmsg hcmsg; /* for message composition triggered from hardware */ | 98 | _cmsg hcmsg; /* for message composition triggered from hardware */ |
99 | _cmsg acmsg; /* for dissection of messages sent from application */ | 99 | _cmsg acmsg; /* for dissection of messages sent from application */ |
100 | u8 bc_buf[MAX_BC_OCTETS+1]; | 100 | u8 bc_buf[MAX_BC_OCTETS + 1]; |
101 | u8 hlc_buf[MAX_HLC_OCTETS+1]; | 101 | u8 hlc_buf[MAX_HLC_OCTETS + 1]; |
102 | u8 cgpty_buf[MAX_NUMBER_DIGITS+3]; | 102 | u8 cgpty_buf[MAX_NUMBER_DIGITS + 3]; |
103 | u8 cdpty_buf[MAX_NUMBER_DIGITS+2]; | 103 | u8 cdpty_buf[MAX_NUMBER_DIGITS + 2]; |
104 | }; | 104 | }; |
105 | 105 | ||
106 | /* CIP Value table (from CAPI 2.0 standard, ch. 6.1) */ | 106 | /* CIP Value table (from CAPI 2.0 standard, ch. 6.1) */ |
@@ -109,50 +109,50 @@ static struct { | |||
109 | u8 *hlc; | 109 | u8 *hlc; |
110 | } cip2bchlc[] = { | 110 | } cip2bchlc[] = { |
111 | [1] = { "8090A3", NULL }, | 111 | [1] = { "8090A3", NULL }, |
112 | /* Speech (A-law) */ | 112 | /* Speech (A-law) */ |
113 | [2] = { "8890", NULL }, | 113 | [2] = { "8890", NULL }, |
114 | /* Unrestricted digital information */ | 114 | /* Unrestricted digital information */ |
115 | [3] = { "8990", NULL }, | 115 | [3] = { "8990", NULL }, |
116 | /* Restricted digital information */ | 116 | /* Restricted digital information */ |
117 | [4] = { "9090A3", NULL }, | 117 | [4] = { "9090A3", NULL }, |
118 | /* 3,1 kHz audio (A-law) */ | 118 | /* 3,1 kHz audio (A-law) */ |
119 | [5] = { "9190", NULL }, | 119 | [5] = { "9190", NULL }, |
120 | /* 7 kHz audio */ | 120 | /* 7 kHz audio */ |
121 | [6] = { "9890", NULL }, | 121 | [6] = { "9890", NULL }, |
122 | /* Video */ | 122 | /* Video */ |
123 | [7] = { "88C0C6E6", NULL }, | 123 | [7] = { "88C0C6E6", NULL }, |
124 | /* Packet mode */ | 124 | /* Packet mode */ |
125 | [8] = { "8890218F", NULL }, | 125 | [8] = { "8890218F", NULL }, |
126 | /* 56 kbit/s rate adaptation */ | 126 | /* 56 kbit/s rate adaptation */ |
127 | [9] = { "9190A5", NULL }, | 127 | [9] = { "9190A5", NULL }, |
128 | /* Unrestricted digital information with tones/announcements */ | 128 | /* Unrestricted digital information with tones/announcements */ |
129 | [16] = { "8090A3", "9181" }, | 129 | [16] = { "8090A3", "9181" }, |
130 | /* Telephony */ | 130 | /* Telephony */ |
131 | [17] = { "9090A3", "9184" }, | 131 | [17] = { "9090A3", "9184" }, |
132 | /* Group 2/3 facsimile */ | 132 | /* Group 2/3 facsimile */ |
133 | [18] = { "8890", "91A1" }, | 133 | [18] = { "8890", "91A1" }, |
134 | /* Group 4 facsimile Class 1 */ | 134 | /* Group 4 facsimile Class 1 */ |
135 | [19] = { "8890", "91A4" }, | 135 | [19] = { "8890", "91A4" }, |
136 | /* Teletex service basic and mixed mode | 136 | /* Teletex service basic and mixed mode |
137 | and Group 4 facsimile service Classes II and III */ | 137 | and Group 4 facsimile service Classes II and III */ |
138 | [20] = { "8890", "91A8" }, | 138 | [20] = { "8890", "91A8" }, |
139 | /* Teletex service basic and processable mode */ | 139 | /* Teletex service basic and processable mode */ |
140 | [21] = { "8890", "91B1" }, | 140 | [21] = { "8890", "91B1" }, |
141 | /* Teletex service basic mode */ | 141 | /* Teletex service basic mode */ |
142 | [22] = { "8890", "91B2" }, | 142 | [22] = { "8890", "91B2" }, |
143 | /* International interworking for Videotex */ | 143 | /* International interworking for Videotex */ |
144 | [23] = { "8890", "91B5" }, | 144 | [23] = { "8890", "91B5" }, |
145 | /* Telex */ | 145 | /* Telex */ |
146 | [24] = { "8890", "91B8" }, | 146 | [24] = { "8890", "91B8" }, |
147 | /* Message Handling Systems in accordance with X.400 */ | 147 | /* Message Handling Systems in accordance with X.400 */ |
148 | [25] = { "8890", "91C1" }, | 148 | [25] = { "8890", "91C1" }, |
149 | /* OSI application in accordance with X.200 */ | 149 | /* OSI application in accordance with X.200 */ |
150 | [26] = { "9190A5", "9181" }, | 150 | [26] = { "9190A5", "9181" }, |
151 | /* 7 kHz telephony */ | 151 | /* 7 kHz telephony */ |
152 | [27] = { "9190A5", "916001" }, | 152 | [27] = { "9190A5", "916001" }, |
153 | /* Video telephony, first connection */ | 153 | /* Video telephony, first connection */ |
154 | [28] = { "8890", "916002" }, | 154 | [28] = { "8890", "916002" }, |
155 | /* Video telephony, second connection */ | 155 | /* Video telephony, second connection */ |
156 | }; | 156 | }; |
157 | 157 | ||
158 | /* | 158 | /* |
@@ -164,7 +164,7 @@ static struct { | |||
164 | * emit unsupported parameter warning | 164 | * emit unsupported parameter warning |
165 | */ | 165 | */ |
166 | static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param, | 166 | static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param, |
167 | char *msgname, char *paramname) | 167 | char *msgname, char *paramname) |
168 | { | 168 | { |
169 | if (param && *param) | 169 | if (param && *param) |
170 | dev_warn(cs->dev, "%s: ignoring unsupported parameter: %s\n", | 170 | dev_warn(cs->dev, "%s: ignoring unsupported parameter: %s\n", |
@@ -259,15 +259,15 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag, | |||
259 | CAPIMSG_APPID(data), CAPIMSG_MSGID(data), l, | 259 | CAPIMSG_APPID(data), CAPIMSG_MSGID(data), l, |
260 | CAPIMSG_CONTROL(data)); | 260 | CAPIMSG_CONTROL(data)); |
261 | l -= 12; | 261 | l -= 12; |
262 | dbgline = kmalloc(3*l, GFP_ATOMIC); | 262 | dbgline = kmalloc(3 * l, GFP_ATOMIC); |
263 | if (!dbgline) | 263 | if (!dbgline) |
264 | return; | 264 | return; |
265 | for (i = 0; i < l; i++) { | 265 | for (i = 0; i < l; i++) { |
266 | dbgline[3*i] = hex_asc_hi(data[12+i]); | 266 | dbgline[3 * i] = hex_asc_hi(data[12 + i]); |
267 | dbgline[3*i+1] = hex_asc_lo(data[12+i]); | 267 | dbgline[3 * i + 1] = hex_asc_lo(data[12 + i]); |
268 | dbgline[3*i+2] = ' '; | 268 | dbgline[3 * i + 2] = ' '; |
269 | } | 269 | } |
270 | dbgline[3*l-1] = '\0'; | 270 | dbgline[3 * l - 1] = '\0'; |
271 | gig_dbg(level, " %s", dbgline); | 271 | gig_dbg(level, " %s", dbgline); |
272 | kfree(dbgline); | 272 | kfree(dbgline); |
273 | if (CAPIMSG_COMMAND(data) == CAPI_DATA_B3 && | 273 | if (CAPIMSG_COMMAND(data) == CAPI_DATA_B3 && |
@@ -279,16 +279,16 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag, | |||
279 | return; | 279 | return; |
280 | if (l > 64) | 280 | if (l > 64) |
281 | l = 64; /* arbitrary limit */ | 281 | l = 64; /* arbitrary limit */ |
282 | dbgline = kmalloc(3*l, GFP_ATOMIC); | 282 | dbgline = kmalloc(3 * l, GFP_ATOMIC); |
283 | if (!dbgline) | 283 | if (!dbgline) |
284 | return; | 284 | return; |
285 | data += CAPIMSG_LEN(data); | 285 | data += CAPIMSG_LEN(data); |
286 | for (i = 0; i < l; i++) { | 286 | for (i = 0; i < l; i++) { |
287 | dbgline[3*i] = hex_asc_hi(data[i]); | 287 | dbgline[3 * i] = hex_asc_hi(data[i]); |
288 | dbgline[3*i+1] = hex_asc_lo(data[i]); | 288 | dbgline[3 * i + 1] = hex_asc_lo(data[i]); |
289 | dbgline[3*i+2] = ' '; | 289 | dbgline[3 * i + 2] = ' '; |
290 | } | 290 | } |
291 | dbgline[3*l-1] = '\0'; | 291 | dbgline[3 * l - 1] = '\0'; |
292 | gig_dbg(level, " %s", dbgline); | 292 | gig_dbg(level, " %s", dbgline); |
293 | kfree(dbgline); | 293 | kfree(dbgline); |
294 | } | 294 | } |
@@ -301,7 +301,7 @@ static inline void dump_rawmsg(enum debuglevel level, const char *tag, | |||
301 | 301 | ||
302 | static const char *format_ie(const char *ie) | 302 | static const char *format_ie(const char *ie) |
303 | { | 303 | { |
304 | static char result[3*MAX_FMT_IE_LEN]; | 304 | static char result[3 * MAX_FMT_IE_LEN]; |
305 | int len, count; | 305 | int len, count; |
306 | char *pout = result; | 306 | char *pout = result; |
307 | 307 | ||
@@ -310,7 +310,7 @@ static const char *format_ie(const char *ie) | |||
310 | 310 | ||
311 | count = len = ie[0]; | 311 | count = len = ie[0]; |
312 | if (count > MAX_FMT_IE_LEN) | 312 | if (count > MAX_FMT_IE_LEN) |
313 | count = MAX_FMT_IE_LEN-1; | 313 | count = MAX_FMT_IE_LEN - 1; |
314 | while (count--) { | 314 | while (count--) { |
315 | *pout++ = hex_asc_hi(*++ie); | 315 | *pout++ = hex_asc_hi(*++ie); |
316 | *pout++ = hex_asc_lo(*ie); | 316 | *pout++ = hex_asc_lo(*ie); |
@@ -403,8 +403,8 @@ void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *dskb) | |||
403 | send_data_b3_conf(cs, &iif->ctr, ap->id, CAPIMSG_MSGID(req), | 403 | send_data_b3_conf(cs, &iif->ctr, ap->id, CAPIMSG_MSGID(req), |
404 | bcs->channel + 1, CAPIMSG_HANDLE_REQ(req), | 404 | bcs->channel + 1, CAPIMSG_HANDLE_REQ(req), |
405 | (flags & ~CAPI_FLAGS_DELIVERY_CONFIRMATION) ? | 405 | (flags & ~CAPI_FLAGS_DELIVERY_CONFIRMATION) ? |
406 | CapiFlagsNotSupportedByProtocol : | 406 | CapiFlagsNotSupportedByProtocol : |
407 | CAPI_NOERROR); | 407 | CAPI_NOERROR); |
408 | } | 408 | } |
409 | EXPORT_SYMBOL_GPL(gigaset_skb_sent); | 409 | EXPORT_SYMBOL_GPL(gigaset_skb_sent); |
410 | 410 | ||
@@ -589,7 +589,7 @@ int gigaset_isdn_icall(struct at_state_t *at_state) | |||
589 | } | 589 | } |
590 | iif->cdpty_buf[0] = i + 1; | 590 | iif->cdpty_buf[0] = i + 1; |
591 | iif->cdpty_buf[1] = 0x80; /* type / numbering plan unknown */ | 591 | iif->cdpty_buf[1] = 0x80; /* type / numbering plan unknown */ |
592 | memcpy(iif->cdpty_buf+2, at_state->str_var[STR_ZCPN], i); | 592 | memcpy(iif->cdpty_buf + 2, at_state->str_var[STR_ZCPN], i); |
593 | iif->hcmsg.CalledPartyNumber = iif->cdpty_buf; | 593 | iif->hcmsg.CalledPartyNumber = iif->cdpty_buf; |
594 | msgsize += iif->hcmsg.CalledPartyNumber[0]; | 594 | msgsize += iif->hcmsg.CalledPartyNumber[0]; |
595 | } | 595 | } |
@@ -605,7 +605,7 @@ int gigaset_isdn_icall(struct at_state_t *at_state) | |||
605 | iif->cgpty_buf[0] = i + 2; | 605 | iif->cgpty_buf[0] = i + 2; |
606 | iif->cgpty_buf[1] = 0x00; /* type / numbering plan unknown */ | 606 | iif->cgpty_buf[1] = 0x00; /* type / numbering plan unknown */ |
607 | iif->cgpty_buf[2] = 0x80; /* pres. allowed, not screened */ | 607 | iif->cgpty_buf[2] = 0x80; /* pres. allowed, not screened */ |
608 | memcpy(iif->cgpty_buf+3, at_state->str_var[STR_NMBR], i); | 608 | memcpy(iif->cgpty_buf + 3, at_state->str_var[STR_NMBR], i); |
609 | iif->hcmsg.CallingPartyNumber = iif->cgpty_buf; | 609 | iif->hcmsg.CallingPartyNumber = iif->cgpty_buf; |
610 | msgsize += iif->hcmsg.CallingPartyNumber[0]; | 610 | msgsize += iif->hcmsg.CallingPartyNumber[0]; |
611 | } | 611 | } |
@@ -977,7 +977,7 @@ void gigaset_isdn_stop(struct cardstate *cs) | |||
977 | * register CAPI application | 977 | * register CAPI application |
978 | */ | 978 | */ |
979 | static void gigaset_register_appl(struct capi_ctr *ctr, u16 appl, | 979 | static void gigaset_register_appl(struct capi_ctr *ctr, u16 appl, |
980 | capi_register_params *rp) | 980 | capi_register_params *rp) |
981 | { | 981 | { |
982 | struct gigaset_capi_ctr *iif | 982 | struct gigaset_capi_ctr *iif |
983 | = container_of(ctr, struct gigaset_capi_ctr, ctr); | 983 | = container_of(ctr, struct gigaset_capi_ctr, ctr); |
@@ -1181,21 +1181,21 @@ static void do_facility_req(struct gigaset_capi_ctr *iif, | |||
1181 | } | 1181 | } |
1182 | if (CAPIMSG_U32(pparam, 4) != 0) { | 1182 | if (CAPIMSG_U32(pparam, 4) != 0) { |
1183 | dev_notice(cs->dev, | 1183 | dev_notice(cs->dev, |
1184 | "%s: unsupported supplementary service notification mask 0x%x\n", | 1184 | "%s: unsupported supplementary service notification mask 0x%x\n", |
1185 | "FACILITY_REQ", CAPIMSG_U32(pparam, 4)); | 1185 | "FACILITY_REQ", CAPIMSG_U32(pparam, 4)); |
1186 | info = CapiFacilitySpecificFunctionNotSupported; | 1186 | info = CapiFacilitySpecificFunctionNotSupported; |
1187 | confparam[3] = 2; /* length */ | 1187 | confparam[3] = 2; /* length */ |
1188 | capimsg_setu16(confparam, 4, | 1188 | capimsg_setu16(confparam, 4, |
1189 | CapiSupplementaryServiceNotSupported); | 1189 | CapiSupplementaryServiceNotSupported); |
1190 | } | 1190 | } |
1191 | info = CapiSuccess; | 1191 | info = CapiSuccess; |
1192 | confparam[3] = 2; /* length */ | 1192 | confparam[3] = 2; /* length */ |
1193 | capimsg_setu16(confparam, 4, CapiSuccess); | 1193 | capimsg_setu16(confparam, 4, CapiSuccess); |
1194 | break; | 1194 | break; |
1195 | /* ToDo: add supported services */ | 1195 | /* ToDo: add supported services */ |
1196 | default: | 1196 | default: |
1197 | dev_notice(cs->dev, | 1197 | dev_notice(cs->dev, |
1198 | "%s: unsupported supplementary service function 0x%04x\n", | 1198 | "%s: unsupported supplementary service function 0x%04x\n", |
1199 | "FACILITY_REQ", function); | 1199 | "FACILITY_REQ", function); |
1200 | info = CapiFacilitySpecificFunctionNotSupported; | 1200 | info = CapiFacilitySpecificFunctionNotSupported; |
1201 | /* Supplementary Service specific parameter */ | 1201 | /* Supplementary Service specific parameter */ |
@@ -1318,7 +1318,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, | |||
1318 | cmsg->adr.adrPLCI |= (bcs->channel + 1) << 8; | 1318 | cmsg->adr.adrPLCI |= (bcs->channel + 1) << 8; |
1319 | 1319 | ||
1320 | /* build command table */ | 1320 | /* build command table */ |
1321 | commands = kzalloc(AT_NUM*(sizeof *commands), GFP_KERNEL); | 1321 | commands = kzalloc(AT_NUM * (sizeof *commands), GFP_KERNEL); |
1322 | if (!commands) | 1322 | if (!commands) |
1323 | goto oom; | 1323 | goto oom; |
1324 | 1324 | ||
@@ -1353,10 +1353,10 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, | |||
1353 | commands[AT_TYPE] = kstrdup(s, GFP_KERNEL); | 1353 | commands[AT_TYPE] = kstrdup(s, GFP_KERNEL); |
1354 | if (!commands[AT_TYPE]) | 1354 | if (!commands[AT_TYPE]) |
1355 | goto oom; | 1355 | goto oom; |
1356 | commands[AT_DIAL] = kmalloc(l+3, GFP_KERNEL); | 1356 | commands[AT_DIAL] = kmalloc(l + 3, GFP_KERNEL); |
1357 | if (!commands[AT_DIAL]) | 1357 | if (!commands[AT_DIAL]) |
1358 | goto oom; | 1358 | goto oom; |
1359 | snprintf(commands[AT_DIAL], l+3, "D%.*s\r", l, pp); | 1359 | snprintf(commands[AT_DIAL], l + 3, "D%.*s\r", l, pp); |
1360 | 1360 | ||
1361 | /* encode parameter: Calling party number */ | 1361 | /* encode parameter: Calling party number */ |
1362 | pp = cmsg->CallingPartyNumber; | 1362 | pp = cmsg->CallingPartyNumber; |
@@ -1406,10 +1406,10 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, | |||
1406 | 1406 | ||
1407 | if (l) { | 1407 | if (l) { |
1408 | /* number */ | 1408 | /* number */ |
1409 | commands[AT_MSN] = kmalloc(l+8, GFP_KERNEL); | 1409 | commands[AT_MSN] = kmalloc(l + 8, GFP_KERNEL); |
1410 | if (!commands[AT_MSN]) | 1410 | if (!commands[AT_MSN]) |
1411 | goto oom; | 1411 | goto oom; |
1412 | snprintf(commands[AT_MSN], l+8, "^SMSN=%*s\r", l, pp); | 1412 | snprintf(commands[AT_MSN], l + 8, "^SMSN=%*s\r", l, pp); |
1413 | } | 1413 | } |
1414 | } | 1414 | } |
1415 | 1415 | ||
@@ -1430,13 +1430,13 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, | |||
1430 | 1430 | ||
1431 | /* determine lengths */ | 1431 | /* determine lengths */ |
1432 | if (cmsg->BC && cmsg->BC[0]) /* BC specified explicitly */ | 1432 | if (cmsg->BC && cmsg->BC[0]) /* BC specified explicitly */ |
1433 | lbc = 2*cmsg->BC[0]; | 1433 | lbc = 2 * cmsg->BC[0]; |
1434 | else if (cip2bchlc[cmsg->CIPValue].bc) /* BC derived from CIP */ | 1434 | else if (cip2bchlc[cmsg->CIPValue].bc) /* BC derived from CIP */ |
1435 | lbc = strlen(cip2bchlc[cmsg->CIPValue].bc); | 1435 | lbc = strlen(cip2bchlc[cmsg->CIPValue].bc); |
1436 | else /* no BC */ | 1436 | else /* no BC */ |
1437 | lbc = 0; | 1437 | lbc = 0; |
1438 | if (cmsg->HLC && cmsg->HLC[0]) /* HLC specified explicitly */ | 1438 | if (cmsg->HLC && cmsg->HLC[0]) /* HLC specified explicitly */ |
1439 | lhlc = 2*cmsg->HLC[0]; | 1439 | lhlc = 2 * cmsg->HLC[0]; |
1440 | else if (cip2bchlc[cmsg->CIPValue].hlc) /* HLC derived from CIP */ | 1440 | else if (cip2bchlc[cmsg->CIPValue].hlc) /* HLC derived from CIP */ |
1441 | lhlc = strlen(cip2bchlc[cmsg->CIPValue].hlc); | 1441 | lhlc = strlen(cip2bchlc[cmsg->CIPValue].hlc); |
1442 | else /* no HLC */ | 1442 | else /* no HLC */ |
@@ -1481,7 +1481,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, | |||
1481 | if (cmsg->BProtocol == CAPI_DEFAULT) { | 1481 | if (cmsg->BProtocol == CAPI_DEFAULT) { |
1482 | bcs->proto2 = L2_HDLC; | 1482 | bcs->proto2 = L2_HDLC; |
1483 | dev_warn(cs->dev, | 1483 | dev_warn(cs->dev, |
1484 | "B2 Protocol X.75 SLP unsupported, using Transparent\n"); | 1484 | "B2 Protocol X.75 SLP unsupported, using Transparent\n"); |
1485 | } else { | 1485 | } else { |
1486 | switch (cmsg->B1protocol) { | 1486 | switch (cmsg->B1protocol) { |
1487 | case 0: | 1487 | case 0: |
@@ -1492,24 +1492,24 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, | |||
1492 | break; | 1492 | break; |
1493 | default: | 1493 | default: |
1494 | dev_warn(cs->dev, | 1494 | dev_warn(cs->dev, |
1495 | "B1 Protocol %u unsupported, using Transparent\n", | 1495 | "B1 Protocol %u unsupported, using Transparent\n", |
1496 | cmsg->B1protocol); | 1496 | cmsg->B1protocol); |
1497 | bcs->proto2 = L2_VOICE; | 1497 | bcs->proto2 = L2_VOICE; |
1498 | } | 1498 | } |
1499 | if (cmsg->B2protocol != 1) | 1499 | if (cmsg->B2protocol != 1) |
1500 | dev_warn(cs->dev, | 1500 | dev_warn(cs->dev, |
1501 | "B2 Protocol %u unsupported, using Transparent\n", | 1501 | "B2 Protocol %u unsupported, using Transparent\n", |
1502 | cmsg->B2protocol); | 1502 | cmsg->B2protocol); |
1503 | if (cmsg->B3protocol != 0) | 1503 | if (cmsg->B3protocol != 0) |
1504 | dev_warn(cs->dev, | 1504 | dev_warn(cs->dev, |
1505 | "B3 Protocol %u unsupported, using Transparent\n", | 1505 | "B3 Protocol %u unsupported, using Transparent\n", |
1506 | cmsg->B3protocol); | 1506 | cmsg->B3protocol); |
1507 | ignore_cstruct_param(cs, cmsg->B1configuration, | 1507 | ignore_cstruct_param(cs, cmsg->B1configuration, |
1508 | "CONNECT_REQ", "B1 Configuration"); | 1508 | "CONNECT_REQ", "B1 Configuration"); |
1509 | ignore_cstruct_param(cs, cmsg->B2configuration, | 1509 | ignore_cstruct_param(cs, cmsg->B2configuration, |
1510 | "CONNECT_REQ", "B2 Configuration"); | 1510 | "CONNECT_REQ", "B2 Configuration"); |
1511 | ignore_cstruct_param(cs, cmsg->B3configuration, | 1511 | ignore_cstruct_param(cs, cmsg->B3configuration, |
1512 | "CONNECT_REQ", "B3 Configuration"); | 1512 | "CONNECT_REQ", "B3 Configuration"); |
1513 | } | 1513 | } |
1514 | commands[AT_PROTO] = kmalloc(9, GFP_KERNEL); | 1514 | commands[AT_PROTO] = kmalloc(9, GFP_KERNEL); |
1515 | if (!commands[AT_PROTO]) | 1515 | if (!commands[AT_PROTO]) |
@@ -1518,20 +1518,20 @@ static void do_connect_req(struct gigaset_capi_ctr *iif, | |||
1518 | 1518 | ||
1519 | /* ToDo: check/encode remaining parameters */ | 1519 | /* ToDo: check/encode remaining parameters */ |
1520 | ignore_cstruct_param(cs, cmsg->CalledPartySubaddress, | 1520 | ignore_cstruct_param(cs, cmsg->CalledPartySubaddress, |
1521 | "CONNECT_REQ", "Called pty subaddr"); | 1521 | "CONNECT_REQ", "Called pty subaddr"); |
1522 | ignore_cstruct_param(cs, cmsg->CallingPartySubaddress, | 1522 | ignore_cstruct_param(cs, cmsg->CallingPartySubaddress, |
1523 | "CONNECT_REQ", "Calling pty subaddr"); | 1523 | "CONNECT_REQ", "Calling pty subaddr"); |
1524 | ignore_cstruct_param(cs, cmsg->LLC, | 1524 | ignore_cstruct_param(cs, cmsg->LLC, |
1525 | "CONNECT_REQ", "LLC"); | 1525 | "CONNECT_REQ", "LLC"); |
1526 | if (cmsg->AdditionalInfo != CAPI_DEFAULT) { | 1526 | if (cmsg->AdditionalInfo != CAPI_DEFAULT) { |
1527 | ignore_cstruct_param(cs, cmsg->BChannelinformation, | 1527 | ignore_cstruct_param(cs, cmsg->BChannelinformation, |
1528 | "CONNECT_REQ", "B Channel Information"); | 1528 | "CONNECT_REQ", "B Channel Information"); |
1529 | ignore_cstruct_param(cs, cmsg->Keypadfacility, | 1529 | ignore_cstruct_param(cs, cmsg->Keypadfacility, |
1530 | "CONNECT_REQ", "Keypad Facility"); | 1530 | "CONNECT_REQ", "Keypad Facility"); |
1531 | ignore_cstruct_param(cs, cmsg->Useruserdata, | 1531 | ignore_cstruct_param(cs, cmsg->Useruserdata, |
1532 | "CONNECT_REQ", "User-User Data"); | 1532 | "CONNECT_REQ", "User-User Data"); |
1533 | ignore_cstruct_param(cs, cmsg->Facilitydataarray, | 1533 | ignore_cstruct_param(cs, cmsg->Facilitydataarray, |
1534 | "CONNECT_REQ", "Facility Data Array"); | 1534 | "CONNECT_REQ", "Facility Data Array"); |
1535 | } | 1535 | } |
1536 | 1536 | ||
1537 | /* encode parameter: B channel to use */ | 1537 | /* encode parameter: B channel to use */ |
@@ -1602,7 +1602,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, | |||
1602 | if (oap != ap) { | 1602 | if (oap != ap) { |
1603 | spin_unlock_irqrestore(&bcs->aplock, flags); | 1603 | spin_unlock_irqrestore(&bcs->aplock, flags); |
1604 | send_disconnect_ind(bcs, oap, | 1604 | send_disconnect_ind(bcs, oap, |
1605 | CapiCallGivenToOtherApplication); | 1605 | CapiCallGivenToOtherApplication); |
1606 | spin_lock_irqsave(&bcs->aplock, flags); | 1606 | spin_lock_irqsave(&bcs->aplock, flags); |
1607 | } | 1607 | } |
1608 | } | 1608 | } |
@@ -1619,7 +1619,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, | |||
1619 | if (cmsg->BProtocol == CAPI_DEFAULT) { | 1619 | if (cmsg->BProtocol == CAPI_DEFAULT) { |
1620 | bcs->proto2 = L2_HDLC; | 1620 | bcs->proto2 = L2_HDLC; |
1621 | dev_warn(cs->dev, | 1621 | dev_warn(cs->dev, |
1622 | "B2 Protocol X.75 SLP unsupported, using Transparent\n"); | 1622 | "B2 Protocol X.75 SLP unsupported, using Transparent\n"); |
1623 | } else { | 1623 | } else { |
1624 | switch (cmsg->B1protocol) { | 1624 | switch (cmsg->B1protocol) { |
1625 | case 0: | 1625 | case 0: |
@@ -1630,46 +1630,46 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, | |||
1630 | break; | 1630 | break; |
1631 | default: | 1631 | default: |
1632 | dev_warn(cs->dev, | 1632 | dev_warn(cs->dev, |
1633 | "B1 Protocol %u unsupported, using Transparent\n", | 1633 | "B1 Protocol %u unsupported, using Transparent\n", |
1634 | cmsg->B1protocol); | 1634 | cmsg->B1protocol); |
1635 | bcs->proto2 = L2_VOICE; | 1635 | bcs->proto2 = L2_VOICE; |
1636 | } | 1636 | } |
1637 | if (cmsg->B2protocol != 1) | 1637 | if (cmsg->B2protocol != 1) |
1638 | dev_warn(cs->dev, | 1638 | dev_warn(cs->dev, |
1639 | "B2 Protocol %u unsupported, using Transparent\n", | 1639 | "B2 Protocol %u unsupported, using Transparent\n", |
1640 | cmsg->B2protocol); | 1640 | cmsg->B2protocol); |
1641 | if (cmsg->B3protocol != 0) | 1641 | if (cmsg->B3protocol != 0) |
1642 | dev_warn(cs->dev, | 1642 | dev_warn(cs->dev, |
1643 | "B3 Protocol %u unsupported, using Transparent\n", | 1643 | "B3 Protocol %u unsupported, using Transparent\n", |
1644 | cmsg->B3protocol); | 1644 | cmsg->B3protocol); |
1645 | ignore_cstruct_param(cs, cmsg->B1configuration, | 1645 | ignore_cstruct_param(cs, cmsg->B1configuration, |
1646 | "CONNECT_RESP", "B1 Configuration"); | 1646 | "CONNECT_RESP", "B1 Configuration"); |
1647 | ignore_cstruct_param(cs, cmsg->B2configuration, | 1647 | ignore_cstruct_param(cs, cmsg->B2configuration, |
1648 | "CONNECT_RESP", "B2 Configuration"); | 1648 | "CONNECT_RESP", "B2 Configuration"); |
1649 | ignore_cstruct_param(cs, cmsg->B3configuration, | 1649 | ignore_cstruct_param(cs, cmsg->B3configuration, |
1650 | "CONNECT_RESP", "B3 Configuration"); | 1650 | "CONNECT_RESP", "B3 Configuration"); |
1651 | } | 1651 | } |
1652 | 1652 | ||
1653 | /* ToDo: check/encode remaining parameters */ | 1653 | /* ToDo: check/encode remaining parameters */ |
1654 | ignore_cstruct_param(cs, cmsg->ConnectedNumber, | 1654 | ignore_cstruct_param(cs, cmsg->ConnectedNumber, |
1655 | "CONNECT_RESP", "Connected Number"); | 1655 | "CONNECT_RESP", "Connected Number"); |
1656 | ignore_cstruct_param(cs, cmsg->ConnectedSubaddress, | 1656 | ignore_cstruct_param(cs, cmsg->ConnectedSubaddress, |
1657 | "CONNECT_RESP", "Connected Subaddress"); | 1657 | "CONNECT_RESP", "Connected Subaddress"); |
1658 | ignore_cstruct_param(cs, cmsg->LLC, | 1658 | ignore_cstruct_param(cs, cmsg->LLC, |
1659 | "CONNECT_RESP", "LLC"); | 1659 | "CONNECT_RESP", "LLC"); |
1660 | if (cmsg->AdditionalInfo != CAPI_DEFAULT) { | 1660 | if (cmsg->AdditionalInfo != CAPI_DEFAULT) { |
1661 | ignore_cstruct_param(cs, cmsg->BChannelinformation, | 1661 | ignore_cstruct_param(cs, cmsg->BChannelinformation, |
1662 | "CONNECT_RESP", "BChannel Information"); | 1662 | "CONNECT_RESP", "BChannel Information"); |
1663 | ignore_cstruct_param(cs, cmsg->Keypadfacility, | 1663 | ignore_cstruct_param(cs, cmsg->Keypadfacility, |
1664 | "CONNECT_RESP", "Keypad Facility"); | 1664 | "CONNECT_RESP", "Keypad Facility"); |
1665 | ignore_cstruct_param(cs, cmsg->Useruserdata, | 1665 | ignore_cstruct_param(cs, cmsg->Useruserdata, |
1666 | "CONNECT_RESP", "User-User Data"); | 1666 | "CONNECT_RESP", "User-User Data"); |
1667 | ignore_cstruct_param(cs, cmsg->Facilitydataarray, | 1667 | ignore_cstruct_param(cs, cmsg->Facilitydataarray, |
1668 | "CONNECT_RESP", "Facility Data Array"); | 1668 | "CONNECT_RESP", "Facility Data Array"); |
1669 | } | 1669 | } |
1670 | 1670 | ||
1671 | /* Accept call */ | 1671 | /* Accept call */ |
1672 | if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state, | 1672 | if (!gigaset_add_event(cs, &cs->bcs[channel - 1].at_state, |
1673 | EV_ACCEPT, NULL, 0, NULL)) | 1673 | EV_ACCEPT, NULL, 0, NULL)) |
1674 | return; | 1674 | return; |
1675 | gigaset_schedule_event(cs); | 1675 | gigaset_schedule_event(cs); |
@@ -1712,7 +1712,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, | |||
1712 | if (oap != ap) { | 1712 | if (oap != ap) { |
1713 | spin_unlock_irqrestore(&bcs->aplock, flags); | 1713 | spin_unlock_irqrestore(&bcs->aplock, flags); |
1714 | send_disconnect_ind(bcs, oap, | 1714 | send_disconnect_ind(bcs, oap, |
1715 | CapiCallGivenToOtherApplication); | 1715 | CapiCallGivenToOtherApplication); |
1716 | spin_lock_irqsave(&bcs->aplock, flags); | 1716 | spin_lock_irqsave(&bcs->aplock, flags); |
1717 | } | 1717 | } |
1718 | } | 1718 | } |
@@ -1723,7 +1723,7 @@ static void do_connect_resp(struct gigaset_capi_ctr *iif, | |||
1723 | /* reject call - will trigger DISCONNECT_IND for this app */ | 1723 | /* reject call - will trigger DISCONNECT_IND for this app */ |
1724 | dev_info(cs->dev, "%s: Reject=%x\n", | 1724 | dev_info(cs->dev, "%s: Reject=%x\n", |
1725 | "CONNECT_RESP", cmsg->Reject); | 1725 | "CONNECT_RESP", cmsg->Reject); |
1726 | if (!gigaset_add_event(cs, &cs->bcs[channel-1].at_state, | 1726 | if (!gigaset_add_event(cs, &cs->bcs[channel - 1].at_state, |
1727 | EV_HUP, NULL, 0, NULL)) | 1727 | EV_HUP, NULL, 0, NULL)) |
1728 | return; | 1728 | return; |
1729 | gigaset_schedule_event(cs); | 1729 | gigaset_schedule_event(cs); |
@@ -1756,7 +1756,7 @@ static void do_connect_b3_req(struct gigaset_capi_ctr *iif, | |||
1756 | send_conf(iif, ap, skb, CapiIllContrPlciNcci); | 1756 | send_conf(iif, ap, skb, CapiIllContrPlciNcci); |
1757 | return; | 1757 | return; |
1758 | } | 1758 | } |
1759 | bcs = &cs->bcs[channel-1]; | 1759 | bcs = &cs->bcs[channel - 1]; |
1760 | 1760 | ||
1761 | /* mark logical connection active */ | 1761 | /* mark logical connection active */ |
1762 | bcs->apconnstate = APCONN_ACTIVE; | 1762 | bcs->apconnstate = APCONN_ACTIVE; |
@@ -1767,7 +1767,7 @@ static void do_connect_b3_req(struct gigaset_capi_ctr *iif, | |||
1767 | /* NCPI parameter: not applicable for B3 Transparent */ | 1767 | /* NCPI parameter: not applicable for B3 Transparent */ |
1768 | ignore_cstruct_param(cs, cmsg->NCPI, "CONNECT_B3_REQ", "NCPI"); | 1768 | ignore_cstruct_param(cs, cmsg->NCPI, "CONNECT_B3_REQ", "NCPI"); |
1769 | send_conf(iif, ap, skb, (cmsg->NCPI && cmsg->NCPI[0]) ? | 1769 | send_conf(iif, ap, skb, (cmsg->NCPI && cmsg->NCPI[0]) ? |
1770 | CapiNcpiNotSupportedByProtocol : CapiSuccess); | 1770 | CapiNcpiNotSupportedByProtocol : CapiSuccess); |
1771 | } | 1771 | } |
1772 | 1772 | ||
1773 | /* | 1773 | /* |
@@ -1801,7 +1801,7 @@ static void do_connect_b3_resp(struct gigaset_capi_ctr *iif, | |||
1801 | dev_kfree_skb_any(skb); | 1801 | dev_kfree_skb_any(skb); |
1802 | return; | 1802 | return; |
1803 | } | 1803 | } |
1804 | bcs = &cs->bcs[channel-1]; | 1804 | bcs = &cs->bcs[channel - 1]; |
1805 | 1805 | ||
1806 | if (cmsg->Reject) { | 1806 | if (cmsg->Reject) { |
1807 | /* Reject: clear B3 connect received flag */ | 1807 | /* Reject: clear B3 connect received flag */ |
@@ -1905,7 +1905,7 @@ static void do_disconnect_req(struct gigaset_capi_ctr *iif, | |||
1905 | return; | 1905 | return; |
1906 | } | 1906 | } |
1907 | capi_cmsg2message(b3cmsg, | 1907 | capi_cmsg2message(b3cmsg, |
1908 | __skb_put(b3skb, CAPI_DISCONNECT_B3_IND_BASELEN)); | 1908 | __skb_put(b3skb, CAPI_DISCONNECT_B3_IND_BASELEN)); |
1909 | kfree(b3cmsg); | 1909 | kfree(b3cmsg); |
1910 | capi_ctr_handle_message(&iif->ctr, ap->id, b3skb); | 1910 | capi_ctr_handle_message(&iif->ctr, ap->id, b3skb); |
1911 | } | 1911 | } |
@@ -1947,7 +1947,7 @@ static void do_disconnect_b3_req(struct gigaset_capi_ctr *iif, | |||
1947 | send_conf(iif, ap, skb, CapiIllContrPlciNcci); | 1947 | send_conf(iif, ap, skb, CapiIllContrPlciNcci); |
1948 | return; | 1948 | return; |
1949 | } | 1949 | } |
1950 | bcs = &cs->bcs[channel-1]; | 1950 | bcs = &cs->bcs[channel - 1]; |
1951 | 1951 | ||
1952 | /* reject if logical connection not active */ | 1952 | /* reject if logical connection not active */ |
1953 | if (bcs->apconnstate < APCONN_ACTIVE) { | 1953 | if (bcs->apconnstate < APCONN_ACTIVE) { |
@@ -1965,9 +1965,9 @@ static void do_disconnect_b3_req(struct gigaset_capi_ctr *iif, | |||
1965 | 1965 | ||
1966 | /* NCPI parameter: not applicable for B3 Transparent */ | 1966 | /* NCPI parameter: not applicable for B3 Transparent */ |
1967 | ignore_cstruct_param(cs, cmsg->NCPI, | 1967 | ignore_cstruct_param(cs, cmsg->NCPI, |
1968 | "DISCONNECT_B3_REQ", "NCPI"); | 1968 | "DISCONNECT_B3_REQ", "NCPI"); |
1969 | send_conf(iif, ap, skb, (cmsg->NCPI && cmsg->NCPI[0]) ? | 1969 | send_conf(iif, ap, skb, (cmsg->NCPI && cmsg->NCPI[0]) ? |
1970 | CapiNcpiNotSupportedByProtocol : CapiSuccess); | 1970 | CapiNcpiNotSupportedByProtocol : CapiSuccess); |
1971 | } | 1971 | } |
1972 | 1972 | ||
1973 | /* | 1973 | /* |
@@ -1997,7 +1997,7 @@ static void do_data_b3_req(struct gigaset_capi_ctr *iif, | |||
1997 | send_conf(iif, ap, skb, CapiIllContrPlciNcci); | 1997 | send_conf(iif, ap, skb, CapiIllContrPlciNcci); |
1998 | return; | 1998 | return; |
1999 | } | 1999 | } |
2000 | bcs = &cs->bcs[channel-1]; | 2000 | bcs = &cs->bcs[channel - 1]; |
2001 | if (msglen != CAPI_DATA_B3_REQ_LEN && msglen != CAPI_DATA_B3_REQ_LEN64) | 2001 | if (msglen != CAPI_DATA_B3_REQ_LEN && msglen != CAPI_DATA_B3_REQ_LEN64) |
2002 | dev_notice(cs->dev, "%s: unexpected length %d\n", | 2002 | dev_notice(cs->dev, "%s: unexpected length %d\n", |
2003 | "DATA_B3_REQ", msglen); | 2003 | "DATA_B3_REQ", msglen); |
@@ -2040,7 +2040,7 @@ static void do_data_b3_req(struct gigaset_capi_ctr *iif, | |||
2040 | if (!(flags & CAPI_FLAGS_DELIVERY_CONFIRMATION)) | 2040 | if (!(flags & CAPI_FLAGS_DELIVERY_CONFIRMATION)) |
2041 | send_data_b3_conf(cs, &iif->ctr, ap->id, msgid, channel, handle, | 2041 | send_data_b3_conf(cs, &iif->ctr, ap->id, msgid, channel, handle, |
2042 | flags ? CapiFlagsNotSupportedByProtocol | 2042 | flags ? CapiFlagsNotSupportedByProtocol |
2043 | : CAPI_NOERROR); | 2043 | : CAPI_NOERROR); |
2044 | } | 2044 | } |
2045 | 2045 | ||
2046 | /* | 2046 | /* |
@@ -2258,11 +2258,11 @@ static int gigaset_proc_show(struct seq_file *m, void *v) | |||
2258 | 2258 | ||
2259 | seq_printf(m, "%-16s %s\n", "name", ctr->name); | 2259 | seq_printf(m, "%-16s %s\n", "name", ctr->name); |
2260 | seq_printf(m, "%-16s %s %s\n", "dev", | 2260 | seq_printf(m, "%-16s %s %s\n", "dev", |
2261 | dev_driver_string(cs->dev), dev_name(cs->dev)); | 2261 | dev_driver_string(cs->dev), dev_name(cs->dev)); |
2262 | seq_printf(m, "%-16s %d\n", "id", cs->myid); | 2262 | seq_printf(m, "%-16s %d\n", "id", cs->myid); |
2263 | if (cs->gotfwver) | 2263 | if (cs->gotfwver) |
2264 | seq_printf(m, "%-16s %d.%d.%d.%d\n", "firmware", | 2264 | seq_printf(m, "%-16s %d.%d.%d.%d\n", "firmware", |
2265 | cs->fwver[0], cs->fwver[1], cs->fwver[2], cs->fwver[3]); | 2265 | cs->fwver[0], cs->fwver[1], cs->fwver[2], cs->fwver[3]); |
2266 | seq_printf(m, "%-16s %d\n", "channels", cs->channels); | 2266 | seq_printf(m, "%-16s %d\n", "channels", cs->channels); |
2267 | seq_printf(m, "%-16s %s\n", "onechannel", cs->onechannel ? "yes" : "no"); | 2267 | seq_printf(m, "%-16s %s\n", "onechannel", cs->onechannel ? "yes" : "no"); |
2268 | 2268 | ||
@@ -2315,13 +2315,13 @@ static int gigaset_proc_show(struct seq_file *m, void *v) | |||
2315 | 2315 | ||
2316 | for (i = 0; i < cs->channels; i++) { | 2316 | for (i = 0; i < cs->channels; i++) { |
2317 | seq_printf(m, "[%d]%-13s %d\n", i, "corrupted", | 2317 | seq_printf(m, "[%d]%-13s %d\n", i, "corrupted", |
2318 | cs->bcs[i].corrupted); | 2318 | cs->bcs[i].corrupted); |
2319 | seq_printf(m, "[%d]%-13s %d\n", i, "trans_down", | 2319 | seq_printf(m, "[%d]%-13s %d\n", i, "trans_down", |
2320 | cs->bcs[i].trans_down); | 2320 | cs->bcs[i].trans_down); |
2321 | seq_printf(m, "[%d]%-13s %d\n", i, "trans_up", | 2321 | seq_printf(m, "[%d]%-13s %d\n", i, "trans_up", |
2322 | cs->bcs[i].trans_up); | 2322 | cs->bcs[i].trans_up); |
2323 | seq_printf(m, "[%d]%-13s %d\n", i, "chstate", | 2323 | seq_printf(m, "[%d]%-13s %d\n", i, "chstate", |
2324 | cs->bcs[i].chstate); | 2324 | cs->bcs[i].chstate); |
2325 | switch (cs->bcs[i].proto2) { | 2325 | switch (cs->bcs[i].proto2) { |
2326 | case L2_BITSYNC: | 2326 | case L2_BITSYNC: |
2327 | s = "bitsync"; | 2327 | s = "bitsync"; |
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index db621db67f61..e55aabf8df87 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -30,7 +30,7 @@ | |||
30 | /* Module parameters */ | 30 | /* Module parameters */ |
31 | int gigaset_debuglevel; | 31 | int gigaset_debuglevel; |
32 | EXPORT_SYMBOL_GPL(gigaset_debuglevel); | 32 | EXPORT_SYMBOL_GPL(gigaset_debuglevel); |
33 | module_param_named(debug, gigaset_debuglevel, int, S_IRUGO|S_IWUSR); | 33 | module_param_named(debug, gigaset_debuglevel, int, S_IRUGO | S_IWUSR); |
34 | MODULE_PARM_DESC(debug, "debug level"); | 34 | MODULE_PARM_DESC(debug, "debug level"); |
35 | 35 | ||
36 | /* driver state flags */ | 36 | /* driver state flags */ |
@@ -123,7 +123,7 @@ int gigaset_enterconfigmode(struct cardstate *cs) | |||
123 | if (r < 0) | 123 | if (r < 0) |
124 | goto error; | 124 | goto error; |
125 | } | 125 | } |
126 | r = setflags(cs, TIOCM_RTS|TIOCM_DTR, 800); | 126 | r = setflags(cs, TIOCM_RTS | TIOCM_DTR, 800); |
127 | if (r < 0) | 127 | if (r < 0) |
128 | goto error; | 128 | goto error; |
129 | 129 | ||
@@ -131,8 +131,8 @@ int gigaset_enterconfigmode(struct cardstate *cs) | |||
131 | 131 | ||
132 | error: | 132 | error: |
133 | dev_err(cs->dev, "error %d on setuartbits\n", -r); | 133 | dev_err(cs->dev, "error %d on setuartbits\n", -r); |
134 | cs->control_state = TIOCM_RTS|TIOCM_DTR; | 134 | cs->control_state = TIOCM_RTS | TIOCM_DTR; |
135 | cs->ops->set_modem_ctrl(cs, 0, TIOCM_RTS|TIOCM_DTR); | 135 | cs->ops->set_modem_ctrl(cs, 0, TIOCM_RTS | TIOCM_DTR); |
136 | 136 | ||
137 | return -1; | 137 | return -1; |
138 | } | 138 | } |
@@ -591,7 +591,7 @@ int gigaset_fill_inbuf(struct inbuf_t *inbuf, const unsigned char *src, | |||
591 | if (head > tail) | 591 | if (head > tail) |
592 | n = head - 1 - tail; | 592 | n = head - 1 - tail; |
593 | else if (head == 0) | 593 | else if (head == 0) |
594 | n = (RBUFSIZE-1) - tail; | 594 | n = (RBUFSIZE - 1) - tail; |
595 | else | 595 | else |
596 | n = RBUFSIZE - tail; | 596 | n = RBUFSIZE - tail; |
597 | if (!n) { | 597 | if (!n) { |
@@ -911,10 +911,10 @@ int gigaset_start(struct cardstate *cs) | |||
911 | spin_unlock_irqrestore(&cs->lock, flags); | 911 | spin_unlock_irqrestore(&cs->lock, flags); |
912 | 912 | ||
913 | if (cs->mstate != MS_LOCKED) { | 913 | if (cs->mstate != MS_LOCKED) { |
914 | cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR|TIOCM_RTS); | 914 | cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR | TIOCM_RTS); |
915 | cs->ops->baud_rate(cs, B115200); | 915 | cs->ops->baud_rate(cs, B115200); |
916 | cs->ops->set_line_ctrl(cs, CS8); | 916 | cs->ops->set_line_ctrl(cs, CS8); |
917 | cs->control_state = TIOCM_DTR|TIOCM_RTS; | 917 | cs->control_state = TIOCM_DTR | TIOCM_RTS; |
918 | } | 918 | } |
919 | 919 | ||
920 | cs->waiting = 1; | 920 | cs->waiting = 1; |
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 6d12623c1db0..624a8256a77f 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c | |||
@@ -153,104 +153,104 @@ struct reply_t gigaset_tab_nocid[] = | |||
153 | * action, command */ | 153 | * action, command */ |
154 | 154 | ||
155 | /* initialize device, set cid mode if possible */ | 155 | /* initialize device, set cid mode if possible */ |
156 | {RSP_INIT, -1, -1, SEQ_INIT, 100, 1, {ACT_TIMEOUT} }, | 156 | {RSP_INIT, -1, -1, SEQ_INIT, 100, 1, {ACT_TIMEOUT} }, |
157 | 157 | ||
158 | {EV_TIMEOUT, 100, 100, -1, 101, 3, {0}, "Z\r"}, | 158 | {EV_TIMEOUT, 100, 100, -1, 101, 3, {0}, "Z\r"}, |
159 | {RSP_OK, 101, 103, -1, 120, 5, {ACT_GETSTRING}, | 159 | {RSP_OK, 101, 103, -1, 120, 5, {ACT_GETSTRING}, |
160 | "+GMR\r"}, | 160 | "+GMR\r"}, |
161 | 161 | ||
162 | {EV_TIMEOUT, 101, 101, -1, 102, 5, {0}, "Z\r"}, | 162 | {EV_TIMEOUT, 101, 101, -1, 102, 5, {0}, "Z\r"}, |
163 | {RSP_ERROR, 101, 101, -1, 102, 5, {0}, "Z\r"}, | 163 | {RSP_ERROR, 101, 101, -1, 102, 5, {0}, "Z\r"}, |
164 | 164 | ||
165 | {EV_TIMEOUT, 102, 102, -1, 108, 5, {ACT_SETDLE1}, | 165 | {EV_TIMEOUT, 102, 102, -1, 108, 5, {ACT_SETDLE1}, |
166 | "^SDLE=0\r"}, | 166 | "^SDLE=0\r"}, |
167 | {RSP_OK, 108, 108, -1, 104, -1}, | 167 | {RSP_OK, 108, 108, -1, 104, -1}, |
168 | {RSP_ZDLE, 104, 104, 0, 103, 5, {0}, "Z\r"}, | 168 | {RSP_ZDLE, 104, 104, 0, 103, 5, {0}, "Z\r"}, |
169 | {EV_TIMEOUT, 104, 104, -1, 0, 0, {ACT_FAILINIT} }, | 169 | {EV_TIMEOUT, 104, 104, -1, 0, 0, {ACT_FAILINIT} }, |
170 | {RSP_ERROR, 108, 108, -1, 0, 0, {ACT_FAILINIT} }, | 170 | {RSP_ERROR, 108, 108, -1, 0, 0, {ACT_FAILINIT} }, |
171 | 171 | ||
172 | {EV_TIMEOUT, 108, 108, -1, 105, 2, {ACT_SETDLE0, | 172 | {EV_TIMEOUT, 108, 108, -1, 105, 2, {ACT_SETDLE0, |
173 | ACT_HUPMODEM, | 173 | ACT_HUPMODEM, |
174 | ACT_TIMEOUT} }, | 174 | ACT_TIMEOUT} }, |
175 | {EV_TIMEOUT, 105, 105, -1, 103, 5, {0}, "Z\r"}, | 175 | {EV_TIMEOUT, 105, 105, -1, 103, 5, {0}, "Z\r"}, |
176 | 176 | ||
177 | {RSP_ERROR, 102, 102, -1, 107, 5, {0}, "^GETPRE\r"}, | 177 | {RSP_ERROR, 102, 102, -1, 107, 5, {0}, "^GETPRE\r"}, |
178 | {RSP_OK, 107, 107, -1, 0, 0, {ACT_CONFIGMODE} }, | 178 | {RSP_OK, 107, 107, -1, 0, 0, {ACT_CONFIGMODE} }, |
179 | {RSP_ERROR, 107, 107, -1, 0, 0, {ACT_FAILINIT} }, | 179 | {RSP_ERROR, 107, 107, -1, 0, 0, {ACT_FAILINIT} }, |
180 | {EV_TIMEOUT, 107, 107, -1, 0, 0, {ACT_FAILINIT} }, | 180 | {EV_TIMEOUT, 107, 107, -1, 0, 0, {ACT_FAILINIT} }, |
181 | 181 | ||
182 | {RSP_ERROR, 103, 103, -1, 0, 0, {ACT_FAILINIT} }, | 182 | {RSP_ERROR, 103, 103, -1, 0, 0, {ACT_FAILINIT} }, |
183 | {EV_TIMEOUT, 103, 103, -1, 0, 0, {ACT_FAILINIT} }, | 183 | {EV_TIMEOUT, 103, 103, -1, 0, 0, {ACT_FAILINIT} }, |
184 | 184 | ||
185 | {RSP_STRING, 120, 120, -1, 121, -1, {ACT_SETVER} }, | 185 | {RSP_STRING, 120, 120, -1, 121, -1, {ACT_SETVER} }, |
186 | 186 | ||
187 | {EV_TIMEOUT, 120, 121, -1, 0, 0, {ACT_FAILVER, | 187 | {EV_TIMEOUT, 120, 121, -1, 0, 0, {ACT_FAILVER, |
188 | ACT_INIT} }, | 188 | ACT_INIT} }, |
189 | {RSP_ERROR, 120, 121, -1, 0, 0, {ACT_FAILVER, | 189 | {RSP_ERROR, 120, 121, -1, 0, 0, {ACT_FAILVER, |
190 | ACT_INIT} }, | 190 | ACT_INIT} }, |
191 | {RSP_OK, 121, 121, -1, 0, 0, {ACT_GOTVER, | 191 | {RSP_OK, 121, 121, -1, 0, 0, {ACT_GOTVER, |
192 | ACT_INIT} }, | 192 | ACT_INIT} }, |
193 | 193 | ||
194 | /* leave dle mode */ | 194 | /* leave dle mode */ |
195 | {RSP_INIT, 0, 0, SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"}, | 195 | {RSP_INIT, 0, 0, SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"}, |
196 | {RSP_OK, 201, 201, -1, 202, -1}, | 196 | {RSP_OK, 201, 201, -1, 202, -1}, |
197 | {RSP_ZDLE, 202, 202, 0, 0, 0, {ACT_DLE0} }, | 197 | {RSP_ZDLE, 202, 202, 0, 0, 0, {ACT_DLE0} }, |
198 | {RSP_NODEV, 200, 249, -1, 0, 0, {ACT_FAKEDLE0} }, | 198 | {RSP_NODEV, 200, 249, -1, 0, 0, {ACT_FAKEDLE0} }, |
199 | {RSP_ERROR, 200, 249, -1, 0, 0, {ACT_FAILDLE0} }, | 199 | {RSP_ERROR, 200, 249, -1, 0, 0, {ACT_FAILDLE0} }, |
200 | {EV_TIMEOUT, 200, 249, -1, 0, 0, {ACT_FAILDLE0} }, | 200 | {EV_TIMEOUT, 200, 249, -1, 0, 0, {ACT_FAILDLE0} }, |
201 | 201 | ||
202 | /* enter dle mode */ | 202 | /* enter dle mode */ |
203 | {RSP_INIT, 0, 0, SEQ_DLE1, 251, 5, {0}, "^SDLE=1\r"}, | 203 | {RSP_INIT, 0, 0, SEQ_DLE1, 251, 5, {0}, "^SDLE=1\r"}, |
204 | {RSP_OK, 251, 251, -1, 252, -1}, | 204 | {RSP_OK, 251, 251, -1, 252, -1}, |
205 | {RSP_ZDLE, 252, 252, 1, 0, 0, {ACT_DLE1} }, | 205 | {RSP_ZDLE, 252, 252, 1, 0, 0, {ACT_DLE1} }, |
206 | {RSP_ERROR, 250, 299, -1, 0, 0, {ACT_FAILDLE1} }, | 206 | {RSP_ERROR, 250, 299, -1, 0, 0, {ACT_FAILDLE1} }, |
207 | {EV_TIMEOUT, 250, 299, -1, 0, 0, {ACT_FAILDLE1} }, | 207 | {EV_TIMEOUT, 250, 299, -1, 0, 0, {ACT_FAILDLE1} }, |
208 | 208 | ||
209 | /* incoming call */ | 209 | /* incoming call */ |
210 | {RSP_RING, -1, -1, -1, -1, -1, {ACT_RING} }, | 210 | {RSP_RING, -1, -1, -1, -1, -1, {ACT_RING} }, |
211 | 211 | ||
212 | /* get cid */ | 212 | /* get cid */ |
213 | {RSP_INIT, 0, 0, SEQ_CID, 301, 5, {0}, "^SGCI?\r"}, | 213 | {RSP_INIT, 0, 0, SEQ_CID, 301, 5, {0}, "^SGCI?\r"}, |
214 | {RSP_OK, 301, 301, -1, 302, -1}, | 214 | {RSP_OK, 301, 301, -1, 302, -1}, |
215 | {RSP_ZGCI, 302, 302, -1, 0, 0, {ACT_CID} }, | 215 | {RSP_ZGCI, 302, 302, -1, 0, 0, {ACT_CID} }, |
216 | {RSP_ERROR, 301, 349, -1, 0, 0, {ACT_FAILCID} }, | 216 | {RSP_ERROR, 301, 349, -1, 0, 0, {ACT_FAILCID} }, |
217 | {EV_TIMEOUT, 301, 349, -1, 0, 0, {ACT_FAILCID} }, | 217 | {EV_TIMEOUT, 301, 349, -1, 0, 0, {ACT_FAILCID} }, |
218 | 218 | ||
219 | /* enter cid mode */ | 219 | /* enter cid mode */ |
220 | {RSP_INIT, 0, 0, SEQ_CIDMODE, 150, 5, {0}, "^SGCI=1\r"}, | 220 | {RSP_INIT, 0, 0, SEQ_CIDMODE, 150, 5, {0}, "^SGCI=1\r"}, |
221 | {RSP_OK, 150, 150, -1, 0, 0, {ACT_CMODESET} }, | 221 | {RSP_OK, 150, 150, -1, 0, 0, {ACT_CMODESET} }, |
222 | {RSP_ERROR, 150, 150, -1, 0, 0, {ACT_FAILCMODE} }, | 222 | {RSP_ERROR, 150, 150, -1, 0, 0, {ACT_FAILCMODE} }, |
223 | {EV_TIMEOUT, 150, 150, -1, 0, 0, {ACT_FAILCMODE} }, | 223 | {EV_TIMEOUT, 150, 150, -1, 0, 0, {ACT_FAILCMODE} }, |
224 | 224 | ||
225 | /* leave cid mode */ | 225 | /* leave cid mode */ |
226 | {RSP_INIT, 0, 0, SEQ_UMMODE, 160, 5, {0}, "Z\r"}, | 226 | {RSP_INIT, 0, 0, SEQ_UMMODE, 160, 5, {0}, "Z\r"}, |
227 | {RSP_OK, 160, 160, -1, 0, 0, {ACT_UMODESET} }, | 227 | {RSP_OK, 160, 160, -1, 0, 0, {ACT_UMODESET} }, |
228 | {RSP_ERROR, 160, 160, -1, 0, 0, {ACT_FAILUMODE} }, | 228 | {RSP_ERROR, 160, 160, -1, 0, 0, {ACT_FAILUMODE} }, |
229 | {EV_TIMEOUT, 160, 160, -1, 0, 0, {ACT_FAILUMODE} }, | 229 | {EV_TIMEOUT, 160, 160, -1, 0, 0, {ACT_FAILUMODE} }, |
230 | 230 | ||
231 | /* abort getting cid */ | 231 | /* abort getting cid */ |
232 | {RSP_INIT, 0, 0, SEQ_NOCID, 0, 0, {ACT_ABORTCID} }, | 232 | {RSP_INIT, 0, 0, SEQ_NOCID, 0, 0, {ACT_ABORTCID} }, |
233 | 233 | ||
234 | /* reset */ | 234 | /* reset */ |
235 | {RSP_INIT, 0, 0, SEQ_SHUTDOWN, 504, 5, {0}, "Z\r"}, | 235 | {RSP_INIT, 0, 0, SEQ_SHUTDOWN, 504, 5, {0}, "Z\r"}, |
236 | {RSP_OK, 504, 504, -1, 0, 0, {ACT_SDOWN} }, | 236 | {RSP_OK, 504, 504, -1, 0, 0, {ACT_SDOWN} }, |
237 | {RSP_ERROR, 501, 599, -1, 0, 0, {ACT_FAILSDOWN} }, | 237 | {RSP_ERROR, 501, 599, -1, 0, 0, {ACT_FAILSDOWN} }, |
238 | {EV_TIMEOUT, 501, 599, -1, 0, 0, {ACT_FAILSDOWN} }, | 238 | {EV_TIMEOUT, 501, 599, -1, 0, 0, {ACT_FAILSDOWN} }, |
239 | {RSP_NODEV, 501, 599, -1, 0, 0, {ACT_FAKESDOWN} }, | 239 | {RSP_NODEV, 501, 599, -1, 0, 0, {ACT_FAKESDOWN} }, |
240 | 240 | ||
241 | {EV_PROC_CIDMODE, -1, -1, -1, -1, -1, {ACT_PROC_CIDMODE} }, | 241 | {EV_PROC_CIDMODE, -1, -1, -1, -1, -1, {ACT_PROC_CIDMODE} }, |
242 | {EV_IF_LOCK, -1, -1, -1, -1, -1, {ACT_IF_LOCK} }, | 242 | {EV_IF_LOCK, -1, -1, -1, -1, -1, {ACT_IF_LOCK} }, |
243 | {EV_IF_VER, -1, -1, -1, -1, -1, {ACT_IF_VER} }, | 243 | {EV_IF_VER, -1, -1, -1, -1, -1, {ACT_IF_VER} }, |
244 | {EV_START, -1, -1, -1, -1, -1, {ACT_START} }, | 244 | {EV_START, -1, -1, -1, -1, -1, {ACT_START} }, |
245 | {EV_STOP, -1, -1, -1, -1, -1, {ACT_STOP} }, | 245 | {EV_STOP, -1, -1, -1, -1, -1, {ACT_STOP} }, |
246 | {EV_SHUTDOWN, -1, -1, -1, -1, -1, {ACT_SHUTDOWN} }, | 246 | {EV_SHUTDOWN, -1, -1, -1, -1, -1, {ACT_SHUTDOWN} }, |
247 | 247 | ||
248 | /* misc. */ | 248 | /* misc. */ |
249 | {RSP_ERROR, -1, -1, -1, -1, -1, {ACT_ERROR} }, | 249 | {RSP_ERROR, -1, -1, -1, -1, -1, {ACT_ERROR} }, |
250 | {RSP_ZCAU, -1, -1, -1, -1, -1, {ACT_ZCAU} }, | 250 | {RSP_ZCAU, -1, -1, -1, -1, -1, {ACT_ZCAU} }, |
251 | {RSP_NONE, -1, -1, -1, -1, -1, {ACT_DEBUG} }, | 251 | {RSP_NONE, -1, -1, -1, -1, -1, {ACT_DEBUG} }, |
252 | {RSP_ANY, -1, -1, -1, -1, -1, {ACT_WARN} }, | 252 | {RSP_ANY, -1, -1, -1, -1, -1, {ACT_WARN} }, |
253 | {RSP_LAST} | 253 | {RSP_LAST} |
254 | }; | 254 | }; |
255 | 255 | ||
256 | /* 600: start dialing, 650: dial in progress, 800: connection is up, 700: ring, | 256 | /* 600: start dialing, 650: dial in progress, 800: connection is up, 700: ring, |
@@ -261,91 +261,91 @@ struct reply_t gigaset_tab_cid[] = | |||
261 | * action, command */ | 261 | * action, command */ |
262 | 262 | ||
263 | /* dial */ | 263 | /* dial */ |
264 | {EV_DIAL, -1, -1, -1, -1, -1, {ACT_DIAL} }, | 264 | {EV_DIAL, -1, -1, -1, -1, -1, {ACT_DIAL} }, |
265 | {RSP_INIT, 0, 0, SEQ_DIAL, 601, 5, {ACT_CMD+AT_BC} }, | 265 | {RSP_INIT, 0, 0, SEQ_DIAL, 601, 5, {ACT_CMD + AT_BC} }, |
266 | {RSP_OK, 601, 601, -1, 603, 5, {ACT_CMD+AT_PROTO} }, | 266 | {RSP_OK, 601, 601, -1, 603, 5, {ACT_CMD + AT_PROTO} }, |
267 | {RSP_OK, 603, 603, -1, 604, 5, {ACT_CMD+AT_TYPE} }, | 267 | {RSP_OK, 603, 603, -1, 604, 5, {ACT_CMD + AT_TYPE} }, |
268 | {RSP_OK, 604, 604, -1, 605, 5, {ACT_CMD+AT_MSN} }, | 268 | {RSP_OK, 604, 604, -1, 605, 5, {ACT_CMD + AT_MSN} }, |
269 | {RSP_NULL, 605, 605, -1, 606, 5, {ACT_CMD+AT_CLIP} }, | 269 | {RSP_NULL, 605, 605, -1, 606, 5, {ACT_CMD + AT_CLIP} }, |
270 | {RSP_OK, 605, 605, -1, 606, 5, {ACT_CMD+AT_CLIP} }, | 270 | {RSP_OK, 605, 605, -1, 606, 5, {ACT_CMD + AT_CLIP} }, |
271 | {RSP_NULL, 606, 606, -1, 607, 5, {ACT_CMD+AT_ISO} }, | 271 | {RSP_NULL, 606, 606, -1, 607, 5, {ACT_CMD + AT_ISO} }, |
272 | {RSP_OK, 606, 606, -1, 607, 5, {ACT_CMD+AT_ISO} }, | 272 | {RSP_OK, 606, 606, -1, 607, 5, {ACT_CMD + AT_ISO} }, |
273 | {RSP_OK, 607, 607, -1, 608, 5, {0}, "+VLS=17\r"}, | 273 | {RSP_OK, 607, 607, -1, 608, 5, {0}, "+VLS=17\r"}, |
274 | {RSP_OK, 608, 608, -1, 609, -1}, | 274 | {RSP_OK, 608, 608, -1, 609, -1}, |
275 | {RSP_ZSAU, 609, 609, ZSAU_PROCEEDING, 610, 5, {ACT_CMD+AT_DIAL} }, | 275 | {RSP_ZSAU, 609, 609, ZSAU_PROCEEDING, 610, 5, {ACT_CMD + AT_DIAL} }, |
276 | {RSP_OK, 610, 610, -1, 650, 0, {ACT_DIALING} }, | 276 | {RSP_OK, 610, 610, -1, 650, 0, {ACT_DIALING} }, |
277 | 277 | ||
278 | {RSP_ERROR, 601, 610, -1, 0, 0, {ACT_ABORTDIAL} }, | 278 | {RSP_ERROR, 601, 610, -1, 0, 0, {ACT_ABORTDIAL} }, |
279 | {EV_TIMEOUT, 601, 610, -1, 0, 0, {ACT_ABORTDIAL} }, | 279 | {EV_TIMEOUT, 601, 610, -1, 0, 0, {ACT_ABORTDIAL} }, |
280 | 280 | ||
281 | /* optional dialing responses */ | 281 | /* optional dialing responses */ |
282 | {EV_BC_OPEN, 650, 650, -1, 651, -1}, | 282 | {EV_BC_OPEN, 650, 650, -1, 651, -1}, |
283 | {RSP_ZVLS, 609, 651, 17, -1, -1, {ACT_DEBUG} }, | 283 | {RSP_ZVLS, 609, 651, 17, -1, -1, {ACT_DEBUG} }, |
284 | {RSP_ZCTP, 610, 651, -1, -1, -1, {ACT_DEBUG} }, | 284 | {RSP_ZCTP, 610, 651, -1, -1, -1, {ACT_DEBUG} }, |
285 | {RSP_ZCPN, 610, 651, -1, -1, -1, {ACT_DEBUG} }, | 285 | {RSP_ZCPN, 610, 651, -1, -1, -1, {ACT_DEBUG} }, |
286 | {RSP_ZSAU, 650, 651, ZSAU_CALL_DELIVERED, -1, -1, {ACT_DEBUG} }, | 286 | {RSP_ZSAU, 650, 651, ZSAU_CALL_DELIVERED, -1, -1, {ACT_DEBUG} }, |
287 | 287 | ||
288 | /* connect */ | 288 | /* connect */ |
289 | {RSP_ZSAU, 650, 650, ZSAU_ACTIVE, 800, -1, {ACT_CONNECT} }, | 289 | {RSP_ZSAU, 650, 650, ZSAU_ACTIVE, 800, -1, {ACT_CONNECT} }, |
290 | {RSP_ZSAU, 651, 651, ZSAU_ACTIVE, 800, -1, {ACT_CONNECT, | 290 | {RSP_ZSAU, 651, 651, ZSAU_ACTIVE, 800, -1, {ACT_CONNECT, |
291 | ACT_NOTIFY_BC_UP} }, | 291 | ACT_NOTIFY_BC_UP} }, |
292 | {RSP_ZSAU, 750, 750, ZSAU_ACTIVE, 800, -1, {ACT_CONNECT} }, | 292 | {RSP_ZSAU, 750, 750, ZSAU_ACTIVE, 800, -1, {ACT_CONNECT} }, |
293 | {RSP_ZSAU, 751, 751, ZSAU_ACTIVE, 800, -1, {ACT_CONNECT, | 293 | {RSP_ZSAU, 751, 751, ZSAU_ACTIVE, 800, -1, {ACT_CONNECT, |
294 | ACT_NOTIFY_BC_UP} }, | 294 | ACT_NOTIFY_BC_UP} }, |
295 | {EV_BC_OPEN, 800, 800, -1, 800, -1, {ACT_NOTIFY_BC_UP} }, | 295 | {EV_BC_OPEN, 800, 800, -1, 800, -1, {ACT_NOTIFY_BC_UP} }, |
296 | 296 | ||
297 | /* remote hangup */ | 297 | /* remote hangup */ |
298 | {RSP_ZSAU, 650, 651, ZSAU_DISCONNECT_IND, 0, 0, {ACT_REMOTEREJECT} }, | 298 | {RSP_ZSAU, 650, 651, ZSAU_DISCONNECT_IND, 0, 0, {ACT_REMOTEREJECT} }, |
299 | {RSP_ZSAU, 750, 751, ZSAU_DISCONNECT_IND, 0, 0, {ACT_REMOTEHUP} }, | 299 | {RSP_ZSAU, 750, 751, ZSAU_DISCONNECT_IND, 0, 0, {ACT_REMOTEHUP} }, |
300 | {RSP_ZSAU, 800, 800, ZSAU_DISCONNECT_IND, 0, 0, {ACT_REMOTEHUP} }, | 300 | {RSP_ZSAU, 800, 800, ZSAU_DISCONNECT_IND, 0, 0, {ACT_REMOTEHUP} }, |
301 | 301 | ||
302 | /* hangup */ | 302 | /* hangup */ |
303 | {EV_HUP, -1, -1, -1, -1, -1, {ACT_HUP} }, | 303 | {EV_HUP, -1, -1, -1, -1, -1, {ACT_HUP} }, |
304 | {RSP_INIT, -1, -1, SEQ_HUP, 401, 5, {0}, "+VLS=0\r"}, | 304 | {RSP_INIT, -1, -1, SEQ_HUP, 401, 5, {0}, "+VLS=0\r"}, |
305 | {RSP_OK, 401, 401, -1, 402, 5}, | 305 | {RSP_OK, 401, 401, -1, 402, 5}, |
306 | {RSP_ZVLS, 402, 402, 0, 403, 5}, | 306 | {RSP_ZVLS, 402, 402, 0, 403, 5}, |
307 | {RSP_ZSAU, 403, 403, ZSAU_DISCONNECT_REQ, -1, -1, {ACT_DEBUG} }, | 307 | {RSP_ZSAU, 403, 403, ZSAU_DISCONNECT_REQ, -1, -1, {ACT_DEBUG} }, |
308 | {RSP_ZSAU, 403, 403, ZSAU_NULL, 0, 0, {ACT_DISCONNECT} }, | 308 | {RSP_ZSAU, 403, 403, ZSAU_NULL, 0, 0, {ACT_DISCONNECT} }, |
309 | {RSP_NODEV, 401, 403, -1, 0, 0, {ACT_FAKEHUP} }, | 309 | {RSP_NODEV, 401, 403, -1, 0, 0, {ACT_FAKEHUP} }, |
310 | {RSP_ERROR, 401, 401, -1, 0, 0, {ACT_ABORTHUP} }, | 310 | {RSP_ERROR, 401, 401, -1, 0, 0, {ACT_ABORTHUP} }, |
311 | {EV_TIMEOUT, 401, 403, -1, 0, 0, {ACT_ABORTHUP} }, | 311 | {EV_TIMEOUT, 401, 403, -1, 0, 0, {ACT_ABORTHUP} }, |
312 | 312 | ||
313 | {EV_BC_CLOSED, 0, 0, -1, 0, -1, {ACT_NOTIFY_BC_DOWN} }, | 313 | {EV_BC_CLOSED, 0, 0, -1, 0, -1, {ACT_NOTIFY_BC_DOWN} }, |
314 | 314 | ||
315 | /* ring */ | 315 | /* ring */ |
316 | {RSP_ZBC, 700, 700, -1, -1, -1, {0} }, | 316 | {RSP_ZBC, 700, 700, -1, -1, -1, {0} }, |
317 | {RSP_ZHLC, 700, 700, -1, -1, -1, {0} }, | 317 | {RSP_ZHLC, 700, 700, -1, -1, -1, {0} }, |
318 | {RSP_NMBR, 700, 700, -1, -1, -1, {0} }, | 318 | {RSP_NMBR, 700, 700, -1, -1, -1, {0} }, |
319 | {RSP_ZCPN, 700, 700, -1, -1, -1, {0} }, | 319 | {RSP_ZCPN, 700, 700, -1, -1, -1, {0} }, |
320 | {RSP_ZCTP, 700, 700, -1, -1, -1, {0} }, | 320 | {RSP_ZCTP, 700, 700, -1, -1, -1, {0} }, |
321 | {EV_TIMEOUT, 700, 700, -1, 720, 720, {ACT_ICALL} }, | 321 | {EV_TIMEOUT, 700, 700, -1, 720, 720, {ACT_ICALL} }, |
322 | {EV_BC_CLOSED, 720, 720, -1, 0, -1, {ACT_NOTIFY_BC_DOWN} }, | 322 | {EV_BC_CLOSED, 720, 720, -1, 0, -1, {ACT_NOTIFY_BC_DOWN} }, |
323 | 323 | ||
324 | /*accept icall*/ | 324 | /*accept icall*/ |
325 | {EV_ACCEPT, -1, -1, -1, -1, -1, {ACT_ACCEPT} }, | 325 | {EV_ACCEPT, -1, -1, -1, -1, -1, {ACT_ACCEPT} }, |
326 | {RSP_INIT, 720, 720, SEQ_ACCEPT, 721, 5, {ACT_CMD+AT_PROTO} }, | 326 | {RSP_INIT, 720, 720, SEQ_ACCEPT, 721, 5, {ACT_CMD + AT_PROTO} }, |
327 | {RSP_OK, 721, 721, -1, 722, 5, {ACT_CMD+AT_ISO} }, | 327 | {RSP_OK, 721, 721, -1, 722, 5, {ACT_CMD + AT_ISO} }, |
328 | {RSP_OK, 722, 722, -1, 723, 5, {0}, "+VLS=17\r"}, | 328 | {RSP_OK, 722, 722, -1, 723, 5, {0}, "+VLS=17\r"}, |
329 | {RSP_OK, 723, 723, -1, 724, 5, {0} }, | 329 | {RSP_OK, 723, 723, -1, 724, 5, {0} }, |
330 | {RSP_ZVLS, 724, 724, 17, 750, 50, {ACT_ACCEPTED} }, | 330 | {RSP_ZVLS, 724, 724, 17, 750, 50, {ACT_ACCEPTED} }, |
331 | {RSP_ERROR, 721, 729, -1, 0, 0, {ACT_ABORTACCEPT} }, | 331 | {RSP_ERROR, 721, 729, -1, 0, 0, {ACT_ABORTACCEPT} }, |
332 | {EV_TIMEOUT, 721, 729, -1, 0, 0, {ACT_ABORTACCEPT} }, | 332 | {EV_TIMEOUT, 721, 729, -1, 0, 0, {ACT_ABORTACCEPT} }, |
333 | {RSP_ZSAU, 700, 729, ZSAU_NULL, 0, 0, {ACT_ABORTACCEPT} }, | 333 | {RSP_ZSAU, 700, 729, ZSAU_NULL, 0, 0, {ACT_ABORTACCEPT} }, |
334 | {RSP_ZSAU, 700, 729, ZSAU_ACTIVE, 0, 0, {ACT_ABORTACCEPT} }, | 334 | {RSP_ZSAU, 700, 729, ZSAU_ACTIVE, 0, 0, {ACT_ABORTACCEPT} }, |
335 | {RSP_ZSAU, 700, 729, ZSAU_DISCONNECT_IND, 0, 0, {ACT_ABORTACCEPT} }, | 335 | {RSP_ZSAU, 700, 729, ZSAU_DISCONNECT_IND, 0, 0, {ACT_ABORTACCEPT} }, |
336 | 336 | ||
337 | {EV_BC_OPEN, 750, 750, -1, 751, -1}, | 337 | {EV_BC_OPEN, 750, 750, -1, 751, -1}, |
338 | {EV_TIMEOUT, 750, 751, -1, 0, 0, {ACT_CONNTIMEOUT} }, | 338 | {EV_TIMEOUT, 750, 751, -1, 0, 0, {ACT_CONNTIMEOUT} }, |
339 | 339 | ||
340 | /* B channel closed (general case) */ | 340 | /* B channel closed (general case) */ |
341 | {EV_BC_CLOSED, -1, -1, -1, -1, -1, {ACT_NOTIFY_BC_DOWN} }, | 341 | {EV_BC_CLOSED, -1, -1, -1, -1, -1, {ACT_NOTIFY_BC_DOWN} }, |
342 | 342 | ||
343 | /* misc. */ | 343 | /* misc. */ |
344 | {RSP_ZCON, -1, -1, -1, -1, -1, {ACT_DEBUG} }, | 344 | {RSP_ZCON, -1, -1, -1, -1, -1, {ACT_DEBUG} }, |
345 | {RSP_ZCAU, -1, -1, -1, -1, -1, {ACT_ZCAU} }, | 345 | {RSP_ZCAU, -1, -1, -1, -1, -1, {ACT_ZCAU} }, |
346 | {RSP_NONE, -1, -1, -1, -1, -1, {ACT_DEBUG} }, | 346 | {RSP_NONE, -1, -1, -1, -1, -1, {ACT_DEBUG} }, |
347 | {RSP_ANY, -1, -1, -1, -1, -1, {ACT_WARN} }, | 347 | {RSP_ANY, -1, -1, -1, -1, -1, {ACT_WARN} }, |
348 | {RSP_LAST} | 348 | {RSP_LAST} |
349 | }; | 349 | }; |
350 | 350 | ||
351 | 351 | ||
@@ -453,7 +453,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
453 | case '=': | 453 | case '=': |
454 | if (params > MAX_REC_PARAMS) { | 454 | if (params > MAX_REC_PARAMS) { |
455 | dev_warn(cs->dev, | 455 | dev_warn(cs->dev, |
456 | "too many parameters in response\n"); | 456 | "too many parameters in response\n"); |
457 | /* need last parameter (might be CID) */ | 457 | /* need last parameter (might be CID) */ |
458 | params--; | 458 | params--; |
459 | } | 459 | } |
@@ -461,7 +461,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
461 | } | 461 | } |
462 | 462 | ||
463 | rawstring = 0; | 463 | rawstring = 0; |
464 | cid = params > 1 ? cid_of_response(argv[params-1]) : 0; | 464 | cid = params > 1 ? cid_of_response(argv[params - 1]) : 0; |
465 | if (cid < 0) { | 465 | if (cid < 0) { |
466 | gigaset_add_event(cs, &cs->at_state, RSP_INVAL, | 466 | gigaset_add_event(cs, &cs->at_state, RSP_INVAL, |
467 | NULL, 0, NULL); | 467 | NULL, 0, NULL); |
@@ -550,7 +550,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
550 | event->parameter = zr->code; | 550 | event->parameter = zr->code; |
551 | if (!zr->str) | 551 | if (!zr->str) |
552 | dev_warn(cs->dev, | 552 | dev_warn(cs->dev, |
553 | "%s: unknown parameter %s after ZSAU\n", | 553 | "%s: unknown parameter %s after ZSAU\n", |
554 | __func__, argv[curarg]); | 554 | __func__, argv[curarg]); |
555 | ++curarg; | 555 | ++curarg; |
556 | break; | 556 | break; |
@@ -648,8 +648,8 @@ static void disconnect(struct at_state_t **at_state_p) | |||
648 | static inline struct at_state_t *get_free_channel(struct cardstate *cs, | 648 | static inline struct at_state_t *get_free_channel(struct cardstate *cs, |
649 | int cid) | 649 | int cid) |
650 | /* cids: >0: siemens-cid | 650 | /* cids: >0: siemens-cid |
651 | 0: without cid | 651 | 0: without cid |
652 | -1: no cid assigned yet | 652 | -1: no cid assigned yet |
653 | */ | 653 | */ |
654 | { | 654 | { |
655 | unsigned long flags; | 655 | unsigned long flags; |
@@ -722,12 +722,12 @@ static void send_command(struct cardstate *cs, const char *cmd, int cid, | |||
722 | } | 722 | } |
723 | if (cid > 0 && cid <= 65535) | 723 | if (cid > 0 && cid <= 65535) |
724 | cb->len = snprintf(cb->buf, buflen, | 724 | cb->len = snprintf(cb->buf, buflen, |
725 | dle ? "\020(AT%d%s\020)" : "AT%d%s", | 725 | dle ? "\020(AT%d%s\020)" : "AT%d%s", |
726 | cid, cmd); | 726 | cid, cmd); |
727 | else | 727 | else |
728 | cb->len = snprintf(cb->buf, buflen, | 728 | cb->len = snprintf(cb->buf, buflen, |
729 | dle ? "\020(AT%s\020)" : "AT%s", | 729 | dle ? "\020(AT%s\020)" : "AT%s", |
730 | cmd); | 730 | cmd); |
731 | cb->offset = 0; | 731 | cb->offset = 0; |
732 | cb->next = NULL; | 732 | cb->next = NULL; |
733 | cb->wake_tasklet = NULL; | 733 | cb->wake_tasklet = NULL; |
@@ -790,7 +790,7 @@ static void bchannel_up(struct bc_state *bcs) | |||
790 | } | 790 | } |
791 | 791 | ||
792 | static void start_dial(struct at_state_t *at_state, void *data, | 792 | static void start_dial(struct at_state_t *at_state, void *data, |
793 | unsigned seq_index) | 793 | unsigned seq_index) |
794 | { | 794 | { |
795 | struct bc_state *bcs = at_state->bcs; | 795 | struct bc_state *bcs = at_state->bcs; |
796 | struct cardstate *cs = at_state->cs; | 796 | struct cardstate *cs = at_state->cs; |
@@ -937,10 +937,10 @@ static int reinit_and_retry(struct cardstate *cs, int channel) | |||
937 | 937 | ||
938 | if (channel < 0) | 938 | if (channel < 0) |
939 | dev_warn(cs->dev, | 939 | dev_warn(cs->dev, |
940 | "Could not enter cid mode. Reinit device and try again.\n"); | 940 | "Could not enter cid mode. Reinit device and try again.\n"); |
941 | else { | 941 | else { |
942 | dev_warn(cs->dev, | 942 | dev_warn(cs->dev, |
943 | "Could not get a call id. Reinit device and try again.\n"); | 943 | "Could not get a call id. Reinit device and try again.\n"); |
944 | cs->bcs[channel].at_state.pending_commands |= PC_CID; | 944 | cs->bcs[channel].at_state.pending_commands |= PC_CID; |
945 | } | 945 | } |
946 | schedule_init(cs, MS_INIT); | 946 | schedule_init(cs, MS_INIT); |
@@ -1155,7 +1155,7 @@ static void do_action(int action, struct cardstate *cs, | |||
1155 | at_state2 = get_free_channel(cs, ev->parameter); | 1155 | at_state2 = get_free_channel(cs, ev->parameter); |
1156 | if (!at_state2) { | 1156 | if (!at_state2) { |
1157 | dev_warn(cs->dev, | 1157 | dev_warn(cs->dev, |
1158 | "RING ignored: could not allocate channel structure\n"); | 1158 | "RING ignored: could not allocate channel structure\n"); |
1159 | break; | 1159 | break; |
1160 | } | 1160 | } |
1161 | 1161 | ||
@@ -1372,7 +1372,7 @@ static void do_action(int action, struct cardstate *cs, | |||
1372 | ev->parameter, at_state->ConState); | 1372 | ev->parameter, at_state->ConState); |
1373 | break; | 1373 | break; |
1374 | 1374 | ||
1375 | /* events from the LL */ | 1375 | /* events from the LL */ |
1376 | case ACT_DIAL: | 1376 | case ACT_DIAL: |
1377 | start_dial(at_state, ev->ptr, ev->parameter); | 1377 | start_dial(at_state, ev->ptr, ev->parameter); |
1378 | break; | 1378 | break; |
@@ -1385,7 +1385,7 @@ static void do_action(int action, struct cardstate *cs, | |||
1385 | cs->commands_pending = 1; | 1385 | cs->commands_pending = 1; |
1386 | break; | 1386 | break; |
1387 | 1387 | ||
1388 | /* hotplug events */ | 1388 | /* hotplug events */ |
1389 | case ACT_STOP: | 1389 | case ACT_STOP: |
1390 | do_stop(cs); | 1390 | do_stop(cs); |
1391 | break; | 1391 | break; |
@@ -1393,7 +1393,7 @@ static void do_action(int action, struct cardstate *cs, | |||
1393 | do_start(cs); | 1393 | do_start(cs); |
1394 | break; | 1394 | break; |
1395 | 1395 | ||
1396 | /* events from the interface */ | 1396 | /* events from the interface */ |
1397 | case ACT_IF_LOCK: | 1397 | case ACT_IF_LOCK: |
1398 | cs->cmd_result = ev->parameter ? do_lock(cs) : do_unlock(cs); | 1398 | cs->cmd_result = ev->parameter ? do_lock(cs) : do_unlock(cs); |
1399 | cs->waiting = 0; | 1399 | cs->waiting = 0; |
@@ -1412,7 +1412,7 @@ static void do_action(int action, struct cardstate *cs, | |||
1412 | wake_up(&cs->waitqueue); | 1412 | wake_up(&cs->waitqueue); |
1413 | break; | 1413 | break; |
1414 | 1414 | ||
1415 | /* events from the proc file system */ | 1415 | /* events from the proc file system */ |
1416 | case ACT_PROC_CIDMODE: | 1416 | case ACT_PROC_CIDMODE: |
1417 | spin_lock_irqsave(&cs->lock, flags); | 1417 | spin_lock_irqsave(&cs->lock, flags); |
1418 | if (ev->parameter != cs->cidmode) { | 1418 | if (ev->parameter != cs->cidmode) { |
@@ -1431,7 +1431,7 @@ static void do_action(int action, struct cardstate *cs, | |||
1431 | wake_up(&cs->waitqueue); | 1431 | wake_up(&cs->waitqueue); |
1432 | break; | 1432 | break; |
1433 | 1433 | ||
1434 | /* events from the hardware drivers */ | 1434 | /* events from the hardware drivers */ |
1435 | case ACT_NOTIFY_BC_DOWN: | 1435 | case ACT_NOTIFY_BC_DOWN: |
1436 | bchannel_down(bcs); | 1436 | bchannel_down(bcs); |
1437 | break; | 1437 | break; |
@@ -1533,15 +1533,15 @@ static void process_event(struct cardstate *cs, struct event_t *ev) | |||
1533 | if (rcode == RSP_LAST) { | 1533 | if (rcode == RSP_LAST) { |
1534 | /* found nothing...*/ | 1534 | /* found nothing...*/ |
1535 | dev_warn(cs->dev, "%s: rcode=RSP_LAST: " | 1535 | dev_warn(cs->dev, "%s: rcode=RSP_LAST: " |
1536 | "resp_code %d in ConState %d!\n", | 1536 | "resp_code %d in ConState %d!\n", |
1537 | __func__, ev->type, at_state->ConState); | 1537 | __func__, ev->type, at_state->ConState); |
1538 | return; | 1538 | return; |
1539 | } | 1539 | } |
1540 | if ((rcode == RSP_ANY || rcode == ev->type) | 1540 | if ((rcode == RSP_ANY || rcode == ev->type) |
1541 | && ((int) at_state->ConState >= rep->min_ConState) | 1541 | && ((int) at_state->ConState >= rep->min_ConState) |
1542 | && (rep->max_ConState < 0 | 1542 | && (rep->max_ConState < 0 |
1543 | || (int) at_state->ConState <= rep->max_ConState) | 1543 | || (int) at_state->ConState <= rep->max_ConState) |
1544 | && (rep->parameter < 0 || rep->parameter == ev->parameter)) | 1544 | && (rep->parameter < 0 || rep->parameter == ev->parameter)) |
1545 | break; | 1545 | break; |
1546 | } | 1546 | } |
1547 | 1547 | ||
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 212efaf9a4e4..8fad99e5dbd4 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -91,11 +91,11 @@ enum debuglevel { | |||
91 | 91 | ||
92 | #ifdef CONFIG_GIGASET_DEBUG | 92 | #ifdef CONFIG_GIGASET_DEBUG |
93 | 93 | ||
94 | #define gig_dbg(level, format, arg...) \ | 94 | #define gig_dbg(level, format, arg...) \ |
95 | do { \ | 95 | do { \ |
96 | if (unlikely(((enum debuglevel)gigaset_debuglevel) & (level))) \ | 96 | if (unlikely(((enum debuglevel)gigaset_debuglevel) & (level))) \ |
97 | printk(KERN_DEBUG KBUILD_MODNAME ": " format "\n", \ | 97 | printk(KERN_DEBUG KBUILD_MODNAME ": " format "\n", \ |
98 | ## arg); \ | 98 | ## arg); \ |
99 | } while (0) | 99 | } while (0) |
100 | #define DEBUG_DEFAULT (DEBUG_TRANSCMD | DEBUG_CMD | DEBUG_USBREQ) | 100 | #define DEBUG_DEFAULT (DEBUG_TRANSCMD | DEBUG_CMD | DEBUG_USBREQ) |
101 | 101 | ||
@@ -164,7 +164,7 @@ void gigaset_dbg_buffer(enum debuglevel level, const unsigned char *msg, | |||
164 | #define BAS_CORRFRAMES 4 /* flow control multiplicator */ | 164 | #define BAS_CORRFRAMES 4 /* flow control multiplicator */ |
165 | 165 | ||
166 | #define BAS_INBUFSIZE (BAS_MAXFRAME * BAS_NUMFRAMES) | 166 | #define BAS_INBUFSIZE (BAS_MAXFRAME * BAS_NUMFRAMES) |
167 | /* size of isoc in buf per URB */ | 167 | /* size of isoc in buf per URB */ |
168 | #define BAS_OUTBUFSIZE 4096 /* size of common isoc out buffer */ | 168 | #define BAS_OUTBUFSIZE 4096 /* size of common isoc out buffer */ |
169 | #define BAS_OUTBUFPAD BAS_MAXFRAME /* size of pad area for isoc out buf */ | 169 | #define BAS_OUTBUFPAD BAS_MAXFRAME /* size of pad area for isoc out buf */ |
170 | 170 | ||
@@ -473,17 +473,17 @@ struct cardstate { | |||
473 | int commands_pending; /* flag(s) in xxx.commands_pending have | 473 | int commands_pending; /* flag(s) in xxx.commands_pending have |
474 | been set */ | 474 | been set */ |
475 | struct tasklet_struct event_tasklet; | 475 | struct tasklet_struct event_tasklet; |
476 | /* tasklet for serializing AT commands. | 476 | /* tasklet for serializing AT commands. |
477 | * Scheduled | 477 | * Scheduled |
478 | * -> for modem reponses (and | 478 | * -> for modem reponses (and |
479 | * incoming data for M10x) | 479 | * incoming data for M10x) |
480 | * -> on timeout | 480 | * -> on timeout |
481 | * -> after setting bits in | 481 | * -> after setting bits in |
482 | * xxx.at_state.pending_command | 482 | * xxx.at_state.pending_command |
483 | * (e.g. command from LL) */ | 483 | * (e.g. command from LL) */ |
484 | struct tasklet_struct write_tasklet; | 484 | struct tasklet_struct write_tasklet; |
485 | /* tasklet for serial output | 485 | /* tasklet for serial output |
486 | * (not used in base driver) */ | 486 | * (not used in base driver) */ |
487 | 487 | ||
488 | /* event queue */ | 488 | /* event queue */ |
489 | struct event_t events[MAX_EVENTS]; | 489 | struct event_t events[MAX_EVENTS]; |
@@ -491,7 +491,7 @@ struct cardstate { | |||
491 | spinlock_t ev_lock; | 491 | spinlock_t ev_lock; |
492 | 492 | ||
493 | /* current modem response */ | 493 | /* current modem response */ |
494 | unsigned char respdata[MAX_RESP_SIZE+1]; | 494 | unsigned char respdata[MAX_RESP_SIZE + 1]; |
495 | unsigned cbytes; | 495 | unsigned cbytes; |
496 | 496 | ||
497 | /* private data of hardware drivers */ | 497 | /* private data of hardware drivers */ |
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index 1793ba1b6a89..0f13eb1de657 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c | |||
@@ -243,7 +243,7 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
243 | dev_kfree_skb(bcs->rx_skb); | 243 | dev_kfree_skb(bcs->rx_skb); |
244 | gigaset_new_rx_skb(bcs); | 244 | gigaset_new_rx_skb(bcs); |
245 | 245 | ||
246 | commands = kzalloc(AT_NUM*(sizeof *commands), GFP_ATOMIC); | 246 | commands = kzalloc(AT_NUM * (sizeof *commands), GFP_ATOMIC); |
247 | if (!commands) { | 247 | if (!commands) { |
248 | gigaset_free_channel(bcs); | 248 | gigaset_free_channel(bcs); |
249 | dev_err(cs->dev, "ISDN_CMD_DIAL: out of memory\n"); | 249 | dev_err(cs->dev, "ISDN_CMD_DIAL: out of memory\n"); |
@@ -261,7 +261,7 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
261 | if (!commands[AT_TYPE]) | 261 | if (!commands[AT_TYPE]) |
262 | goto oom; | 262 | goto oom; |
263 | snprintf(commands[AT_DIAL], l, | 263 | snprintf(commands[AT_DIAL], l, |
264 | "D%s\r", cntrl->parm.setup.phone+2); | 264 | "D%s\r", cntrl->parm.setup.phone + 2); |
265 | } else { | 265 | } else { |
266 | commands[AT_TYPE] = kstrdup("^SCTP=1\r", GFP_ATOMIC); | 266 | commands[AT_TYPE] = kstrdup("^SCTP=1\r", GFP_ATOMIC); |
267 | if (!commands[AT_TYPE]) | 267 | if (!commands[AT_TYPE]) |
@@ -482,7 +482,7 @@ int gigaset_isdn_icall(struct at_state_t *at_state) | |||
482 | response.parm.setup.si2 = 2; | 482 | response.parm.setup.si2 = 2; |
483 | } else { | 483 | } else { |
484 | dev_warn(cs->dev, "RING ignored - unsupported BC %s\n", | 484 | dev_warn(cs->dev, "RING ignored - unsupported BC %s\n", |
485 | at_state->str_var[STR_ZBC]); | 485 | at_state->str_var[STR_ZBC]); |
486 | return ICALL_IGNORE; | 486 | return ICALL_IGNORE; |
487 | } | 487 | } |
488 | if (at_state->str_var[STR_NMBR]) { | 488 | if (at_state->str_var[STR_NMBR]) { |
@@ -518,7 +518,7 @@ int gigaset_isdn_icall(struct at_state_t *at_state) | |||
518 | return ICALL_REJECT; | 518 | return ICALL_REJECT; |
519 | case 3: /* incomplete */ | 519 | case 3: /* incomplete */ |
520 | dev_warn(cs->dev, | 520 | dev_warn(cs->dev, |
521 | "LL requested unsupported feature: Incomplete Number\n"); | 521 | "LL requested unsupported feature: Incomplete Number\n"); |
522 | return ICALL_IGNORE; | 522 | return ICALL_IGNORE; |
523 | case 4: /* proceeding */ | 523 | case 4: /* proceeding */ |
524 | /* Gigaset will send ALERTING anyway. | 524 | /* Gigaset will send ALERTING anyway. |
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index ee0a549a933a..da2486e59102 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -33,10 +33,10 @@ static int if_lock(struct cardstate *cs, int *arg) | |||
33 | } | 33 | } |
34 | 34 | ||
35 | if (!cmd && cs->mstate == MS_LOCKED && cs->connected) { | 35 | if (!cmd && cs->mstate == MS_LOCKED && cs->connected) { |
36 | cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR|TIOCM_RTS); | 36 | cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR | TIOCM_RTS); |
37 | cs->ops->baud_rate(cs, B115200); | 37 | cs->ops->baud_rate(cs, B115200); |
38 | cs->ops->set_line_ctrl(cs, CS8); | 38 | cs->ops->set_line_ctrl(cs, CS8); |
39 | cs->control_state = TIOCM_DTR|TIOCM_RTS; | 39 | cs->control_state = TIOCM_DTR | TIOCM_RTS; |
40 | } | 40 | } |
41 | 41 | ||
42 | cs->waiting = 1; | 42 | cs->waiting = 1; |
@@ -252,17 +252,17 @@ static int if_ioctl(struct tty_struct *tty, | |||
252 | break; | 252 | break; |
253 | case GIGASET_BRKCHARS: | 253 | case GIGASET_BRKCHARS: |
254 | retval = copy_from_user(&buf, | 254 | retval = copy_from_user(&buf, |
255 | (const unsigned char __user *) arg, 6) | 255 | (const unsigned char __user *) arg, 6) |
256 | ? -EFAULT : 0; | 256 | ? -EFAULT : 0; |
257 | if (retval >= 0) { | 257 | if (retval >= 0) { |
258 | gigaset_dbg_buffer(DEBUG_IF, "GIGASET_BRKCHARS", | 258 | gigaset_dbg_buffer(DEBUG_IF, "GIGASET_BRKCHARS", |
259 | 6, (const unsigned char *) arg); | 259 | 6, (const unsigned char *) arg); |
260 | retval = cs->ops->brkchars(cs, buf); | 260 | retval = cs->ops->brkchars(cs, buf); |
261 | } | 261 | } |
262 | break; | 262 | break; |
263 | case GIGASET_VERSION: | 263 | case GIGASET_VERSION: |
264 | retval = copy_from_user(version, | 264 | retval = copy_from_user(version, |
265 | (unsigned __user *) arg, sizeof version) | 265 | (unsigned __user *) arg, sizeof version) |
266 | ? -EFAULT : 0; | 266 | ? -EFAULT : 0; |
267 | if (retval >= 0) | 267 | if (retval >= 0) |
268 | retval = if_version(cs, version); | 268 | retval = if_version(cs, version); |
@@ -299,7 +299,7 @@ static int if_tiocmget(struct tty_struct *tty) | |||
299 | if (mutex_lock_interruptible(&cs->mutex)) | 299 | if (mutex_lock_interruptible(&cs->mutex)) |
300 | return -ERESTARTSYS; | 300 | return -ERESTARTSYS; |
301 | 301 | ||
302 | retval = cs->control_state & (TIOCM_RTS|TIOCM_DTR); | 302 | retval = cs->control_state & (TIOCM_RTS | TIOCM_DTR); |
303 | 303 | ||
304 | mutex_unlock(&cs->mutex); | 304 | mutex_unlock(&cs->mutex); |
305 | 305 | ||
@@ -329,7 +329,7 @@ static int if_tiocmset(struct tty_struct *tty, | |||
329 | gig_dbg(DEBUG_IF, "not connected"); | 329 | gig_dbg(DEBUG_IF, "not connected"); |
330 | retval = -ENODEV; | 330 | retval = -ENODEV; |
331 | } else { | 331 | } else { |
332 | mc = (cs->control_state | set) & ~clear & (TIOCM_RTS|TIOCM_DTR); | 332 | mc = (cs->control_state | set) & ~clear & (TIOCM_RTS | TIOCM_DTR); |
333 | retval = cs->ops->set_modem_ctrl(cs, cs->control_state, mc); | 333 | retval = cs->ops->set_modem_ctrl(cs, cs->control_state, mc); |
334 | cs->control_state = mc; | 334 | cs->control_state = mc; |
335 | } | 335 | } |
@@ -680,9 +680,9 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, | |||
680 | goto enomem; | 680 | goto enomem; |
681 | 681 | ||
682 | tty->magic = TTY_DRIVER_MAGIC, | 682 | tty->magic = TTY_DRIVER_MAGIC, |
683 | tty->type = TTY_DRIVER_TYPE_SERIAL, | 683 | tty->type = TTY_DRIVER_TYPE_SERIAL, |
684 | tty->subtype = SERIAL_TYPE_NORMAL, | 684 | tty->subtype = SERIAL_TYPE_NORMAL, |
685 | tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; | 685 | tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; |
686 | 686 | ||
687 | tty->driver_name = procname; | 687 | tty->driver_name = procname; |
688 | tty->name = devname; | 688 | tty->name = devname; |
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index f39ccdf87a17..a351c16705bd 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c | |||
@@ -250,94 +250,94 @@ static inline void dump_bytes(enum debuglevel level, const char *tag, | |||
250 | */ | 250 | */ |
251 | static const u16 stufftab[5 * 256] = { | 251 | static const u16 stufftab[5 * 256] = { |
252 | /* previous 1s = 0: */ | 252 | /* previous 1s = 0: */ |
253 | 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, | 253 | 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, |
254 | 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x201f, | 254 | 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x201f, |
255 | 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, | 255 | 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, |
256 | 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x203e, 0x205f, | 256 | 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x203e, 0x205f, |
257 | 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, | 257 | 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, |
258 | 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x209f, | 258 | 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x209f, |
259 | 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, | 259 | 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f, |
260 | 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x207c, 0x207d, 0x20be, 0x20df, | 260 | 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x207c, 0x207d, 0x20be, 0x20df, |
261 | 0x0480, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487, 0x0488, 0x0489, 0x048a, 0x048b, 0x048c, 0x048d, 0x048e, 0x048f, | 261 | 0x0480, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487, 0x0488, 0x0489, 0x048a, 0x048b, 0x048c, 0x048d, 0x048e, 0x048f, |
262 | 0x0490, 0x0491, 0x0492, 0x0493, 0x0494, 0x0495, 0x0496, 0x0497, 0x0498, 0x0499, 0x049a, 0x049b, 0x049c, 0x049d, 0x049e, 0x251f, | 262 | 0x0490, 0x0491, 0x0492, 0x0493, 0x0494, 0x0495, 0x0496, 0x0497, 0x0498, 0x0499, 0x049a, 0x049b, 0x049c, 0x049d, 0x049e, 0x251f, |
263 | 0x04a0, 0x04a1, 0x04a2, 0x04a3, 0x04a4, 0x04a5, 0x04a6, 0x04a7, 0x04a8, 0x04a9, 0x04aa, 0x04ab, 0x04ac, 0x04ad, 0x04ae, 0x04af, | 263 | 0x04a0, 0x04a1, 0x04a2, 0x04a3, 0x04a4, 0x04a5, 0x04a6, 0x04a7, 0x04a8, 0x04a9, 0x04aa, 0x04ab, 0x04ac, 0x04ad, 0x04ae, 0x04af, |
264 | 0x04b0, 0x04b1, 0x04b2, 0x04b3, 0x04b4, 0x04b5, 0x04b6, 0x04b7, 0x04b8, 0x04b9, 0x04ba, 0x04bb, 0x04bc, 0x04bd, 0x253e, 0x255f, | 264 | 0x04b0, 0x04b1, 0x04b2, 0x04b3, 0x04b4, 0x04b5, 0x04b6, 0x04b7, 0x04b8, 0x04b9, 0x04ba, 0x04bb, 0x04bc, 0x04bd, 0x253e, 0x255f, |
265 | 0x08c0, 0x08c1, 0x08c2, 0x08c3, 0x08c4, 0x08c5, 0x08c6, 0x08c7, 0x08c8, 0x08c9, 0x08ca, 0x08cb, 0x08cc, 0x08cd, 0x08ce, 0x08cf, | 265 | 0x08c0, 0x08c1, 0x08c2, 0x08c3, 0x08c4, 0x08c5, 0x08c6, 0x08c7, 0x08c8, 0x08c9, 0x08ca, 0x08cb, 0x08cc, 0x08cd, 0x08ce, 0x08cf, |
266 | 0x08d0, 0x08d1, 0x08d2, 0x08d3, 0x08d4, 0x08d5, 0x08d6, 0x08d7, 0x08d8, 0x08d9, 0x08da, 0x08db, 0x08dc, 0x08dd, 0x08de, 0x299f, | 266 | 0x08d0, 0x08d1, 0x08d2, 0x08d3, 0x08d4, 0x08d5, 0x08d6, 0x08d7, 0x08d8, 0x08d9, 0x08da, 0x08db, 0x08dc, 0x08dd, 0x08de, 0x299f, |
267 | 0x0ce0, 0x0ce1, 0x0ce2, 0x0ce3, 0x0ce4, 0x0ce5, 0x0ce6, 0x0ce7, 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb, 0x0cec, 0x0ced, 0x0cee, 0x0cef, | 267 | 0x0ce0, 0x0ce1, 0x0ce2, 0x0ce3, 0x0ce4, 0x0ce5, 0x0ce6, 0x0ce7, 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb, 0x0cec, 0x0ced, 0x0cee, 0x0cef, |
268 | 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6, 0x10f7, 0x20f8, 0x20f9, 0x20fa, 0x20fb, 0x257c, 0x257d, 0x29be, 0x2ddf, | 268 | 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6, 0x10f7, 0x20f8, 0x20f9, 0x20fa, 0x20fb, 0x257c, 0x257d, 0x29be, 0x2ddf, |
269 | 269 | ||
270 | /* previous 1s = 1: */ | 270 | /* previous 1s = 1: */ |
271 | 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x200f, | 271 | 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x200f, |
272 | 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x202f, | 272 | 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x202f, |
273 | 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x204f, | 273 | 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x204f, |
274 | 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x203e, 0x206f, | 274 | 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x203e, 0x206f, |
275 | 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x208f, | 275 | 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x208f, |
276 | 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x20af, | 276 | 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x20af, |
277 | 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x20cf, | 277 | 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x20cf, |
278 | 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x207c, 0x207d, 0x20be, 0x20ef, | 278 | 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077, 0x0078, 0x0079, 0x007a, 0x007b, 0x207c, 0x207d, 0x20be, 0x20ef, |
279 | 0x0480, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487, 0x0488, 0x0489, 0x048a, 0x048b, 0x048c, 0x048d, 0x048e, 0x250f, | 279 | 0x0480, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x0487, 0x0488, 0x0489, 0x048a, 0x048b, 0x048c, 0x048d, 0x048e, 0x250f, |
280 | 0x0490, 0x0491, 0x0492, 0x0493, 0x0494, 0x0495, 0x0496, 0x0497, 0x0498, 0x0499, 0x049a, 0x049b, 0x049c, 0x049d, 0x049e, 0x252f, | 280 | 0x0490, 0x0491, 0x0492, 0x0493, 0x0494, 0x0495, 0x0496, 0x0497, 0x0498, 0x0499, 0x049a, 0x049b, 0x049c, 0x049d, 0x049e, 0x252f, |
281 | 0x04a0, 0x04a1, 0x04a2, 0x04a3, 0x04a4, 0x04a5, 0x04a6, 0x04a7, 0x04a8, 0x04a9, 0x04aa, 0x04ab, 0x04ac, 0x04ad, 0x04ae, 0x254f, | 281 | 0x04a0, 0x04a1, 0x04a2, 0x04a3, 0x04a4, 0x04a5, 0x04a6, 0x04a7, 0x04a8, 0x04a9, 0x04aa, 0x04ab, 0x04ac, 0x04ad, 0x04ae, 0x254f, |
282 | 0x04b0, 0x04b1, 0x04b2, 0x04b3, 0x04b4, 0x04b5, 0x04b6, 0x04b7, 0x04b8, 0x04b9, 0x04ba, 0x04bb, 0x04bc, 0x04bd, 0x253e, 0x256f, | 282 | 0x04b0, 0x04b1, 0x04b2, 0x04b3, 0x04b4, 0x04b5, 0x04b6, 0x04b7, 0x04b8, 0x04b9, 0x04ba, 0x04bb, 0x04bc, 0x04bd, 0x253e, 0x256f, |
283 | 0x08c0, 0x08c1, 0x08c2, 0x08c3, 0x08c4, 0x08c5, 0x08c6, 0x08c7, 0x08c8, 0x08c9, 0x08ca, 0x08cb, 0x08cc, 0x08cd, 0x08ce, 0x298f, | 283 | 0x08c0, 0x08c1, 0x08c2, 0x08c3, 0x08c4, 0x08c5, 0x08c6, 0x08c7, 0x08c8, 0x08c9, 0x08ca, 0x08cb, 0x08cc, 0x08cd, 0x08ce, 0x298f, |
284 | 0x08d0, 0x08d1, 0x08d2, 0x08d3, 0x08d4, 0x08d5, 0x08d6, 0x08d7, 0x08d8, 0x08d9, 0x08da, 0x08db, 0x08dc, 0x08dd, 0x08de, 0x29af, | 284 | 0x08d0, 0x08d1, 0x08d2, 0x08d3, 0x08d4, 0x08d5, 0x08d6, 0x08d7, 0x08d8, 0x08d9, 0x08da, 0x08db, 0x08dc, 0x08dd, 0x08de, 0x29af, |
285 | 0x0ce0, 0x0ce1, 0x0ce2, 0x0ce3, 0x0ce4, 0x0ce5, 0x0ce6, 0x0ce7, 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb, 0x0cec, 0x0ced, 0x0cee, 0x2dcf, | 285 | 0x0ce0, 0x0ce1, 0x0ce2, 0x0ce3, 0x0ce4, 0x0ce5, 0x0ce6, 0x0ce7, 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb, 0x0cec, 0x0ced, 0x0cee, 0x2dcf, |
286 | 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6, 0x10f7, 0x20f8, 0x20f9, 0x20fa, 0x20fb, 0x257c, 0x257d, 0x29be, 0x31ef, | 286 | 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6, 0x10f7, 0x20f8, 0x20f9, 0x20fa, 0x20fb, 0x257c, 0x257d, 0x29be, 0x31ef, |
287 | 287 | ||
288 | /* previous 1s = 2: */ | 288 | /* previous 1s = 2: */ |
289 | 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x2007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x2017, | 289 | 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x2007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x2017, |
290 | 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x2027, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x2037, | 290 | 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x2027, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x2037, |
291 | 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x2047, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x2057, | 291 | 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x2047, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x2057, |
292 | 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x2067, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x203e, 0x2077, | 292 | 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x2067, 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x203e, 0x2077, |
293 | 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x2087, 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x2097, | 293 | 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x2087, 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x2097, |
294 | 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x20a7, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x20b7, | 294 | 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x20a7, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x20b7, |
295 | 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x20c7, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x20d7, | 295 | 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x20c7, 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x20d7, |
296 | 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x20e7, 0x0078, 0x0079, 0x007a, 0x007b, 0x207c, 0x207d, 0x20be, 0x20f7, | 296 | 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x20e7, 0x0078, 0x0079, 0x007a, 0x007b, 0x207c, 0x207d, 0x20be, 0x20f7, |
297 | 0x0480, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x2507, 0x0488, 0x0489, 0x048a, 0x048b, 0x048c, 0x048d, 0x048e, 0x2517, | 297 | 0x0480, 0x0481, 0x0482, 0x0483, 0x0484, 0x0485, 0x0486, 0x2507, 0x0488, 0x0489, 0x048a, 0x048b, 0x048c, 0x048d, 0x048e, 0x2517, |
298 | 0x0490, 0x0491, 0x0492, 0x0493, 0x0494, 0x0495, 0x0496, 0x2527, 0x0498, 0x0499, 0x049a, 0x049b, 0x049c, 0x049d, 0x049e, 0x2537, | 298 | 0x0490, 0x0491, 0x0492, 0x0493, 0x0494, 0x0495, 0x0496, 0x2527, 0x0498, 0x0499, 0x049a, 0x049b, 0x049c, 0x049d, 0x049e, 0x2537, |
299 | 0x04a0, 0x04a1, 0x04a2, 0x04a3, 0x04a4, 0x04a5, 0x04a6, 0x2547, 0x04a8, 0x04a9, 0x04aa, 0x04ab, 0x04ac, 0x04ad, 0x04ae, 0x2557, | 299 | 0x04a0, 0x04a1, 0x04a2, 0x04a3, 0x04a4, 0x04a5, 0x04a6, 0x2547, 0x04a8, 0x04a9, 0x04aa, 0x04ab, 0x04ac, 0x04ad, 0x04ae, 0x2557, |
300 | 0x04b0, 0x04b1, 0x04b2, 0x04b3, 0x04b4, 0x04b5, 0x04b6, 0x2567, 0x04b8, 0x04b9, 0x04ba, 0x04bb, 0x04bc, 0x04bd, 0x253e, 0x2577, | 300 | 0x04b0, 0x04b1, 0x04b2, 0x04b3, 0x04b4, 0x04b5, 0x04b6, 0x2567, 0x04b8, 0x04b9, 0x04ba, 0x04bb, 0x04bc, 0x04bd, 0x253e, 0x2577, |
301 | 0x08c0, 0x08c1, 0x08c2, 0x08c3, 0x08c4, 0x08c5, 0x08c6, 0x2987, 0x08c8, 0x08c9, 0x08ca, 0x08cb, 0x08cc, 0x08cd, 0x08ce, 0x2997, | 301 | 0x08c0, 0x08c1, 0x08c2, 0x08c3, 0x08c4, 0x08c5, 0x08c6, 0x2987, 0x08c8, 0x08c9, 0x08ca, 0x08cb, 0x08cc, 0x08cd, 0x08ce, 0x2997, |
302 | 0x08d0, 0x08d1, 0x08d2, 0x08d3, 0x08d4, 0x08d5, 0x08d6, 0x29a7, 0x08d8, 0x08d9, 0x08da, 0x08db, 0x08dc, 0x08dd, 0x08de, 0x29b7, | 302 | 0x08d0, 0x08d1, 0x08d2, 0x08d3, 0x08d4, 0x08d5, 0x08d6, 0x29a7, 0x08d8, 0x08d9, 0x08da, 0x08db, 0x08dc, 0x08dd, 0x08de, 0x29b7, |
303 | 0x0ce0, 0x0ce1, 0x0ce2, 0x0ce3, 0x0ce4, 0x0ce5, 0x0ce6, 0x2dc7, 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb, 0x0cec, 0x0ced, 0x0cee, 0x2dd7, | 303 | 0x0ce0, 0x0ce1, 0x0ce2, 0x0ce3, 0x0ce4, 0x0ce5, 0x0ce6, 0x2dc7, 0x0ce8, 0x0ce9, 0x0cea, 0x0ceb, 0x0cec, 0x0ced, 0x0cee, 0x2dd7, |
304 | 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6, 0x31e7, 0x20f8, 0x20f9, 0x20fa, 0x20fb, 0x257c, 0x257d, 0x29be, 0x41f7, | 304 | 0x10f0, 0x10f1, 0x10f2, 0x10f3, 0x10f4, 0x10f5, 0x10f6, 0x31e7, 0x20f8, 0x20f9, 0x20fa, 0x20fb, 0x257c, 0x257d, 0x29be, 0x41f7, |
305 | 305 | ||
306 | /* previous 1s = 3: */ | 306 | /* previous 1s = 3: */ |
307 | 0x0000, 0x0001, 0x0002, 0x2003, 0x0004, 0x0005, 0x0006, 0x200b, 0x0008, 0x0009, 0x000a, 0x2013, 0x000c, 0x000d, 0x000e, 0x201b, | 307 | 0x0000, 0x0001, 0x0002, 0x2003, 0x0004, 0x0005, 0x0006, 0x200b, 0x0008, 0x0009, 0x000a, 0x2013, 0x000c, 0x000d, 0x000e, 0x201b, |
308 | 0x0010, 0x0011, 0x0012, 0x2023, 0x0014, 0x0015, 0x0016, 0x202b, 0x0018, 0x0019, 0x001a, 0x2033, 0x001c, 0x001d, 0x001e, 0x203b, | 308 | 0x0010, 0x0011, 0x0012, 0x2023, 0x0014, 0x0015, 0x0016, 0x202b, 0x0018, 0x0019, 0x001a, 0x2033, 0x001c, 0x001d, 0x001e, 0x203b, |
309 | 0x0020, 0x0021, 0x0022, 0x2043, 0x0024, 0x0025, 0x0026, 0x204b, 0x0028, 0x0029, 0x002a, 0x2053, 0x002c, 0x002d, 0x002e, 0x205b, | 309 | 0x0020, 0x0021, 0x0022, 0x2043, 0x0024, 0x0025, 0x0026, 0x204b, 0x0028, 0x0029, 0x002a, 0x2053, 0x002c, 0x002d, 0x002e, 0x205b, |
310 | 0x0030, 0x0031, 0x0032, 0x2063, 0x0034, 0x0035, 0x0036, 0x206b, 0x0038, 0x0039, 0x003a, 0x2073, 0x003c, 0x003d, 0x203e, 0x207b, | 310 | 0x0030, 0x0031, 0x0032, 0x2063, 0x0034, 0x0035, 0x0036, 0x206b, 0x0038, 0x0039, 0x003a, 0x2073, 0x003c, 0x003d, 0x203e, 0x207b, |
311 | 0x0040, 0x0041, 0x0042, 0x2083, 0x0044, 0x0045, 0x0046, 0x208b, 0x0048, 0x0049, 0x004a, 0x2093, 0x004c, 0x004d, 0x004e, 0x209b, | 311 | 0x0040, 0x0041, 0x0042, 0x2083, 0x0044, 0x0045, 0x0046, 0x208b, 0x0048, 0x0049, 0x004a, 0x2093, 0x004c, 0x004d, 0x004e, 0x209b, |
312 | 0x0050, 0x0051, 0x0052, 0x20a3, 0x0054, 0x0055, 0x0056, 0x20ab, 0x0058, 0x0059, 0x005a, 0x20b3, 0x005c, 0x005d, 0x005e, 0x20bb, | 312 | 0x0050, 0x0051, 0x0052, 0x20a3, 0x0054, 0x0055, 0x0056, 0x20ab, 0x0058, 0x0059, 0x005a, 0x20b3, 0x005c, 0x005d, 0x005e, 0x20bb, |
313 | 0x0060, 0x0061, 0x0062, 0x20c3, 0x0064, 0x0065, 0x0066, 0x20cb, 0x0068, 0x0069, 0x006a, 0x20d3, 0x006c, 0x006d, 0x006e, 0x20db, | 313 | 0x0060, 0x0061, 0x0062, 0x20c3, 0x0064, 0x0065, 0x0066, 0x20cb, 0x0068, 0x0069, 0x006a, 0x20d3, 0x006c, 0x006d, 0x006e, 0x20db, |
314 | 0x0070, 0x0071, 0x0072, 0x20e3, 0x0074, 0x0075, 0x0076, 0x20eb, 0x0078, 0x0079, 0x007a, 0x20f3, 0x207c, 0x207d, 0x20be, 0x40fb, | 314 | 0x0070, 0x0071, 0x0072, 0x20e3, 0x0074, 0x0075, 0x0076, 0x20eb, 0x0078, 0x0079, 0x007a, 0x20f3, 0x207c, 0x207d, 0x20be, 0x40fb, |
315 | 0x0480, 0x0481, 0x0482, 0x2503, 0x0484, 0x0485, 0x0486, 0x250b, 0x0488, 0x0489, 0x048a, 0x2513, 0x048c, 0x048d, 0x048e, 0x251b, | 315 | 0x0480, 0x0481, 0x0482, 0x2503, 0x0484, 0x0485, 0x0486, 0x250b, 0x0488, 0x0489, 0x048a, 0x2513, 0x048c, 0x048d, 0x048e, 0x251b, |
316 | 0x0490, 0x0491, 0x0492, 0x2523, 0x0494, 0x0495, 0x0496, 0x252b, 0x0498, 0x0499, 0x049a, 0x2533, 0x049c, 0x049d, 0x049e, 0x253b, | 316 | 0x0490, 0x0491, 0x0492, 0x2523, 0x0494, 0x0495, 0x0496, 0x252b, 0x0498, 0x0499, 0x049a, 0x2533, 0x049c, 0x049d, 0x049e, 0x253b, |
317 | 0x04a0, 0x04a1, 0x04a2, 0x2543, 0x04a4, 0x04a5, 0x04a6, 0x254b, 0x04a8, 0x04a9, 0x04aa, 0x2553, 0x04ac, 0x04ad, 0x04ae, 0x255b, | 317 | 0x04a0, 0x04a1, 0x04a2, 0x2543, 0x04a4, 0x04a5, 0x04a6, 0x254b, 0x04a8, 0x04a9, 0x04aa, 0x2553, 0x04ac, 0x04ad, 0x04ae, 0x255b, |
318 | 0x04b0, 0x04b1, 0x04b2, 0x2563, 0x04b4, 0x04b5, 0x04b6, 0x256b, 0x04b8, 0x04b9, 0x04ba, 0x2573, 0x04bc, 0x04bd, 0x253e, 0x257b, | 318 | 0x04b0, 0x04b1, 0x04b2, 0x2563, 0x04b4, 0x04b5, 0x04b6, 0x256b, 0x04b8, 0x04b9, 0x04ba, 0x2573, 0x04bc, 0x04bd, 0x253e, 0x257b, |
319 | 0x08c0, 0x08c1, 0x08c2, 0x2983, 0x08c4, 0x08c5, 0x08c6, 0x298b, 0x08c8, 0x08c9, 0x08ca, 0x2993, 0x08cc, 0x08cd, 0x08ce, 0x299b, | 319 | 0x08c0, 0x08c1, 0x08c2, 0x2983, 0x08c4, 0x08c5, 0x08c6, 0x298b, 0x08c8, 0x08c9, 0x08ca, 0x2993, 0x08cc, 0x08cd, 0x08ce, 0x299b, |
320 | 0x08d0, 0x08d1, 0x08d2, 0x29a3, 0x08d4, 0x08d5, 0x08d6, 0x29ab, 0x08d8, 0x08d9, 0x08da, 0x29b3, 0x08dc, 0x08dd, 0x08de, 0x29bb, | 320 | 0x08d0, 0x08d1, 0x08d2, 0x29a3, 0x08d4, 0x08d5, 0x08d6, 0x29ab, 0x08d8, 0x08d9, 0x08da, 0x29b3, 0x08dc, 0x08dd, 0x08de, 0x29bb, |
321 | 0x0ce0, 0x0ce1, 0x0ce2, 0x2dc3, 0x0ce4, 0x0ce5, 0x0ce6, 0x2dcb, 0x0ce8, 0x0ce9, 0x0cea, 0x2dd3, 0x0cec, 0x0ced, 0x0cee, 0x2ddb, | 321 | 0x0ce0, 0x0ce1, 0x0ce2, 0x2dc3, 0x0ce4, 0x0ce5, 0x0ce6, 0x2dcb, 0x0ce8, 0x0ce9, 0x0cea, 0x2dd3, 0x0cec, 0x0ced, 0x0cee, 0x2ddb, |
322 | 0x10f0, 0x10f1, 0x10f2, 0x31e3, 0x10f4, 0x10f5, 0x10f6, 0x31eb, 0x20f8, 0x20f9, 0x20fa, 0x41f3, 0x257c, 0x257d, 0x29be, 0x46fb, | 322 | 0x10f0, 0x10f1, 0x10f2, 0x31e3, 0x10f4, 0x10f5, 0x10f6, 0x31eb, 0x20f8, 0x20f9, 0x20fa, 0x41f3, 0x257c, 0x257d, 0x29be, 0x46fb, |
323 | 323 | ||
324 | /* previous 1s = 4: */ | 324 | /* previous 1s = 4: */ |
325 | 0x0000, 0x2001, 0x0002, 0x2005, 0x0004, 0x2009, 0x0006, 0x200d, 0x0008, 0x2011, 0x000a, 0x2015, 0x000c, 0x2019, 0x000e, 0x201d, | 325 | 0x0000, 0x2001, 0x0002, 0x2005, 0x0004, 0x2009, 0x0006, 0x200d, 0x0008, 0x2011, 0x000a, 0x2015, 0x000c, 0x2019, 0x000e, 0x201d, |
326 | 0x0010, 0x2021, 0x0012, 0x2025, 0x0014, 0x2029, 0x0016, 0x202d, 0x0018, 0x2031, 0x001a, 0x2035, 0x001c, 0x2039, 0x001e, 0x203d, | 326 | 0x0010, 0x2021, 0x0012, 0x2025, 0x0014, 0x2029, 0x0016, 0x202d, 0x0018, 0x2031, 0x001a, 0x2035, 0x001c, 0x2039, 0x001e, 0x203d, |
327 | 0x0020, 0x2041, 0x0022, 0x2045, 0x0024, 0x2049, 0x0026, 0x204d, 0x0028, 0x2051, 0x002a, 0x2055, 0x002c, 0x2059, 0x002e, 0x205d, | 327 | 0x0020, 0x2041, 0x0022, 0x2045, 0x0024, 0x2049, 0x0026, 0x204d, 0x0028, 0x2051, 0x002a, 0x2055, 0x002c, 0x2059, 0x002e, 0x205d, |
328 | 0x0030, 0x2061, 0x0032, 0x2065, 0x0034, 0x2069, 0x0036, 0x206d, 0x0038, 0x2071, 0x003a, 0x2075, 0x003c, 0x2079, 0x203e, 0x407d, | 328 | 0x0030, 0x2061, 0x0032, 0x2065, 0x0034, 0x2069, 0x0036, 0x206d, 0x0038, 0x2071, 0x003a, 0x2075, 0x003c, 0x2079, 0x203e, 0x407d, |
329 | 0x0040, 0x2081, 0x0042, 0x2085, 0x0044, 0x2089, 0x0046, 0x208d, 0x0048, 0x2091, 0x004a, 0x2095, 0x004c, 0x2099, 0x004e, 0x209d, | 329 | 0x0040, 0x2081, 0x0042, 0x2085, 0x0044, 0x2089, 0x0046, 0x208d, 0x0048, 0x2091, 0x004a, 0x2095, 0x004c, 0x2099, 0x004e, 0x209d, |
330 | 0x0050, 0x20a1, 0x0052, 0x20a5, 0x0054, 0x20a9, 0x0056, 0x20ad, 0x0058, 0x20b1, 0x005a, 0x20b5, 0x005c, 0x20b9, 0x005e, 0x20bd, | 330 | 0x0050, 0x20a1, 0x0052, 0x20a5, 0x0054, 0x20a9, 0x0056, 0x20ad, 0x0058, 0x20b1, 0x005a, 0x20b5, 0x005c, 0x20b9, 0x005e, 0x20bd, |
331 | 0x0060, 0x20c1, 0x0062, 0x20c5, 0x0064, 0x20c9, 0x0066, 0x20cd, 0x0068, 0x20d1, 0x006a, 0x20d5, 0x006c, 0x20d9, 0x006e, 0x20dd, | 331 | 0x0060, 0x20c1, 0x0062, 0x20c5, 0x0064, 0x20c9, 0x0066, 0x20cd, 0x0068, 0x20d1, 0x006a, 0x20d5, 0x006c, 0x20d9, 0x006e, 0x20dd, |
332 | 0x0070, 0x20e1, 0x0072, 0x20e5, 0x0074, 0x20e9, 0x0076, 0x20ed, 0x0078, 0x20f1, 0x007a, 0x20f5, 0x207c, 0x40f9, 0x20be, 0x417d, | 332 | 0x0070, 0x20e1, 0x0072, 0x20e5, 0x0074, 0x20e9, 0x0076, 0x20ed, 0x0078, 0x20f1, 0x007a, 0x20f5, 0x207c, 0x40f9, 0x20be, 0x417d, |
333 | 0x0480, 0x2501, 0x0482, 0x2505, 0x0484, 0x2509, 0x0486, 0x250d, 0x0488, 0x2511, 0x048a, 0x2515, 0x048c, 0x2519, 0x048e, 0x251d, | 333 | 0x0480, 0x2501, 0x0482, 0x2505, 0x0484, 0x2509, 0x0486, 0x250d, 0x0488, 0x2511, 0x048a, 0x2515, 0x048c, 0x2519, 0x048e, 0x251d, |
334 | 0x0490, 0x2521, 0x0492, 0x2525, 0x0494, 0x2529, 0x0496, 0x252d, 0x0498, 0x2531, 0x049a, 0x2535, 0x049c, 0x2539, 0x049e, 0x253d, | 334 | 0x0490, 0x2521, 0x0492, 0x2525, 0x0494, 0x2529, 0x0496, 0x252d, 0x0498, 0x2531, 0x049a, 0x2535, 0x049c, 0x2539, 0x049e, 0x253d, |
335 | 0x04a0, 0x2541, 0x04a2, 0x2545, 0x04a4, 0x2549, 0x04a6, 0x254d, 0x04a8, 0x2551, 0x04aa, 0x2555, 0x04ac, 0x2559, 0x04ae, 0x255d, | 335 | 0x04a0, 0x2541, 0x04a2, 0x2545, 0x04a4, 0x2549, 0x04a6, 0x254d, 0x04a8, 0x2551, 0x04aa, 0x2555, 0x04ac, 0x2559, 0x04ae, 0x255d, |
336 | 0x04b0, 0x2561, 0x04b2, 0x2565, 0x04b4, 0x2569, 0x04b6, 0x256d, 0x04b8, 0x2571, 0x04ba, 0x2575, 0x04bc, 0x2579, 0x253e, 0x467d, | 336 | 0x04b0, 0x2561, 0x04b2, 0x2565, 0x04b4, 0x2569, 0x04b6, 0x256d, 0x04b8, 0x2571, 0x04ba, 0x2575, 0x04bc, 0x2579, 0x253e, 0x467d, |
337 | 0x08c0, 0x2981, 0x08c2, 0x2985, 0x08c4, 0x2989, 0x08c6, 0x298d, 0x08c8, 0x2991, 0x08ca, 0x2995, 0x08cc, 0x2999, 0x08ce, 0x299d, | 337 | 0x08c0, 0x2981, 0x08c2, 0x2985, 0x08c4, 0x2989, 0x08c6, 0x298d, 0x08c8, 0x2991, 0x08ca, 0x2995, 0x08cc, 0x2999, 0x08ce, 0x299d, |
338 | 0x08d0, 0x29a1, 0x08d2, 0x29a5, 0x08d4, 0x29a9, 0x08d6, 0x29ad, 0x08d8, 0x29b1, 0x08da, 0x29b5, 0x08dc, 0x29b9, 0x08de, 0x29bd, | 338 | 0x08d0, 0x29a1, 0x08d2, 0x29a5, 0x08d4, 0x29a9, 0x08d6, 0x29ad, 0x08d8, 0x29b1, 0x08da, 0x29b5, 0x08dc, 0x29b9, 0x08de, 0x29bd, |
339 | 0x0ce0, 0x2dc1, 0x0ce2, 0x2dc5, 0x0ce4, 0x2dc9, 0x0ce6, 0x2dcd, 0x0ce8, 0x2dd1, 0x0cea, 0x2dd5, 0x0cec, 0x2dd9, 0x0cee, 0x2ddd, | 339 | 0x0ce0, 0x2dc1, 0x0ce2, 0x2dc5, 0x0ce4, 0x2dc9, 0x0ce6, 0x2dcd, 0x0ce8, 0x2dd1, 0x0cea, 0x2dd5, 0x0cec, 0x2dd9, 0x0cee, 0x2ddd, |
340 | 0x10f0, 0x31e1, 0x10f2, 0x31e5, 0x10f4, 0x31e9, 0x10f6, 0x31ed, 0x20f8, 0x41f1, 0x20fa, 0x41f5, 0x257c, 0x46f9, 0x29be, 0x4b7d | 340 | 0x10f0, 0x31e1, 0x10f2, 0x31e5, 0x10f4, 0x31e9, 0x10f6, 0x31ed, 0x20f8, 0x41f1, 0x20fa, 0x41f5, 0x257c, 0x46f9, 0x29be, 0x4b7d |
341 | }; | 341 | }; |
342 | 342 | ||
343 | /* hdlc_bitstuff_byte | 343 | /* hdlc_bitstuff_byte |
@@ -598,22 +598,22 @@ static inline void hdlc_frag(struct bc_state *bcs, unsigned inbits) | |||
598 | * bit 7 set if there are 5 or more "interior" consecutive '1' bits | 598 | * bit 7 set if there are 5 or more "interior" consecutive '1' bits |
599 | */ | 599 | */ |
600 | static const unsigned char bitcounts[256] = { | 600 | static const unsigned char bitcounts[256] = { |
601 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, | 601 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, |
602 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, | 602 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, |
603 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, | 603 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, |
604 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x80, 0x06, | 604 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x80, 0x06, |
605 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, | 605 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, |
606 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, | 606 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x05, |
607 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, | 607 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x04, |
608 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x80, 0x81, 0x80, 0x07, | 608 | 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x80, 0x81, 0x80, 0x07, |
609 | 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x13, 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x14, | 609 | 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x13, 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x14, |
610 | 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x13, 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x15, | 610 | 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x13, 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x15, |
611 | 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x13, 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x14, | 611 | 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x13, 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x14, |
612 | 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x13, 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x90, 0x16, | 612 | 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x10, 0x13, 0x10, 0x11, 0x10, 0x12, 0x10, 0x11, 0x90, 0x16, |
613 | 0x20, 0x21, 0x20, 0x22, 0x20, 0x21, 0x20, 0x23, 0x20, 0x21, 0x20, 0x22, 0x20, 0x21, 0x20, 0x24, | 613 | 0x20, 0x21, 0x20, 0x22, 0x20, 0x21, 0x20, 0x23, 0x20, 0x21, 0x20, 0x22, 0x20, 0x21, 0x20, 0x24, |
614 | 0x20, 0x21, 0x20, 0x22, 0x20, 0x21, 0x20, 0x23, 0x20, 0x21, 0x20, 0x22, 0x20, 0x21, 0x20, 0x25, | 614 | 0x20, 0x21, 0x20, 0x22, 0x20, 0x21, 0x20, 0x23, 0x20, 0x21, 0x20, 0x22, 0x20, 0x21, 0x20, 0x25, |
615 | 0x30, 0x31, 0x30, 0x32, 0x30, 0x31, 0x30, 0x33, 0x30, 0x31, 0x30, 0x32, 0x30, 0x31, 0x30, 0x34, | 615 | 0x30, 0x31, 0x30, 0x32, 0x30, 0x31, 0x30, 0x33, 0x30, 0x31, 0x30, 0x32, 0x30, 0x31, 0x30, 0x34, |
616 | 0x40, 0x41, 0x40, 0x42, 0x40, 0x41, 0x40, 0x43, 0x50, 0x51, 0x50, 0x52, 0x60, 0x61, 0x70, 0x78 | 616 | 0x40, 0x41, 0x40, 0x42, 0x40, 0x41, 0x40, 0x43, 0x50, 0x51, 0x50, 0x52, 0x60, 0x61, 0x70, 0x78 |
617 | }; | 617 | }; |
618 | 618 | ||
619 | /* hdlc_unpack | 619 | /* hdlc_unpack |
diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c index b943efbff44d..e3f9d0f089fa 100644 --- a/drivers/isdn/gigaset/proc.c +++ b/drivers/isdn/gigaset/proc.c | |||
@@ -35,7 +35,7 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr, | |||
35 | if (!isspace(*end++)) | 35 | if (!isspace(*end++)) |
36 | return -EINVAL; | 36 | return -EINVAL; |
37 | if (value < 0 || value > 1) | 37 | if (value < 0 || value > 1) |
38 | return -EINVAL; | 38 | return -EINVAL; |
39 | 39 | ||
40 | if (mutex_lock_interruptible(&cs->mutex)) | 40 | if (mutex_lock_interruptible(&cs->mutex)) |
41 | return -ERESTARTSYS; | 41 | return -ERESTARTSYS; |
@@ -56,7 +56,7 @@ static ssize_t set_cidmode(struct device *dev, struct device_attribute *attr, | |||
56 | return count; | 56 | return count; |
57 | } | 57 | } |
58 | 58 | ||
59 | static DEVICE_ATTR(cidmode, S_IRUGO|S_IWUSR, show_cidmode, set_cidmode); | 59 | static DEVICE_ATTR(cidmode, S_IRUGO | S_IWUSR, show_cidmode, set_cidmode); |
60 | 60 | ||
61 | /* free sysfs for device */ | 61 | /* free sysfs for device */ |
62 | void gigaset_free_dev_sysfs(struct cardstate *cs) | 62 | void gigaset_free_dev_sysfs(struct cardstate *cs) |
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index 86a5c4f7775e..6f3fd4cf4378 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c | |||
@@ -246,7 +246,7 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb) | |||
246 | unsigned long flags; | 246 | unsigned long flags; |
247 | 247 | ||
248 | gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? | 248 | gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? |
249 | DEBUG_TRANSCMD : DEBUG_LOCKCMD, | 249 | DEBUG_TRANSCMD : DEBUG_LOCKCMD, |
250 | "CMD Transmit", cb->len, cb->buf); | 250 | "CMD Transmit", cb->len, cb->buf); |
251 | 251 | ||
252 | spin_lock_irqsave(&cs->cmdlock, flags); | 252 | spin_lock_irqsave(&cs->cmdlock, flags); |
@@ -773,8 +773,8 @@ static int __init ser_gigaset_init(void) | |||
773 | 773 | ||
774 | /* allocate memory for our driver state and initialize it */ | 774 | /* allocate memory for our driver state and initialize it */ |
775 | driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, | 775 | driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, |
776 | GIGASET_MODULENAME, GIGASET_DEVNAME, | 776 | GIGASET_MODULENAME, GIGASET_DEVNAME, |
777 | &ops, THIS_MODULE); | 777 | &ops, THIS_MODULE); |
778 | if (!driver) | 778 | if (!driver) |
779 | goto error; | 779 | goto error; |
780 | 780 | ||
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 5e3300d8a2a5..049da67f6392 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c | |||
@@ -184,7 +184,7 @@ static int set_value(struct cardstate *cs, u8 req, u16 val) | |||
184 | (unsigned)req, (unsigned)val); | 184 | (unsigned)req, (unsigned)val); |
185 | r = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x12, 0x41, | 185 | r = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), 0x12, 0x41, |
186 | 0xf /*?*/, 0, NULL, 0, 2000 /*?*/); | 186 | 0xf /*?*/, 0, NULL, 0, 2000 /*?*/); |
187 | /* no idea what this does */ | 187 | /* no idea what this does */ |
188 | if (r < 0) { | 188 | if (r < 0) { |
189 | dev_err(&udev->dev, "error %d on request 0x12\n", -r); | 189 | dev_err(&udev->dev, "error %d on request 0x12\n", -r); |
190 | return r; | 190 | return r; |
@@ -365,7 +365,7 @@ static void gigaset_read_int_callback(struct urb *urb) | |||
365 | src = cs->hw.usb->rcvbuf; | 365 | src = cs->hw.usb->rcvbuf; |
366 | if (unlikely(*src)) | 366 | if (unlikely(*src)) |
367 | dev_warn(cs->dev, | 367 | dev_warn(cs->dev, |
368 | "%s: There was no leading 0, but 0x%02x!\n", | 368 | "%s: There was no leading 0, but 0x%02x!\n", |
369 | __func__, (unsigned) *src); | 369 | __func__, (unsigned) *src); |
370 | ++src; /* skip leading 0x00 */ | 370 | ++src; /* skip leading 0x00 */ |
371 | --numbytes; | 371 | --numbytes; |
@@ -465,7 +465,7 @@ static int send_cb(struct cardstate *cs, struct cmdbuf_t *cb) | |||
465 | 465 | ||
466 | usb_fill_bulk_urb(ucs->bulk_out_urb, ucs->udev, | 466 | usb_fill_bulk_urb(ucs->bulk_out_urb, ucs->udev, |
467 | usb_sndbulkpipe(ucs->udev, | 467 | usb_sndbulkpipe(ucs->udev, |
468 | ucs->bulk_out_endpointAddr & 0x0f), | 468 | ucs->bulk_out_endpointAddr & 0x0f), |
469 | cb->buf + cb->offset, count, | 469 | cb->buf + cb->offset, count, |
470 | gigaset_write_bulk_callback, cs); | 470 | gigaset_write_bulk_callback, cs); |
471 | 471 | ||
@@ -499,7 +499,7 @@ static int gigaset_write_cmd(struct cardstate *cs, struct cmdbuf_t *cb) | |||
499 | unsigned long flags; | 499 | unsigned long flags; |
500 | 500 | ||
501 | gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? | 501 | gigaset_dbg_buffer(cs->mstate != MS_LOCKED ? |
502 | DEBUG_TRANSCMD : DEBUG_LOCKCMD, | 502 | DEBUG_TRANSCMD : DEBUG_LOCKCMD, |
503 | "CMD Transmit", cb->len, cb->buf); | 503 | "CMD Transmit", cb->len, cb->buf); |
504 | 504 | ||
505 | spin_lock_irqsave(&cs->cmdlock, flags); | 505 | spin_lock_irqsave(&cs->cmdlock, flags); |