14 Oct, 2010

1 commit


07 Oct, 2010

2 commits

  • This adds API to allow adding per-station GTKs,
    updates mac80211 to support it, and also allows
    drivers to remove a key from hwaccel again when
    this may be necessary due to multiple GTKs.

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

    Johannes Berg
     
  • When roaming while we have active BA session,
    we can end up transmitting delBA frames to
    the old AP while we're already on the new AP's
    channel, which can cause warnings.

    Simply avoid sending those frames, but still
    tear down the internal session state, since
    they are not really necessary anyway as we
    will implicitly disassociate when sending the
    association to the new AP.

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

    Johannes Berg
     

06 Oct, 2010

3 commits

  • The locking around ieee80211_recalc_smps is
    buggy -- it cannot acquire another interface's
    mutex while the iflist mutex is held because
    another code path could be holding the iface
    mutex and trying to acquire the iflist mutex.

    But the locking is also unnecessary, we only
    check "ifmgd->associated" as a bool, and don't
    use the pointer (in check_mgd_smps).

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

    Johannes Berg
     
  • On association to an AP, after receiving beacons, the beacon_crc value is set.
    The beacon_crc value is not reset in disassociation, but the BSS data may be
    expired at a later point. When associating again, it's possible that a
    beacon for the AP is not received, resulting in the beacon_ies to remain NULL.

    After association, further beacons will not update the beacon data, as the
    crc value of the beacon has not changed, and the beacon_crc still holds a
    value matching the beacon. The beacon_ies will remain forever null.

    One of the results of this is that WLAN power save cannot be entered, the STA
    will remain foreven in active mode.

    Fix this by adding a validation flag for the beacon_crc, which is cleared on
    association.

    Signed-off-by: Juuso Oikarinen
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Juuso Oikarinen
     
  • This patch fixes an refcounting bug. Previously it
    was possible to corrupt the per-device recv. filter
    and monitor management counters when:
    iw dev wlanX set monitor [new flags]
    was issued on an active monitor interface.

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

    Christian Lamparter
     

28 Sep, 2010

2 commits

  • commit 8c0c709eea5cbab97fb464cd68b06f24acc58ee1
    Author: Johannes Berg
    Date: Wed Nov 25 17:46:15 2009 +0100

    mac80211: move cmntr flag out of rx flags

    moved the CMNTR flag into the skb RX flags for
    some aggregation cleanups, but this was wrong
    since the optimisation this flag tried to make
    requires that it is kept across the processing
    of multiple interfaces -- which isn't true for
    flags in the skb. The patch not only broke the
    optimisation, it also introduced a bug: under
    some (common!) circumstances the flag will be
    set on an already freed skb!

    However, investigating this in more detail, I
    found that most of the flags that we set should
    be per packet, _except_ for this one, due to
    a-MPDU processing. Additionally, the flags used
    for processing (currently just this one) need
    to be reset before processing a new packet.

    Since we haven't actually seen bugs reported as
    a result of the wrong flags handling (which is
    not too surprising -- the only real bug case I
    can come up with is an a-MSDU contained in an
    a-MPDU), I'll make a different fix for rc.

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

    Johannes Berg
     
  • Create 'stations' sub-directory under each netdev:[vif-name]
    directory to hold all stations for that network device.

    Signed-off-by: Ben Greear
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Ben Greear
     

25 Sep, 2010

2 commits

  • IEEE Std 802.11k-2008 added DS Parameter Set information element into
    Probe Request frames as an optional information on 2.4 GHz band (and
    mandatory, if radio measurements are enabled). This allows APs to
    filter out Probe Request frames that may be received from neighboring
    overlapping channels and by doing so, reduce the number of unnecessary
    frames in the air. Make mac80211 add this IE into Probe Request frames
    whenever the channel is known (i.e., whenever hwscan is not used).

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

    Jouni Malinen
     
  • If the TX rate set has been masked, the removed rates can also be
    removed from the Supported Rates and Extended Supported Rates IEs in
    Probe Request frames.

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

    Jouni Malinen
     

