07 Mar, 2013

1 commit


06 Mar, 2013

1 commit


18 Feb, 2013

1 commit

  • ieee80211_ht_cap_ie_to_sta_ht_cap() will clean up the
    ht_supported flag and station bandwidth field for us
    if the peer beacon doesn't have an HT capability element
    (is operating as non-HT).

    Also, we don't really need a special station ch_width
    member to track the station operating mode any more so use
    sta.bandwidth instead.

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

    Thomas Pedersen
     

15 Feb, 2013

2 commits

  • Handle the operating mode notification action frame.
    When the supported streams or the bandwidth change
    let the driver and rate control algorithm know.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • For VHT, many more bandwidth changes are possible. As a first
    step, stop toggling the IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag
    in the HT capabilities and instead introduce a bandwidth field
    indicating the currently usable bandwidth to transmit to the
    station. Of course, make all drivers use it.

    To achieve this, make ieee80211_ht_cap_ie_to_sta_ht_cap() get
    the station as an argument, rather than the new capabilities,
    so it can set up the new bandwidth field.

    If the station is a VHT station and VHT bandwidth is in use,
    also set the bandwidth accordingly.

    Doing this allows us to get rid of the supports_40mhz flag as
    the HT capabilities now reflect the true capability instead of
    the current setting.

    While at it, also fix ieee80211_ht_cap_ie_to_sta_ht_cap() to not
    ignore HT cap overrides when MCS TX isn't supported (not that it
    really happens...)

    Signed-off-by: Johannes Berg

    Johannes Berg
     

12 Feb, 2013

1 commit

  • Fix most kernel-doc warnings, for some reason it
    seems to have issues with __aligned, don't remove
    the documentation entries it considers to be in
    excess due to that.

    Reported-by: Fengguang Wu
    Signed-off-by: Johannes Berg

    Johannes Berg
     

05 Feb, 2013

1 commit

  • Add routines to
    - maintain a PS mode for each peer and a non-peer PS mode
    - indicate own PS mode in transmitted frames
    - track neighbor STAs power modes
    - buffer frames when neighbors are in PS mode
    - add TIM and Awake Window IE to beacons
    - release frames in Mesh Peer Service Periods

    Add local_pm to sta_info to represent the link-specific power
    mode at this station towards the remote station. When a peer
    link is established, use the default power mode stored in mesh
    config. Update the PS status if the peering status of a neighbor
    changes.
    Maintain a mesh power mode for non-peer mesh STAs. Set the
    non-peer power mode to active mode during peering. Authenticated
    mesh peering is currently not working when either node is
    configured to be in power save mode.

    Indicate the current power mode in transmitted frames. Use QoS
    Nulls to indicate mesh power mode transitions.
    For performance reasons, calls to the function setting the frame
    flags are placed in HWMP routing routines, as there the STA
    pointer is already available.

    Add peer_pm to sta_info to represent the peer's link-specific
    power mode towards the local station. Add nonpeer_pm to
    represent the peer's power mode towards all non-peer stations.
    Track power modes based on received frames.

    Add the ps_data structure to ieee80211_if_mesh (for TIM map, PS
    neighbor counter and group-addressed frame buffer).

    Set WLAN_STA_PS flag for STA in PS mode to use the unicast frame
    buffering routines in the tx path. Update num_sta_ps to buffer
    and release group-addressed frames after DTIM beacons.

    Announce the awake window duration in beacons if in light or
    deep sleep mode towards any peer or non-peer. Create a TIM IE
    similarly to AP mode and add it to mesh beacons. Parse received
    Awake Window IEs and check TIM IEs for buffered frames.

    Release frames towards peers in mesh Peer Service Periods. Use
    the corresponding trigger frames and monitor the MPSP status.
    Append a QoS Null as trigger frame if neccessary to properly end
    the MPSP. Currently, in HT channels MPSPs behave imperfectly and
    show large delay spikes and frame losses.

    Signed-off-by: Marco Porsch
    Signed-off-by: Ivan Bezyazychnyy
    Signed-off-by: Mike Krinkin
    Signed-off-by: Max Filippov
    Signed-off-by: Johannes Berg

    Marco Porsch
     

03 Jan, 2013

