05 Dec, 2012

1 commit

  • Commit f0425beda4d404a6e751439b562100b902ba9c98 "mac80211: retry sending
    failed BAR frames later instead of tearing down aggr" caused regression
    on rt2x00 hardware (connection hangs). This regression was fixed by
    commit be03d4a45c09ee5100d3aaaedd087f19bc20d01 "rt2x00: Don't let
    mac80211 send a BAR when an AMPDU subframe fails". But the latter
    commit caused yet another problem reported in
    https://bugzilla.kernel.org/show_bug.cgi?id=42828#c22

    After long discussion in this thread:
    http://mid.gmane.org/20121018075615.GA18212@redhat.com
    and testing various alternative solutions, which failed on one or other
    setup, we have no other good fix for the issues like just revert both
    mentioned earlier commits.

    To do not affect other hardware which benefit from commit
    f0425beda4d404a6e751439b562100b902ba9c98, instead of reverting it,
    introduce flag that when used will restore mac80211 behaviour before
    the commit.

    Cc: stable@vger.kernel.org
    Signed-off-by: Stanislaw Gruszka
    [replaced link with mid.gmane.org that has message-id]
    Signed-off-by: Johannes Berg

    Stanislaw Gruszka
     

03 Dec, 2012

1 commit


30 Nov, 2012

1 commit


27 Nov, 2012

1 commit


26 Nov, 2012

4 commits

  • To achieve this, limit the number of retries to
    31 (instead of 255) and use the three bits that
    are then free for VHT flags.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Add support to mac80211 for having drivers report
    received VHT MCS information.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Convert mac80211 (and where necessary, some drivers a
    little bit) to the new channel definition struct.

    This will allow extending mac80211 for VHT, which is
    currently restricted to channel contexts since there
    are no drivers using that which makes it easier. As
    I also don't care about VHT for drivers not using the
    channel context API, I won't convert the previous API
    to VHT support.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • As mwifiex (and mac80211 in the software case) are the
    only drivers actually implementing remain-on-channel
    with channel type, userspace can't be relying on it.
    This is the case, as it's used only for P2P operations
    right now.

    Rather than adding a flag to tell userspace whether or
    not it can actually rely on it, simplify all the code
    by removing the ability to use different channel types.
    Leave only the validation of the attribute, so that if
    we extend it again later (with the needed capability
    flag), it can't break userspace sending invalid data.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

21 Nov, 2012

1 commit


19 Nov, 2012

2 commits

  • Drivers (e.g. wl12xx) might need to know the vif
    to roc on (mainly in order to configure the
    rx filters correctly).

    Add the vif to the op params, and update the current
    users (iwlwifi) to use the new api.

    Signed-off-by: Eliad Peller
    [fix hwsim]
    Signed-off-by: Johannes Berg

    Eliad Peller
     
  • In some cases, in particular for experimentation, it
    can be useful to be able to add vendor namespace data
    to received frames in addition to the normal radiotap
    data.

    Allow doing this through mac80211 by adding fields to
    the RX status descriptor that describe the data while
    the data itself is prepended to the frame.

    Also add some example code to hwsim, but don't enable
    it because it doesn't use a proper OUI identifier.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

14 Nov, 2012

1 commit

  • Allow drivers to indicate their mactime is at RX completion and adjust
    for this in mac80211. Also rename the existing RX_FLAG_MACTIME_MPDU to
    RX_FLAG_MACTIME_START to clarify its intent. Based on similar code by
    Johannes Berg.

    Signed-off-by: Thomas Pedersen
    [fix docs, atheros drivers]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     

10 Nov, 2012

2 commits

  • During hardware restart, all interfaces are iterated even
    though they haven't been re-added to the driver, document
    this behaviour. The same also happens during resume, which
    is even more confusing since all of the interfaces were
    previously removed from the driver. Make this optional so
    drivers relying on the current behaviour can still use it,
    but to let drivers that don't want this behaviour disable
    it.

    Also convert all API users, keeping the old semantics
    except in hwsim, where the new normal ones are desired.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • When the driver requests a restart (reconfiguration) it
    gets all the normal method calls, but can't really tell
    why they're happening. Call a new restart_complete op
    in the driver when the restart completes, so it could
    keep its own state about the restart and clear it there.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