17 Sep, 2010

2 commits


02 Sep, 2010

1 commit


01 Sep, 2010

1 commit


28 Aug, 2010

6 commits

  • Somebody noticed this problem, and I outlined
    to them how to fix it, but haven't heard back
    from them. So while I was adding the state
    field I figured I could use it to fix it.

    The problem, as I understand it, is that when
    we go offchannel while the driver has a queue
    stopped, the driver will likely start draining
    the queue and then enable it while offchannel.
    This in turn will enable the interface queue,
    and that leads to transmitting data frames on
    the wrong channel.

    Fix this by keeping track of offchannel status
    per interface, and not enabling the interface
    queues on interfaces that are offchannel when
    the driver enables a queue.

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

    Johannes Berg
     
  • Add support to mac80211 for changing the interface
    type even when the interface is UP, if the driver
    supports it.

    To achieve this
    * add a new driver callback for switching,
    * split some of the interface up/down code out
    into new functions (do_open/do_stop), and
    * maintain an own __SDATA_RUNNING bit that will
    not be set during interface type, so that any
    other code doesn't use the interface.

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

    Johannes Berg
     
  • Some vendor specified mechanisms for 802.1X-style
    functionality use a different protocol than EAP
    (even if EAP is vendor-extensible). Support this
    in mac80211 via the cfg80211 API for it.

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

    Johannes Berg
     
  • Allow drivers to specify their own set of cipher
    suites to advertise vendor-specific ciphers. The
    driver is then required to implement hardware
    crypto offload for it.

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

    Johannes Berg
     
  • The ieee80211_scan_completed() function was a frequent
    source of potential deadlocks, since it is called by
    drivers but may call back into drivers, so drivers had
    to make sure to call it without any locks held, which
    frequently lead to more complex code in drivers. Avoid
    that problem by allowing the function to be called in
    any context, and queueing the actual work it does.
    Also update the documentation for it to indicate this.

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

    Johannes Berg
     
  • Since cfg80211 manages the BSS list completely,
    this define hasn't been used for a long time
    and will never be used again.

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

    Johannes Berg
     

25 Aug, 2010

1 commit

  • Allow userspace to register for more than just
    action frames by giving the frame subtype, and
    make it possible to use this in various modes
    as well.

    With some tweaks and some added functionality
    this will, in the future, also be usable in AP
    mode and be able to replace the cooked monitor
    interface currently used in that case.

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

    Johannes Berg
     

17 Aug, 2010

5 commits

  • Sometimes drivers have more information than the
    stack about how their antennas/chains are used,
    and may require that the SM PS mode be changed.
    This could happen, for example, when detecting
    that the user disconnected an antenna. Thus this
    patch introduces API to allow drivers to request
    SM PS mode changes.

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

    Johannes Berg
     
  • Sometimes we don't just need to know whether or
    not the device is idle, but also per interface.
    This adds that reporting capability to mac80211.

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

    Johannes Berg
     
  • This patch introduces a new timer, which will release
    queued-up MPDUs from the reorder buffer, whenever
    they've waited for more than HT_RX_REORDER_BUF_TIMEOUT
    (which is at around 100 ms).

    The advantage of having a dedicated timer, instead of
    relying on a constant stream of freshly arriving aMPDUs
    to release the old ones, is particularly observable when
    even a small fraction of MPDUs are forever lost at
    low network speeds.

    Previously under these circumstances frames would become
    stuck in the reorder buffer and the network stack of both
    HT peers throttled back, instead of revving up and
    gunning the pipes.

    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     
  • Having both scan and work mutexes is not just
    a bit too fine grained, it also creates issues
    when there's code that needs both since they
    then need to be acquired in the right order,
    which can be hard to do.

    Therefore, use just a single mutex for both.

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

    Johannes Berg
     
  • This patch implement basic infrastructure to support use of NAPI by
    mac80211-based hardware drivers.

    Because mac80211 devices can support multiple netdevs, a dummy netdev
    is used for interfacing with the NAPI code in the core of the network
    stack. That structure is hidden from the hardware drivers, but the
    actual napi_struct is exposed in the ieee80211_hw structure so that the
    poll routines in drivers can retrieve that structure. Hardware drivers
    can also specify their own weight value for NAPI polling.

    Signed-off-by: John W. Linville

    John W. Linville
     

