diff options
author | Ilan Elias <ilane@ti.com> | 2012-01-18 13:16:12 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:32:28 -0500 |
commit | 8939e47fc953cce6ef53e79e9ff9b53319d1a72d (patch) | |
tree | fba0ffe539b4d6937bfb2bd9986fe989917b8039 /include/net/nfc | |
parent | 6d810f10325522cfcf498dc6d64b9f96e1f5153f (diff) | |
download | linux-stable-8939e47fc953cce6ef53e79e9ff9b53319d1a72d.tar.gz linux-stable-8939e47fc953cce6ef53e79e9ff9b53319d1a72d.tar.bz2 linux-stable-8939e47fc953cce6ef53e79e9ff9b53319d1a72d.zip |
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/net/nfc')
-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 @@ #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; |