20 Dec, 2008

10 commits

  • This patch implements dynamic power save for mac80211. Basically it
    means enabling power save mode after an idle period. Implementing it
    dynamically gives a good compromise of low power consumption and low
    latency. Some hardware have support for this in firmware, but some
    require the host to do it.

    The dynamic power save is implemented by adding an timeout to
    ieee80211_subif_start_xmit(). The timeout can be enabled from userspace
    with Wireless Extensions. For example, the command below enables the
    dynamic power save and sets the time timeout to 500 ms:

    iwconfig wlan0 power timeout 500m

    Power save now only works with devices which handle power save in firmware.
    It's also disabled by default and the heuristics when and how to enable is
    considered as a policy decision and will be left for the userspace to handle.
    In case the firmware has support for this, drivers can disable this feature
    with IEEE80211_HW_NO_STACK_DYNAMIC_PS.

    Big thanks to Johannes Berg for the help with the design and code.

    Signed-off-by: Kalle Valo
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Kalle Valo
     
  • This is a preparation for the dynamic power save support. In future there are
    two paths to stop the master queues and we need to track this properly to
    avoid starting queues incorrectly. Implement this by adding a status
    array for each queue.

    The original idea and design is from Johannes Berg, I just did
    the implementation based on his notes. All the bugs are mine, of course.

    Signed-off-by: Kalle Valo
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Kalle Valo
     
  • Also disable power save when disassociated. It makes no sense to have
    power save enabled while disassociated.

    iwlwifi seems to have this check in the driver, but it's better to do this
    in mac80211 instead.

    Signed-off-by: Kalle Valo
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Kalle Valo
     
  • In stress testing p54usb, the WARN_ON() in ieee80211_tasklet_handler() was
    triggered; however, there is no logging of the received value for packet
    type. Adding that feature will improve the warning.

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville

    Larry Finger
     
  • This patch fixes a typo in ieee80211_send_assoc(), net/mac80211/mlme.c.

    The error is usage of a wrong member when building
    the ie80211 management frame (it should be assoc_req, and not reassoc_req).

    Signed-off-by: Rami Rosen
    Signed-off-by: John W. Linville

    Rami Rosen
     
  • Since we do not currently report HT rates (MCS index) in radiotap
    header for HT rates, we should not claim the rate is present. The rate
    octet itself is used as padding in this case, so only the it_present
    flag needs to be removed in case of HT rates.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • When a STA roams back to the same AP before the previous STA entry has
    expired, a new STA entry is not added in mac80211. However, a Layer 2
    Update frame still needs to be transmitted to update layer 2 devices
    about the new location for the STA. Without this, switches may
    continue to forward frames to the previous (now incorrect) port when
    STA roams between APs.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • This patch adds option for HT-enabled drivers to report HT rates
    (HT20/HT40, short GI, MCS index) to mac80211. These rates are
    currently not in the rate table, so the rate_idx is used to indicate
    MCS index.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • HT management is done differently for AP and STA modes, unify
    to just the ->config() callback since HT is fundamentally a
    PHY property and cannot be per-BSS.

    Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
    the channel type ( NO_HT, HT20, HT40+, HT40- ).

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

    Sujith
     
  • This patch adds signal strength and transmission bitrate
    to the station_info of nl80211.

    Signed-off-by: Henning Rogge
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Henning Rogge
     

13 Dec, 2008