30 Jul, 2010

1 commit

  • Some features require knowing the DTIM period
    before associating. This implements the ability
    to wait for a beacon in mac80211 before assoc
    to provide this value. It is optional since
    most likely not all drivers will need this.

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

    Johannes Berg
     

27 Jul, 2010

1 commit


22 Jul, 2010

1 commit

  • IBSS has never had locking, instead relying on some
    memory barriers etc. That's hard to get right, and
    I think we had it wrong too until the previous patch.
    Since this is not performance sensitive, it doesn't
    make sense to have the maintenance overhead of that,
    so add proper locking.

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

    Johannes Berg
     

02 Jul, 2010

1 commit


22 Jun, 2010

1 commit

  • This mechanism introduced in this patch applies (at least) for hardware
    designs using a single shared antenna for both WLAN and BT. In these designs,
    the antenna must be toggled between WLAN and BT.

    In those hardware, managing WLAN co-existence with Bluetooth requires WLAN
    full power save whenever there is Bluetooth activity in order for WLAN to be
    able to periodically relinquish the antenna to be used for BT. This is because
    BT can only access the shared antenna when WLAN is idle or asleep.

    Some hardware, for instance the wl1271, are able to indicate to the host
    whenever there is BT traffic. In essence, the hardware will send an indication
    to the host whenever there is, for example, SCO traffic or A2DP traffic, and
    will send another indication when the traffic is over.

    The hardware gets information of Bluetooth traffic via hardware co-existence
    control lines - these lines are used to negotiate the shared antenna
    ownership. The hardware will give the antenna to BT whenever WLAN is sleeping.

    This patch adds the interface to mac80211 to facilitate temporarily disabling
    of dynamic power save as per request of the WLAN driver. This interface will
    immediately force WLAN to full powersave, hence allowing BT coexistence as
    described above.

    In these kind of shared antenna desings, when WLAN powersave is fully disabled,
    Bluetooth will not work simultaneously with WLAN at all. This patch does not
    address that problem. This interface will not change PSM state, so if PSM is
    disabled it will remain so. Solving this problem requires knowledge about BT
    state, and is best done in user-space.

    Signed-off-by: Juuso Oikarinen
    Signed-off-by: John W. Linville

    Juuso Oikarinen
     

18 Jun, 2010

1 commit


16 Jun, 2010

1 commit

  • The ps-qos latency handling is broken. It uses predetermined latency values
    to select specific dynamic PS timeouts. With common AP configurations, these
    values overlap with beacon interval and are therefore essentially useless
    (for network latencies less than the beacon interval, PSM is disabled.)

    This patch remedies the problem by replacing the predetermined network latency
    values with one high value (1900ms) which is used to go trigger full psm. For
    backwards compatibility, the value 2000ms is still mapped to a dynamic ps
    timeout of 100ms.

    Currently also the mac80211 internal value for storing user space configured
    dynamic PSM values is incorrectly in the driver visible ieee80211_conf struct.
    Move it to the ieee80211_local struct.

    Signed-off-by: Juuso Oikarinen
    Signed-off-by: John W. Linville

    Juuso Oikarinen
     

15 Jun, 2010

