16 Sep, 2008

17 commits

  • Some comments refer to 80211.o or similar; also remove
    a comment about implementing fragments better, we really
    have better things to do.

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

    Johannes Berg
     
  • Most of the scan functions are called ieee80211_sta_scan_*
    or similar, make clean it up so they are all just called
    ieee80211_scan_*.

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

    Johannes Berg
     
  • The bridge_packets configuration really should be per virtual
    interface (theoretically per AP/VLAN, but this is much easier);
    there currently is no way to set it yet though. Also invert
    the option to "NO_BRIDGE_PACKETS" so the default is to bridge.

    While at it, also document the flags properly.

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

    Johannes Berg
     
  • It really doesn't belong into the wireless extensions code.

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

    Johannes Berg
     
  • This way all the utility functions are at the top, then the
    state machine and externally callable functions are moved to
    the bottom. Also clean up ieee80211_i.h a bit and add a few
    comments about which functions are called from where.

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

    Johannes Berg
     
  • When we remove an interface, we can currently end up having
    a pointer to it left in local->scan_sdata after it has been
    set down, and then with a hardware scan the scan completion
    can try to access it which is a bug. Alternatively, a scan
    that started as a hardware scan may terminate as though it
    was a software scan, if the timing is just right.

    On SMP systems, software scan also has a similar problem,
    just canceling the delayed work and setting a flag isn't
    enough since it may be running concurrently; in this case
    we would also never restore state of other interfaces.

    This patch hopefully fixes the problems by always invoking
    ieee80211_scan_completed or requiring it to be invoked by
    the driver, I suspect the drivers that have ->hw_scan() are
    buggy. The bug will not manifest itself unless you remove
    the interface while hw-scanning which will also turn off
    the hw, and then add a new interface which will be unusable
    until you scan once.

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

    Johannes Berg
     
  • When we stop an interface, the work on it may still be pending
    or running. We do cancel the timer, but we do not currently
    protect against the work struct. The race is very unlikely to
    hit -- it'll happen only when the driver is using mac80211's
    workqueue to run long-running tasks and the sta/mesh works are
    delayed for quite a bit.

    This patch fixes it by cancelling the work explicitly.

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

    Johannes Berg
     
  • This patch splits off mesh handling from the STA/IBSS.
    Unfortunately it increases mesh code size a bit, but I
    think it makes things clearer. The patch also reduces
    per-interface run-time memory usage.

    Also clean up a few places where ifdef is not required.

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

    Johannes Berg
     
  • The timer restart is done wrongly, we shouldn't set the REQ_RUN
    bit when the scan has finished if it hadn't been set before the
    scan started. If the timer fires during the scan, it will set
    REQ_RUN and then we can run the work for it, if it didn't fire
    then we shouldn't run its work either.

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

    Johannes Berg
     
  • This I shouldn't have moved to the scan implementation, move
    it back to the MLME where it belongs, to the notification.

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

    Johannes Berg
     
  • ieee80211_sta_expire uses the internal __sta_info_unlink
    function which can become static if this function is moved
    to sta_info.c.

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

    Johannes Berg
     
  • And support setting both long and short retries independently.

    Signed-off-by: Dan Williams
    Signed-off-by: John W. Linville

    Dan Williams
     
  • RF kill support is enabled when CONFIG_RFKILL
    is set.

    Signed-off-by: Vasanthakumar Thiagarajan
    Signed-off-by: John W. Linville

    Vasanthakumar Thiagarajan
     
  • Some of the functions in main.c are re-ordered in such
    a way that all local functions are defined before mac80211
    and pci callbacks.

    Signed-off-by: Vasanthakumar Thiagarajan
    Signed-off-by: John W. Linville

    Vasanthakumar Thiagarajan
     
  • The generic reset command is unused. Each interface type needs to
    handle the reset command differently since after reset, the firmware is
    dead and interface-specific mechanisms must be used to reinitialize the
    card.

    Signed-off-by: Dan Williams
    Signed-off-by: John W. Linville

    Dan Williams
     
  • This cleans up zd1211rw's own regulatory work, and makes use of
    the new cfg80211 regulatory_hint().

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

    Luis R. Rodriguez
     
  • This adds the new wireless regulatory infrastructure. The
    main motiviation behind this was to centralize regulatory
    code as each driver was implementing their own regulatory solution,
    and to replace the initial centralized code we have where:

    * only 3 regulatory domains are supported: US, JP and EU
    * regulatory domains can only be changed through module parameter
    * all rules were built statically in the kernel

    We now have support for regulatory domains for many countries
    and regulatory domains are now queried through a userspace agent
    through udev allowing distributions to update regulatory rules
    without updating the kernel.

    Each driver can regulatory_hint() a regulatory domain
    based on either their EEPROM mapped regulatory domain value to a
    respective ISO/IEC 3166-1 country code or pass an internally built
    regulatory domain. We also add support to let the user set the
    regulatory domain through userspace in case of faulty EEPROMs to
    further help compliance.

    Support for world roaming will be added soon for cards capable of
    this.

    For more information see:

    http://wireless.kernel.org/en/developers/Regulatory/CRDA

    For now we leave an option to enable the old module parameter,
    ieee80211_regdom, and to build the 3 old regdomains statically
    (US, JP and EU). This option is CONFIG_WIRELESS_OLD_REGULATORY.
    These old static definitions and the module parameter is being
    scheduled for removal for 2.6.29. Note that if you use this
    you won't make use of a world regulatory domain as its pointless.
    If you leave this option enabled and if CRDA is present and you
    use US or JP we will try to ask CRDA to update us a regulatory
    domain for us.

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

    Luis R. Rodriguez
     

