03 Nov, 2015

2 commits

  • Currently, cfg80211 rejects updates of AID and listen interval parameters
    for existing entries. This information is known only at association stage
    and as a result it's impossible to update entries that were added
    unassociated.
    Fix this by allowing updates of these properies for stations that the
    driver (or mac80211) assigned unassociated state.

    This then fixes mac80211's use of NL80211_FEATURE_FULL_AP_CLIENT_STATE.

    Signed-off-by: Ayala Beker
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Ayala Beker
     
  • If parse_acl_data succeeds but the subsequent parsing of smps
    attributes fails, there will be a memory leak due to early returns.
    Fix that by moving the ACL parsing later.

    Cc: stable@vger.kernel.org
    Fixes: 18998c381b19b ("cfg80211: allow requesting SMPS mode on ap start")
    Signed-off-by: Ola Olsson
    Signed-off-by: Johannes Berg

    Ola Olsson
     

16 Oct, 2015

7 commits


15 Oct, 2015

6 commits


13 Oct, 2015

2 commits

  • 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
     
  • For location and connectivity services, userspace would often like
    to know the time when the BSS was last seen. The current "last seen"
    value is calculated in a way that makes it less useful, especially
    if the system suspended in the meantime.

    Add the ability for the driver to report a real CLOCK_BOOTTIME stamp
    that can then be reported to userspace (if present).

    Drivers wishing to use this must be converted to the new API to call
    cfg80211_inform_bss_data() or cfg80211_inform_bss_frame_data(). They
    need to ensure the reported value is accurate enough even when the
    frame might have been buffered in the device (e.g. firmware.)

    Signed-off-by: Dmitry Shmidt
    [modified to use struct, inlines]
    Signed-off-by: Johannes Berg

    Dmitry Shmidt
     

07 Oct, 2015

1 commit

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

    Johannes Berg says:

    ====================
    For the current cycle, we have the following right now:
    * many internal fixes, API improvements, cleanups, etc.
    * full AP client state tracking in cfg80211/mac80211 from Ayala
    * VHT support (in mac80211) for mesh
    * some A-MSDU in A-MPDU support from Emmanuel
    * show current TX power to userspace (from Rafał)
    * support for netlink dump in vendor commands (myself)
    ====================

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

    David S. Miller
     

29 Sep, 2015

2 commits

  • Currently, cfg80211 rejects capability updates for existing entries
    and as a result it's impossible to update entries that were added
    unassociated, but that is necessary to go through the full station
    states from userspace, adding a station before authentication etc.

    Fix this by allowing updates to capabilities for stations that the
    driver (or mac80211) assigned unassociated state. Drivers setting
    the full station state support flag must use the new station type
    for proper operation.

    Signed-off-by: Ayala Beker
    Signed-off-by: Luca Coelho
    Signed-off-by: Johannes Berg

    Ayala Beker
     
  • 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
     

22 Sep, 2015

3 commits


04 Sep, 2015

1 commit

  • restore_regulatory_settings() should restore alpha2
    as computed in restore_alpha2(), not raw user_alpha2 to
    behave as described in the comment just above that code.

    This fixes endless loop of calling CRDA for "00" and "97"
    countries after resume from suspend on my laptop.

    Looks like others had the same problem, too:
    http://ath9k-devel.ath9k.narkive.com/knY5W6St/ath9k-and-crda-messages-in-logs
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/899335
    https://forum.porteus.org/viewtopic.php?t=4975&p=36436
    https://forums.opensuse.org/showthread.php/483356-Authentication-Regulatory-Domain-issues-ath5k-12-2

    Signed-off-by: Maciej Szmigiero
    Signed-off-by: Johannes Berg

    Maciej S. Szmigiero
     

14 Aug, 2015

3 commits


17 Jul, 2015

5 commits

  • This is necessary to merge the new TDLS and mesh patches,
    as they depend on some fixes.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Commit eeca9fce1d71 ('cfg80211: Schedule timeout for all CRDA calls')
    left behind a superfluous check after it removed some earlier code.

    In reg_process_hint, the test of "treatment == REG_REQ_IGNORE ||
    treatment == REG_REQ_ALREADY_SET" is superfluous because the code in the
    if-then branch is identical to the code after the if statement.

    Coverity CID #1295939

    I also removed the unnecessary assignment of treatment in this case,
    and added a comment reminding any future patch authors to ensure that
    treatment is properly assigned before it is used after the switch.

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

    John Linville
     
  • 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
     
  • The RTNL is required to check for IR-relaxation conditions that allow
    more channels to beacon. Export an RTNL locked version of reg_can_beacon
    and use it where possible in AP/STA interface type flows, where
    IR-relaxation may be applicable.

    Fixes: 06f207fc5418 ("cfg80211: change GO_CONCURRENT to IR_CONCURRENT for STA")
    Signed-off-by: Arik Nemtsov
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Arik Nemtsov
     
  • With a basic Linux userspace, the messages "Calling CRDA to update
    world regulatory domain" appears 10 times after boot every second or
    so, followed by a final "Exceeded CRDA call max attempts. Not calling
    CRDA". For those of us not having the corresponding userspace parts,
    having those messages repeatedly displayed at boot time is a bit
    annoying, so this commit reduces their log level to pr_debug().

    Signed-off-by: Thomas Petazzoni
    Signed-off-by: Johannes Berg

    Thomas Petazzoni
     

14 Jun, 2015

1 commit


10 Jun, 2015

