05 Jan, 2016

1 commit

  • Samuel Ortiz says:

    ====================
    NFC 4.5 pull request

    This is the first NFC pull request for 4.5 and it brings:

    - A new driver for the STMicroelectronics ST95HF NFC chipset.
    The ST95HF is an NFC digital transceiver with an embedded analog
    front-end and as such relies on the Linux NFC digital
    implementation. This is the 3rd user of the NFC digital stack.

    - ACPI support for the ST st-nci and st21nfca drivers.

    - A small improvement for the nfcsim driver, as we can now tune
    the Rx delay through sysfs.

    - A bunch of minor cleanups and small fixes from Christophe Ricard,
    for a few drivers and the NFC core code.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

30 Dec, 2015

4 commits


02 Dec, 2015

1 commit

  • This patch is a cleanup to make following patch easier to
    review.

    Goal is to move SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA
    from (struct socket)->flags to a (struct socket_wq)->flags
    to benefit from RCU protection in sock_wake_async()

    To ease backports, we rename both constants.

    Two new helpers, sk_set_bit(int nr, struct sock *sk)
    and sk_clear_bit(int net, struct sock *sk) are added so that
    following patch can change their implementation.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

28 Oct, 2015

1 commit

  • This fixes a build error that seems to be toochain
    dependent (Not seen with gcc v5.1):

    In file included from net/nfc/nci/rsp.c:36:0:
    net/nfc/nci/rsp.c: In function ‘nci_rsp_packet’:
    include/net/nfc/nci_core.h:355:12: error: inlining failed in call to
    always_inline ‘nci_prop_rsp_packet’: function body not available
    inline int nci_prop_rsp_packet(struct nci_dev *ndev, __u16 opcode,

    Signed-off-by: Robert Dolca
    Signed-off-by: Samuel Ortiz

    Robert Dolca
     

27 Oct, 2015

6 commits

  • In some cases low level drivers might want to update the
    SPI transfer clock (e.g. during firmware download).

    This patch adds this support. Without any modification the
    driver will use the default SPI clock (from pdata or device tree).

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     
  • SPI driver should be a module.

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     
  • Export nci_send_frame and nci_send_cmd symbols to allow drivers
    to use it. This is needed for example if NCI is used during
    firmware download phase.

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     
  • Add support for proprietary commands useful mainly
    for factory testings.

    Here is a list:

    - FACTORY_MODE: Allow to set the driver into a mode where no
    secure element are activated. It does not consider any
    NFC_ATTR_VENDOR_DATA.
    - HCI_CLEAR_ALL_PIPES: Allow to execute a HCI clear all pipes
    command. It does not consider any NFC_ATTR_VENDOR_DATA.
    - HCI_DM_PUT_DATA: Allow to configure specific CLF registry as
    for example RF trimmings or low level drivers configurations
    (I2C, SPI, SWP).
    - HCI_DM_UPDATE_AID: Allow to configure an AID routing into the
    CLF routing table following RF technology, CLF mode or protocol.
    - HCI_DM_GET_INFO: Allow to retrieve CLF information.
    - HCI_DM_GET_DATA: Allow to retrieve CLF configurable data such as
    low level drivers configurations or RF trimmings.
    - HCI_DM_LOAD: Allow to load a firmware into the CLF. A complete
    packet can be more than 8KB.
    - HCI_DM_RESET: Allow to run a CLF reset in order to "commit" CLF
    configuration changes without CLF power off.
    - HCI_GET_PARAM: Allow to retrieve an HCI CLF parameter (for example
    the white list).
    - HCI_DM_FIELD_GENERATOR: Allow to generate different kind of RF
    technology. When using this command to anti-collision is done.
    - HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF
    connectivity.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • Add some few code style fixes.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • In order to manage in a better way the nci poll mode state machine,
    add mode parameter to deactivate_target functions.
    This way we can manage different target state.
    mode parameter make sense only in nci core.

    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     

26 Oct, 2015

14 commits


20 Oct, 2015

1 commit

  • The exit label performs device_unlock(&dev->dev);, which will fail when dev
    is NULL, and nfc_put_device(dev);, which is not useful when dev is NULL, so
    just exit the function immediately.

    Problem found using scripts/coccinelle/null/deref_null.cocci

    Signed-off-by: Julia Lawall
    Signed-off-by: Samuel Ortiz

    Julia Lawall
     

03 Oct, 2015

1 commit

  • Since we do not know in which context drivers will call these
    routines, they should use the unlocked version of nci_request,
    i.e. __nci_request.
    It is up to drivers to know/decide if they need to take the
    req_lock mutex before calling those routines. When being called
    from the NCI setup routine there is no need to do so as ops->setup
    is called under req_lock.

    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     

21 Aug, 2015

4 commits


17 Aug, 2015

2 commits

  • When NFC_ATTR_VENDOR_DATA is not set, data_len is 0 and data is NULL.

    Fixes the following warning:

    net/nfc/netlink.c:1536:3: warning: 'data' may be used uninitialized
    +in this function [-Wmaybe-uninitialized]
    return cmd->doit(dev, data, data_len);

    Cc: stable@vger.kernel.org
    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     
  • NFC_ATTR_VENDOR_DATA is an optional vendor_cmd argument.
    The current code was potentially using a non existing argument
    leading to potential catastrophic results.

    Cc: stable@vger.kernel.org
    Signed-off-by: Christophe Ricard
    Signed-off-by: Samuel Ortiz

    Christophe Ricard
     

16 Jun, 2015

1 commit


13 Jun, 2015

1 commit

  • NCI deactivate management was modified to support all NCI
    deactivation type. Problem is that all the API are not ready
    yet for it.

    Problem is that with current code, when neard asks to deactivate
    the tag it sends a deactivate SLEEP but nobody will then send a
    IDLE deactivate. This IDLE deactivate is mandatory since NFC
    controller can only be unlocked by DH.

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     

12 Jun, 2015

2 commits

  • Add support of Marvell NFC chip controlled over UART

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     
  • Some NFC controller supports UART as host interface.
    As with SPI, a lot of code can be shared between vendor
    drivers. This patch add the generic support of UART and
    provides some extension API for vendor specific needs.

    This code is strongly inspired by the Bluetooth HCI ldisc
    implementation. NCI UART vendor drivers will have to register
    themselves to this layer via nci_uart_register.

    Underlying tty will have to be configured from user land
    thanks to an ioctl.

    Signed-off-by: Vincent Cuissard
    Signed-off-by: Samuel Ortiz

    Vincent Cuissard
     

10 Jun, 2015

1 commit