5 commits

  • The initiator/tx doesn't really identify why an
    aggregation session is stopped, give a reason
    for stopping that more clearly identifies what's
    going on. This will help tell the driver clearly
    what is expected of it.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • If there are VLANs, stopping an AP is inefficient as it
    calls rcu_barrier() once for each interface (the VLANs
    and the AP itself). Optimise this by moving rcu_barrier()
    out of the station cleanups and calling it only once for
    all interfaces combined.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • The last fixes re-added the RCU synchronize penalty
    on roaming to fix the races. Split up sta_info_flush()
    now to get rid of that again, and let managed mode
    (and only it) delay the actual destruction.

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

    Johannes Berg
     
  • When all interfaces have been removed, there can't
    be any stations left over, so there's no need to
    flush again. Remove this, and all code associated
    with it, which also simplifies the function.

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

    Johannes Berg
     
  • Unfortunately, commit b22cfcfcae5b, intended to speed up roaming
    by avoiding the synchronize_rcu() broke AP/mesh modes as it moved
    some code into that work item that will still call into the driver
    at a time where it's no longer expected to handle this: after the
    AP or mesh has been stopped.

    To fix this problem remove the per-station work struct, maintain a
    station cleanup list instead and flush this list when stations are
    flushed. To keep this patch smaller for stable, do this when the
    stations are flushed (sta_info_flush()). This unfortunately brings
    back the original roaming delay; I'll fix that again in a separate
    patch.

    Also, Ben reported that the original commit could sometimes (with
    many interfaces) cause long delays when an interface is set down,
    due to blocking on flush_workqueue(). Since we now maintain the
    cleanup list, this particular change of the original patch can be
    reverted.

    Cc: stable@vger.kernel.org [3.7]
    Reported-by: Ben Greear
    Tested-by: Ben Greear
    Signed-off-by: Johannes Berg

    Johannes Berg
     

29 Nov, 2012

2 commits


26 Nov, 2012

2 commits


19 Nov, 2012

1 commit


10 Sep, 2012

1 commit

  • mac80211 calls synchronize_rcu() on sta deletion,
    which increase the roaming time significantly.

    Convert it into a call_rcu() mechanism, in order
    to avoid blocking. Since some of the cleanup
    functions might sleep, schedule from the call_rcu
    callback a new work that will do the actual cleanup.

    In order to make sure the cleanup occurs before
    the interface went down, flush local->workqueue
    on ieee80211_do_stop().

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

    Eliad Peller
     

12 Jun, 2012

1 commit


09 Jun, 2012

1 commit


15 May, 2012

1 commit


10 May, 2012

1 commit


09 May, 2012

1 commit

  • Section 9.23.3.5 of IEEE 80211s standard describes the protection rules for
    HT mesh STA in a MBSS. Three HT protection modes are supported for now:

    non-HT mixed mode - is selected if any non-HT peers are present in our MBSS.
    20MHz-protection mode - is selected if all peers in our 20/40MHz MBSS support
    HT and atleast one HT20 peer is present.
    no-protection mode - is selected otherwise.

    This is a limited implementation of 9.23.3.5, which only considers mesh peers
    when determining the HT protection mode. Station's channel_type needs to be
    maintained.

    Signed-off-by: Ashok Nagarajan
    Reviewed-by: Thomas Pedersen
    Signed-off-by: John W. Linville

    Ashok Nagarajan
     

11 Apr, 2012

2 commits

  • This patch adds MBSS extensible synchronization framework (Sec.
    13.13.2 of IEEE Std. 802.11-2012).

    The framework is implemented via an ops table which defines the
    following functions:

    rx_bcn_presp() - this is called every time a mesh beacon is
    received.
    adjust_tbtt() - this is called immediately before a beacon is about
    to be transmitted.

    The default neighbor offset synchronization defined in the standard is
    implemented. We also provide template functions for vendor specific
    methods.

    When neighbor offset synchronization is active (which is the default)
    mesh neighbors in the same MBSS will track timing offsets to each other
    and compensate clock drift.

    In our tests we observed that this mesh synchronization implementation
    successfully corrected drifts between stations of ~2PPM while
    introducing a jitter of ~20us.

    It is also possible to test this framework on mac80211_hwsim simulated
    phys to see how it behaves under different topologies, over poor links,
    etc.

    Signed-off-by: Marco Porsch
    Signed-off-by: Pavel Zubarev
    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Javier Cardona
     
  • The channel type argument to the rate_update()
    callback isn't really the correct way to give
    the rate control algorithm about the desired
    RX bandwidth of the peer.

    Remove this argument, and instead update the
    STA capabilities with 20/40 appropriately. The
    SMPS update done by this callback works in the
    same way, so this makes the callback cleaner.

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

    Johannes Berg
     

10 Apr, 2012

