11 Feb, 2020

1 commit

  • commit 5080832627b65e3772a35d1dced68c64e2b24442 upstream.

    Clang warns

    ../drivers/nfc/pn544/pn544.c:696:4: warning: misleading indentation;
    statement is not part of the previous 'if' [-Wmisleading-indentation]
    return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE,
    ^
    ../drivers/nfc/pn544/pn544.c:692:3: note: previous statement is here
    if (target->nfcid1_len != 4 && target->nfcid1_len != 7 &&
    ^
    1 warning generated.

    This warning occurs because there is a space after the tab on this line.
    Remove it so that the indentation is consistent with the Linux kernel
    coding style and clang no longer warns.

    Fixes: da052850b911 ("NFC: Add pn544 presence check for different targets")
    Link: https://github.com/ClangBuiltLinux/linux/issues/814
    Signed-off-by: Nathan Chancellor
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Nathan Chancellor
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms and conditions of the gnu general public license
    version 2 as published by the free software foundation this program
    is distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not see http www gnu org
    licenses

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 33 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190531081038.745679586@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

16 Jun, 2017

1 commit

  • It seems like a historic accident that these return unsigned char *,
    and in many places that means casts are required, more often than not.

    Make these functions return void * and remove all the casts across
    the tree, adding a (u8 *) cast only where the unsigned char pointer
    was used directly, all done with the following spatch:

    @@
    expression SKB, LEN;
    typedef u8;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - *(fn(SKB, LEN))
    + *(u8 *)fn(SKB, LEN)

    @@
    expression E, SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    type T;
    @@
    - E = ((T *)(fn(SKB, LEN)))
    + E = fn(SKB, LEN)

    @@
    expression SKB, LEN;
    identifier fn = { skb_push, __skb_push, skb_push_rcsum };
    @@
    - fn(SKB, LEN)[0]
    + *(u8 *)fn(SKB, LEN)

    Note that the last part there converts from push(...)[0] to the
    more idiomatic *(u8 *)push(...).

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

28 Jan, 2015

1 commit


17 Feb, 2014

1 commit

  • Different pn544 hardware variant may use different commands to download
    new firmwares. The C2 does a regular firmware download while the C3 uses
    a more secure protocol.
    As a consequence we need to pass the hardware variant from the HCI SW
    version command reply down to the pn544 i2c layer, in order to use the
    right protocol at run time.

    Signed-off-by: Arron Wang
    Signed-off-by: Samuel Ortiz

    Arron Wang
     

04 Jan, 2014

1 commit

  • Some of the EEPROM configurations that are assigned by the PN544 driver
    are set by the firmware and should not be modified by the driver. Others
    are certain user mode configurations that are currently getting set to values
    that shouldn't necessarily be dictated by the driver. This patch changes
    most user and system mode configurations to the firmware defaults.

    Signed-off-by: Arman Uguray
    Signed-off-by: Samuel Ortiz

    Arman Uguray
     

11 Dec, 2013

1 commit

  • Several files refer to an old address for the Free Software Foundation
    in the file header comment. Resolve by replacing the address with
    the URL so that we do not have to keep
    updating the header comments anytime the address changes.

    CC: linux-wireless@vger.kernel.org
    CC: Lauro Ramos Venancio
    CC: Aloisio Almeida Jr
    CC: Samuel Ortiz
    Signed-off-by: Jeff Kirsher
    Signed-off-by: John W. Linville

    Jeff Kirsher
     

25 Sep, 2013

3 commits

  • Use standardized styles to minimize coding defects.

    Always use nfc_ where feasible.
    Add \n to formats where appropriate.
    Typo "it it" correction.
    Add #define pr_fmt where appropriate.
    Remove function tracing logging messages.
    Remove OOM messages.

    Signed-off-by: Joe Perches
    Signed-off-by: Samuel Ortiz

    Joe Perches
     
  • To enable the UICC secure element, we first enable the UICC gate list in
    order for the SE to be able to use all RF technologies.
    For the embedded SE, we just turn the eSE default mode to ON.

    Signed-off-by: Arron Wang
    Signed-off-by: Samuel Ortiz

    Arron Wang
     
  • For the SWP secure element, we send the proprietary SELF_TEST_SWP
    command and check the response.
    For the WI secure element, we simply try to switch to the default
    embedded SE mode. If that works, it means we have an embedded SE.

    Signed-off-by: Arron Wang
    Signed-off-by: Samuel Ortiz

    Arron Wang
     

14 Aug, 2013

2 commits


14 Jun, 2013

3 commits

  • Supported secure elements are typically found during a discovery process
    initiated when the NFC controller is up and running. For a given NFC
    chipset there can be many configurations (embedded SE or not, with or
    without a SIM card wired to the NFC controller SWP interface, etc...) and
    thus driver code will never know before hand which SEs are available.
    So we remove this field, it will be replaced by a real SE discovery
    mechanism.

    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     
  • There is no builtin command for driver to check the presence of
    Felica and Jewel device, it is more reasonable for the userspace
    daemon neard to build seperate commands to check the presence of
    the card.

    Signed-off-by: Arron Wang
    Signed-off-by: Samuel Ortiz

    Arron Wang
     
  • NFCID2 is defined as the first 2 manufacturer ID (IDm) bytes.
    NFC DEP (NFC peer to peer) devices Type-F NFCID2 must start with
    0x01fe according to the NFC Digital Specification.
    By checking those first 2 bytes we send the right command either to the
    reader gate when NFCID2 != 0x1fe (The NFC tag case) or to the NFCIP1 gate
    when seeing an NFC DEP device (The NFC peer to peer case).

    Without this fix, Felica (Type F) tags are not properly detected with this
    driver.

    Signed-off-by: Arron Wang
    Signed-off-by: Samuel Ortiz

    Arron Wang
     

10 Jan, 2013

6 commits


27 Oct, 2012

2 commits