16 Jul, 2013

1 commit

  • The various components accessing the bitrates table must use consider
    the used channel bandwidth to select only available rates or calculate
    the bitrate correctly.

    There are some rates in reduced bandwidth modes which can't be
    represented as multiples of 500kbps, like 2.25 MBit/s in 5 MHz mode. The
    standard suggests to round up to the next multiple of 500kbps, just do
    that in mac80211 as well.

    Signed-off-by: Simon Wunderlich
    Signed-off-by: Mathias Kretschmer
    [make rate unsigned in ieee80211_add_tx_radiotap_header(), squash fix]
    Signed-off-by: Johannes Berg

    Simon Wunderlich
     

18 Jun, 2013

1 commit


11 Jun, 2013

1 commit

  • The patch "cfg80211/mac80211: use cfg80211 wdev mutex in
    mac80211" introduced several deadlocks by converting the
    ifmsh->mtx to wdev->mtx. Solve these by:

    1. drop the cancel_work_sync() in ieee80211_stop_mesh().
    Instead make the mesh work conditional on whether the mesh
    is running or not.
    2. lock the mesh work with sdata_lock() to protect beacon
    updates and prevent races with wdev->mesh_id_len or
    cfg80211.

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

    Thomas Pedersen
     

25 May, 2013

1 commit

  • Using separate locks in cfg80211 and mac80211 has always
    caused issues, for example having to unlock in places in
    mac80211 to call cfg80211, which even needed a framework
    to make cfg80211 calls after some functions returned etc.

    Additionally, I suspect some issues people have reported
    with the cfg80211 state getting confused could be due to
    such issues, when cfg80211 is asking mac80211 to change
    state but mac80211 is in the process of telling cfg80211
    that the state changed (in another way.)

    Signed-off-by: Johannes Berg

    Johannes Berg
     

16 Apr, 2013

1 commit

  • VHT introduces multiple IEs that need to be parsed for a
    wide bandwidth channel switch. Two are (currently) needed
    in mac80211:
    * wide bandwidth channel switch element
    * channel switch wrapper element

    The former is contained in the latter for beacons and probe
    responses, but not for the spectrum management action frames
    so the IE parser needs a new argument to differentiate them.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

11 Apr, 2013

1 commit


06 Mar, 2013

3 commits


18 Feb, 2013

2 commits

  • Convert mesh peering events into strings and make the
    debug output a little easier to read. Also stop printing
    the llid and plid since these don't change across peering
    states and are random numbers anyway so they just amount
    to noise.

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

    Thomas Pedersen
     
  • 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

4 commits

  • There's various code with strange indentation,
    questionable loop and locking constructs, etc.

    The bigger change is moving the "sdata" argument
    to the first argument of all functions, like all
    other mac80211 functions that have one.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Previously, the entire mesh beacon would be generated each
    time the beacon timer fired. Instead generate a beacon
    head and tail (so the TIM can easily be inserted when mesh
    power save is on) when starting a mesh or the MBSS
    parameters change.

    Also add a mutex for protecting beacon updates and
    preventing leaks.

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

    Thomas Pedersen
     
  • 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
     
  • A few mesh utility functions will call
    ieee80211_bss_info_change_notify(), and then the caller
    might notify the driver of the same change again. Avoid
    this redundancy by propagating the BSS changes and
    generally calling bss_info_change_notify() once per
    change.

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

    Thomas Pedersen
     

12 Feb, 2013

1 commit

  • The patch "mac80211: clean up mesh sta allocation warning"
    moved some mesh initialization into a path which is only
    called when the kernel handles peering. This causes a hang
    when mac80211 tries to clean up a userspace-allocated
    station entry and delete a timer which has never been
    initialized.

    To avoid this, only do any mesh sta peering teardown if
    the kernel is actually handling it.

    The same is true when quiescing before suspend.

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

    Thomas Pedersen
     

05 Feb, 2013

2 commits

  • Since mesh_plink_quiesce() would unconditionally delete
    the plink timer, and the timer initialization was recently
    moved into the mesh code path, suspending with a non-mesh
    interface now causes a crash. Fix this by only deleting
    the plink timer for mesh interfaces.

    Reported-by: Emmanuel Grumbach
    Tested-by: Emmanuel Grumbach
    Signed-off-by: Thomas Pedersen
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • 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
     

30 Jan, 2013

