12 Apr, 2012
1 commit
-
Reported-by: Dan Carpenter
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville
07 Mar, 2012
17 commits
-
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
The socket local pointer needs to be set to NULL when the adapter is
removed or the MAC goes down.
If the socket release code is called after such an event, the socket
reference count still needs to be decreased in order for the socket to
eventually be freed.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
When calling nfc_dep_link_up, we implicitely are in initiator mode.
Which means we also can provide the general bytes as a function argument,
as all drivers will eventually request them.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
We just don't do anything with it when parsing the general bytes.
We handle it from the CONNECT reception code.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
The parent socket (the bound one) could be freed before its children, so
we should unlink the children without trying to reach it through the parent.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Based on the receiver MIU, we have to fragment the frame to be
transmitted.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
We use the maximum values for the LLCP Maximum Information Unit and Receive
Window Size.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
In order to acknowledge an I frame, we have to either queue pending local
I frames or queue a receiver ready frame.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
This one will be called from the I frame command sending.
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
For user space to know if a device is up or down.
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville
28 Jan, 2012
1 commit
-
This is a pointer so it should be NULL instead of zero. Sparse
complains about this stuff:
net/nfc/nci/core.c:447:37: warning: Using plain integer as NULL pointerSigned-off-by: Dan Carpenter
Acked-by: Samuel Ortiz
Signed-off-by: John W. Linville
25 Jan, 2012
6 commits
-
Add the ability to select between multiple targets in NCI.
If only one target is found, it will be auto-activated.
If more than one target is found, then DISCOVER_NTF will be
generated for each target, and the host should select one by
calling DISCOVER_SELECT_CMD. Then, the target will be activated.
If the activation fails, GENERIC_ERROR_NTF is generated.Signed-off-by: Ilan Elias
Signed-off-by: John W. Linville -
The NFC core layer should not set the target_idx.
Instead, the driver layer (e.g. NCI, PN533) should set the
target_idx, so that it will be able to identify the target
when its I/F (e.g. activate_target) is called.
This is required in order to support multiple targets.
Note that currently supported drivers (PN533 and NCI) don't
use the target_idx in their implementation.Signed-off-by: Ilan Elias
Signed-off-by: John W. Linville -
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
Signed-off-by: John W. Linville -
Add NCI data exchange timer to catch timeouts,
and call the data exchange callback with an error.Signed-off-by: Ilan Elias
Acked-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Export new attributes sensb_res for tech B and sensf_res
for tech F in the target info (returned as a response to
NFC_CMD_GET_TARGET).
The max size of the attributes nfcid1, sensb_res and sensf_res
is exported to user space though include/linux/nfc.Signed-off-by: Ilan Elias
Acked-by: Samuel Ortiz
Signed-off-by: John W. Linville -
If a target was active, complete the NCI deactivate request
only in deactivate_ntf. Otherwise, complete it at deactivate_rsp.
Deactivate_ntf represents the actual disconnection event (sent from
the NCI controller).Signed-off-by: Ilan Elias
Acked-by: Samuel Ortiz
Signed-off-by: John W. Linville
05 Jan, 2012
3 commits
-
The nfcid1 is the NFC-A identifier.
It is exported as an attribute of the target info
(returned as a response to NFC_CMD_GET_TARGET).Signed-off-by: Ilan Elias
Acked-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Add support for NCI Interface Error Notification.
When this notification is received and we're during a
data exchange transaction, indicate an error to the NFC
core layer via the data exchange callback.Signed-off-by: Ilan Elias
Signed-off-by: John W. Linville -
Addition, deletion, and modification of NCI constants.
Changes in NCI commands, responses, and notifications structures.Signed-off-by: Ilan Elias
Signed-off-by: John W. Linville
20 Dec, 2011
3 commits
-
This is a struct sk_buff pointer and it should be freed with kfree_skb()
instead of kfree().Signed-off-by: Dan Carpenter
Acked-by: Samuel Ortiz
Signed-off-by: John W. Linville -
We unlock inside the if block on the other side of this if else
statement. It could result in calling mutex_unlock() twice.Signed-off-by: Dan Carpenter
Acked-by: Samuel Ortiz
Signed-off-by: John W. Linville -
llcp_mac routines should be static and inlined or build will fail with NFC
selected without LLCP.This patch fixes:
LD [M] net/nfc/nfc.o
net/nfc/netlink.o: In function `nfc_llcp_mac_is_down':
netlink.c:(.text+0x0): multiple definition of `nfc_llcp_mac_is_down'
net/nfc/core.o:(.text+0x0): first defined here
net/nfc/netlink.o: In function `nfc_llcp_mac_is_up':
netlink.c:(.text+0x10): multiple definition of `nfc_llcp_mac_is_up'
net/nfc/core.o:(.text+0x10): first defined here
net/nfc/af_nfc.o: In function `nfc_llcp_mac_is_down':
(.text+0x0): multiple definition of `nfc_llcp_mac_is_down'
net/nfc/core.o:(.text+0x0): first defined here
net/nfc/af_nfc.o: In function `nfc_llcp_mac_is_up':
(.text+0x10): multiple definition of `nfc_llcp_mac_is_up'
net/nfc/core.o:(.text+0x10): first defined here
net/nfc/rawsock.o: In function `nfc_llcp_mac_is_down':
rawsock.c:(.text+0x0): multiple definition of `nfc_llcp_mac_is_down'
net/nfc/core.o:(.text+0x0): first defined here
net/nfc/rawsock.o: In function `nfc_llcp_mac_is_up':
rawsock.c:(.text+0x10): multiple definition of `nfc_llcp_mac_is_up'
net/nfc/core.o:(.text+0x10): first defined hereSigned-off-by: Samuel Ortiz
Signed-off-by: John W. Linville
15 Dec, 2011
8 commits
-
This patch is an initial implementation for the NFC Logical Link Control
protocol. It's also known as NFC peer to peer mode.
This is a basic implementation as it lacks SDP (services Discovery
Protocol), frames aggregation support, and frame rejecion parsing.
Follow up patches will implement those missing features.
This code has been tested against a Nexus S phone implementing LLCP 1.0.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Without an API for setting and getting the local and remote general bytes,
drivers won't be able to properly establish a DEP link.
This API also allows them to propagate the remote general bytes they get
from the DEP link establishment up to the LLCP layer.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
NFC-DEP (Data Exchange Protocol) is an NFC MAC layer.
This command allows to enable and disable the DEP link on to which e.g.
LLCP can run.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
rawsock_create() is called with preemption disabled, so we should not
sleep.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
The netlink notifier is atomic so we must not sleep in that context.
Also we know that Any netlink packets arriving to us will be purged when
the notifier is called, so we don't need to take the mutex.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
This is a factorization of the current rawsock tx skb allocation routine,
as it will be used by the LLCP code.
We also rename nfc_alloc_skb to nfc_alloc_recv_skb for consistency sake.Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Signed-off-by: Samuel Ortiz
Signed-off-by: John W. Linville -
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c
13 Dec, 2011
1 commit
-
wait_for_completion_interruptible_timeout() returns -ERESTARTSYS if
interrupted so completion_rc needs to be signed. The current code
probably returns -ETIMEDOUT if we hit this situation, but after this
patch is applied it will return -ERESTARTSYS.Signed-off-by: Dan Carpenter
Signed-off-by: John W. Linville