17 Feb, 2014

1 commit


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
     

20 Nov, 2013

3 commits

  • Register generic netlink multicast groups as an array with
    the family and give them contiguous group IDs. Then instead
    of passing the global group ID to the various functions that
    send messages, pass the ID relative to the family - for most
    families that's just 0 because the only have one group.

    This avoids the list_head and ID in each group, adding a new
    field for the mcast group ID offset to the family.

    At the same time, this allows us to prevent abusing groups
    again like the quota and dropmon code did, since we can now
    check that a family only uses a group it owns.

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

    Johannes Berg
     
  • This doesn't really change anything, but prepares for the
    next patch that will change the APIs to pass the group ID
    within the family, rather than the global group ID.

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

    Johannes Berg
     
  • As suggested by David Miller, make genl_register_family_with_ops()
    a macro and pass only the array, evaluating ARRAY_SIZE() in the
    macro, this is a little safer.

    The openvswitch has some indirection, assing ops/n_ops directly in
    that code. This might ultimately just assign the pointers in the
    family initializations, saving the struct genl_family_and_ops and
    code (once mcast groups are handled differently.)

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

    Johannes Berg
     

15 Nov, 2013

1 commit

  • Now that genl_ops are no longer modified in place when
    registering, they can be made const. This patch was done
    mostly with spatch:

    @@
    identifier ops;
    @@
    +const
    struct genl_ops ops[] = {
    ...
    };

    (except the struct thing in net/openvswitch/datapath.c)

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

    Johannes Berg
     

07 Oct, 2013

1 commit


25 Sep, 2013

1 commit


14 Aug, 2013

2 commits


31 Jul, 2013

1 commit


14 Jun, 2013

4 commits

  • Enabling or disabling an NFC accessible secure element through netlink
    requires giving both an NFC controller and a secure element indexes.
    Once enabled the secure element will handle card emulation once polling
    starts.

    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     
  • When an NFC driver or host controller stack discovers a secure element,
    it will call nfc_add_se(). In order for userspace applications to use
    these secure elements, a netlink event will then be sent with the SE
    index and its type. With that information userspace applications can
    decide wether or not to enable SEs, through their indexes.

    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     
  • 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
     
  • As several NFC chipsets can have their firmwares upgraded and
    reflashed, this patchset adds a new netlink command to trigger
    that the driver loads or flashes a new firmware. This will allows
    userspace triggered firmware upgrade through netlink.
    The firmware name or hint is passed as a parameter, and the driver
    will eventually fetch the firmware binary through the request_firmware
    API.
    The cmd can only be executed when the nfc dev is not in use. Actual
    firmware loading/flashing is an asynchronous operation. Result of the
    operation shall send a new event up to user space through the nfc dev
    multicast socket. During operation, the nfc dev is not openable and
    thus not usable.

    Signed-off-by: Eric Lapuyade
    Signed-off-by: Samuel Ortiz

    Eric Lapuyade
     

26 Apr, 2013

1 commit


11 Mar, 2013

2 commits


10 Jan, 2013

1 commit

  • Each NFC adapter can have several links to different secure elements and
    that property needs to be exported by the drivers.
    A secure element link can be enabled and disabled, and card emulation will
    be handled by the currently active one. Otherwise card emulation will be
    host implemented.

    Signed-off-by: Samuel Ortiz

    Samuel Ortiz
     

29 Oct, 2012

1 commit

  • NFC_CMD_LLC_GET_PARAMS: request LTO, RW, and MIUX parameters for a device

    NFC_CMD_LLC_SET_PARAMS: set one or more of LTO, RW, and MIUX parameters for
    a device. LTO must be set before the link is up otherwise -EINPROGRESS is
    returned. RW and MIUX can be set at anytime and will be passed in subsequent
    CONNECT and CC messages. If one of the passed parameters is wrong none is
    set and -EINVAL is returned.

    Signed-off-by: Thierry Escande
    Signed-off-by: Samuel Ortiz

    Thierry Escande
     

