summaryrefslogtreecommitdiff
path: root/recipes/librfid/files/013-zero-UID.patch
blob: 30e09099c4c72bc4f859fa63451244324d6627bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Index: librfid-svn/src/rfid_asic_rc632.c
===================================================================
--- librfid-svn.orig/src/rfid_asic_rc632.c	2008-02-27 16:47:21.000000000 -0500
+++ librfid-svn/src/rfid_asic_rc632.c	2008-02-28 12:56:31.000000000 -0500
@@ -529,7 +529,7 @@
 		rc632_reg_read(handle, RC632_REG_CHANNEL_REDUNDANCY, &tmp);
 
 		//return 0;
-		return -1;
+		return -EIO;
 	}
 
 	return rc632_fifo_read(handle, *rx_len, rx_buf);
@@ -1777,7 +1777,7 @@
 	ret = rc632_transceive(handle, (u_int8_t *)acf, acf_len,
 			       (u_int8_t *) resp, rx_len, 
 			       iso15693_timing[rate][ISO15693_T1], 0);
-	if (ret == -ETIMEDOUT)
+	if (ret == -ETIMEDOUT || ret == -EIO)
 		return ret;
 
 	/* determine whether there was a collission */
@@ -1795,6 +1795,8 @@
 		*bit_of_col = boc;
 	}else{
 		*bit_of_col = 0;
+		if (error_flag & RC632_ERR_FLAG_CRC_ERR)
+			return -EIO;
 	}
 
 	return 0;