static inline int
fwi_to_fwt(struct rfid_layer2_handle *h, unsigned int *fwt, unsigned int fwi)
{
- unsigned int multiplier;
+ unsigned int multiplier, tmp;
/* 15 is RFU */
if (fwi > 14)
multiplier = 1 << fwi; /* 2 to the power of fwi */
- return (1000000 * 256 * 16 / h->rh->ah->asic->fc) * multiplier
+ tmp = (unsigned int) 1000000 * 256 * 16;
+
+ return (tmp / h->rh->ah->asic->fc) * multiplier;
}
static int
/* FIXME: send N-1 slot marker frames */
if (atqb_len != sizeof(atqb)) {
- DEBUGP("error: atqb_len = %u instead of %u\n",
+ DEBUGP("error: atqb_len = %u instead of %Zu\n",
atqb_len, sizeof(atqb));
continue;
}
{
unsigned char afi = 0; /* FIXME */
int ret;
- char buf[255];
+ unsigned char buf[255];
unsigned int buf_len = sizeof(buf);
ret = send_reqb(handle, afi, 0, 0);
iso14443b_transcieve(struct rfid_layer2_handle *handle,
const unsigned char *tx_buf, unsigned int tx_len,
unsigned char *rx_buf, unsigned int *rx_len,
- unsigned int timeout, unsigned int flags)
+ u_int64_t timeout, unsigned int flags)
{
return handle->rh->reader->transcieve(handle->rh, tx_buf, tx_len,
rx_buf, rx_len, timeout, flags);