Skip to content

Commit

Permalink
NFC: Fix target mode p2p link establishment
Browse files Browse the repository at this point in the history
With commit e29a9e2, we set the active_target pointer from
nfc_dep_link_is_up() in order to support the case where the target
detection and the DEP link setting are done atomically by the driver.
That can only happen in initiator mode, so we need to check for that
otherwise we fail to bring a p2p link in target mode.

Signed-off-by: Arron Wang <arron.wang@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Arron Wang authored and Samuel Ortiz committed Jan 4, 2014
1 parent b7e0473 commit d31652a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/nfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
{
dev->dep_link_up = true;

if (!dev->active_target) {
if (!dev->active_target && rf_mode == NFC_RF_INITIATOR) {
struct nfc_target *target;

target = nfc_find_target(dev, target_idx);
Expand Down

0 comments on commit d31652a

Please sign in to comment.