Age | Commit message (Collapse) | Author | Files | Lines |
|
The LLC layer manages modules that control the link layer protocol (such
as shdlc) between HCI and an HCI driver. The driver must simply specify
the required llc when it registers with HCI.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
This enables the completion callback to be called from a different
context, preventing a possible deadlock if the callback resulted in the
invocation of a nested call to the currently locked nfc_dev.
This is also more in line with the im_transceive nfc_ops for NFC Core or
NCI drivers which already behave asynchronously.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
This method initiates execution of an HCI cmd. Result will be delivered
through an asynchronous callback.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
NFC is using a number of custom ordered workqueues w/ WQ_MEM_RECLAIM.
WQ_MEM_RECLAIM is unnecessary unless NFC is gonna be used as transport
for storage device, and all use cases match one work item to one
ordered workqueue - IOW, there's no actual ordering going on at all
and using system_nrt_wq gives the same behavior.
There's nothing to be gained by using custom workqueues. Use
system_nrt_wq instead and drop all the custom ones.
Signed-off-by: Tejun Heo <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
During NFC-DEP target activation, store the remote
general bytes to be used later in dep_link_up.
When dep_link_up is called, activate the NFC-DEP target,
and forward the remote general bytes.
When dep_link_down is called, deactivate the target.
Signed-off-by: Ilan Elias <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
Signed-off-by: Ilan Elias <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
If initiator protocol is NFC-DEP, set the local general bytes
in nci_start_poll.
Signed-off-by: Ilan Elias <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
It is a frequent mistake to confuse the netlink port identifier with a
process identifier. Try to reduce this confusion by renaming fields
that hold port identifiers portid instead of pid.
I have carefully avoided changing the structures exported to
userspace to avoid changing the userspace API.
I have successfully built an allyesconfig kernel with this change.
Signed-off-by: "Eric W. Biederman" <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Some NFC chips will statically create and open pipes for both standard
and proprietary gates. The driver can now pass this information to HCI
such that HCI will not attempt to create and open them, but will instead
directly use the passed pipe ids.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
This API should be used by drivers, HCI, SHDLC or NCI stacks to report an
unrecoverable error.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
This routine will be called by drivers whenever they receive data in target
mode. This should be unexpected events and as such should be handled by a
standalone API (i.e. not as a callback pointer from an existing API).
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
And rename the initiator mode data exchange ops for consistency sake.
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
Userspace gets a netlink event upon target mode activation.
The LLCP layer is also signaled when we get an ATR_REQ in order to get
the remote general bytes.
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
Signed-off-by: Samuel Ortiz <[email protected]>
|
|
The NFC core code already does that for them.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
It is now specified that nfc_target_found() and nfc_target_lost() core
functions must not be called from an atomic context. This allow us to
serialize calls and protect the targets table using the nfc device lock
instead of a spinlock.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
The NFC Core now caches the active nfc target pointer, thereby avoiding
the need to lookup the target table for each invocation of a driver ops.
Consequently, pn533, HCI and NCI now directly receive an nfc_target
pointer instead of a target index.
Cc: Ilan Elias <[email protected]>
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
drivers/net/wireless/iwlwifi/iwl-testmode.c
include/net/nfc/nfc.h
net/nfc/netlink.c
net/wireless/nl80211.c
|
|
Use of "unsigned int" is preferred to bare "unsigned" in net tree.
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
|
|
Some HW/drivers get notifications when a tag moves out of the radio field.
This notification is now forwarded to user space through netlink.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
The target index can be used by userspace to uniquely identify a target
and thus should be kept unique, per NFC adapter. Moreover, some protocols
do not provide a logical index when discovering new targets, so we have to
generate one for them.
For NCI or pn533 to fetch their logical index, we added a logical_idx field
to the target structure.
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Most NFC HCI chipsets actually use a simplified HDLC link layer to
carry HCI payloads.
This implementation registers itself as an HCI device on behalf of the
NFC driver.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
This is an implementation of ETSI TS 102 622 specification.
Many NFC chipsets use HCI as the host <-> target protocol on top of a
serial link like i2c.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
NFC drivers will call this routine when they detect that a tag leaves the
RF field. This will eventually lead to the corresponding netlink event
to be sent.
Signed-off-by: Eric Lapuyade <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Add NCI data exchange timer to catch timeouts,
and call the data exchange callback with an error.
Signed-off-by: Ilan Elias <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Increase NCI deactivate timeout from 5 sec to 30 sec.
NCI deactivate procedure might take a long time,
depending on the local and remote parameters.
Signed-off-by: Ilan Elias <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Addition, deletion, and modification of NCI constants.
Changes in NCI commands, responses, and notifications structures.
Signed-off-by: Ilan Elias <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Fix indentation in nci.h file.
Signed-off-by: Ilan Elias <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Check if NCI data flow control is used in nci_tx_work.
Signed-off-by: Ilan Elias <[email protected]>
Acked-by: Lauro Ramos Venancio <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Remove unused NCI operations, e.g. create static rf connection.
Signed-off-by: Ilan Elias <[email protected]>
Acked-by: Lauro Ramos Venancio <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|
|
Addition, deletion and modification of NCI constants.
Changes in NCI commands, responses and notifications structures.
Signed-off-by: Ilan Elias <[email protected]>
Acked-by: Lauro Ramos Venancio <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
|