13 Sep, 2008

7 commits

  • Signed-off-by: Stephen Rothwell
    Signed-off-by: David S. Miller

    Stephen Rothwell
     
  • This patch resolves a few issues found with multiq including wording
    suggestions and a problem seen in the allocation of queues.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This new action will have the ability to change the priority and/or
    queue_mapping fields on an sk_buff.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • This patch is intended to add a qdisc to support the new tx multiqueue
    architecture by providing a band for each hardware queue. By doing
    this it is possible to support a different qdisc per physical hardware
    queue.

    This qdisc uses the skb->queue_mapping to select which band to place
    the traffic onto. It then uses a round robin w/ a check to see if the
    subqueue is stopped to determine which band to dequeue the packet from.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • inet6_rsk() is called on a struct request_sock * before we
    have checked whether the socket is an ipv6 socket or a ipv6-
    mapped ipv4 socket. The access that triggers this is the
    inet_rsk(rsk)->inet6_rsk_offset dereference in inet6_rsk().

    This is arguably not a critical error as the inet6_rsk_offset
    is only used to compute a pointer which is never really used
    (in the code path in question) anyway. But it might be a
    latent error, so let's fix it.

    Spotted by kmemcheck.

    Signed-off-by: Vegard Nossum
    Acked-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Vegard Nossum
     
  • The dst garbage collector dst_gc_task() may not be scheduled as we
    expect it to be in __dst_free().

    Indeed, when the dst_gc_timer was replaced by the delayed_work
    dst_gc_work, the mod_timer() call used to schedule the garbage
    collector at an earlier date was replaced by a schedule_delayed_work()
    (see commit 86bba269d08f0c545ae76c90b56727f65d62d57f).

    But, the behaviour of mod_timer() and schedule_delayed_work() is
    different in the way they handle the delay.

    mod_timer() stops the timer and re-arm it with the new given delay,
    whereas schedule_delayed_work() only check if the work is already
    queued in the workqueue (and queue it (with delay) if it is not)
    BUT it does NOT take into account the new delay (even if the new delay
    is earlier in time).
    schedule_delayed_work() returns 0 if it didn't queue the work,
    but we don't check the return code in __dst_free().

    If I understand the code in __dst_free() correctly, we want dst_gc_task
    to be queued after DST_GC_INC jiffies if we pass the test (and not in
    some undetermined time in the future), so I think we should add a call
    to cancel_delayed_work() before schedule_delayed_work(). Patch below.

    Or we should at least test the return code of schedule_delayed_work(),
    and reset the values of dst_garbage.timer_inc and dst_garbage.timer_expires
    back to their former values if schedule_delayed_work() failed.
    Otherwise the subsequent calls to __dst_free will test the wrong values
    and assume wrong thing about when the garbage collector is supposed to
    be scheduled.

    dst_gc_task() also calls schedule_delayed_work() without checking
    its return code (or calling cancel_scheduled_work() first), but it
    should fine there: dst_gc_task is the routine of the delayed_work, so
    no dst_gc_work should be pending in the queue when it's running.

    Signed-off-by: Benjamin Thery
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Benjamin Thery
     

12 Sep, 2008

16 commits