15 Oct, 2015

1 commit


13 Oct, 2015

1 commit

  • Add the option to configure multiple 'scan plans' for scheduled scan.
    Each 'scan plan' defines the number of scan cycles and the interval
    between scans. The scan plans are executed in the order they were
    configured. The last scan plan will always run infinitely and thus
    defines only the interval between scans.
    The maximum number of scan plans supported by the device and the
    maximum number of iterations in a single scan plan are advertised
    to userspace so it can configure the scan plans appropriately.

    When scheduled scan results are received there is no way to know which
    scan plan is being currently executed, so there is no way to know when
    the next scan iteration will start. This is not a problem, however.
    The scan start timestamp is only used for flushing old scan results,
    and there is no difference between flushing all results received until
    the end of the previous iteration or the start of the current one,
    since no results will be received in between.

    Signed-off-by: Avraham Stern
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Avraham Stern
     

29 Sep, 2015

1 commit

  • Now, PM core supports asynchronous suspend/resume mode for devices
    during system suspend/resume, and the power state transition of one
    device may be completed in separate kernel thread. PM core ensures
    all power state transition timing dependency between devices. This
    patch enables wiphy device to suspend/resume asynchronously. This can
    take advantage of multicore and improve system suspend/resume speed.

    Signed-off-by: Zhonghui Fu
    Signed-off-by: Johannes Berg

    Fu, Zhonghui
     

17 Jul, 2015

1 commit

  • This callback is currently not allowed to sleep, which makes it more
    difficult to implement proper driver methods in mac80211 than it has
    to be. Instead of doing asynchronous work here in mac80211, make it
    possible for the callback to sleep by doing some asynchronous work
    in cfg80211. This also enables improvements to other drivers, like
    ath6kl, that would like to sleep in this callback.

    While at it, also fix the code to call the driver on the implicit
    unregistration when an interface is removed, and do that also when
    a P2P-Device wdev is destroyed (otherwise we leak the structs.)

    Signed-off-by: Johannes Berg

    Johannes Berg
     

24 Feb, 2015

1 commit


20 Jan, 2015

1 commit

  • This reverts commit ba1debdfed974f25aa598c283567878657b292ee.

    Oliver reported that it breaks network-manager, for some reason with
    this patch NM decides that the device isn't wireless but "generic"
    (ethernet), sees no carrier (as expected with wifi) and fails to do
    anything else with it.

    Revert this to unbreak userspace.

    Reported-by: Oliver Hartkopp
    Tested-by: Oliver Hartkopp
    Signed-off-by: Johannes Berg

    Johannes Berg
     

18 Dec, 2014

2 commits


17 Dec, 2014

1 commit

  • Add a new regulatory flag that allows a driver to manage regdomain
    changes/updates for its own wiphy.
    A self-managed wiphys only employs regulatory information obtained from
    the FW and driver and does not use other cfg80211 sources like
    beacon-hints, country-code IEs and hints from other devices on the same
    system. Conversely, a self-managed wiphy does not share its regulatory
    hints with other devices in the system. If a system contains several
    devices, one or more of which are self-managed, there might be
    contradictory regulatory settings between them. Usage of flag is
    generally discouraged. Only use it if the FW/driver is incompatible
    with non-locally originated hints.

    A new API lets the driver send a complete regdomain, to be applied on
    its wiphy only.

    After a wiphy-specific regdomain change takes place, usermode will get
    a new type of change notification. The regulatory core also takes care
    enforce regulatory restrictions, in case some interfaces are on
    forbidden channels.

    Signed-off-by: Jonathan Doron
    Signed-off-by: Arik Nemtsov
    Reviewed-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Jonathan Doron
     

12 Dec, 2014

1 commit

  • It allows to identify the wlan kind of device for the user application,
    e.g.:

    # ip -d link

    1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0
    2: enp0s25: mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff promiscuity 0
    3: wlp3s0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff promiscuity 0
    wlan

    Signed-off-by: Vadim Kochan
    Acked-by: Marcel Holtmann
    [make wireless_link_ops const]
    Signed-off-by: Johannes Berg

    Vadim Kochan
     

28 Nov, 2014

