12 Jan, 2013

1 commit

  • Since:

    commit 2c60db037034d27f8c636403355d52872da92f81
    Author: Eric Dumazet
    Date: Sun Sep 16 09:17:26 2012 +0000

    net: provide a default dev->ethtool_ops

    wireless core does not correctly assign ethtool_ops.

    After alloc_netdev*() call, some cfg80211 drivers provide they own
    ethtool_ops, but some do not. For them, wireless core provide generic
    cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call:

    if (!dev->ethtool_ops)
    dev->ethtool_ops = &cfg80211_ethtool_ops;

    But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211
    drivers without custom ethtool_ops), but points to &default_ethtool_ops.

    In order to fix the problem, provide function which will overwrite
    default_ethtool_ops and use it by wireless core.

    Signed-off-by: Stanislaw Gruszka
    Acked-by: Johannes Berg
    Acked-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Stanislaw Gruszka
     

05 Nov, 2012

1 commit

  • The commit:

    commit 5e760230e42cf759bd923457ca2753aacf2e656e
    Author: Johannes Berg
    Date: Fri Nov 4 11:18:17 2011 +0100

    cfg80211: allow registering to beacons

    allowed only a single process to register for beacon events
    per wiphy. This breaks cases where a user may want two or
    more VIFs on a wiphy and run a seperate hostapd process on
    each vif.

    This patch allows multiple beacon listeners, fixing the
    regression.

    Signed-off-by: Ben Greear
    Signed-off-by: Johannes Berg

    Ben Greear
     

30 Oct, 2012

1 commit


24 Oct, 2012

1 commit


18 Oct, 2012

3 commits

  • No driver initializes chan->max_antenna_gain to something sensible, and
    the only place where it is being used right now is inside ath9k. This
    leads to ath9k potentially using less tx power than it can use, which can
    decrease performance/range in some rare cases.

    Rather than going through every single driver, this patch initializes
    chan->orig_mag in wiphy_register(), ignoring whatever value the driver
    left in there. If a driver for some reason wishes to limit it independent
    from regulatory rulesets, it can do so internally.

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

    Felix Fietkau
     
  • This will allow adding central tracing like in mac80211.

    Signed-off-by: Hila Gonen
    Reviewed-by: Emmanuel Grumbach
    Reviewed-by: Johannes Berg
    Signed-off-by: Johannes Berg

    Hila Gonen
     
  • Add an NL80211_SCAN_FLAG_FLUSH flag that causes old bss cache
    entries to be flushed on scan completion. This is useful for
    collecting guaranteed fresh scan/survey result (e.g. on resume).

    For normal scan, flushing only happens on successful completion
    of a scan; i.e. it does not happen if the scan is aborted.
    For scheduled scan, previous scan results are flushed everytime
    when we get new scan results.

    This feature is enabled by default. Drivers can disable it by
    unsetting the NL80211_FEATURE_SCAN_FLUSH flag.

    Signed-off-by: Sam Leffler
    Tested-by: Amitkumar Karwar
    Signed-off-by: Amitkumar Karwar
    Signed-off-by: Bing Zhao
    [invert polarity of feature flag to account for old kernels]
    Signed-off-by: Johannes Berg

    Sam Leffler
     

25 Aug, 2012

1 commit


20 Aug, 2012

1 commit

  • In order to support using a different MAC address
    for the P2P Device address we must first have a
    P2P Device abstraction that can be assigned a MAC
    address.

    This abstraction will also be useful to support
    offloading P2P operations to the device, e.g.
    periodic listen for discoverability.

    Currently, the driver is responsible for assigning
    a MAC address to the P2P Device, but this could be
    changed by allowing a MAC address to be given to
    the NEW_INTERFACE command.

    As it has no associated netdev, a P2P Device can
    only be identified by its wdev identifier but the
    previous patches allowed using the wdev identifier
    in various APIs, e.g. remain-on-channel.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

07 Aug, 2012

1 commit

  • libertas currently calls cfg80211_disconnected() when it is being
    brought down. This causes an event to be allocated, but since the
    wdev is already removed from the rdev by the time that the event
    processing work executes, the event is never processed or freed.
    http://article.gmane.org/gmane.linux.kernel.wireless.general/95666

    Fix this leak, and other possible situations, by processing the event
    queue when a device is being unregistered. Thanks to Johannes Berg for
    the suggestion.

    Signed-off-by: Daniel Drake
    Cc: stable@vger.kernel.org
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Daniel Drake
     

17 Jul, 2012

