04 Jun, 2011

1 commit


25 May, 2011

1 commit


17 May, 2011

3 commits


06 May, 2011

1 commit

  • Force dev_alloc_name() to be called from register_netdevice() by
    dev_get_valid_name(). That allows to remove multiple explicit
    dev_alloc_name() calls.

    The possibility to call dev_alloc_name in advance remains.

    This also fixes veth creation regresion caused by
    84c49d8c3e4abefb0a41a77b25aa37ebe8d6b743

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

04 Mar, 2011

1 commit


21 Feb, 2011

1 commit

  • From: Eric W. Biederman

    In the beginning with batching unreg_list was a list that was used only
    once in the lifetime of a network device (I think). Now we have calls
    using the unreg_list that can happen multiple times in the life of a
    network device like dev_deactivate and dev_close that are also using the
    unreg_list. In addition in unregister_netdevice_queue we also do a
    list_move because for devices like veth pairs it is possible that
    unregister_netdevice_queue will be called multiple times.

    So I think the change below to fix dev_deactivate which Eric D. missed
    will fix this problem. Now to go test that.

    Signed-off-by: David S. Miller

    Eric W. Biederman
     

04 Feb, 2011

1 commit


06 Jan, 2011

1 commit


23 Dec, 2010

2 commits

  • The throughput LED trigger was always active when
    the radio was enabled. In most cases that's likely
    the desired behaviour, but iwlwifi requires it to
    be only active when one of the virtual interfaces
    is actually "connected" in some way.

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

    Johannes Berg
     
  • iwlwifi and other drivers like to blink their LED
    based on throughput. Implement this generically in
    mac80211, based on a throughput table the driver
    specifies. That way, drivers can set the blink
    frequencies depending on their desired behaviour
    and max throughput.

    All the drivers need to do is provide an LED class
    device, best with blink hardware offload.

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

    Johannes Berg
     

07 Dec, 2010

2 commits

  • Instead of tying mesh activity to interface up,
    add join and leave commands for mesh. Since we
    must be backward compatible, let cfg80211 handle
    joining a mesh if a mesh ID was pre-configured
    when the device goes up.

    Note that this therefore must modify mac80211 as
    well since mac80211 needs to lose the logic to
    start the mesh on interface up.

    We now allow querying mesh parameters before the
    mesh is connected, which simply returns defaults.
    Setting them (internally renamed to "update") is
    only allowed while connected. Specify them with
    the new mesh join command instead where needed.

    In mac80211, beaconing must now also follow the
    mesh enabled/not enabled state, which is done
    by testing the mesh ID.

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

    Johannes Berg
     
  • Logically, the filter adjusting belongs with
    starting/stopping mesh, not interface up/down,
    so move it there.

    Tested-by: Javier Cardona
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

09 Nov, 2010

1 commit

  • For client STA interfaces, ieee80211_do_stop unsets the relevant
    interface's SDATA_STATE_RUNNING state bit prior to cancelling an
    interrupted scan. When ieee80211_offchannel_return is invoked as
    part of cancelling the scan, it doesn't bother unsetting the
    SDATA_STATE_OFFCHANNEL bit because it sees that the interface is
    down. Normally this doesn't matter because when the client STA
    interface is brought back up, it will probably issue a scan. But
    in some cases (e.g., the user changes the interface type while it
    is down), the SDATA_STATE_OFFCHANNEL bit will remain set. This
    prevents the interface queues from being started. So we
    cancel the scan before unsetting the SDATA_STATE_RUNNING bit.

    Signed-off-by: Brian Cavagnolo
    Signed-off-by: John W. Linville

    Brian Cavagnolo
     

14 Oct, 2010

1 commit


07 Oct, 2010

1 commit

  • 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

2 commits


17 Sep, 2010

