01 Dec, 2011

1 commit

  • The on-channel work optimisations have caused a
    number of issues, and the code is unfortunately
    very complex and almost impossible to follow.
    Instead of attempting to put in more workarounds
    let's just remove those optimisations, we can
    work on them again later, after we change the
    whole auth/assoc design.

    This should fix rate_control_send_low() warnings,
    see RH bug 731365.

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

    Johannes Berg
     

22 Nov, 2011

1 commit

  • This implements ht-cap over-rides for mac80211 drivers.
    HT may be disabled, making an /a/b/g/n station act like an
    a/b/g station. HT40 may be disabled forcing the station to
    be HT20 even if the AP and local hardware support HT40.

    MAX-AMSDU may be disabled.
    AMPDU-Density may be increased.
    AMPDU-Factor may be decreased.

    This has been successfully tested with ath9k using patched
    wpa_supplicant and iw.

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

    Ben Greear
     

10 Nov, 2011

2 commits


09 Nov, 2011

1 commit


03 Nov, 2011

2 commits

  • When going back on-channel, we should reconfigure
    the hw iff the hardware is not already configured
    to the operational channel.

    Signed-off-by: Eliad Peller
    Cc: stable@kernel.org # 2.6.39+
    Signed-off-by: John W. Linville

    Eliad Peller
     
  • The offchannel code is currently broken - we should
    remain_off_channel if the work was started, and
    the work's channel and channel_type are the same
    as local->tmp_channel and local->tmp_channel_type.

    However, if wk->chan_type and local->tmp_channel_type
    coexist (e.g. have the same channel type), we won't
    remain_off_channel.

    This behavior was introduced by commit da2fd1f
    ("mac80211: Allow work items to use existing
    channel type.")

    Tested-by: Ben Greear
    Signed-off-by: Eliad Peller
    Cc: stable@kernel.org # 2.6.39+
    Signed-off-by: John W. Linville

    Eliad Peller
     

12 Oct, 2011

1 commit

  • When I introduced in-kernel off-channel TX I
    introduced a bug -- the work can't be canceled
    again because the code clear the skb pointer.
    Fix this by keeping track separately of whether
    TX status has already been reported.

    Cc: stable@kernel.org [2.6.38+]
    Reported-by: Jouni Malinen
    Tested-by: Jouni Malinen
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

28 Sep, 2011

1 commit

  • Whenever the scan request or tx_mgmt is requesting not to
    use CCK rate for managemet frames through
    NL80211_ATTR_TX_NO_CCK_RATE attribute, then mac80211 should
    select appropriate least non-CCK rate. This could help to
    send P2P probes and P2P action frames at non 11b rates
    without diabling 11b rates globally.

    Cc: Jouni Malinen
    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     

14 Sep, 2011

1 commit


21 Jul, 2011

1 commit

  • In P2P client mode, the GO (AP) to connect to might
    have periods of time where it is not available due
    to powersave. To allow the driver to sync with it
    and send frames to the GO only when it is available
    add a new callback tx_sync (and the corresponding
    finish_tx_sync). These callbacks can sleep unlike
    the actual TX.

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

    Johannes Berg
     

20 Jul, 2011

1 commit


28 Jun, 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
     

08 May, 2011

1 commit


27 Apr, 2011

1 commit

  • These warnings are exposed by gcc 4.6.
    net/mac80211/sta_info.c: In function 'sta_info_cleanup_expire_buffered':
    net/mac80211/sta_info.c:590:32: warning: variable 'sdata' set but not used
    net/mac80211/ibss.c: In function 'ieee80211_rx_mgmt_auth_ibss':
    net/mac80211/ibss.c:43:34: warning: variable 'status_code' set but not used
    net/mac80211/work.c: In function 'ieee80211_send_assoc':
    net/mac80211/work.c:203:9: warning: variable 'len' set but not used
    net/mac80211/tx.c: In function '__ieee80211_parse_tx_radiotap':
    net/mac80211/tx.c:1039:35: warning: variable 'sband' set but not used
    net/mac80211/mesh.c: In function 'ieee80211_mesh_rx_queued_mgmt':
    net/mac80211/mesh.c:616:28: warning: variable 'ifmsh' set but not used
    ...

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville

    Rajkumar Manoharan
     

08 Mar, 2011

1 commit


19 Feb, 2011

1 commit

  • The module parameter ieee80211_disable_40mhz_24ghz
    was meant to allow disabling 40 MHz operation in
    the 2.4 GHz band by default. However, it is buggy
    as implemented because while it advertises to the
    AP that the device doesn't support 40 MHz, it will
    itself still use 40 MHz configurations.

    To fix this, clear the 40 MHz bits from the sband
    completely instead of overriding where used.

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

    Johannes Berg
     

10 Feb, 2011

1 commit


05 Feb, 2011

1 commit

  • This should decrease un-necessary flushes, on/off channel work,
    and channel changes in cases where the only scanned channel is
    the current operating channel.

    * Removes SCAN_OFF_CHANNEL flag, uses SDATA_STATE_OFFCHANNEL
    and is-scanning flags instead.

    * Add helper method to determine if we are currently configured
    for the operating channel.

    * Do no blindly go off/on channel in work.c Instead, only call
    appropriate on/off code when we really need to change channels.
    Always enable offchannel-ps mode when starting work,
    and disable it when we are done.

    * Consolidate ieee80211_offchannel_stop_station and
    ieee80211_offchannel_stop_beaconing, call it
    ieee80211_offchannel_stop_vifs instead.

    * Accept non-beacon frames when scanning on operating channel.

    * Scan state machine optimized to minimize on/off channel
    transitions. Also, when going on-channel, go ahead and
    re-enable beaconing. We're going to be there for 200ms,
    so seems like some useful beaconing could happen.
    Always enable offchannel-ps mode when starting software
    scan, and disable it when we are done.

    * Grab local->mtx earlier in __ieee80211_scan_completed_finish
    so that we are protected when calling hw_config(), etc.

    * Pass probe-responses up the stack if scanning on local
    channel, so that mlme can take a look.

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

    Ben Greear
     

18 Dec, 2010

1 commit


14 Dec, 2010

1 commit

  • On suspend, there might be usb wireless drivers which wrongly trigger
    the warning in ieee80211_work_work. If an usb driver doesn't have a
    suspend hook, the usb stack will disconnect the device. On disconnect,
    a mac80211 driver calls ieee80211_unregister_hw, which calls dev_close,
    which calls ieee80211_stop, and in the end calls ieee80211_work_purge->
    ieee80211_work_work.

    The problem is that this call to ieee80211_work_purge comes after
    mac80211 is suspended, triggering the warning even when we don't have
    work queued in work_list (the expected case when already suspended),
    because it always calls ieee80211_work_work.

    So, just call ieee80211_work_work in ieee80211_work_purge if we really
    have to abort work. This addresses the warning reported at
    https://bugzilla.kernel.org/show_bug.cgi?id=24402

    Signed-off-by: Herton Ronaldo Krzesinski
    Signed-off-by: John W. Linville

    Herton Ronaldo Krzesinski
     

09 Dec, 2010

1 commit


30 Nov, 2010

1 commit

  • This implements the new off-channel TX API
    in mac80211 with a new work item type. The
    operation doesn't add a new work item when
    we're on the right channel and there's no
    wait time so that for example p2p probe
    responses will be transmitted without delay.

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

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
     

18 Jun, 2010

1 commit


17 Jun, 2010

1 commit


03 Jun, 2010

1 commit


18 May, 2010

2 commits


13 May, 2010

1 commit

  • When we process a frame, we currently just match it
    to the work struct by the MAC addresses, and not by
    the work type. This means that we can end up doing
    the work for an association request item when (for
    whatever reason) we receive another frame type, for
    example a probe response. Processing the wrong type
    of frame will lead to completely invalid data being
    processed, and will lead to various problems like
    thinking the association was successful even if the
    AP never sent an assocation response.

    Fix this by making each processing function check
    that it is invoked for the right work struct type
    only and continue processing otherwise (and drop
    frames that we didn't expect).

    This bug was uncovered during the debugging for
    https://bugzilla.kernel.org/show_bug.cgi?id=15862
    but doesn't seem to be the cause for any of the
    various problems reported there.

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

    Johannes Berg
     

06 May, 2010

1 commit


29 Apr, 2010

1 commit


16 Apr, 2010

1 commit


10 Apr, 2010

1 commit

  • As scan_work is queued from work_work it needs to be checked if scan
    has been started during execution of work_work. Otherwise, when hw
    scan is used, the stack gets error about hw being busy with ongoing
    scan. This causes the stack to abort scan without notifying the driver
    about it. This leads to a situation where the hw is scanning and the stack
    thinks it's not. Then when the scan finishes, the stack will complain by
    warnings.

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

    Teemu Paasikivi
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

27 Feb, 2010

1 commit

  • If authentication has already been performed when the WLAN interface is
    stopped, (sometimes) the ieee80211_work_purge would corrupt some
    ieee80211_work-structures. The outcome is this (cleaned up):

    [ 2252.398681] WARNING: at net/mac80211/work.c:995 ieee80211_work_purge
    [ 2252.466430] Backtrace:
    [ 2252.529266] (ieee80211_work_purge+0x0/0xcc [mac80211])
    [ 2252.546875] (ieee80211_stop+0x0/0x4c0 [mac80211])

    Additionally, one would get this, going on regarless of the WLAN interface
    state, going on forever:

    [ 2252.859985] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717525)
    [ 2253.055419] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717524)
    [ 2253.250610] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717523)
    [ 2253.446014] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717522)
    [ 2253.641357] wlan0: direct probe to 00:90:4c:60:04:00 (try -996717521)

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

    Juuso Oikarinen
     

26 Jan, 2010

1 commit

  • Currently, the remain_on_channel work callback needs
    to track in its own data structure whether the work
    was just started or not. By reordering some code this
    becomes unnecessary, the generic wk->started variable
    can still be 'false' on the first invocation and only
    be 'true' on actual timeout invocations, so that the
    extra variable can be removed.

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

    Johannes Berg