3 commits

  • Now that we have wiphy_regulatory_register() we can
    tuck away the core's regulatory_update() call there
    and make it static.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     
  • This makes it clearer what we're doing. This now makes a bit
    more sense given that regardless of the wiphy if the cell
    base station hint feature is supported we will be modifying the
    way the regulatory core behaves.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     
  • Cellular base stations can provide hints to cfg80211 about
    where they think we are. This can be done for example on
    a cell phone. To enable these hints we simply allow them
    through as user regulatory hints but we allow userspace
    to clasify the hint as either coming directly from the
    user or coming from a cellular base station. This option
    is only available when you enable
    CONFIG_CFG80211_CERTIFICATION_ONUS.

    The base station hints themselves will not be processed
    by the core unless at least one device on the system
    supports this feature.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Luis R. Rodriguez
     

13 Jul, 2012

1 commit

  • Revert commit b78e8ceac23655e1e06b30aa95ab11742d1ac7c0
    ("cfg80211: track monitor channel") and remove the
    set_monitor_enabled() callback.

    Due to the tracking happening in NETDEV_PRE_UP, it had
    introduced bugs because the monitor interface callback
    would be called before the device was started. It looks
    like there's no way to fix this, and using NETDEV_PRE_UP
    is broken anyway (since there's no NETDEV_UP_FAIL), so
    remove all that code, track interfaces in NETDEV_UP and
    also stop tracking the monitor channel in cfg80211.

    This mostly reverts to before the tracking, except that
    we keep the interface count tracking so that setting the
    monitor channel can be rejected properly.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

12 Jul, 2012

1 commit


09 Jul, 2012

2 commits

  • There are a few places that iterate the wdev
    list and assume wdev->netdev exists, check
    there. The rfkill one has to be extended for
    each non-netdev type later.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • In order to support a P2P device abstraction and
    Bluetooth high-speed AMPs, we need to have a way
    to identify virtual interfaces that don't have a
    netdev associated.

    Do this by adding a NL80211_ATTR_WDEV attribute
    to identify a wdev which may or may not also be
    a netdev.

    To simplify things, use a 64-bit value with the
    high 32 bits being the wiphy index for this new
    wdev identifier in the nl80211 API.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

08 Jul, 2012

1 commit


04 Jul, 2012

1 commit

  • Michal's monitor channel tracking introduce a locking problem
    as it locked the rdev lock inside the netdev notifier which
    isn't allowed as we might already hold it if we get there by
    removing an interface that is up.

    Fix this by relying only on the RTNL to protect the interface
    counters, the RTNL is always held in these code paths anyway.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

02 Jul, 2012

1 commit

  • Add enumerations for both cfg80211 and nl80211.
    This expands wiphy.bands etc. arrays.

    Extend channel frequency translation to cover 60g band
    and modify the rate check logic since there are no legacy
    mandatory rates (only MCS is used.)

    Signed-off-by: Vladimir Kondratiev
    Signed-off-by: Johannes Berg

    Vladimir Kondratiev
     

29 Jun, 2012

6 commits

  • devlist_mtx locking is changed to accomodate changes.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     
  • .connect cannot be handled since the driver scans
    and connects on its own. It is up to the driver
    then to refuse a connection (with -EBUSY for
    example).

    Non-fixed channel IBSSes always take a single
    channel resource. For example two non-fixed
    channel IBSSes always take up 2
    num_different_channels, even if they operate on
    the same channel at a given point of time.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     
  • Implements behaviour seen in mac80211. A running
    monitor always has a channel - even before
    .set_channel. This way we won't break current
    behaviour.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     
  • Make it even more obvious we support single
    monitor channel. This will allow us to remove
    .get_channel.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     
  • Implements .set_monitor_enabled(wiphy, enabled).

    Notifies driver upon change of interface layout.

    If only monitor interfaces become present it is
    called with 2nd argument being true. If
    non-monitor interface appears then 2nd argument
    is false. Driver is notified only upon change.

    This makes it more obvious about the fact that
    cfg80211 supports single monitor channel. Once we
    implement multi-channel we don't want to allow
    setting monitor channel while other interface
    types are running. Otherwise it would be ambiguous
    once we start considering num_different_channels.

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     
  • We'll need this for proper channel tracking (which
    is going to be needed for channel context
    accounting and finding matching/active interface
    combination).

    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     

27 Jun, 2012

1 commit

  • When CONFIG_PM is disabled, no device can possibly
    support WoWLAN since it can't go to sleep to start
    with. Due to this, mac80211 had even rejected the
    hardware registration. By making all the code and
    data for WoWLAN depend on CONFIG_PM we can promote
    this runtime error to a compile-time error.

    Add #ifdef around all WoWLAN code to remove it in
    systems that don't need it as they never suspend.

    Cc: Kalle Valo
    Acked-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Johannes Berg
     

