diff options
author | Ilan Elias <ilane@ti.com> | 2012-01-18 06:16:12 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:32:28 -0500 |
commit | 8939e47fc953cce6ef53e79e9ff9b53319d1a72d (patch) | |
tree | fba0ffe539b4d6937bfb2bd9986fe989917b8039 /include | |
parent | 6d810f10325522cfcf498dc6d64b9f96e1f5153f (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/nfc/nci_core.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h index 9154663b606b..b9c3f8de13dd 100644 --- a/include/net/nfc/nci_core.h +++ b/include/net/nfc/nci_core.h | |||
@@ -34,16 +34,21 @@ | |||
34 | #include <net/nfc/nfc.h> | 34 | #include <net/nfc/nfc.h> |
35 | #include <net/nfc/nci.h> | 35 | #include <net/nfc/nci.h> |
36 | 36 | ||
37 | /* NCI device state */ | 37 | /* NCI device flags */ |
38 | enum { | 38 | enum nci_flag { |
39 | NCI_INIT, | 39 | NCI_INIT, |
40 | NCI_UP, | 40 | NCI_UP, |
41 | NCI_DISCOVERY, | ||
42 | NCI_POLL_ACTIVE, | ||
43 | NCI_DATA_EXCHANGE, | 41 | NCI_DATA_EXCHANGE, |
44 | NCI_DATA_EXCHANGE_TO, | 42 | NCI_DATA_EXCHANGE_TO, |
45 | }; | 43 | }; |
46 | 44 | ||
45 | /* NCI device states */ | ||
46 | enum nci_state { | ||
47 | NCI_IDLE, | ||
48 | NCI_DISCOVERY, | ||
49 | NCI_POLL_ACTIVE, | ||
50 | }; | ||
51 | |||
47 | /* NCI timeouts */ | 52 | /* NCI timeouts */ |
48 | #define NCI_RESET_TIMEOUT 5000 | 53 | #define NCI_RESET_TIMEOUT 5000 |
49 | #define NCI_INIT_TIMEOUT 5000 | 54 | #define NCI_INIT_TIMEOUT 5000 |
@@ -70,6 +75,7 @@ struct nci_dev { | |||
70 | int tx_headroom; | 75 | int tx_headroom; |
71 | int tx_tailroom; | 76 | int tx_tailroom; |
72 | 77 | ||
78 | atomic_t state; | ||
73 | unsigned long flags; | 79 | unsigned long flags; |
74 | 80 | ||
75 | atomic_t cmd_cnt; | 81 | atomic_t cmd_cnt; |