NFC: Clearly separate NCI states from flags

Make a clear separation between NCI states and flags.
This is required in order to support more NCI states (e.g.
for multiple targets support).

Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Ilan Elias
2012-01-18 13:16:12 +02:00
committed by John W. Linville
parent 6d810f1032
commit 8939e47fc9
4 changed files with 22 additions and 16 deletions

View File

@ -34,16 +34,21 @@
#include <net/nfc/nfc.h>
#include <net/nfc/nci.h>
/* NCI device state */
enum {
/* NCI device flags */
enum nci_flag {
NCI_INIT,
NCI_UP,
NCI_DISCOVERY,
NCI_POLL_ACTIVE,
NCI_DATA_EXCHANGE,
NCI_DATA_EXCHANGE_TO,
};
/* NCI device states */
enum nci_state {
NCI_IDLE,
NCI_DISCOVERY,
NCI_POLL_ACTIVE,
};
/* NCI timeouts */
#define NCI_RESET_TIMEOUT 5000
#define NCI_INIT_TIMEOUT 5000
@ -70,6 +75,7 @@ struct nci_dev {
int tx_headroom;
int tx_tailroom;
atomic_t state;
unsigned long flags;
atomic_t cmd_cnt;