16 Dec, 2011

1 commit

  • Station entries can have various states, the most
    important ones being auth, assoc and authorized.
    This patch prepares us for telling the driver about
    these states, we don't want to confuse drivers with
    strange transitions, so with this we enforce that
    they move in the right order between them (back and
    forth); some transitions might happen before the
    driver even knows about the station, but at least
    runtime transitions will be ordered correctly.

    As a consequence, IBSS and MESH stations will now
    have the ASSOC flag set (so they can transition to
    AUTHORIZED), and we can get rid of a special case
    in TX processing.

    When freeing a station, unwind the state so that
    other parts of the code (or drivers later) can rely
    on the transitions.

    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
     

09 Nov, 2011

3 commits


01 Oct, 2011

2 commits

  • The flaglock in struct sta_info has long been
    something that I wanted to get rid of, this
    finally does the conversion to atomic bitops.

    The conversion itself is straight-forward in
    most places, a few things needed to change a
    bit since we can no longer use multiple bits
    at the same time.

    On x86-64, this is a fairly significant code
    size reduction:
    text data bss dec hex
    427861 23648 1008 452517 6e7a5 before
    425383 23648 976 450007 6ddd7 after

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

    Johannes Berg
     
  • Relocate the mesh implementation of adding the (extended) supported
    rates IE to util.c, anticipating its use by other parts of mac80211.

    Signed-off-by: Arik Nemtsov
    Cc: Kalyan C Gaddam
    Signed-off-by: John W. Linville

    Arik Nemtsov
     

22 Sep, 2011

1 commit


15 Sep, 2011

1 commit


23 Aug, 2011

3 commits

  • This patch updates the mesh peering frames to the format specified in
    the recently ratified 802.11s standard. Several changes took place to
    make this happen:

    - Change RX path to handle new self-protected frames
    - Add new Peering management IE
    - Remove old Peer Link IE
    - Remove old plink_action field in ieee80211_mgmt header

    These changes by themselves would either break peering, or work by
    coincidence, so squash them all into this patch.

    Signed-off-by: Thomas Pedersen
    Signed-off-by: John W. Linville

    Thomas Pedersen
     
  • Have the mesh peering frames use the self-protected action and reason codes
    specified in 802.11s and defined in ieee80211.h. Remove the local enums.

    Signed-off-by: Thomas Pedersen
    Signed-off-by: John W. Linville

    Thomas Pedersen
     
  • Correct ordering of IEs in the mesh beacon while removing unneeded IEs
    from mesh peering frames. Set privacy bit in capability info if security
    is enabled. Add utility functions to aid in construction
    of IEs and reduce code duplication.

    Signed-off-by: Thomas Pedersen
    Signed-off-by: John W. Linville

    Thomas Pedersen
     

17 May, 2011

1 commit


12 May, 2011

3 commits

  • Previous versions of 11s draft used the all zeroes address. Current
    draft uses the same address as address 2.

    Also, use the ANA-approved action category code for peer establishment frames.

    Note: This breaks compatibility with previous mesh protocol instances.

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

    Javier Cardona
     
  • Note: This breaks compatibility with previous mesh protocol instances.

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

    Javier Cardona
     
  • Introduce a new configuration option to support AMPE from userspace.

    Prior to this series we only supported authentication in userspace: an
    authentication daemon would authenticate peer candidates in userspace
    and hand them over to the kernel. From that point the mesh stack would
    take over and establish a peer link (Mesh Peering Management).

    These patches introduce support for Authenticated Mesh Peering Exchange
    in userspace. The userspace daemon implements the AMPE protocol and on
    successfull completion create mesh peers and install encryption keys.

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

    Javier Cardona
     

13 Apr, 2011

5 commits


21 Dec, 2010

1 commit

  • Userspace will now be allowed to toggle between the default path
    selection algorithm (HWMP, implemented in the kernel), and a vendor
    specific alternative. Also in the same patch, allow userspace to add
    information elements to mesh beacons. This is accordance with the
    Extensible Path Selection Framework specified in version 7.0 of the
    802.11s draft.

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

    Javier Cardona
     

