19 Nov, 2012

1 commit


24 Jun, 2012

1 commit

  • There are a few things that make the logging and
    debugging in mac80211 less useful than it should
    be right now:
    * a lot of messages should be pr_info, not pr_debug
    * wholesale use of pr_debug makes it require *both*
    Kconfig and dynamic configuration
    * there are still a lot of ifdefs
    * the style is very inconsistent, sometimes the
    sdata->name is printed in front

    Clean up everything, introducing new macros and
    separating out the station MLME debugging into
    a new Kconfig symbol.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

16 May, 2012

1 commit


11 Apr, 2012

1 commit

  • Changing the channel type during operation is
    confusing to some drivers and will be hard to
    handle in multi-channel scenarios. Instead of
    changing the channel, set it to the right HT
    channel before authenticating/associating and
    don't change it -- just update the 20/40 MHz
    restrictions in rate control as needed when
    changed by the AP.

    This also fixes a problem that Paul missed in
    his fix for the "regulatory makes us deaf"
    issue -- when we couldn't use 40 MHz we still
    associated saying we were using 40 MHz, which
    could in similarly broken APs make us never
    even connect successfully.

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

    Johannes Berg
     

16 Dec, 2011

1 commit

  • Currently BAR, ADDBA and DELBA frames are always sent using AC_VO. If
    the TID for which a BA session is established is assigned to a different
    queue BAR, ADDBA and DELBA frames can "overtake" frames of the according
    BA session.

    Hence, always put BA session related frames into the same queue as the
    BA sessions data frames.

    Signed-off-by: Helmut Schaa
    Signed-off-by: John W. Linville

    Helmut Schaa
     

07 Dec, 2011

2 commits

  • AP interfaces routinely call this logic, so just silently
    return when this happens instead of splatting the kernel
    logs.

    Reported-by: Christian Lamparter
    Signed-off-by: Ben Greear
    Signed-off-by: John W. Linville

    Ben Greear
     
  • The HT mode is set by iw (previous patchsets).
    The interface is set into the specified HT mode.
    HT mode and capabilities are announced in beacons.

    If we add a station that uses HT also, the fastest matching HT mode will
    be used for transmission. That means if we are using HT40+ and we add a station
    running on HT40-, we would transfer at HT20.

    If we join an IBSS with HT40, but the secondary channel is not
    available, we will fall back into HT20 as well.

    Allow frame aggregation to start in IBSS mode.

    Signed-off-by: Alexander Simon
    [siwu@hrz.tu-chemnitz.de: Updates]
    * remove implicit channel_type enum assumptions
    * use rate_control_rate_init() if channel type changed
    * remove channel flags check
    * activate HT IBSS feature support
    * slightly reword commit message
    * rebase on wireless-testing

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Alexander Simon
     

29 Nov, 2011

1 commit


23 Nov, 2011

1 commit


22 Nov, 2011

1 commit

  • This implements ht-cap over-rides for mac80211 drivers.
    HT may be disabled, making an /a/b/g/n station act like an
    a/b/g station. HT40 may be disabled forcing the station to
    be HT20 even if the AP and local hardware support HT40.

    MAX-AMSDU may be disabled.
    AMPDU-Density may be increased.
    AMPDU-Factor may be decreased.

    This has been successfully tested with ath9k using patched
    wpa_supplicant and iw.

    Signed-off-by: Ben Greear
    Signed-off-by: John W. Linville

    Ben Greear
     

09 Nov, 2011

1 commit


01 Nov, 2011

1 commit


01 Oct, 2011

1 commit

  • The flaglock in struct sta_info has long been
    something that I wanted to get rid of, this
    finally does the conversion to atomic bitops.

    The conversion itself is straight-forward in
    most places, a few things needed to change a
    bit since we can no longer use multiple bits
    at the same time.

    On x86-64, this is a fairly significant code
    size reduction:
    text data bss dec hex
    427861 23648 1008 452517 6e7a5 before
    425383 23648 976 450007 6ddd7 after

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

    Johannes Berg
     

14 Sep, 2011

1 commit


08 Jun, 2011