7 commits

  • This patch removes unneeded member (skbuff) from
    ieee80211_ibss_add_sta() method in its declaration (in ieee80211_i.h)
    and its callers (in rx.c and mlme.c)

    This patch removes unneeded member from struct ieee80211_rx_data
    in ieee80211_i.h.

    (Originally posted as two patches. -- JWL)

    Signed-off-by: Rami Rosen
    Signed-off-by: John W. Linville

    Rami Rosen
     
  • AP mode operations are seriously affected if mac80211 runs through a
    multi-second scan while the AP is trying to send Beacon frames on the
    operation channel. While this could be implemented in a way that does
    not cause too many problems, it is not very simple and will require
    synchronization with Beacon frame scheduling in the drivers (scan one
    channel at a time between Beacon frames). Furthermore, such scanning
    takes quite a bit longer time and existing userspace applications
    would be likely to timeout while waiting for the results.

    For now, just refuse requests for new scans (SIOCSIWSCAN) when in AP
    mode. In practice, this moves the rejection from iwl* drivers into
    mac80211 to make it apply to every mac80211-based driver.

    This issue shows up in associated stations getting disconnected when
    something (e.g., Network Manager) requests a scan while the interface
    is in AP mode. When doing this continuously (e.g., NM does it every 120
    seconds), the network gets close to useless.

    Signed-off-by: Jouni Malinen
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • This patch replaces the newly introduced sta_notify_ps function,
    which can be used to notify the driver about every power state
    transition for all associated stations, by integrating its functionality
    back into the original sta_notify callback.

    Signed-off-by: Christian Lamparter
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Christian Lamparter
     
  • Make sure sparse checks endianness when run on mac80211/cfg80211.

    Signed-off-by: Johannes Berg
    Cc: Sam Ravnborg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • There's no driver that actually does fragmentation on the
    device, and the callback is buggy (when it returns an error,
    mac80211's fragmentation status is changed so reading the
    frag threshold from userspace reads the new value despite
    the error). Let's just remove it, if we really find some
    hardware supporting it we can add it back later.

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

    Johannes Berg
     
  • Drivers will support this, obviously, but this forces them to
    set it up properly.

    (This includes the fix posted as "mac80211: fix ifmodes check" and
    tested in wireless-testing by Hin-Tak and others. -- JWL)

    Signed-off-by: Johannes Berg
    Reported-by: Larry Finger
    Tested-by: Hin-Tak Leung
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • ieee80211_hw_config can return an error when the hardware
    has rfkill enabled. A WARN_ON() is too harsh for this
    failure as it is a valid scenario. Only comment this warning
    as we would like to have it back when rfkill is integrated into
    mac80211.

    Also reintroduce propagation of error if ieee80211_hw_config fails
    in ieee80211_config_beacon.

    This patch partially reverts patch:
    5f0387fc3337ca26f0745f945f550f0c3734960f
    "mac80211: clean up ieee80211_hw_config errors"

    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Reinette Chatre
     

06 Dec, 2008

1 commit


05 Dec, 2008

10 commits

  • This patch removes unnecessary parameter in ieee80211_beacon_add_tim() and
    removes unneeded definition and assignment for bdev (instance of net_device) in
    ieee80211_beacon_get() and in ieee80211_get_buffered_bc()
    (all in tx.c).

    Signed-off-by: Rami Rosen
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Rami Rosen
     
  • This patch is necessary in order to provide a proper Access point support for p54.
    Unfortunately for us, there is no documented way to disable the interfering
    power save buffering mechanism in firmware completely.

    Therefore we give in and notify the driver through our new sta_notify_ps callback,
    so that we can update the filter state.

    Signed-off-by: Christian Lamparter
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Christian Lamparter
     
  • Some access points (e.g. Sitecom WL-174) use an empty string as hidden SSID.

    Signed-off-by: Fabio Rossi
    Signed-off-by: John W. Linville

    Fabio Rossi
     
  • further reducing wext code in mac80211.

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

    Johannes Berg
     
  • This patch moves the SIOCGIWNAME handling from mac80211 to cfg80211.

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

    Johannes Berg
     
  • This patch adds new NL80211_CMD_SET_WIPHY attributes
    NL80211_ATTR_WIPHY_FREQ and NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET to allow
    userspace to set the operating channel (e.g., hostapd for AP mode).

    Signed-off-by: Jouni Malinen
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Jouni Malinen
     
  • When a station goes to PS mode to scan, it will then send
    probe requests without the PS bit set. mac80211 will take
    that as indication that the station woke up, but it didn't.
    This patch changes mac80211 to only consider doze->wake
    transitions on data frames to to fix that issue.

    Signed-off-by: Johannes Berg
    Cc: Jouni Malinen
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This patch reorders calls during disassociation in
    ieee80211_set_disassoc function.
    Since sta_info_unlink calls sta_notify(REMOVE) it will
    remove the station representing AP from the driver before
    it has disassociated from it using bss_info_changed callback.

    Signed-off-by: Tomas Winkler
    Signed-off-by: John W. Linville

    Tomas Winkler
     
  • It seems like proper etiquette to let other stations know when we are
    going down in either STA or IBSS mode. This also notifies userland, so
    wpa_supplicant doesn't get confused.

    Signed-off-by: John W. Linville

    John W. Linville
     
  • After fixing zd1211rw: use unaligned safe memcmp() in-place of
    compare_ether_addr(), I started to see kernel log messages detailing
    unaligned access:

    Kernel unaligned access at TPC[100f7f44] sta_info_get+0x24/0x68 [mac80211]

    As with the aforementioned patch, the unaligned access was eminating
    from a compare_ether_addr() call. Concerned that whilst it was safe to
    assume that unalignment was the norm for the zd1211rw, and take
    preventative measures, it may not be the case or acceptable to use the
    easy fix of changing the call to memcmp().

    My research however indicated that it was OK to do this, as there are
    a few instances where memcmp() is the preferred mechanism for doing
    mac address comparisons throughout the module.

    Signed-off-by: Shaddy Baddah
    Signed-off-by: John W. Linville

    Shaddy Baddah
     