1 commit

  • When the regulatory settings change, some channels might become invalid.
    Disconnect interfaces acting on these channels, after giving userspace
    code a grace period to leave them.

    This mode is currently opt-in, and not all interface operating modes are
    supported for regulatory-enforcement checks. A wiphy that wishes to use
    the new enforcement code must specify an appropriate regulatory flag,
    and all its supported interface modes must be supported by the checking
    code.

    Signed-off-by: Arik Nemtsov
    Reviewed-by: Luis R. Rodriguez
    [fix some indentation, typos]
    Signed-off-by: Johannes Berg

    Arik Nemtsov
     

20 Nov, 2014

1 commit

  • Introduce commands to initiate and cancel TDLS channel-switching. Once
    TDLS channel-switching is started, the lower level driver is responsible
    for continually initiating channel-switch operations and returning to
    the base (AP) channel to listen for beacons from time to time.

    Upon cancellation of the channel-switch all communication between the
    relevant TDLS peers will continue on the base channel.

    Signed-off-by: Arik Nemtsov
    Signed-off-by: Johannes Berg

    Arik Nemtsov
     

04 Nov, 2014

1 commit

  • This patch adds new iface type (NL80211_IFTYPE_OCB) representing
    the OCB (Outside the Context of a BSS) mode.
    When establishing a connection to the network a cfg80211_join_ocb
    function is called (particular nl80211_command is added as well).
    A mandatory parameters during the ocb_join operation are 'center
    frequency' and 'channel width (5/10 MHz)'.

    Changes done in mac80211 are minimal possible required to avoid
    many warnings (warning: enumeration value 'NL80211_IFTYPE_OCB'
    not handled in switch) during compilation. Full functionality
    (where needed) is added in the following patch.

    Signed-off-by: Rostislav Lisovy
    Signed-off-by: Johannes Berg

    Rostislav Lisovy
     

31 Oct, 2014

1 commit


27 Oct, 2014

1 commit

  • Kernel will attempt to use the name if it is supplied,
    but if name cannot be used for some reason, the default
    phyX name will be used instead.

    Signed-off-by: Ben Greear
    [while at it, use wiphy_name() instead of dev_name(),
    fix format string issue reported by Kees Cook]
    Signed-off-by: Johannes Berg

    Ben Greear
     

16 Sep, 2014

1 commit

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

    Johannes Berg <johannes@sipsolutions.net> says:

    "This time, I have some rate minstrel improvements, support for a very
    small feature from CCX that Steinar reverse-engineered, dynamic ACK
    timeout support, a number of changes for TDLS, early support for radio
    resource measurement and many fixes. Also, I'm changing a number of
    places to clear key memory when it's freed and Intel claims copyright
    for code they developed."

    Conflicts:
    net/mac80211/iface.c

    Signed-off-by: John W. Linville <linville@tuxdriver.com>

    John W. Linville
     

11 Sep, 2014

1 commit


05 Sep, 2014

2 commits


26 Aug, 2014

2 commits


23 Jun, 2014

1 commit

  • Currently, cfg80211 tries to implement ethtool, but that doesn't
    really scale well, with all the different operations. Make the
    lower-level driver responsible for it, which currently only has
    an effect on mac80211. It will similarly not scale well at that
    level though, since mac80211 also has many drivers.

    To cleanly implement this in mac80211, introduce a new file and
    move some code to appropriate places.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

26 May, 2014

1 commit


15 May, 2014

1 commit

  • Change the type of NL80211_ATTR_CSA_C_OFF_BEACON and
    NL80211_ATTR_CSA_C_OFF_PRESP to be NLA_BINARY which allows
    userspace to use beacons and probe responses with
    multiple CSA counters.
    This isn't breaking the API since userspace can
    continue to use nla_put_u16 for this attributes, which
    is equivalent to a single element u16 array.
    In addition advertise max number of supported CSA counters.
    This is needed when using CSA and eCSA IEs together.

    Signed-off-by: Andrei Otcheretianski
    Signed-off-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Andrei Otcheretianski
     

09 May, 2014

1 commit

  • When the driver fails during HW restart or resume, the whole
    stack goes into a very confused state with interfaces being
    up while the hardware is down etc.

    Address this by shutting down everything; we'll run into a
    lot of warnings in the process but that's better than having
    the whole stack get messed up.

    Reviewed-by: Arik Nemtsov
    Signed-off-by: Johannes Berg

    Johannes Berg
     

06 May, 2014