1 commit

  • Some devices support BT/WLAN co-existence algorigthms.
    In order not to harm the system performance and user experience, the device
    requests not to allow any RX BA session and tear down existing RX BA sessions
    based on system constraints such as periodic BT activity that needs to limit
    WLAN activity (eg.SCO or A2DP).
    In such cases, the intention is to limit the duration of the RX PPDU and
    therefore prevent the peer device to use A-MPDU aggregation.

    Adding ieee80211_stop_rx_ba_session() callback
    that can be used by the driver to stop existing BA sessions.

    Signed-off-by: Shahar Levi
    Signed-off-by: John W. Linville

    Shahar Levi
     

17 May, 2011

2 commits

  • This adds sparse RCU annotations to most of
    mac80211, only the mesh code remains to be
    done.

    Due the the previous patches, the annotations
    are pretty simple. The only thing that this
    actually changes is removing the RCU usage of
    key->sta in debugfs since this pointer isn't
    actually an RCU-managed pointer (it only has
    a single assignment done before the key even
    goes live). As that is otherwise harmless, I
    decided to make it part of this patch.

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

    Johannes Berg
     
  • During my quest to make mac80211 not have any RCU
    warnings from sparse, I came across the a-MPDU code
    again and it wasn't quite clear why it isn't racy.
    So instead of assigning the tid_tx array with just
    the spinlock held in ieee80211_start_tx_ba_session
    use a separate temporary array protected only by
    the spinlock and protect all assignments to the
    "live" array by both the spinlock and the mutex so
    that other code is easily verified to be correct.

    Due to pointer assignment atomicity I don't think
    this is a real issue, but I'm not sure, especially
    on Alpha the current code might be problematic.

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

    Johannes Berg
     

26 Feb, 2011

1 commit


14 Oct, 2010

1 commit

  • It looks like I submitted a different patch
    than I tested, because clearly the code in
    mac80211 is missing actually propagating the
    requested SMPS mode. Fix that!

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

    Johannes Berg
     

07 Oct, 2010

1 commit

  • When roaming while we have active BA session,
    we can end up transmitting delBA frames to
    the old AP while we're already on the new AP's
    channel, which can cause warnings.

    Simply avoid sending those frames, but still
    tear down the internal session state, since
    they are not really necessary anyway as we
    will implicitly disassociate when sending the
    association to the new AP.

    Signed-off-by: Johannes Berg
    Acked-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Johannes Berg
     

17 Aug, 2010

1 commit

  • Sometimes drivers have more information than the
    stack about how their antennas/chains are used,
    and may require that the SM PS mode be changed.
    This could happen, for example, when detecting
    that the user disconnected an antenna. Thus this
    patch introduces API to allow drivers to request
    SM PS mode changes.

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

    Johannes Berg
     

17 Jul, 2010

1 commit


15 Jun, 2010

6 commits

  • To prepare for allowing drivers to sleep in
    ampdu_action, change the locking in the TX
    aggregation code to use the mutex the RX part
    already uses. The spinlock is still necessary
    around some code to avoid races with TX, but
    now we can also synchronize_net() to avoid
    getting an inconsistent sequence number.

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

    Johannes Berg
     
  • To prepare for allowing drivers to sleep in
    ampdu_action, change the locking in the RX
    aggregation code to use a mutex, so that it
    would already allow drivers to sleep. But
    explicitly disable BHs around the callback
    for now since the TX part cannot yet sleep,
    and drivers' locking might require it.

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

    Johannes Berg
     
  • Since we want the code to be able to sleep
    in the future, it must not be called from
    the timer directly. To prepare, move it out
    into the aggregation work.

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

    Johannes Berg
     
  • Move the block-ack session works into common
    code, since it will be needed for RX agg too
    in the next patches.

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

    Johannes Berg
     
  • When the driver or rate control requests starting
    or stopping an aggregation session, that currently
    causes a direct callback into the driver, which
    could potentially cause locking problems. Also,
    the functions need to be callable from contexts
    that cannot sleep, and thus will interfere with
    making the ampdu_action callback sleeping.

    To address these issues, add a new work item for
    each station that will process any start or stop
    requests out of line.

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

    Johannes Berg
     
  • Currently we allocate some memory for each TX
    aggregation session and additionally keep a
    state bitmap indicating the state it is in.
    By using RCU to protect the pointer, moving
    the state into the structure and some locking
    trickery we can avoid locking when the TX agg
    session is fully operational.

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

    Johannes Berg
     

08 Apr, 2010

1 commit


26 Dec, 2009

1 commit


23 Dec, 2009