27 Nov, 2008

1 commit


26 Nov, 2008

8 commits

  • Signed-off-by: Ivan Kuten
    Signed-off-by: John W. Linville

    Ivan Kuten
     
  • When a disassoc packet is received from the AP with a reason code of
    'leaving the BSS', mac80211 should go into DISABLED state just as it
    would do if the AP suddenly went away for some reason, as that is what
    will happen shortly after the AP leaves anyway.

    Signed-off-by: Vivek Natarajan
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Vivek Natarajan
     
  • In commit 9ea2c74 named "mac80211/drivers: rewrite the rate control API",
    the meaning of status.rates[i].count was changed from number of retries
    to total number of tries. As a result, the pid rate-setting algorithm fails
    because every packet appears to have needed a retransmit.

    Signed-off-by: Larry Finger
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Larry Finger
     
  • This makes minstrel the default rate control algorithm
    for mac80211. For more information see:

    http://wireless.kernel.org/en/developers/Documentation/mac80211/RateControl/minstrel

    If someone can come up with a better algorithm they get a prize
    (undisclosed).

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

    Luis R. Rodriguez
     
  • mac80211's ieee80211_register_hw() is often called within the
    probe path so it cannot assume the device's driver structure
    has been attached yet so to create a workqueue instead of
    using driver->name use the wiphy's phy%d name. The name doesn't
    really matter anyway.

    This should fix sporadic oopses found when we race to beat the
    driver pointer setting. Not even sure how this was working properly.

    http://www.kerneloops.org/search.php?search=ieee80211_register_hw

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

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

    Sujith
     
  • This adds country IE parsing to mac80211 and enables its usage
    within the new regulatory infrastructure in cfg80211. We parse
    the country IEs only on management beacons for the BSSID you are
    associated to and disregard the IEs when the country and environment
    (indoor, outdoor, any) matches the already processed country IE.

    To avoid following misinformed or outdated APs we build and use
    a regulatory domain out of the intersection between what the AP
    provides us on the country IE and what CRDA is aware is allowed
    on the same country.

    A secondary device is allowed to follow only the same country IE
    as it make no sense for two devices on a system to be in two
    different countries.

    In the case the AP is using country IEs for an incorrect country
    the user may help compliance further by setting the regulatory
    domain before or after the IE is parsed and in that case another
    intersection will be performed.

    CONFIG_WIRELESS_OLD_REGULATORY is supported but requires CRDA
    present.

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

    Luis R. Rodriguez
     
  • Patch fixes the kernel trace when user tries to set
    ad-hoc mode on non IBSS channel.
    e.g iwconfig wlan0 chan 36 mode ad-hoc

    Signed-off-by: Abhijeet Kolekar
    Signed-off-by: John W. Linville

    Abhijeet Kolekar
     

22 Nov, 2008

3 commits