1 commit

  • The standard mandates mesh STAs to set the ERP Short Slot
    Time capability info bit in beacons to 0. Even though this
    is their way of disallowing short slot time for mesh STAs,
    there should be no harm in enabling it if we determine all
    STAs in the current MBSS support ERP rates.

    Increases throughput about 20% for legacy rates when
    enabled.

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

    Thomas Pedersen
     

28 Jan, 2013

1 commit


24 Jan, 2013

2 commits

  • An existing mesh station entry may change its rate
    capabilities, so call rate_control_rate_update() to notify
    the rate control.

    Signed-off-by: Thomas Pedersen
    [fix compilation]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     
  • This refactoring fixes a "scheduling while atomic" warning
    when allocating a mesh station entry while holding the RCU
    read lock. Fix this by creating a new function
    mesh_sta_info_get(), which correctly handles the locking
    and returns under RCU.

    Also move some unnecessarily #ifdefed mesh station init
    code from sta_info_alloc() to __mesh_sta_info_alloc().

    Signed-off-by: Thomas Pedersen
    [change code flow to make sparse happy]
    Signed-off-by: Johannes Berg

    Thomas Pedersen
     

17 Jan, 2013

1 commit


28 Nov, 2012

1 commit


26 Nov, 2012

2 commits


17 Oct, 2012

2 commits

  • estab_plinks is not a statistics member. Hence move estab_plinks from
    struct mesh_stat to struct ieee80211_if_mesh

    Signed-off-by: Ashok Nagarajan
    Signed-off-by: Johannes Berg

    Ashok Nagarajan
     
  • Instead of operating on a single channel only,
    use the new channel context infrastructure in
    all mac80211 code.

    This enables drivers that want to use the new
    channel context infrastructure to use multiple
    channels, while nothing should change for all
    the other drivers that don't support it.

    Right now this disables both TX power settings
    and spatial multiplexing powersave. Both need
    to be re-enabled on a channel context basis.

    Additionally, when channel contexts are used
    drop the connection when channel switch is
    received rather than trying to handle it. This
    will have to be improved later.

    [With fixes from Eliad and Emmanuel incorporated]
    Signed-off-by: Eliad Peller
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Johannes Berg
     

14 Sep, 2012

1 commit

  • Peer link which is blocked using the "iw mesh0 station
    set plink_action block" is previously not able
    to re-open using "iw mesh0 station set
    plink_action open". This patch is intended to solve this.

    If the station plink state remains at OPN_SNT once open,
    try block and open again should solve this problem.

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

    Chun-Yeow Yeoh
     

22 Aug, 2012

1 commit


20 Aug, 2012

1 commit

  • Using local->_oper_channel_type in the mesh code is
    completely wrong as this value is the combination
    of the various interface channel types and can be
    a different value from the mesh interface in case
    there are multiple virtual interfaces.

    Use sdata->vif.bss_conf.channel_type instead as it
    tracks the per-vif channel type.

    Signed-off-by: Johannes Berg

    Johannes Berg
     

14 Aug, 2012

1 commit

  • ieee80211_bss_info_change_notify is called everytime a peer link is established
    or closed, because the accepting_plinks flag in the meshconf IE *might* have changed.

    With this patch the corresponding functions return the BSS_CHANGED_BEACON flag when a beacon update is necessary.

    Also it makes mesh_accept_plinks_update the common place to update the accepting_plinks flag.
    mesh_accept_plinks_update is called upon plink change and also periodically from ieee80211_mesh_housekeeping.
    Thus, it also picks up changes of local->num_sta.

    Signed-off-by: Marco Porsch
    Acked-by: Thomas Pedersen
    Signed-off-by: John W. Linville

    Marco Porsch
     

04 Aug, 2012

2 commits


31 Jul, 2012

2 commits

  • When sending probe requests, e.g. during software scanning,
    these will go out on the *current* channel, so their IEs
    need to be built from the current channel. At other times,
    e.g. for beacons or probe request templates, the IEs will
    be used on the *operating* channel and using the current
    channel instead might result in errors.

    Add the appropriate parameters to respect the difference.

    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Rate control is re-initialized whenever a beacon from a mesh
    peer received, breaking the algorithms and resulting in low
    performance. Return early from mesh_peer_init if we already
    established a link with this peer to avoid this.

    Signed-off-by: Chun-Yeow Yeoh
    [clarify commit message]
    Signed-off-by: Johannes Berg

    Chun-Yeow Yeoh
     

13 Jul, 2012

1 commit


11 Jul, 2012

1 commit


28 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