20 Jun, 2012

1 commit


17 May, 2012

1 commit


17 Apr, 2012

1 commit

  • My grand plan to allow drivers to gradually move over
    to advertising virtual interface combinations and only
    enforce with drivers that do want it enforced doesn't
    seem to be working out, only Christian ever added the
    advertising (to carl9170), nobody else did.

    Begin enforcing combinations in cfg80211 so that users
    can rely on the information reported about a device.

    Cc: "Luis R. Rodriguez"
    Cc: Jouni Malinen
    Cc: Vasanthakumar Thiagarajan
    Cc: Senthil Balasubramanian
    Cc: Kalle Valo
    Cc: Jiri Slaby
    Cc: Nick Kossifidis
    Cc: Bob Copeland
    Cc: Bing Zhao
    Cc: Lennert Buytenhek
    Cc: Ivo van Doorn
    Cc: Gertjan van Wingerde
    Cc: Helmut Schaa
    Cc: Luciano Coelho
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

12 Apr, 2012

1 commit

  • In WoWLAN, we only get the triggers when we actually get
    to suspend. As a consequence, drivers currently don't
    know that the device should enable wakeup. However, the
    device_set_wakeup_enable() API is intended to be called
    when the wakeup is enabled, not later when needed.

    Add a new set_wakeup() call to cfg80211 and mac80211 to
    allow drivers to properly call device_set_wakeup_enable.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

10 Nov, 2011

1 commit

  • Add the ability to advertise that the device
    contains the AP SME and what features it can
    support. There are currently no features in
    the bitmap -- probe response offload will be
    advertised by a few patches Arik is working
    on now (who took over from Guy Eilam) and a
    device with AP SME will typically implement
    and require response offload.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

22 Sep, 2011

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/Kconfig
    drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
    drivers/net/ethernet/broadcom/tg3.c
    drivers/net/wireless/iwlwifi/iwl-pci.c
    drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
    drivers/net/wireless/rt2x00/rt2800usb.c
    drivers/net/wireless/wl12xx/main.c

    David S. Miller
     

15 Sep, 2011

1 commit

  • The function wiphy_update_regulatory() uses the static variable
    last_request and thus needs to be called with reg_mutex held.
    This is the case for all users in reg.c, but the function was
    exported for use by wiphy_register(), from where it is called
    without the lock being held.

    Fix this by making wiphy_update_regulatory() private and introducing
    regulatory_update() as a wrapper that acquires and holds the lock.

    Signed-off-by: Sven Neumann
    Cc: John W. Linville
    Cc: Luis R. Rodriguez
    Cc: Daniel Mack
    Cc: linux-wireless@vger.kernel.org
    Acked-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Sven Neumann
     

23 Aug, 2011

1 commit

  • Do not call ->suspend, ->resume methods after we unregister wiphy. Also
    delete sta_clanup timer after we finish wiphy unregister to avoid this:

    WARNING: at lib/debugobjects.c:262 debug_print_object+0x85/0xa0()
    Hardware name: 6369CTO
    ODEBUG: free active (active state 0) object type: timer_list hint: sta_info_cleanup+0x0/0x180 [mac80211]
    Modules linked in: aes_i586 aes_generic fuse bridge stp llc autofs4 sunrpc cpufreq_ondemand acpi_cpufreq mperf ext2 dm_mod uinput thinkpad_acpi hwmon sg arc4 rt2800usb rt2800lib crc_ccitt rt2x00usb rt2x00lib mac80211 cfg80211 i2c_i801 iTCO_wdt iTCO_vendor_support e1000e ext4 mbcache jbd2 sd_mod crc_t10dif sr_mod cdrom yenta_socket ahci libahci pata_acpi ata_generic ata_piix i915 drm_kms_helper drm i2c_algo_bit video [last unloaded: microcode]
    Pid: 5663, comm: pm-hibernate Not tainted 3.1.0-rc1-wl+ #19
    Call Trace:
    [] warn_slowpath_common+0x6d/0xa0
    [] ? debug_print_object+0x85/0xa0
    [] ? debug_print_object+0x85/0xa0
    [] warn_slowpath_fmt+0x2e/0x30
    [] debug_print_object+0x85/0xa0
    [] ? sta_info_alloc+0x1a0/0x1a0 [mac80211]
    [] debug_check_no_obj_freed+0xe2/0x180
    [] kfree+0x8b/0x150
    [] cfg80211_dev_free+0x7e/0x90 [cfg80211]
    [] wiphy_dev_release+0xd/0x10 [cfg80211]
    [] device_release+0x19/0x80
    [] kobject_release+0x7a/0x1c0
    [] ? rtnl_unlock+0x8/0x10
    [] ? wiphy_resume+0x6b/0x80 [cfg80211]
    [] ? kobject_del+0x30/0x30
    [] kref_put+0x2d/0x60
    [] kobject_put+0x1d/0x50
    [] ? mutex_lock+0x14/0x40
    [] put_device+0xf/0x20
    [] dpm_resume+0xca/0x160
    [] hibernation_snapshot+0xcd/0x260
    [] ? freeze_processes+0x3f/0x90
    [] hibernate+0xcb/0x1e0
    [] ? pm_async_store+0x40/0x40
    [] state_store+0xa0/0xb0
    [] ? pm_async_store+0x40/0x40
    [] kobj_attr_store+0x20/0x30
    [] sysfs_write_file+0x94/0xf0
    [] vfs_write+0x9a/0x160
    [] ? sysfs_open_file+0x200/0x200
    [] sys_write+0x3d/0x70
    [] sysenter_do_call+0x12/0x28

    Cc: stable@kernel.org
    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: John W. Linville

    Stanislaw Gruszka
     

