12 Jan, 2012

1 commit

  • My patch to validate station flags broke compatibility
    with the old station flags setting where all flags are
    always set at once since it always set the mask as all
    possible flags which ended up being rejected later in
    the station add/modify code.

    Fix by parsing only the current flags in the old flags
    attribute -- new applications and new flags should use
    (and will now require) the new flags attribute where
    the mask is given by the application.

    Reported-and-tested-by: Thomas Hilber
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

05 Jan, 2012

5 commits

  • Wireless will select a different hardware queue based on the
    top 3 bits of the diffserv field, for ipv4. Extend that queue
    selection mechanism to ipv6, and make the calls orthogonal.

    Signed-off-by: Dave Täht
    Signed-off-by: John W. Linville

    Dave Täht
     
  • Following the tradition we have had with ath5k, ath9k, CRDA,
    wireless-regdb I'd like to license this code under the permissive ISC
    license for the code sharing purposes with other OSes, it'd sure be nice
    to help the landscape in this area. Although I am %82.89 owner of the
    regulatory code I have asked every contributor to the regulatory code
    and have receieved positive Acked-bys from everyone except two deceased
    entities:

    o Frans Pop RIP 2010 [0]
    - Frans Pop
    - Frans Pop
    o Nokia RIP February, 11, 2011 [1], [2]
    - ext-yuri.ershov@nokia.com
    - kalle.valo@nokia.com

    Frans Pop's contribution was a simple patch 55f98938, titled,
    "wireless: remove trailing space in messages" which just add a \n
    to some printk lines. I'm going to treat these additions as
    uncopyrightable.

    As for the contributions made by employees on behalf of Nokia
    my contact point was Petri Karhula but
    after one month he noted he had not been able to get traction from the
    legal department on this request, as such it I proceeded by replacing
    their contributions in previous patches.

    The end goal is to help a clean rewrite that starts in userspace
    that is shared under ISC license which currently is taking place with
    the regulatory simulator [3].

    [0] http://lists.debian.org/debian-devel/2011/12/msg00263.html
    [1] http://press.nokia.com/2011/02/11/nokia-outlines-new-strategy-introduces-new-leadership-operational-structure/
    [2] http://NokiaPlanB.com
    [3] git://github.com/mcgrof/regsim.git

    Acked-by: Thadeu Lima de Souza Cascardo
    Acked-by: Dan Carpenter
    Acked-by: Mihai Moldovan
    Acked-by: Uwe Kleine-König
    Acked-by: Sven Neumann
    Acked-by: Johannes Berg
    Acked-by: Tomas Winkler
    Acked-by: Tony Vroon
    Acked-by: Pavel Roskin
    Acked-by: Bob Copeland
    Acked-by: Lucas De Marchi
    Acked-by: Pat Erley
    Acked-by: Tejun Heo
    Acked-by: John W. Linville
    Acked-by: Chris Wright
    Acked-by: Joe Perches
    Acked-by: Paul Gortmaker
    Acked-by: John Gordon
    Acked-by: Simon Barber
    Acked-by: Rajkumar Manoharan
    Acked-by: Jiri Benc
    Acked-by: Bruno Randolf
    Acked-by: Scott James Remnant
    Acked-by: Roel Kluin
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • Nokia hasn't gotten back to me in over 1 month for a relicense
    change request. There are only a few changes that they contributed,
    so just reverting their changes but replacing with another set.
    This change replaces this commit:

    commit 269ac5fd2d75b118d76a2291e28796527db2f3f8
    Author: Kalle Valo
    Date: Tue Dec 1 10:47:15 2009 +0200

    cfg80211: indent regulatory messages with spaces

    The regulatory messages in syslog look weird:

    kernel: cfg80211: Regulatory domain: US
    kernel: ^I(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    kernel: ^I(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
    kernel: ^I(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    kernel: ^I(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    kernel: ^I(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    kernel: ^I(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
    kernel: ^I(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)

    Indent them with four spaces instead of the tab character to get prettier
    output.

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

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

    Luis R. Rodriguez
     
  • Nokia hasn't gotten back to me in over 1 month for a relicense
    change request. There are only a few changes that they contributed,
    so just reverting their changes but replacing with another set.
    This change replaces this commit:

    commit c4c322941ce0d7e2b7b8794ad70683123d9cb26a
    Author: Yuri Ershov
    Date: Tue Jun 29 15:08:08 2010 +0400

    cfg80211: Update of regulatory request initiator handling

    In some cases there could be possible dereferencing freed pointer. The
    update is intended to avoid this issue.

    Signed-off-by: Yuri Ershov
    Signed-off-by: John W. Linville

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

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

    Dmitry Shmidt
     

20 Dec, 2011

1 commit


16 Dec, 2011

4 commits

  • When we restore regulatory settings the world regulatory domain
    is properly reset on cfg80211 (or user prefered regulatory domain)
    but we were never setting back channel values for drivers that use
    WIPHY_FLAG_CUSTOM_REGULATORY. Set these values up again by using
    the orig_ channel parameters.

    This fixes restoring custom regulatory settings upon disconnect
    events.

    Cc: compat@orbit-lab.org
    Cc: Paul Stewart
    Cc: Rajkumar Manoharan
    Cc: Senthilkumar Balasubramanian
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • By definition WIPHY_FLAG_STRICT_REGULATORY was intended to allow the
    wiphy to adjust itself to the country IE power information if the
    card had no regulatory data but we had no way to tell cfg80211 that if
    the card also had its own custom regulatory domain (these are typically
    custom world regulatory domains) that we want to follow the country IE's
    noted values for power for each channel. We add support for this and
    document it.

    This is not a critical fix but a performance optimization for cards
    with custom regulatory domains that associate to an AP with sends
    out country IEs with a higher EIRP than the one on the custom
    regulatory domain. In practice the only driver affected right now
    are the Atheros drivers as they are the only drivers using both
    WIPHY_FLAG_STRICT_REGULATORY and WIPHY_FLAG_CUSTOM_REGULATORY --
    used on cards that have an Atheros world regulatory domain. Cards
    that have been programmed to follow a country specifically will not
    follow the country IE power. So although not a stable fix distributions
    should consider cherry picking this.

    Cc: compat@orbit-lab.org
    Cc: Paul Stewart
    Cc: Rajkumar Manoharan
    Cc: Senthilkumar Balasubramanian
    Reported-by: Rajkumar Manoharan
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • The nl80211 station handling code is a bit messy
    and doesn't do a lot of validation. It seems like
    this could be an issue for drivers that don't use
    mac80211 to validate everything.

    As cfg80211 doesn't keep station state, move the
    validation of allowing supported_rates to change
    for TDLS only in station mode to mac80211.

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

    Johannes Berg
     
  • This was evidently missed in the TDLS patch (07ba55d7).

    Cc: Arik Nemtsov
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

15 Dec, 2011

1 commit

  • All nl80211 commands that need only the wiphy
    still allow identifying it by giving an interface
    index, except, as Kenny pointed out, the testmode
    dump support.

    Fix this by looking up the wiphy via the ifidx in
    this case as well.

    Tested-by: Kenny Hsu
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

14 Dec, 2011

2 commits

  • Regulatory updates set by CORE are ignored for custom regulatory cards.
    Let us notify the changes to the driver, as some drivers uses core hint
    to restore its orig_* reg domain setting.

    Cc: Paul Stewart
    Signed-off-by: Rajkumar Manoharan
    Acked-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     
  • It is quite possible to run into a race in bss timeout where
    the drivers see the bss entry just before notifying cfg80211
    of a roaming event but it got timed out by the time rdev->event_work
    got scehduled from cfg80211_wq. This would result in the following
    WARN-ON() along with the failure to notify the user space of
    the roaming. The other situation which is happening with ath6kl
    that runs into issue is when the driver reports roam to same AP
    event where the AP bss entry already got expired. To fix this,
    move cfg80211_get_bss() from __cfg80211_roamed() to cfg80211_roamed().

    [158645.538384] WARNING: at net/wireless/sme.c:586
    __cfg80211_roamed+0xc2/0x1b1()
    [158645.538810] Call Trace:
    [158645.538838] [] warn_slowpath_common+0x65/0x7a
    [158645.538917] [] ? __cfg80211_roamed+0xc2/0x1b1
    [158645.538946] [] warn_slowpath_null+0xf/0x13
    [158645.539055] [] __cfg80211_roamed+0xc2/0x1b1
    [158645.539086] [] cfg80211_process_rdev_events+0x153/0x1cc
    [158645.539166] [] cfg80211_event_work+0x26/0x36
    [158645.539195] [] process_one_work+0x219/0x38b
    [158645.539273] [] ? wiphy_new+0x419/0x419
    [158645.539301] [] worker_thread+0xf6/0x1bf
    [158645.539379] [] ? rescuer_thread+0x1b5/0x1b5
    [158645.539407] [] kthread+0x62/0x67
    [158645.539484] [] ? __init_kthread_worker+0x42/0x42
    [158645.539514] [] kernel_thread_helper+0x6/0xd

    Reported-by: Kalle Valo
    Signed-off-by: Vasanthakumar Thiagarajan
    Signed-off-by: John W. Linville

    Vasanthakumar Thiagarajan
     

08 Dec, 2011

1 commit

  • This code has been on the list to remove for a long
    time, so disable it by default, add a warning to its
    Kconfig, and schedule it for removal in 3.5.

    The only known dependency, hal, has not required it
    since its 0.5.12 release, which was in early 2009
    and hal has since been deprecated completely.

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

    Johannes Berg
     

07 Dec, 2011

1 commit

  • Prepare cfg80211 for IBSS HT:
    * extend cfg80211 ibss struct with channel_type
    * Check if extension channel can be used
    * Export can_beacon_sec_chan for use in mac80211 (will be called
    from ibss.c later).

    Signed-off-by: Alexander Simon
    [siwu@hrz.tu-chemnitz.de: Updates]
    * fix cfg80211_can_beacon_ext_chan comment
    * remove implicit channel_type enum assumptions
    * remove radar channel flags check
    * add HT IBSS feature flag
    * reword commit message

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

    Alexander Simon
     

03 Dec, 2011

1 commit


01 Dec, 2011

2 commits

  • Johannes' patch for "cfg80211: fix regulatory NULL dereference"
    broke user regulaotry hints and it did not address the fact that
    last_request was left populated even if the previous regulatory
    hint was stale due to the wiphy disappearing.

    Fix user reguluatory hints by only bailing out if for those
    regulatory hints where a request_wiphy is expected. The stale last_request
    considerations are addressed through the previous fixes on last_request
    where we reset the last_request to a static world regdom request upon
    reset_regdomains(). In this case though we further enhance the effect
    by simply restoring reguluatory settings completely.

    Cc: stable@vger.kernel.org
    Cc: Johannes Berg
    Signed-off-by: Luis R. Rodriguez
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • There is a theoretical race that if hit will trigger
    a crash. The race is between when we issue the first
    regulatory hint, regulatory_hint_core(), gets processed
    by the workqueue and between when the first device
    gets registered to the wireless core. This is not easy
    to reproduce but it was easy to do so through the
    regulatory simulator I have been working on. This
    is a port of the fix I implemented there [1].

    [1] https://github.com/mcgrof/regsim/commit/a246ccf81f059cb662eee288aa13100f631e4cc8

    Cc: stable@vger.kernel.org
    Cc: Johannes Berg
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     

29 Nov, 2011

4 commits


23 Nov, 2011

1 commit


22 Nov, 2011

9 commits

  • sparse reports:
    net/wireless/util.c:499:30: error: cannot size expression
    net/wireless/util.c:503:30: error: cannot size expression

    This is evidently due to the EXPORT_SYMBOL() of the
    bridge_tunnel_header and rfc1042 header variables.
    Move them to the end of the file to work around the
    sparse issue. The error itself from sparse can be
    ignored safely, but since sparse stops parsing at
    errors, other issues after this would go undetected.

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

    Johannes Berg
     
  • This allows users to disable features such as HT, HT40,
    and to modify the MCS, AMPDU, and AMSDU settings for
    drivers that support it.

    The MCS, AMPDU, and AMSDU features that may be disabled are
    are reported in the phy-info netlink message as a mask.

    Attemping to disable features that are not supported will
    take no affect, but will not return errors. This is to aid
    backwards compatibility in user-space apps that may not be
    clever enough to deal with parsing the the capabilities mask.

    This patch only enables the infrastructure. An additional
    patch will enable the feature in mac80211.

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

    Ben Greear
     
  • No other driver ever ended up using this, and
    the commit forgot to move the prototype so no
    driver could have used it. Revert it, if any
    driver shows up and needs it it can be moved
    again, but until then it's more efficient to
    have it in mac80211 where the only user is.

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

    Johannes Berg
     
  • get_vlan() sets the output parameter even if it
    returns an error, which is a bit odd. Instead,
    convert it to use ERR_PTR.

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

    Johannes Berg
     
  • Currently mac80211 implements these for all devices,
    but given restrictions of some devices that isn't
    really true, so prepare for being able to remove the
    capability for some mac80211 devices.

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

    Johannes Berg
     
  • User space might want to test if driver supports testmode. Adding testmode
    to the list of supported commands makes this easier.

    I omitted testmode_dump() in purpose. I assume all drivers implementing
    testmode_dump() will also implement testmode_cmd().

    Signed-off-by: Kalle Valo
    Signed-off-by: John W. Linville

    Kalle Valo
     
  • This grants drivers access to the DFS region that a
    regulatory domain belongs to.

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

    Luis R. Rodriguez
     
  • The wireless-regdb now has support for mapping a country to
    one DFS region. CRDA sends this to us now so process it
    so we can provide that hint to drivers. This will later be
    used by code for processing DFS in a way that meets the
    criteria for the DFS region the country belongs to.

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

    Luis R. Rodriguez
     
  • By the time userspace returns with a response to
    the regulatory domain request, the wiphy causing
    the request might have gone away. If this is so,
    reject the update but mark the request as having
    been processed anyway.

    Cc: Luis R. Rodriguez
    Signed-off-by: Johannes Berg
    Cc: stable@vger.kernel.org
    Signed-off-by: John W. Linville

    Johannes Berg
     

12 Nov, 2011

5 commits

  • Pass probe-response data from usermode via beacon parameters.

    Signed-off-by: Guy Eilam
    Signed-off-by: Arik Nemtsov
    Signed-off-by: John W. Linville

    Arik Nemtsov
     
  • Notify user-space about probe-response offloading support in the driver.

    A wiphy flag is used to indicate support and a bitmap of protocols
    determines which protocols are supported.

    Signed-off-by: Guy Eilam
    Signed-off-by: Arik Nemtsov
    Signed-off-by: John W. Linville

    Arik Nemtsov
     
  • John reported the following warning:

    net/wireless/nl80211.c: In function ‘nl80211_tx_mgmt’:
    net/wireless/nl80211.c:5286:8: warning: ‘hdr’ may be used uninitialized in this function

    Evidently, his version of gcc isn't able to see that
    when "msg" is initialized, "hdr" must also be. My
    gcc, 4.6.1, can actually see that and doesn't warn.
    Simply initialize the variable to NULL. That means
    if the compiler was ever right we'll crash though so
    isn't really optimal since it may hide warnings from
    the compiler when somebody modifies this code in the
    future.

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

    Johannes Berg
     
  • Just add API to get the channel & report it. Trivial really.

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

    Johannes Berg
     
  • The problem with PSM when a hidden SSID was used was originally
    reported by Juuso Oikarinen.

    - When generally scanning, the AP is getting a bss entry with
    a zero SSID.
    - When associating, a probe-req is sent to the AP with the SSID,
    and as a result a probe-response is received with the hidden
    SSID in place. As a consequence, a second bss entry is created
    for the AP, now with the real SSID.
    - After association, mac80211 executes ieee80211_recalc_ps(),
    but does not switch to powersave because the beacon-ies are missing.

    As result, the STA does not ever enter PSM.

    The patch merges in beacon ies of hidden bss from beacon to the probe
    response, creating a consistent set of ies in place.

    Patch is depended on "cfg80211: fix cmp_ies" made by Johannes.

    Signed-off-by: Dmitry Tarnyagin
    Signed-off-by: John W. Linville

    Dmitry Tarnyagin
     

10 Nov, 2011

2 commits

  • The new wifi socket TX capability should be
    supported by wifi drivers, let them advertise
    whether they do or not.

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

    Johannes Berg
     
  • For probe responses it can be useful to not wait for ACK to
    avoid retransmissions if the station that sent the probe is
    already on the next channel, so allow userspace to request
    not caring about the ACK with a new nl80211 flag.

    Since mac80211 needs to be updated for the new function
    prototype anyway implement it right away -- it's just a
    few lines of code.

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

    Johannes Berg