06 Nov, 2012

1 commit


30 Oct, 2012

1 commit

  • Even before channel contexts/multi-channel, having a
    single global TX power limit was already problematic,
    in particular if two managed interfaces connected to
    two APs with different power constraints. The channel
    context introduction completely broke this though and
    in fact I had disabled TX power configuration there
    for drivers using channel contexts.

    Change everything to track TX power per interface so
    that different user settings and different channel
    maxima are treated correctly. Also continue tracking
    the global TX power though for compatibility with
    applications that attempt to configure the wiphy's
    TX power globally.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

26 Oct, 2012

1 commit


24 Oct, 2012

1 commit

  • Expose a function for the AES-CMAC subkey calculation
    to drivers. This is the first step of the AES-CMAC
    cipher key setup and may be required for CMAC hardware
    offloading.

    Signed-off-by: Assaf Krauss
    Reviewed-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Assaf Krauss
     

18 Oct, 2012

1 commit

  • Initialization of beacon transmission in IBSS mode depends
    on whether a new BSS is being created or joined. When joining
    an existing IBSS network, beaconing has to start only after
    a TSF-sync has happened - this is explained in 11.1.4.

    Introduce a new parameter in the BSS information structure to
    indicate creator/joiner mode.

    Signed-off-by: Sujith Manoharan
    Signed-off-by: Johannes Berg

    Sujith Manoharan
     

17 Oct, 2012

5 commits

  • Save the AP's VHT capabilities (in managed
    mode) and make them available to the driver
    in the station information.

    Unlike HT capabilities, they aren't restricted
    to the common capabilities, so drivers must be
    aware of their own capabilities.

    Signed-off-by: Mahesh Palivela
    [fix endian conversion bug ...]
    Signed-off-by: Johannes Berg

    Mahesh Palivela
     
  • Drivers may need to iterate the active channel
    contexts, export an iterator function to allow
    that. To make it possible, use RCU-safe list
    functions.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • On each channel that the device is operating on, it
    may need to listen using one or more chains depending
    on the SMPS settings of the interfaces using it. The
    previous channel context changes completely removed
    this ability (before, it was available as the SMPS
    mode).

    Add per-context tracking of the required static and
    dynamic RX chains and notify the driver on changes.
    To achieve this, track the chains and SMPS mode used
    on each virtual interface and update the channel
    context whenever this changes.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Introduce channel context driver methods. The channel
    on a context channel is immutable, but the channel type
    and other properties can change.

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

    Michal Kazior
     
  • Channel context are the foundation for multi-channel
    operation. They are are immutable and are re-created
    (or re-used if other interfaces are bound to a certain
    channel and a compatible channel type) on channel
    switching.

    This is an initial implementation and more features
    will come in separate patches.

    Signed-off-by: Michal Kazior
    [some changes including RCU protection]
    Signed-off-by: Johannes Berg

    Michal Kazior
     

10 Sep, 2012

1 commit

  • Mark keys that might be used to receive management
    frames so drivers can fall back on software crypto
    for them if they don't support hardware offload.
    As the new flag is only set correctly for RX keys
    and the existing IEEE80211_KEY_FLAG_SW_MGMT flag
    can only affect TX, also rename the latter to
    IEEE80211_KEY_FLAG_SW_MGMT_TX.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

20 Aug, 2012

3 commits

  • Some devices like the current iwlwifi implementation
    require that the P2P interface address match the P2P
    Device address (only one P2P interface is supported.)
    Add the HW flag IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF
    that allows drivers to request that P2P Interfaces
    added while a P2P Device is active get the same MAC
    address by default.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Support getting A-MPDU status information from the
    drivers and reporting it to userspace via radiotap
    in the standard fields.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • In IBSS it is possible that the supported rates set for a station changes over
    time (e.g. it gets first initialised as an empty set because of no available
    information about rates and updated later). In this case the driver has to be
    notified about the change in order to update its internal table accordingly (if
    needed).

    This behaviour is needed by all those drivers that handle rc internally but
    leave stations management to mac80211

    Reported-by: Gui Iribarren
    Signed-off-by: Antonio Quartulli
    [Johannes - add docs, validate IBSS mode only, fix compilation]
    Signed-off-by: Johannes Berg

    Antonio Quartulli
     