21 Jul, 2011

1 commit

  • cfg80211_netdev_notifier_call() is configuring psm in case
    of NL80211_IFTYPE_STATION interface type (on NETDEV_UP).
    do the same for NL80211_IFTYPE_P2P_CLIENT interface type.

    Signed-off-by: Eliad Peller
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Eliad Peller
     

16 Jul, 2011

1 commit

  • Since we now have the necessary API in place to support
    GTK rekeying, applications will need to know whether it
    is supported by a device. Add a pseudo-trigger that is
    used only to advertise that capability. Also, add some
    new triggers that match what iwlagn devices can do.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

06 Jul, 2011

1 commit

  • There was a deadlock when rfkill-blocking a wireless interface,
    because we were locking the rdev mutex on NETDEV_GOING_DOWN to stop
    sched_scans that were eventually running. The rfkill block code was
    already holding a mutex under rdev:

    kernel: =======================================================
    kernel: [ INFO: possible circular locking dependency detected ]
    kernel: 3.0.0-rc1-00049-g1fa7b6a #57
    kernel: -------------------------------------------------------
    kernel: kworker/0:1/4525 is trying to acquire lock:
    kernel: (&rdev->mtx){+.+.+.}, at: [] cfg80211_netdev_notifier_call+0x131/0x5b0
    kernel:
    kernel: but task is already holding lock:
    kernel: (&rdev->devlist_mtx){+.+.+.}, at: [] cfg80211_rfkill_set_block+0x4f/0xa0
    kernel:
    kernel: which lock already depends on the new lock.

    To fix this, add a new mutex specifically for sched_scan, to protect
    the sched_scan_req element in the rdev struct, instead of using the
    global rdev mutex.

    Reported-by: Duane Griffin
    Signed-off-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Luciano Coelho
     

17 May, 2011

1 commit

  • Add the ability to advertise interface combinations in nl80211.
    This allows the driver to indicate what the combinations are
    that it supports. "Combinations" of just a single interface are
    implicit, as previously. Note that cfg80211 will enforce that
    the restrictions are met, but not for all drivers yet (once all
    drivers are updated, we can remove the flag and enforce for all).

    When no combinations are actually supported, an empty list will
    be exported so that userspace can know if the kernel exported
    this info or not (although it isn't clear to me what tools using
    the info should do if the kernel didn't export it).

    Since some interface types are purely virtual/software and don't
    fit the restrictions, those are exposed in a new list of pure SW
    types, not subject to restrictions. This mainly exists to handle
    AP-VLAN and monitor interfaces in mac80211.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

13 May, 2011

1 commit

  • When sched_scan_stopped was called by the driver, mac80211 calls
    cfg80211, which in turn was calling mac80211 back with a flag
    "driver_initiated". This flag was used so that mac80211 would do the
    necessary cleanup but would not call the driver. This was enough to
    prevent the bounce back between the driver and mac80211, but not
    between mac80211 and cfg80211.

    To fix this, we now do the cleanup in mac80211 before calling
    cfg80211. To help with locking issues, the workqueue was moved from
    cfg80211 to mac80211.

    Reported-by: Johannes Berg
    Signed-off-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Luciano Coelho