1 commit

  • This exports a new cfg80211_stop_iface() function.

    This is intended for driver internal interface
    combination management and channel switching.

    Due to locking issues (it re-enters driver) the
    call is asynchronous and uses cfg80211 event
    list/worker.

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

    Michal Kazior
     

29 Apr, 2014

1 commit


25 Apr, 2014

2 commits


09 Apr, 2014

2 commits

  • Get rid of the cfg80211_can_add_interface() and
    cfg80211_can_change_interface() functions by moving that functionality
    to mac80211. With this patch all interface combination checks are now
    out of cfg80211 (except for the channel switch case which will be
    addressed in a future commit).

    Additionally, modify the ieee80211_check_combinations() function so
    that an undefined chandef can be passed, in order to use it before a
    channel is defined.

    Signed-off-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Luciano Coelho
     
  • When dynamically creating interfaces from userspace, e.g. for P2P usage,
    such interfaces are usually owned by the process that created them, i.e.
    wpa_supplicant. Should wpa_supplicant crash, such interfaces will often
    cease operating properly and cause problems on restarting the process.

    To avoid this problem, introduce an ownership concept for interfaces. If
    an interface is owned by a netlink socket, then it will be destroyed if
    the netlink socket is closed for any reason, including if the process it
    belongs to crashed. This gives us a race-free way to get rid of any such
    interfaces.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

22 Mar, 2014

1 commit


15 Mar, 2014

1 commit


03 Mar, 2014

1 commit

  • In case of AP mode, the beacon interval is already reset to
    zero inside cfg80211_stop_ap(), and in the other modes it
    isn't relevant. Remove the assignment to remove a potential
    race since the assignment isn't properly locked.

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

    Johannes Berg
     

26 Feb, 2014

1 commit

  • Commit "nl80211: send event when AP operation is stopped" added an
    event to notify user space that an AP interface has been stopped, to
    handle cases such as suspend etc. The event is sent regardless
    if the stop AP flow was triggered by user space or due to internal state
    change.

    This might cause issues with wpa_supplicant/hostapd flows that consider
    stop AP flow as a synchronous one, e.g., AP/GO channel change in the
    absence of CSA support. In such cases, the flow will restart the AP
    immediately after the stop AP flow is done, and only handle the stop
    AP event after the current flow is done, and as a result stop the AP
    again.

    Change the current implementation to only send the event in case the
    stop AP was triggered due to an internal reason.

    Signed-off-by: Ilan Peer
    Signed-off-by: Johannes Berg

    Ilan Peer
     

14 Feb, 2014

1 commit


06 Feb, 2014

3 commits

  • Due to the previous commit, when a scan finishes, it is in theory
    possible to hit the following sequence:
    1. interface starts being removed
    2. scan is cancelled by driver and cfg80211 is notified
    3. scan done work is scheduled
    4. interface is removed completely, rdev->scan_req is freed,
    event sent to userspace but scan done work remains pending
    5. new scan is requested on another virtual interface
    6. scan done work runs, freeing the still-running scan

    To fix this situation, hang on to the scan done message and block
    new scans while that is the case, and only send the message from
    the work function, regardless of whether the scan_req is already
    freed from interface removal. This makes step 5 above impossible
    and changes step 6 to be
    5. scan done work runs, sending the scan done message

    As this can't work for wext, so we send the message immediately,
    but this shouldn't be an issue since we still return -EBUSY.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • When an interface/wdev is removed, any ongoing scan should be
    cancelled by the driver. This will make it call cfg80211, which
    only queues a work struct. If interface/wdev removal is quick
    enough, this can leave the scan request pending and processed
    only after the interface is gone, causing a use-after-free.

    Fix this by making sure the scan request is not pending after
    the interface is destroyed. We can't flush or cancel the work
    item due to locking concerns, but when it'll run it shouldn't
    find anything to do. This leaves a potential issue, if a new
    scan gets requested before the work runs, it prematurely stops
    the running scan, potentially causing another crash. I'll fix
    that in the next patch.

    This was particularly observed with P2P_DEVICE wdevs, likely
    because freeing them is quicker than freeing netdevs.

    Reported-by: Andrei Otcheretianski
    Fixes: 4a58e7c38443 ("cfg80211: don't "leak" uncompleted scans")
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Unfortunately I forgot this during the merge window, but the
    patch seems small enough to go in as a fix. The userspace API
    bug that was the reason for disabling it has long been fixed.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

05 Feb, 2014

1 commit