diff options
Diffstat (limited to 'drivers/isdn/hysdn/hysdn_boot.c')
-rw-r--r-- | drivers/isdn/hysdn/hysdn_boot.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/isdn/hysdn/hysdn_boot.c b/drivers/isdn/hysdn/hysdn_boot.c index 7bfba196f315..6d0eb0f42fca 100644 --- a/drivers/isdn/hysdn/hysdn_boot.c +++ b/drivers/isdn/hysdn/hysdn_boot.c | |||
@@ -30,17 +30,17 @@ | |||
30 | /* needed during boot and so allocated dynamically. */ | 30 | /* needed during boot and so allocated dynamically. */ |
31 | /************************************************************/ | 31 | /************************************************************/ |
32 | struct boot_data { | 32 | struct boot_data { |
33 | word Cryptor; /* for use with Decrypt function */ | 33 | unsigned short Cryptor; /* for use with Decrypt function */ |
34 | word Nrecs; /* records remaining in file */ | 34 | unsigned short Nrecs; /* records remaining in file */ |
35 | uchar pof_state; /* actual state of read handler */ | 35 | unsigned char pof_state;/* actual state of read handler */ |
36 | uchar is_crypted; /* card data is crypted */ | 36 | unsigned char is_crypted;/* card data is crypted */ |
37 | int BufSize; /* actual number of bytes bufferd */ | 37 | int BufSize; /* actual number of bytes bufferd */ |
38 | int last_error; /* last occurred error */ | 38 | int last_error; /* last occurred error */ |
39 | word pof_recid; /* actual pof recid */ | 39 | unsigned short pof_recid;/* actual pof recid */ |
40 | ulong pof_reclen; /* total length of pof record data */ | 40 | unsigned long pof_reclen;/* total length of pof record data */ |
41 | ulong pof_recoffset; /* actual offset inside pof record */ | 41 | unsigned long pof_recoffset;/* actual offset inside pof record */ |
42 | union { | 42 | union { |
43 | uchar BootBuf[BOOT_BUF_SIZE]; /* buffer as byte count */ | 43 | unsigned char BootBuf[BOOT_BUF_SIZE];/* buffer as byte count */ |
44 | tPofRecHdr PofRecHdr; /* header for actual record/chunk */ | 44 | tPofRecHdr PofRecHdr; /* header for actual record/chunk */ |
45 | tPofFileHdr PofFileHdr; /* header from POF file */ | 45 | tPofFileHdr PofFileHdr; /* header from POF file */ |
46 | tPofTimeStamp PofTime; /* time information */ | 46 | tPofTimeStamp PofTime; /* time information */ |
@@ -69,11 +69,11 @@ StartDecryption(struct boot_data *boot) | |||
69 | static void | 69 | static void |
70 | DecryptBuf(struct boot_data *boot, int cnt) | 70 | DecryptBuf(struct boot_data *boot, int cnt) |
71 | { | 71 | { |
72 | uchar *bufp = boot->buf.BootBuf; | 72 | unsigned char *bufp = boot->buf.BootBuf; |
73 | 73 | ||
74 | while (cnt--) { | 74 | while (cnt--) { |
75 | boot->Cryptor = (boot->Cryptor >> 1) ^ ((boot->Cryptor & 1U) ? CRYPT_FEEDTERM : 0); | 75 | boot->Cryptor = (boot->Cryptor >> 1) ^ ((boot->Cryptor & 1U) ? CRYPT_FEEDTERM : 0); |
76 | *bufp++ ^= (uchar) boot->Cryptor; | 76 | *bufp++ ^= (unsigned char)boot->Cryptor; |
77 | } | 77 | } |
78 | } /* DecryptBuf */ | 78 | } /* DecryptBuf */ |
79 | 79 | ||
@@ -86,7 +86,7 @@ pof_handle_data(hysdn_card * card, int datlen) | |||
86 | { | 86 | { |
87 | struct boot_data *boot = card->boot; /* pointer to boot specific data */ | 87 | struct boot_data *boot = card->boot; /* pointer to boot specific data */ |
88 | long l; | 88 | long l; |
89 | uchar *imgp; | 89 | unsigned char *imgp; |
90 | int img_len; | 90 | int img_len; |
91 | 91 | ||
92 | /* handle the different record types */ | 92 | /* handle the different record types */ |
@@ -197,7 +197,7 @@ pof_write_buffer(hysdn_card * card, int datlen) | |||
197 | break; | 197 | break; |
198 | } | 198 | } |
199 | /* Setup the new state and vars */ | 199 | /* Setup the new state and vars */ |
200 | boot->Nrecs = (word) (boot->buf.PofFileHdr.N_PofRecs); /* limited to 65535 */ | 200 | boot->Nrecs = (unsigned short)(boot->buf.PofFileHdr.N_PofRecs); /* limited to 65535 */ |
201 | boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */ | 201 | boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */ |
202 | boot->last_error = sizeof(tPofRecHdr); /* new length */ | 202 | boot->last_error = sizeof(tPofRecHdr); /* new length */ |
203 | break; | 203 | break; |
@@ -268,7 +268,7 @@ pof_write_buffer(hysdn_card * card, int datlen) | |||
268 | /* occurred. Additionally the pointer to the buffer data area is set on success */ | 268 | /* occurred. Additionally the pointer to the buffer data area is set on success */ |
269 | /*******************************************************************************/ | 269 | /*******************************************************************************/ |
270 | int | 270 | int |
271 | pof_write_open(hysdn_card * card, uchar ** bufp) | 271 | pof_write_open(hysdn_card * card, unsigned char **bufp) |
272 | { | 272 | { |
273 | struct boot_data *boot; /* pointer to boot specific data */ | 273 | struct boot_data *boot; /* pointer to boot specific data */ |
274 | 274 | ||
@@ -335,7 +335,7 @@ pof_write_close(hysdn_card * card) | |||
335 | /* when POF has been booted. A return value of 0 is used if no error occurred. */ | 335 | /* when POF has been booted. A return value of 0 is used if no error occurred. */ |
336 | /*********************************************************************************/ | 336 | /*********************************************************************************/ |
337 | int | 337 | int |
338 | EvalSysrTokData(hysdn_card * card, uchar * cp, int len) | 338 | EvalSysrTokData(hysdn_card *card, unsigned char *cp, int len) |
339 | { | 339 | { |
340 | u_char *p; | 340 | u_char *p; |
341 | u_char crc; | 341 | u_char crc; |