16 May, 2018

1 commit

  • commit 4bf01ca21e2e0e4561d1a03c48c3d740418702db upstream.

    Make sure to free the rfkill device in case registration fails during
    probe.

    Fixes: 5e7ca3937fbe ("net: rfkill: gpio: convert to resource managed allocation")
    Cc: stable # 3.13
    Cc: Heikki Krogerus
    Signed-off-by: Johan Hovold
    Reviewed-by: Heikki Krogerus
    Signed-off-by: Johannes Berg
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     

13 Jun, 2017

1 commit


24 Jan, 2017

1 commit

  • There are no users of this ("vrfkill") in the tree, so it's just
    dead code - remove it.

    This also isn't really how rfkill is supposed to be used - it's
    intended as a signalling mechanism to/from the device, which the
    driver (and partially cfg80211) will handle - having a separate
    rfkill instance for a regulator is confusing, the driver should
    use the regulator instead to turn off the device when requested.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

09 Jan, 2017

1 commit

  • Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill-any,
    which may be useful on laptops with a single "radio LED" and multiple
    radio transmitters. The trigger is meant to turn a LED on whenever
    there is at least one radio transmitter active and turn it off
    otherwise.

    Signed-off-by: Michał Kępień
    Signed-off-by: Johannes Berg

    Michał Kępień
     

20 Dec, 2016

1 commit

  • This reverts commit 73f4f76a196d7adb11a1e192bd8024fe0bc83910.

    As Mike reported, and I should've seen in review, we can't call
    the new LED functions, which acquire the mutex, from places like
    rfkill_set_sw_state() that are documented to be callable from
    any context the user likes to use. For Mike's case it led to a
    deadlock, but other scenarios are possible.

    Reported-by: Михаил Кринкин
    Signed-off-by: Johannes Berg

    Johannes Berg
     

16 Dec, 2016

1 commit

  • A cleanup introduced a harmless warning in some configurations:

    net/rfkill/core.c: In function 'rfkill_init':
    net/rfkill/core.c:1350:1: warning: label 'error_input' defined but not used [-Wunused-label]

    This adds another #ifdef around the label to match that around the
    caller.

    Fixes: 6124c53edeea ("rfkill: Cleanup error handling in rfkill_init()")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Johannes Berg

    Arnd Bergmann
     

13 Dec, 2016

3 commits

  • Add a new "global" (i.e. not per-rfkill device) LED trigger, rfkill-any,
    which may be useful on laptops with a single "radio LED" and multiple
    radio transmitters. The trigger is meant to turn a LED on whenever
    there is at least one radio transmitter active and turn it off
    otherwise.

    This requires taking rfkill_global_mutex before calling rfkill_set_block()
    in rfkill_resume(): since __rfkill_any_led_trigger_event() is called from
    rfkill_set_block() unconditionally, each caller of the latter needs to
    take care of locking rfkill_global_mutex.

    Signed-off-by: Michał Kępień
    Signed-off-by: Johannes Berg

    Michał Kępień
     
  • Use a separate label per error condition in rfkill_init() to make it a
    bit cleaner and easier to extend.

    Signed-off-by: Michał Kępień
    Signed-off-by: Johannes Berg

    Michał Kępień
     
  • Simplify the two conditions gating the schedule_work() into
    a single one and get rid of the additional exit point from
    the function in doing so.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

05 Apr, 2016

1 commit


02 Mar, 2016

1 commit

  • …inux/kernel/git/jberg/mac80211-next

    Johannes Berg says:

    ====================
    Here's another round of updates for -next:
    * big A-MSDU RX performance improvement (avoid linearize of paged RX)
    * rfkill changes: cleanups, documentation, platform properties
    * basic PBSS support in cfg80211
    * MU-MIMO action frame processing support
    * BlockAck reordering & duplicate detection offload support
    * various cleanups & little fixes
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     

24 Feb, 2016

10 commits


26 Jan, 2016

1 commit

  • The code within wait_event_interruptible() is called with
    !TASK_RUNNING, so mustn't call any functions that can sleep,
    like mutex_lock().

    Since we re-check the list_empty() in a loop after the wait,
    it's safe to simply use list_empty() without locking.

    This bug has existed forever, but was only discovered now
    because all userspace implementations, including the default
    'rfkill' tool, use poll() or select() to get a readable fd
    before attempting to read.

    Cc: stable@vger.kernel.org
    Fixes: c64fb01627e24 ("rfkill: create useful userspace interface")
    Reported-by: Dmitry Vyukov
    Signed-off-by: Johannes Berg

    Johannes Berg
     

