-static int spidev_transceive(struct rfid_reader_handle *rh,
- enum rfid_frametype frametype,
- const unsigned char *tx_data,
- unsigned int tx_len, unsigned char *rx_data,
- unsigned int *rx_len, u_int64_t timeout,
- unsigned int flags)
-{
- return rh->ah->asic->priv.rc632.fn.transceive(rh->ah, frametype,
- tx_data, tx_len, rx_data,
- rx_len, timeout, flags);
-}
-
-static int spidev_transceive_sf(struct rfid_reader_handle *rh,
- unsigned char cmd,
- struct iso14443a_atqa *atqa)
-{
- return rh->ah->asic->priv.rc632.fn.iso14443a.transceive_sf(rh->ah, cmd,
- atqa);
-}
-
-static int
-spidev_transceive_acf(struct rfid_reader_handle *rh,
- struct iso14443a_anticol_cmd *cmd,
- unsigned int *bit_of_col)
-{
- return rh->ah->asic->priv.rc632.fn.iso14443a.transceive_acf(rh->ah,
- cmd,
- bit_of_col);
-}
-
-static int spidev_14443a_init(struct rfid_reader_handle *rh)
-{
- int ret;
- ret = rh->ah->asic->priv.rc632.fn.iso14443a.init(rh->ah);
- return ret;
-}
-
-static int
-spidev_14443a_set_speed(struct rfid_reader_handle *rh,
- unsigned int tx, unsigned int speed)
-{
- u_int8_t rate;
-
- DEBUGP("setting rate: ");
- switch (speed) {
- case RFID_14443A_SPEED_106K:
- rate = 0x00;
- DEBUGPC("106K\n");
- break;
- case RFID_14443A_SPEED_212K:
- rate = 0x01;
- DEBUGPC("212K\n");
- break;
- case RFID_14443A_SPEED_424K:
- rate = 0x02;
- DEBUGPC("424K\n");
- break;
- case RFID_14443A_SPEED_848K:
- rate = 0x03;
- DEBUGPC("848K\n");
- break;
- default:
- return -EINVAL;
- break;
- }
- return rh->ah->asic->priv.rc632.fn.iso14443a.set_speed(rh->ah,
- tx, rate);
-}
-
-static int spidev_14443b_init(struct rfid_reader_handle *rh)
-{
- return rh->ah->asic->priv.rc632.fn.iso14443b.init(rh->ah);
-}
-
-static int spidev_15693_init(struct rfid_reader_handle *rh)
-{
- return rh->ah->asic->priv.rc632.fn.iso15693.init(rh->ah);
-}
-
-static int
-spidev_mifare_setkey(struct rfid_reader_handle *rh, const u_int8_t * key)
-{
- return rh->ah->asic->priv.rc632.fn.mifare_classic.setkey(rh->ah, key);
-}
-
-static int
-spidev_mifare_auth(struct rfid_reader_handle *rh, u_int8_t cmd,
- u_int32_t serno, u_int8_t block)
-{
- return rh->ah->asic->priv.rc632.fn.mifare_classic.auth(rh->ah,
- cmd, serno,
- block);
-}
-