提交 d31652a2 编写于 作者: A Arron Wang 提交者: Samuel Ortiz

NFC: Fix target mode p2p link establishment

With commit e29a9e2a, 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: NArron Wang <arron.wang@intel.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 b7e04735
...@@ -384,7 +384,7 @@ int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx, ...@@ -384,7 +384,7 @@ int nfc_dep_link_is_up(struct nfc_dev *dev, u32 target_idx,
{ {
dev->dep_link_up = true; dev->dep_link_up = true;
if (!dev->active_target) { if (!dev->active_target && rf_mode == NFC_RF_INITIATOR) {
struct nfc_target *target; struct nfc_target *target;
target = nfc_find_target(dev, target_idx); target = nfc_find_target(dev, target_idx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册