05 Jan, 2016

1 commit


10 Dec, 2015

1 commit

  • Some users of rfkill, like NFC and cfg80211, use a dynamic name when
    allocating rfkill, in those cases dev_name(). Therefore, the pointer
    passed to rfkill_alloc() might not be valid forever, I specifically
    found the case that the rfkill name was quite obviously an invalid
    pointer (or at least garbage) when the wiphy had been renamed.

    Fix this by making a copy of the rfkill name in rfkill_alloc().

    Cc: stable@vger.kernel.org
    Signed-off-by: Johannes Berg

    Johannes Berg
     

04 Sep, 2015

1 commit

  • When switching the state of all RFKill switches of type all we need to
    replicate the RFKILL_TYPE_ALL global state to all the other types global
    state, so it is used to initialize persistent RFKill switches on
    register.

    Signed-off-by: João Paulo Rechi Vita
    Acked-by: Marcel Holtmann
    Signed-off-by: Johannes Berg

    João Paulo Rechi Vita
     

18 Aug, 2015

1 commit

  • …etooth/bluetooth-next

    Johan Hedberg says:

    ====================
    pull request: bluetooth-next 2015-08-16

    Here's what's likely the last bluetooth-next pull request for 4.3:

    - 6lowpan/802.15.4 refactoring, cleanups & fixes
    - Document 6lowpan netdev usage in Documentation/networking/6lowpan.txt
    - Support for UART based QCA Bluetooth controllers
    - Power management support for Broeadcom Bluetooth controllers
    - Change LE connection initiation to always use passive scanning first
    - Support for new Silicon Wave USB ID

    Please let me know if there are any issues pulling. Thanks.
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     

13 Aug, 2015

1 commit

  • The GPIO subsystem provides dummy GPIO consumer functions if GPIOLIB is
    not enabled. Hence drivers that depend on GPIOLIB, but use GPIO consumer
    functionality only, can still be compiled if GPIOLIB is not enabled.

    Relax the dependency on GPIOLIB if COMPILE_TEST is enabled, where
    appropriate.

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Linus Walleij
    Signed-off-by: Johannes Berg

    Geert Uytterhoeven
     

12 Aug, 2015

1 commit


29 May, 2015

1 commit

  • Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions)
    which appeared in v3.17-rc1, the gpiod_get* functions take an additional
    parameter that allows to specify direction and initial value for output.

    Furthermore there is devm_gpiod_get_optional which is designed to get
    optional gpios.

    Simplify driver accordingly.

    Note this makes error checking more strict because only -ENOENT is
    ignored when searching for the GPIOs which is good.

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Johannes Berg

    Uwe Kleine-König
     

20 May, 2015

1 commit


05 Feb, 2015

1 commit

  • …inux/kernel/git/jberg/mac80211-next

    Last round of updates for net-next:
    * revert a patch that caused a regression with mesh userspace (Bob)
    * fix a number of suspend/resume related races
    (from Emmanuel, Luca and myself - we'll look at backporting later)
    * add software implementations for new ciphers (Jouni)
    * add a new ACPI ID for Broadcom's rfkill (Mika)
    * allow using netns FD for wireless (Vadim)
    * some other cleanups (various)

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     

03 Feb, 2015

1 commit


15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

05 Nov, 2014

1 commit

  • The driver uses devm_gpiod_get_index(..., index) so that the index refers
    directly to the GpioIo resource under the ACPI device. The problem with
    this is that if the ordering changes we get wrong GPIOs.

    With ACPI 5.1 _DSD we can now use names instead to reference GPIOs
    analogous to Device Tree. However, we still have systems out there that do
    not provide _DSD at all. These systems must be supported as well.

    Luckily we now have acpi_dev_add_driver_gpios() that can be used to provide
    mappings for systems where _DSD is not provided and still take advantage of
    _DSD if it exists.

    This patch changes the driver to create default GPIO mappings if we are
    running on ACPI system.

    While there we can drop the indices completely and use devm_gpiod_get()
    with name instead.

    Signed-off-by: Mika Westerberg
    Reviewed-by: Johannes Berg
    Acked-by: John W. Linville
    Acked-by: Linus Walleij
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

20 Oct, 2014

1 commit


09 Oct, 2014

1 commit


23 Sep, 2014

1 commit


17 Sep, 2014

1 commit


26 Aug, 2014

1 commit


23 May, 2014

1 commit