15 #include <linux/slab.h>
16 #include <asm/uaccess.h>
24 #define POF_READ_FILE_HEAD 0
25 #define POF_READ_TAG_HEAD 1
26 #define POF_READ_TAG_DATA 2
101 DecryptBuf(boot, datlen);
139 DecryptBuf(boot, datlen);
218 hysdn_addlog(card,
"POF: got record id=0x%lx length=%ld ",
241 if ((boot->
last_error = pof_handle_data(card, datlen)) < 0)
277 hysdn_addlog(card,
"POF open: already opened for boot");
299 StartDecryption(boot);
343 hysdn_addlog(card,
"SysReady Token data length %d", len);
349 for (p = cp, crc = 0; p < (cp + len - 2); p++)
351 crc = (((
u_char) (crc << 1)) + 1) + *p;
353 crc = ((
u_char) (crc << 1)) + *p;
355 if (crc != *(cp + len - 1)) {
365 if (len < (*(cp + 1) + 2)) {
366 hysdn_addlog(card,
"token 0x%x invalid length %d", *cp, *(cp + 1));
389 hysdn_addlog(card,
"unknown token 0x%02x length %d", *cp, *(cp + 1));
392 len -= (*(cp + 1) + 2);
393 cp += (*(cp + 1) + 2);