2 commits

  • When a driver advertises p2p device support,
    mac80211 will handle it, but internally it will
    rewrite the interface type to STA/AP rather than
    P2P-STA/GO since otherwise a lot of paths need
    to be touched that are otherwise identical. A
    p2p boolean tells drivers whether or not a given
    interface will be used for p2p or not.

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

    Johannes Berg
     
  • When an interface is brought up, the recent changes
    to allow changing type-while-up only set the running
    bit after everything was done. This broke a number
    of things, including idle calculation for monitor
    interfaces, and it also broke WDS station insertion
    (although nobody noticed yet).

    Thus, change the code to set the running bit earlier,
    but keep it after the driver's add_interface was
    called because otherwise drivers may iterate over
    interfaces they haven't fully set up yet.

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

    Johannes Berg
     

28 Aug, 2010

5 commits

  • 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
     
  • Split the concurrent virtual interface checks
    into a new function that can be used to check
    for any given new interface type.

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

    Johannes Berg
     
  • The libertas_tf special code for zero addresses
    is a bit too complex, it compares against a stack
    value instead of using is_zero_ether_addr() and
    tries to update all interfaces even if just the
    one that's being brought up needs to be changed.
    Additionally, the repeated check for a valid MAC
    address need only be done if we actually changed
    it on the fly.

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

    Johannes Berg
     
  • There's a lot of redundant code in mac80211's
    interface cleanup/down, for example freeing
    AP beacons is done both when the interface is
    set DOWN as well as when it is torn down, of
    which only the former has any effect.

    Also, a bunch of things should be closer to
    where they matter, like the MLME timers that
    we should cancel when disassociating, rather
    than only when the interface is set DOWN.

    Clean up all this code.

    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
     

26 Aug, 2010

1 commit


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

2 commits

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

21 Jul, 2010

2 commits

  • If a station interface is reused as monitor interface it is possible that
    the carrier is still set to off. This breaks packet injection on that
    monitor interface.
    Force the carrier on in monitor interface initialisation like it is also done
    for other interface types (e.g. adhoc, mesh point, ap).

    Signed-off-by: David Gnedt
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    David Gnedt
     
  • When aggregation related action frames are enqueued for further work,
    and they originate from a STA that is part of an AP VLAN, they are
    currently enqueued for the AP interface. This breaks the sta_info_get()
    lookup in the actual work function, and because of that, aggregation
    sessions are not established for this STA.

    Fix this by replacing the sta_info_get call with a call to
    sta_info_get_bss.

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

    Felix Fietkau
     

15 Jun, 2010

8 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
     
  • To prepare for allowing drivers to sleep in
    ampdu_action, change the locking in the RX
    aggregation code to use a mutex, so that it
    would already allow drivers to sleep. But
    explicitly disable BHs around the callback
    for now since the TX part cannot yet sleep,
    and drivers' locking might require it.

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

    Johannes Berg
     
  • This moves the aggregation callback processing
    to the per-sdata skb queue and a work function
    rather than the tasklet.

    Unfortunately, this means that it extends the
    pkt_type hack to that skb queue. However, it
    will enable making ampdu_action API changes
    gradually, my current plan is to get rid of
    this again by forcing drivers to only return
    from ampdu_action() when everything is done,
    thus removing the callbacks completely.

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

    Johannes Berg
     
  • There's a corner case where we receive a fragmented
    frame during a blockack session, in which case we
    will terminate that session. To simplify future work
    in this area that will culminate in allowing the
    driver callbacks for aggregation to sleep, move the
    processing of this case out of the RX path into the
    interface work.

    This will simplify future work because the new place
    for this code doesn't require that the function will
    always be atomic, which the RX path needs.

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

    Johannes Berg
     
  • To prepare for making the ampdu_action callback
    sleep, make mac80211 always process blockack
    action frames from the skb queue. This gets rid
    of the current special case for managed mode
    interfaces as well.

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

    Johannes Berg
     
  • All the management processing functions free the
    skb after they are done, so this can be done in
    the new common code instead.

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

    Johannes Berg
     
  • Even with the previous patch, IBSS, managed
    and mesh modes all attach their own work
    function to the shared work struct, which
    means some duplicated code. Change that to
    only have a frame processing function and a
    further work function for each of them and
    share some common code.

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

    Johannes Berg
     
  • IBSS, managed and mesh modes all have their
    own work struct, and in the future we want
    to also use it in other modes to process
    frames from the now common skb queue.

    This also makes the skb queue and work safe
    to use from other interface types.

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

    Johannes Berg