7 commits

  • There is a circular locking dependency when configuring the
    hardware ARP filters on association, occurring when flushing the mac80211
    workqueue. This is what happens:

    [ 92.026800] =======================================================
    [ 92.030507] [ INFO: possible circular locking dependency detected ]
    [ 92.030507] 2.6.34-04781-g2b2c009 #85
    [ 92.030507] -------------------------------------------------------
    [ 92.030507] modprobe/5225 is trying to acquire lock:
    [ 92.030507] ((wiphy_name(local->hw.wiphy))){+.+.+.}, at: [] flush_workq
    ueue+0x0/0xb0
    [ 92.030507]
    [ 92.030507] but task is already holding lock:
    [ 92.030507] (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x12/0x20
    [ 92.030507]
    [ 92.030507] which lock already depends on the new lock.
    [ 92.030507]
    [ 92.030507]
    [ 92.030507] the existing dependency chain (in reverse order) is:
    [ 92.030507]
    [ 92.030507] -> #2 (rtnl_mutex){+.+.+.}:
    [ 92.030507] [] lock_acquire+0xdb/0x110
    [ 92.030507] [] mutex_lock_nested+0x44/0x300
    [ 92.030507] [] rtnl_lock+0x12/0x20
    [ 92.030507] [] ieee80211_assoc_done+0x6c/0xe0 [mac80211]
    [ 92.030507] [] ieee80211_work_work+0x31d/0x1280 [mac80211]

    [ 92.030507] -> #1 ((&local->work_work)){+.+.+.}:
    [ 92.030507] [] lock_acquire+0xdb/0x110
    [ 92.030507] [] worker_thread+0x22a/0x370
    [ 92.030507] [] kthread+0x96/0xb0
    [ 92.030507] [] kernel_thread_helper+0x4/0x10
    [ 92.030507]
    [ 92.030507] -> #0 ((wiphy_name(local->hw.wiphy))){+.+.+.}:
    [ 92.030507] [] __lock_acquire+0x1c0c/0x1d50
    [ 92.030507] [] lock_acquire+0xdb/0x110
    [ 92.030507] [] flush_workqueue+0x4e/0xb0
    [ 92.030507] [] ieee80211_stop_device+0x2b/0xb0 [mac80211]
    [ 92.030507] [] ieee80211_stop+0x3e5/0x680 [mac80211]

    The locking in this case is quite complex. Fix the problem by rewriting the
    way the hardware ARP filter list is handled - i.e. make a copy of the address
    list to the bss_conf struct, and provide that list to the hardware driver
    when needed.

    The current patch will enable filtering also in promiscuous mode. This may need
    to be changed in the future.

    Reported-by: Reinette Chatre
    Signed-off-by: Juuso Oikarinen
    Signed-off-by: John W. Linville

    Juuso Oikarinen
     
  • This patch adds support to nl80211 and mac80211 to set basic rates when
    joining/creating ibss network.

    Original patch was posted by Johannes Berg on the linux-wireless posting list.

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

    Teemu Paasikivi
     
  • Since we want the code to be able to sleep
    in the future, it must not be called from
    the timer directly. To prepare, move it out
    into the aggregation work.

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

    Johannes Berg
     
  • Move the block-ack session works into common
    code, since it will be needed for RX agg too
    in the next patches.

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

    Johannes Berg
     
  • When the driver or rate control requests starting
    or stopping an aggregation session, that currently
    causes a direct callback into the driver, which
    could potentially cause locking problems. Also,
    the functions need to be callable from contexts
    that cannot sleep, and thus will interfere with
    making the ampdu_action callback sleeping.

    To address these issues, add a new work item for
    each station that will process any start or stop
    requests out of line.

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

    Johannes Berg
     
  • mac80211 currently maintains the ampdu_lock to
    avoid starting a queue due to one aggregation
    session while another aggregation session needs
    the queue stopped.

    We can do better, however, and instead refcount
    the queue stops for this particular purpose,
    thus removing the need for the lock. This will
    help making ampdu_action able to sleep.

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

    Johannes Berg
     
  • The non-irqsafe aggregation start/stop done
    callbacks are currently only used by ath9k_htc,
    and can cause callbacks into the driver again.
    This might lead to locking issues, which will
    only get worse as we modify locking. To avoid
    trouble, remove the non-irqsafe versions and
    change ath9k_htc to use those instead.

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

    Johannes Berg