1 commit

  • Until recently, mac80211 overwrote all the statistics it could
    provide when getting called, but it now relies on the struct
    having been zeroed by the caller. This was always the case in
    nl80211, but wext used a static struct which could even cause
    values from one device leak to another.

    Using a static struct is OK (as even documented in a comment)
    since the whole usage of this function and its return value is
    always locked under RTNL. Not clearing the struct for calling
    the driver has always been wrong though, since drivers were
    free to only fill values they could report, so calling this
    for one device and then for another would always have leaked
    values from one to the other.

    Fix this by initializing the structure in question before the
    driver method call.

    This fixes https://bugzilla.kernel.org/show_bug.cgi?id=99691

    Cc: stable@vger.kernel.org
    Reported-by: Gerrit Renker
    Reported-by: Alexander Kaltsas
    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

29 May, 2015

1 commit

  • It was possible for mac80211 to be coerced into an
    unexpected flow causing sdata union to become
    corrupted. Station pointer was put into
    sdata->u.vlan.sta memory location while it was
    really master AP's sdata->u.ap.next_beacon. This
    led to station entry being later freed as
    next_beacon before __sta_info_flush() in
    ieee80211_stop_ap() and a subsequent invalid
    pointer dereference crash.

    The problem was that ieee80211_ptr->use_4addr
    wasn't cleared on interface type changes.

    This could be reproduced with the following steps:

    # host A and host B have just booted; no
    # wpa_s/hostapd running; all vifs are down
    host A> iw wlan0 set type station
    host A> iw wlan0 set 4addr on
    host A> printf 'interface=wlan0\nssid=4addrcrash\nchannel=1\nwds_sta=1' > /tmp/hconf
    host A> hostapd -B /tmp/conf
    host B> iw wlan0 set 4addr on
    host B> ifconfig wlan0 up
    host B> iw wlan0 connect -w hostAssid
    host A> pkill hostapd
    # host A crashed:

    [ 127.928192] BUG: unable to handle kernel NULL pointer dereference at 00000000000006c8
    [ 127.929014] IP: [] __sta_info_flush+0xac/0x158
    ...
    [ 127.934578] [] ieee80211_stop_ap+0x139/0x26c
    [ 127.934578] [] ? dump_trace+0x279/0x28a
    [ 127.934578] [] __cfg80211_stop_ap+0x84/0x191
    [ 127.934578] [] cfg80211_stop_ap+0x3f/0x58
    [ 127.934578] [] nl80211_stop_ap+0x1b/0x1d
    [ 127.934578] [] genl_family_rcv_msg+0x259/0x2b5

    Note: This isn't a revert of f8cdddb8d61d
    ("cfg80211: check iface combinations only when
    iface is running") as far as functionality is
    considered because b6a550156bc ("cfg80211/mac80211:
    move more combination checks to mac80211") moved
    the logic somewhere else already.

    Fixes: f8cdddb8d61d ("cfg80211: check iface combinations only when iface is running")
    Signed-off-by: Michal Kazior
    Signed-off-by: Johannes Berg

    Michal Kazior
     

26 May, 2015

1 commit

  • When we disconnect from the AP, drivers call cfg80211_disconnect().
    This doesn't know whether the disconnection was initiated locally
    or by the AP though, which can cause problems with the supplicant,
    for example with WPS. This issue obviously doesn't show up with any
    mac80211 based driver since mac80211 doesn't call this function.

    Fix this by requiring drivers to indicate whether the disconnect is
    locally generated or not. I've tried to update the drivers, but may
    not have gotten the values correct, and some drivers may currently
    not be able to report correct values. In case of doubt I left it at
    false, which is the current behaviour.

    For libertas, make adjustments as indicated by Dan Williams.

    Reported-by: Matthieu Mauger
    Tested-by: Matthieu Mauger
    Signed-off-by: Johannes Berg

    Johannes Berg
     

20 May, 2015

1 commit


06 May, 2015

2 commits

  • The GO_CONCURRENT regulatory definition can be extended to station
    interfaces requesting to IR as part of TDLS off-channel operations.
    Rename the GO_CONCURRENT flag to IR_CONCURRENT and allow the added
    use-case.

    Change internal users of GO_CONCURRENT to use the new definition.

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

    Arik Nemtsov
     
  • If a P2P GO was allowed on a channel because of the GO concurrent
    relaxation, i.e., another station interface was associated to an AP on
    the same channel or the same UNII band, and the station interface
    disconnected from the AP, allow the following use cases unless the
    channel is marked as indoor only and the device is not operating in an
    indoor environment:

    1. Allow the P2P GO to stay on its current channel. The rationale behind
    this is that if the channel or UNII band were allowed by the AP they
    could still be used to continue the P2P GO operation, and avoid connection
    breakage.
    2. Allow another P2P GO to start on the same channel or another channel
    that is in the same UNII band as the previous instantiated P2P GO.

    Signed-off-by: Avraham Stern
    Signed-off-by: Arik Nemtsov
    Signed-off-by: Ilan Peer
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Avraham Stern
     

24 Apr, 2015

1 commit

  • wpa_supplicant or authsae handles the mesh peering in user
    space, but the plink state is still managed in kernel space.
    Currently, there is no implementation by wpa_supplicant or
    authsae to block the plink state after it is set to ESTAB.

    By applying this patch, we can use the "iw mesh0 station set
    plink_action block" to block the peer mesh STA.
    This is useful for experimenting purposes.

    Signed-off-by: Chun-Yeow Yeoh
    Signed-off-by: Johannes Berg

    Chun-Yeow Yeoh