31 Jul, 2012

2 commits

  • Remove the control.sta pointer from ieee80211_tx_info to free up
    sufficient space in the TX skb control buffer for the upcoming
    Transmit Power Control (TPC).
    Instead, the pointer is now on the stack in a new control struct
    that is passed as a function parameter to the drivers' tx method.

    Signed-off-by: Thomas Huehn
    Signed-off-by: Alina Friedrichsen
    Signed-off-by: Felix Fietkau
    [reworded commit message]
    Signed-off-by: Johannes Berg

    Thomas Huehn
     
  • Currently, ps mode is indicated per device (rather than
    per interface), which doesn't make a lot of sense.

    Moreover, there are subtle bugs caused by the inability
    to indicate ps change along with other changes
    (e.g. when the AP deauth us, we'd like to indicate
    CHANGED_PS | CHANGED_ASSOC, as changing PS before
    notifying about disassociation will result in null-packets
    being sent (if IEEE80211_HW_SUPPORTS_DYNAMIC_PS) while
    the sta is already disconnected.)

    Keep the current per-device notifications, and add
    parallel per-vif notifications.

    In order to keep it simple, the per-device ps and
    the per-vif ps are orthogonal - the per-vif ps
    configuration is determined only by the user
    configuration (enable/disable) and the connection
    state, and is not affected by other vifs state and
    (temporary) dynamic_ps/offchannel operations
    (unlike per-device ps).

    Signed-off-by: Eliad Peller
    Signed-off-by: Johannes Berg

    Eliad Peller
     

12 Jul, 2012

2 commits

  • Some drivers (iwlegacy, iwlwifi and rt2x00) today use the
    bss_conf.last_tsf value. By itself though that value is
    completely worthless since it may be ancient. What really
    is needed is synchronisation between some device time and
    the TSF.

    To clarify this, rename bss_conf.last_tsf to sync_tsf and
    add sync_device_ts which is obtained from rx_status which
    gets a new field device_timestamp for this purpose. This
    is intentionally not using the mactime field since that
    is used for other things and in IBSS is expected to sync
    with the IBSS's TSF which isn't necessarily true for the
    device timestamp.

    Also, since we have the information and it's useful even
    before the connection has been established, give all the
    timing details to the driver before authenticating.

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

    Johannes Berg
     
  • We waste a lot of space in this struct because it uses
    int values where smaller ones would be sufficient. The
    upcoming A-MPDU information needs some space, optimize
    the struct now.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

09 Jul, 2012

1 commit


03 Jul, 2012

2 commits

  • Some drivers require setup before being able to send
    management frames in managed mode, in particular in
    multi-channel cases.

    Introduce API to allow the drivers to do such setup
    while being able to sleep waiting for the setup to
    finish in the device. This isn't possible inside the
    TX call since that can't sleep.

    A future patch may also restructure the TX retry to
    wait for the driver to report the frame status, as
    suggested by Arik in
    http://mid.gmane.org/CA+XVXffKSEL6ZQPQ98x-zO-NL2=TNF1uN==mprRyUmAaRn254g@mail.gmail.com

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • IEEE80211_TX_MAX_RATES can be reduced from 5 to 4 as there
    is no current hardware supporting a rate chain with 5 multi
    rate stages (mrr), so 4 mrr stages are sufficient.

    The memory that is freed within the ieee80211_tx_info struct
    will be used in the upcoming Transmission Power Control (TPC)
    implementation.

    Suggested-by: Felix Fietkau
    Signed-off-by: Thomas Huehn
    [reword commit message]
    Signed-off-by: Johannes Berg

    Thomas Huehn
     

02 Jul, 2012

1 commit


28 Jun, 2012

2 commits


27 Jun, 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