12 Oct, 2010

1 commit

  • This patch not only fixes a null-pointer de-reference
    that would be triggered by a PLINK_OPEN frame with mis-
    matching/incompatible mesh configuration, but also
    responds correctly to non-compatible PLINK_OPEN frames
    by generating a PLINK_CLOSE with the right reason code.

    The original bug was detected by smatch.
    ( http://repo.or.cz/w/smatch.git )

    net/mac80211/mesh_plink.c +574 mesh_rx_plink_frame(168)
    error: we previously assumed 'sta' could be null.

    Cc:
    Reviewed-and-Tested-by: Steve deRosier
    Reviewed-and-Tested-by: Javier Cardona
    Acked-by: Johannes Berg
    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     

25 Jun, 2010

1 commit

  • While mesh_rx_plink_frame holds sta->lock...

    mesh_rx_plink_frame ->
    mesh_plink_inc_estab_count ->
    ieee80211_bss_info_change_notify

    ...but ieee80211_bss_info_change_notify is allowed to sleep. A driver
    taking advantage of that allowance can cause a scheduling while
    atomic bug. Similar paths exist for mesh_plink_dec_estab_count,
    so work around those as well.

    http://bugzilla.kernel.org/show_bug.cgi?id=16099

    Also, correct a minor kerneldoc comment error (mismatched function names).

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

    John W. Linville
     

16 Apr, 2010

1 commit


09 Apr, 2010

1 commit


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
     

08 Mar, 2010

1 commit


09 Feb, 2010

2 commits

  • In particular, several occurances of funny versions of 'success',
    'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
    'beginning', 'desirable', 'separate' and 'necessary' are fixed.

    Signed-off-by: Daniel Mack
    Cc: Joe Perches
    Cc: Junio C Hamano
    Signed-off-by: Jiri Kosina

    Daniel Mack
     
  • Many drivers would like to sleep during station
    addition and removal, and currently have a high
    complexity there from not being able to.

    This introduces two new callbacks sta_add() and
    sta_remove() that drivers can implement instead
    of using sta_notify() and that can sleep, and
    the new sta_add() callback is also allowed to
    fail.

    The reason we didn't do this previously is that
    the IBSS code wants to insert stations from the
    RX path, which is a tasklet, so cannot sleep.
    This patch will keep the station allocation in
    that path, but moves adding the station to the
    driver out of line. Since the addition can now
    fail, we can have IBSS peer structs the driver
    rejected -- in that case we still talk to the
    station but never tell the driver about it in
    the control.sta pointer. If there will ever be
    a driver that has a low limit on the number of
    stations and that cannot talk to any stations
    that are not known to it, we need to do come up
    with a new strategy of handling larger IBSSs,
    maybe quicker expiry or rejecting peers.

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

    Johannes Berg
     

22 Dec, 2009

2 commits

  • For bluetooth 3, we will most likely not have
    a netdev for a virtual interface (sdata), so
    prepare for that by reducing the reliance on
    having a netdev. This patch moves the name
    and address fields into the sdata struct and
    uses them from there all over. Some work is
    needed to keep them sync'ed, but that's not
    a lot of work and in slow paths anyway.

    In doing so, this also reduces the number of
    pointer dereferences in many places, because
    of things like sdata->dev->dev_addr becoming
    sdata->vif.addr.

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

    Johannes Berg
     
  • The station management currently uses the virtual
    interface, but you cannot add the same station to
    multiple virtual interfaces if you're communicating
    with it in multiple ways.

    This restriction should be lifted so that in the
    future we can, for instance, support bluetooth 3
    with an access point that mac80211 is already
    associated to.

    We can do that by requiring all sta_info_get users
    to provide the virtual interface and making the RX
    code aware that an address may match more than one
    station struct. Thanks to the previous patches this
    one isn't all that large and except for the RX and
    TX status paths changes has low complexity.

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

    Johannes Berg
     

19 Nov, 2009

1 commit


14 Nov, 2009

2 commits


12 Nov, 2009

4 commits


14 Aug, 2009

1 commit