12 Apr, 2012

1 commit


07 Mar, 2012

17 commits


28 Jan, 2012

1 commit


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

    Ilan Elias
     
  • 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

    Ilan Elias
     
  • 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

    Ilan Elias
     
  • 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

    Ilan Elias
     
  • 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

    Ilan Elias
     
  • 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

    Ilan Elias
     

05 Jan, 2012

3 commits


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

    Dan Carpenter
     
  • 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

    Dan Carpenter
     
  • 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 here

    Signed-off-by: Samuel Ortiz
    Signed-off-by: John W. Linville

    Samuel Ortiz
     

15 Dec, 2011

8 commits


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

    Dan Carpenter