25 May, 2011

1 commit


21 May, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
    macvlan: fix panic if lowerdev in a bond
    tg3: Add braces around 5906 workaround.
    tg3: Fix NETIF_F_LOOPBACK error
    macvlan: remove one synchronize_rcu() call
    networking: NET_CLS_ROUTE4 depends on INET
    irda: Fix error propagation in ircomm_lmp_connect_response()
    irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
    irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
    be2net: Kill set but unused variable 'req' in lancer_fw_download()
    irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
    atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
    rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
    rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
    rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
    pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
    isdn: capi: Use pr_debug() instead of ifdefs.
    tg3: Update version to 3.119
    tg3: Apply rx_discards fix to 5719/5720
    ...

    Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
    as per Davem.

    Linus Torvalds
     

20 May, 2011

2 commits

  • * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (78 commits)
    Revert "rcu: Decrease memory-barrier usage based on semi-formal proof"
    net,rcu: convert call_rcu(prl_entry_destroy_rcu) to kfree
    batman,rcu: convert call_rcu(softif_neigh_free_rcu) to kfree_rcu
    batman,rcu: convert call_rcu(neigh_node_free_rcu) to kfree()
    batman,rcu: convert call_rcu(gw_node_free_rcu) to kfree_rcu
    net,rcu: convert call_rcu(kfree_tid_tx) to kfree_rcu()
    net,rcu: convert call_rcu(xt_osf_finger_free_rcu) to kfree_rcu()
    net/mac80211,rcu: convert call_rcu(work_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(wq_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(phonet_device_rcu_free) to kfree_rcu()
    perf,rcu: convert call_rcu(swevent_hlist_release_rcu) to kfree_rcu()
    perf,rcu: convert call_rcu(free_ctx) to kfree_rcu()
    net,rcu: convert call_rcu(__nf_ct_ext_free_rcu) to kfree_rcu()
    net,rcu: convert call_rcu(net_generic_release) to kfree_rcu()
    net,rcu: convert call_rcu(netlbl_unlhsh_free_addr6) to kfree_rcu()
    net,rcu: convert call_rcu(netlbl_unlhsh_free_addr4) to kfree_rcu()
    security,rcu: convert call_rcu(sel_netif_free) to kfree_rcu()
    net,rcu: convert call_rcu(xps_dev_maps_release) to kfree_rcu()
    net,rcu: convert call_rcu(xps_map_release) to kfree_rcu()
    net,rcu: convert call_rcu(rps_map_release) to kfree_rcu()
    ...

    Linus Torvalds
     
  • After commit 1928ecab620907a0953f811316d05f367f3f4dba (mac80211: fix and
    simplify mesh locking) mesh table allocation is performed with the
    pathtbl_resize_lock taken. Under those conditions one should not sleep.
    This patch makes the allocations GFP_ATOMIC to prevent that.

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

    Javier Cardona
     

18 May, 2011

1 commit


17 May, 2011

12 commits

  • …wireless-next-2.6 into for-davem

    Conflicts:
    drivers/net/wireless/iwlwifi/iwl-agn-tx.c
    net/mac80211/sta_info.h

    John W. Linville
     
  • This adds proper RCU annotations to the mesh path
    table code, and fixes a number of bugs in the code
    that I found while checking the sparse warnings I
    got as a result of the annotations.

    Some things like the changes in mesh_path_add() or
    mesh_pathtbl_init() only serve to shut up sparse,
    but other changes like the changes surrounding the
    for_each_mesh_entry() macro fix real RCU bugs in
    the code.

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

    Johannes Berg
     
  • The locking in mesh_{mpath,mpp}_table_grow not only
    has an rcu_read_unlock() missing, it's also racy
    (though really only technically since it's invoked
    from a single function only) since it obtains the
    new size of the table without any locking, so two
    invocations of the function could attempt the same
    resize.

    Additionally, it uses synchronize_rcu() which is
    rather expensive and can be avoided trivially here.

    Modify the functions to only use the table lock
    and use call_rcu() instead of synchronize_rcu().

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

    Johannes Berg
     
  • mac80211 uses call_rcu() with functions that are
    defined in the module, so it must use rcu_barrier()
    at module exit time.

    Luckily, this seems to not be a problem in practice
    as module unload and unregistration takes a long
    time and probably does multiple synchronize_rcu().

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

    Johannes Berg
     
  • As long as no delay is required b/w channel change, scan work
    is proceeding without scheduling a new work. In such case, we
    can not abort scan work when the card was unplugged. This patch
    completes the scanning immediately whenever the device goes down.

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

    Rajkumar Manoharan
     
  • Drivers shouldn't attempt to advertise support
    for more than one IBSS interface since mac80211
    doesn't support that. Check and return an error
    from ieee80211_register_hw() in that case.

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

    Johannes Berg
     
  • Mesh paths are deleted via mesh_path_del() which properly
    deactivates the timer associated to a mesh path. But if paths were
    deleted by mesh_table_free(..., true) timers would not be deactivated.
    This fixes this case.

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

    Javier Cardona
     
  • Currently the devices that have already stripped IEEE 802.11
    header from the AMSDU SKB can not use ieee80211_amsdu_to_8023s
    routine. This patch enhances ieee80211_amsdu_to_8023s() API by
    changing mandatory removing of IEEE 802.11 header from AMSDU
    to optional.

    Signed-off-by: Yogesh Ashok Powar
    Signed-off-by: Bing Zhao
    Signed-off-by: John W. Linville

    Yogesh Ashok Powar
     
  • These definitions need to be exposed now that we can set the peer link
    states via NL80211_ATTR_STA_PLINK_STATE. They were already being
    (opaquely) reported by NL80211_STA_INFO_PLINK_STATE.

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

    Javier Cardona
     
  • This adds sparse RCU annotations to most of
    mac80211, only the mesh code remains to be
    done.

    Due the the previous patches, the annotations
    are pretty simple. The only thing that this
    actually changes is removing the RCU usage of
    key->sta in debugfs since this pointer isn't
    actually an RCU-managed pointer (it only has
    a single assignment done before the key even
    goes live). As that is otherwise harmless, I
    decided to make it part of this patch.

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

    Johannes Berg
     
  • During my quest to make mac80211 not have any RCU
    warnings from sparse, I came across the a-MPDU code
    again and it wasn't quite clear why it isn't racy.
    So instead of assigning the tid_tx array with just
    the spinlock held in ieee80211_start_tx_ba_session
    use a separate temporary array protected only by
    the spinlock and protect all assignments to the
    "live" array by both the spinlock and the mutex so
    that other code is easily verified to be correct.

    Due to pointer assignment atomicity I don't think
    this is a real issue, but I'm not sure, especially
    on Alpha the current code might be problematic.

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

    Johannes Berg
     
  • Add the ability to advertise interface combinations in nl80211.
    This allows the driver to indicate what the combinations are
    that it supports. "Combinations" of just a single interface are
    implicit, as previously. Note that cfg80211 will enforce that
    the restrictions are met, but not for all drivers yet (once all
    drivers are updated, we can remove the flag and enforce for all).

    When no combinations are actually supported, an empty list will
    be exported so that userspace can know if the kernel exported
    this info or not (although it isn't clear to me what tools using
    the info should do if the kernel didn't export it).

    Since some interface types are purely virtual/software and don't
    fit the restrictions, those are exposed in a new list of pure SW
    types, not subject to restrictions. This mainly exists to handle
    AP-VLAN and monitor interfaces in mac80211.

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

    Johannes Berg
     

13 May, 2011

7 commits

  • There's no need to have table functions in one
    file and all users in another, move the functions
    to the right file and make them static. Also move
    a static variable to the beginning of the file to
    make it easier to find.

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

    Johannes Berg
     
  • When sched_scan_stopped was called by the driver, mac80211 calls
    cfg80211, which in turn was calling mac80211 back with a flag
    "driver_initiated". This flag was used so that mac80211 would do the
    necessary cleanup but would not call the driver. This was enough to
    prevent the bounce back between the driver and mac80211, but not
    between mac80211 and cfg80211.

    To fix this, we now do the cleanup in mac80211 before calling
    cfg80211. To help with locking issues, the workqueue was moved from
    cfg80211 to mac80211.

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

    Luciano Coelho
     
  • A few configuration functions correctly do
    rcu_read_lock() but don't correctly reference
    some pointers protected by RCU. Fix that.

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

    Johannes Berg
     
  • The code here is only not racy because all the
    places that assign the pointers it uses are
    holding the sta_mtx as well as the key_mtx and
    so can't race against this because this code
    holds the sta_mtx. But that's not intuitive,
    so fix it to hold the key_mtx.

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

    Johannes Berg
     
  • The code in ieee80211_del_key() doesn't acquire the
    key_mtx properly when it dereferences the keys. It
    turns out that isn't actually necessary since the
    key_mtx itself seems to be redundant since all key
    manipulations are done under the RTNL, but as long
    as we have the key_mtx we should use it the right
    way too.

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

    Johannes Berg
     
  • The code here to RCU-dereference a pointer that's
    on the stack is totally pointless, RCU isn't magic
    (like say Java's weak references are), so the code
    can't work like whoever wrote it thought it might.

    Remove it so readers don't get confused. Note that
    it seems that a bug is there anyway: I don't see
    any code that cancels the timer when a mesh path
    struct is destroyed.

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

    Johannes Berg
     
  • When transmitting a frame, the transmitter waits a random number of
    slots between 0 and cw. Thus, the contention time is (cw / 2) * t_slot
    which we can represent instead as (cw * t_slot) >> 1. Also fix a few
    other accounting bugs around contention time, and add comments.

    Signed-off-by: Daniel Halperin
    Signed-off-by: John W. Linville

    Daniel Halperin
     

12 May, 2011

13 commits


11 May, 2011

3 commits

  • This seems to be a leftover from the old days, when we didn't support
    any frames that didn't contain the full ieee802.11 header. This is
    not the case anymore. It does not cause problems now, because they
    are only dropped during scan. But when scheduled scans get merged,
    this would become a problem because we would drop all small frames
    while scheduled scan is running.

    To fix this, return RX_CONTINUE instead of RX_DROP_MONITOR.

    Cc: Johannes Berg
    Signed-off-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Luciano Coelho
     
  • When mac80211 is built without CONFIG_PM being defined, the following errors
    are output:

    net/mac80211/main.c: In function ‘ieee80211_register_hw’:
    net/mac80211/main.c:700: error: ‘const struct ieee80211_ops’ has no member named ‘suspend’
    net/mac80211/main.c:700: error: ‘const struct ieee80211_ops’ has no member named ‘resume’
    make[2]: *** [net/mac80211/main.o] Error 1
    make[1]: *** [net/mac80211] Error 2
    make[1]: *** Waiting for unfinished jobs....
    make: *** [net] Error 2

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

    Larry Finger
     
  • When we are disconnecting, we set PS off, but this happens before we
    send the deauth/disassoc request. When the deauth/disassoc frames are
    sent, we trigger the dynamic ps timer, which then times out and turns
    PS back on. Thus, PS remains on after disconnecting, causing problems
    when associating again.

    This can be fixed by preventing the timer to start when we're not
    associated anymore.

    Signed-off-by: Luciano Coelho
    Signed-off-by: John W. Linville

    Luciano Coelho