27 Oct, 2012

2 commits


28 Sep, 2012

1 commit


27 Sep, 2012

1 commit

  • netlink_register_notifier requires notify functions to not sleep.
    nfc_stop_poll locks device mutex and must not be called from notifier.
    Create workqueue that will handle this for all devices.

    BUG: sleeping function called from invalid context at kernel/mutex.c:269
    in_atomic(): 0, irqs_disabled(): 0, pid: 4497, name: neard
    1 lock held by neard/4497:
    Pid: 4497, comm: neard Not tainted 3.5.0-999-nfc+ #5
    Call Trace:
    [] __might_sleep+0x145/0x200
    [] mutex_lock_nested+0x2e/0x50
    [] nfc_stop_poll+0x39/0xb0
    [] nfc_genl_rcv_nl_event+0x77/0xc0
    [] notifier_call_chain+0x5c/0x120
    [] __atomic_notifier_call_chain+0x86/0x140
    [] ? notifier_call_chain+0x120/0x120
    [] ? skb_dequeue+0x67/0x90
    [] atomic_notifier_call_chain+0x16/0x20
    [] netlink_release+0x24a/0x280
    [] sock_release+0x28/0xa0
    [] sock_close+0x17/0x30
    [] __fput+0xcc/0x250
    [] ____fput+0xe/0x10
    [] task_work_run+0x69/0x90
    [] do_notify_resume+0x81/0xd0
    [] int_signal+0x12/0x17

    Signed-off-by: Szymon Janc
    Signed-off-by: Samuel Ortiz

    Szymon Janc
     

11 Sep, 2012

1 commit

  • It is a frequent mistake to confuse the netlink port identifier with a
    process identifier. Try to reduce this confusion by renaming fields
    that hold port identifiers portid instead of pid.

    I have carefully avoided changing the structures exported to
    userspace to avoid changing the userspace API.

    I have successfully built an allyesconfig kernel with this change.

    Signed-off-by: "Eric W. Biederman"
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Eric W. Biederman
     

13 Jul, 2012

1 commit


10 Jul, 2012

1 commit


29 Jun, 2012

1 commit

  • Using NLMSG_GOODSIZE results in multiple pages being used as
    nlmsg_new() will automatically add the size of the netlink
    header to the payload thus exceeding the page limit.

    NLMSG_DEFAULT_SIZE takes this into account.

    Signed-off-by: Thomas Graf
    Cc: Jiri Pirko
    Cc: Dmitry Eremin-Solenikov
    Cc: Sergey Lapin
    Cc: Johannes Berg
    Cc: Lauro Ramos Venancio
    Cc: Aloisio Almeida Jr
    Cc: Samuel Ortiz
    Reviewed-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Thomas Graf
     

05 Jun, 2012

3 commits


16 May, 2012

2 commits

  • The variable 'nfc_genl_family' is only referenced in this file and
    should be marked static to prevent it from being exposed globally.

    Quites the sparse warning:

    warning: symbol 'nfc_genl_family' was not declared. Should it be static?

    Signed-off-by: H Hartley Sweeten
    Cc: Lauro Ramos Venancio
    Cc: Aloisio Almeida Jr
    Cc: Samuel Ortiz
    Cc: "David S. Miller"
    Signed-off-by: Samuel Ortiz
    Signed-off-by: John W. Linville

    H Hartley Sweeten
     
  • It is now specified that nfc_target_found() and nfc_target_lost() core
    functions must not be called from an atomic context. This allow us to
    serialize calls and protect the targets table using the nfc device lock
    instead of a spinlock.

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

    Eric Lapuyade
     

19 Apr, 2012

1 commit


13 Apr, 2012

1 commit


02 Apr, 2012

1 commit


07 Mar, 2012

3 commits


25 Jan, 2012

1 commit

  • 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