1 commit

  • Enable spatial multiplexing in mac80211 by telling the
    driver what to do and, where necessary, sending action
    frames to the AP to update the requested SMPS mode.

    Also includes a trivial implementation for hwsim that
    just logs the requested mode.

    For now, the userspace interface is in debugfs only,
    and let you toggle the requested mode at any time.

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

    Johannes Berg
     

22 Dec, 2009

2 commits

  • For bluetooth 3, we will most likely not have
    a netdev for a virtual interface (sdata), so
    prepare for that by reducing the reliance on
    having a netdev. This patch moves the name
    and address fields into the sdata struct and
    uses them from there all over. Some work is
    needed to keep them sync'ed, but that's not
    a lot of work and in slow paths anyway.

    In doing so, this also reduces the number of
    pointer dereferences in many places, because
    of things like sdata->dev->dev_addr becoming
    sdata->vif.addr.

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

    Johannes Berg
     
  • I noticed yesterday, because Jeff had noticed
    a speed regression, cf. bug
    http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2138
    that the SM PS settings for peers were wrong.
    Instead of overwriting the SM PS settings with
    the local bits, we need to keep the remote bits.

    The bug was part of the original HT code from
    over two years ago, but unfortunately nobody
    noticed that it makes no sense -- we shouldn't
    be overwriting the peer's setting with our own
    but rather keep it intact when masking the peer
    capabilities with our own.

    While fixing that, I noticed that the masking of
    capabilities is completely useless for most of
    the bits, so also fix those other bits.

    Finally, I also noticed that PSMP_SUPPORT no
    longer exists in the final 802.11n version, so
    also remove that.

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

    Johannes Berg
     

02 Dec, 2009

1 commit


01 Dec, 2009

1 commit

  • Lennert Buytenhek noticed that delBA handling in mac80211
    was broken and has remotely triggerable problems, some of
    which are due to some code shuffling I did that ended up
    changing the order in which things were done -- this was

    commit d75636ef9c1af224f1097941879d5a8db7cd04e5
    Author: Johannes Berg
    Date: Tue Feb 10 21:25:53 2009 +0100

    mac80211: RX aggregation: clean up stop session

    and other parts were already present in the original

    commit d92684e66091c0f0101819619b315b4bb8b5bcc5
    Author: Ron Rindjunsky
    Date: Mon Jan 28 14:07:22 2008 +0200

    mac80211: A-MPDU Tx add delBA from recipient support

    The first problem is that I moved a BUG_ON before various
    checks -- thereby making it possible to hit. As the comment
    indicates, the BUG_ON can be removed since the ampdu_action
    callback must already exist when the state is != IDLE.

    The second problem isn't easily exploitable but there's a
    race condition due to unconditionally setting the state to
    OPERATIONAL when a delBA frame is received, even when no
    aggregation session was ever initiated. All the drivers
    accept stopping the session even then, but that opens a
    race window where crashes could happen before the driver
    accepts it. Right now, a WARN_ON may happen with non-HT
    drivers, while the race opens only for HT drivers.

    For this case, there are two things necessary to fix it:
    1) don't process spurious delBA frames, and be more careful
    about the session state; don't drop the lock

    2) HT drivers need to be prepared to handle a session stop
    even before the session was really started -- this is
    true for all drivers (that support aggregation) but
    iwlwifi which can be fixed easily. The other HT drivers
    (ath9k and ar9170) are behaving properly already.

    Reported-by: Lennert Buytenhek
    Cc: stable@kernel.org
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

19 Nov, 2009

2 commits


31 Oct, 2009

1 commit


23 Apr, 2009

2 commits

  • Trying to separate header files into net/wireless.h and
    net/cfg80211.h has been a source of confusion. Remove
    net/wireless.h (because there also is the linux/wireless.h)
    and subsume everything into net/cfg80211.h -- except the
    definitions for regulatory structures which get moved to
    a new header net/regulatory.h.

    The "new" net/cfg80211.h is now divided into sections.

    There are no real changes in this patch but code shuffling
    and some very minor documentation fixes.

    I have also, to make things reflect reality, put in a
    copyright line for Luis to net/regulatory.h since that
    is probably exclusively written by him but was formerly
    in a file that only had my copyright line.

    Signed-off-by: Johannes Berg
    Cc: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • It really belongs into that file since it is only relevant
    for managed mode. Move 1:1, not even whitespace changes,
    but make it static and remove from header file.

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

    Johannes Berg