1 commit

  • Calling mod_timer from the rx/tx hotpath is somewhat expensive, and the
    timeout doesn't need to be so precise.

    Switch to a different strategy: Schedule the timer initially, store jiffies
    of all last rx/tx activity which would previously modify the timer, and
    let the timer re-arm itself after checking the last rx/tx timestamp.
    Make the session timers deferrable to avoid causing extra wakeups on systems
    running on battery.
    This visibly reduces CPU load under high network load on small embedded
    systems.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     

07 Mar, 2012

1 commit


06 Mar, 2012

1 commit


07 Feb, 2012

4 commits

  • There are situations where we don't have the
    necessary rate control information yet for
    station entries, e.g. when associating. This
    currently doesn't really happen due to the
    dummy station handling; explicitly disabling
    rate control when it's not initialised will
    allow us to remove dummy stations.

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

    Johannes Berg
     
  • The dummy STA support was added because I didn't
    want to change the driver API at the time. Now
    that we have state transitions triggering station
    add/remove in the driver, we only call add once a
    station reaches ASSOCIATED, so we can remove the
    dummy station stuff again.

    While at it, tighten the RX check and accept only
    port control (EAP) frames from the AP station if
    it's not associated yet -- in other cases there's
    no race.

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

    Johannes Berg
     
  • (based on Eliad's patch)

    Add a callback to notify the low-level driver whenever
    the state of a station changes. The driver is only
    notified when the station is actually in the mac80211
    hash table, not for pre-insert state transitions.

    To allow the driver to replace sta_add/remove calls
    with this, call extra transitions with the NOTEXIST
    state.

    This callback can fail, so we need to be careful in
    handling it when a station is inserted, particularly
    in the IBSS case where we still keep the station entry
    around for mac80211 purposes.

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

    Johannes Berg
     
  • This will be used by drivers later if they
    need to have stations inserted all the time,
    in mac80211 has no purpose, is never used
    and sta_state starts out in NONE.

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

    Johannes Berg
     

31 Jan, 2012

1 commit

  • In the future, when we start notifying drivers,
    state transitions could potentially fail. To make
    it easier to distinguish between programming bugs
    and driver failures:
    * rename sta_info_move_state() to
    sta_info_pre_move_state() which can only be
    called before the station is inserted (and
    check this with a new station flag).
    * rename sta_info_move_state_checked() to just
    plain sta_info_move_state(), as it will be
    the regular function that can fail for more
    than just one reason (bad transition or an
    error from the driver)

    This makes the programming model easier -- one of
    the functions can only be called before insertion
    and can't fail, the other can fail.

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

    Johannes Berg
     

20 Dec, 2011

2 commits

  • If station info contains a beacon loss count, return
    it to userspace.

    Signed-off-by: Paul Stewart
    Signed-off-by: John W. Linville

    Paul Stewart
     
  • Currently code allows three (HT_AGG_MAX_RETRIES) unanswered addba
    requests. When this limit is reached aggregation is turned off for
    given TID permanently. This doesn't seem right: three requests is
    not that much, some 'blackout' can happen, but effect of it affects
    whole connection indefinitely.
    This patch increases number of retries to 15. Also, when there have
    been 3 or more retries it splits further retries apart by 15 seconds
    instead of sending them in very short period of time.

    Signed-off-by: Nikolay Martynov
    Signed-off-by: John W. Linville

    Nikolay Martynov
     

16 Dec, 2011

2 commits

  • No real changes, just note that they are const.

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

    Johannes Berg
     
  • Station entries can have various states, the most
    important ones being auth, assoc and authorized.
    This patch prepares us for telling the driver about
    these states, we don't want to confuse drivers with
    strange transitions, so with this we enforce that
    they move in the right order between them (back and
    forth); some transitions might happen before the
    driver even knows about the station, but at least
    runtime transitions will be ordered correctly.

    As a consequence, IBSS and MESH stations will now
    have the ASSOC flag set (so they can transition to
    AUTHORIZED), and we can get rid of a special case
    in TX processing.

    When freeing a station, unwind the state so that
    other parts of the code (or drivers later) can rely
    on the transitions.

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

    Johannes Berg
     

01 Dec, 2011

1 commit


29 Nov, 2011

1 commit

  • Currently tx aggregation is not being timed out even if timeout is
    specified when aggregation is opened. Tx tid stays active until delba
    arrives from recipient (i.e. recipient times out tid when it is
    inactive).
    The problem with this approach is that delba can get lost in the air
    and tx tid will stay perpetually opened on the originator while closed
    on recipient thus all data sent via this tid will be lost.
    This patch implements tx tid timeouting in way very similar to rx tid
    timeouting.

    Signed-off-by: Nikolay Martynov
    Signed-off-by: John W. Linville

    Nikolay Martynov
     

22 Nov, 2011

1 commit