22 May, 2010

3 commits

  • Specifying a valid channel type will get
    goto out rather than continuing, due to
    missing braces. This affects both remain
    on channel and action frame TX commands.

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

    Johannes Berg
     
  • Since wdev can be NULL, check it before dereferencing it

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

    Felix Fietkau
     
  • signal_type is enum cfg80211_signal_type.

    This fixes the gcc warning:

    scan.c: In function `cfg80211_inform_bss':
    scan.c:518:6: warning: comparison between `enum cfg80211_signal_type' and `enum nl80211_bss'
    scan.c: In function `cfg80211_inform_bss_frame':
    scan.c:574:6: warning: comparison between `enum cfg80211_signal_type' and `enum nl80211_bss'

    Signed-off-by: Sujith
    Signed-off-by: John W. Linville

    Sujith
     

12 May, 2010

1 commit


08 May, 2010

1 commit

  • Currently (all tested with hwsim) you can do stupid
    things like setting up an AP on a certain channel,
    then adding another virtual interface and making
    that associate on another channel -- this will make
    the beaconing to move channel but obviously without
    the necessary IEs data update.

    In order to improve this situation, first make the
    configuration APIs (cfg80211 and nl80211) aware of
    multi-channel operation -- we'll eventually need
    that in the future anyway. There's one userland API
    change and one API addition. The API change is that
    now SET_WIPHY must be called with virtual interface
    index rather than only wiphy index in order to take
    effect for that interface -- luckily all current
    users (hostapd) do that. For monitor interfaces, the
    old setting is preserved, but monitors are always
    slaved to other devices anyway so no guarantees.

    The second userland API change is the introduction
    of a per virtual interface SET_CHANNEL command, that
    hostapd should use going forward to make it easier
    to understand what's going on (it can automatically
    detect a kernel with this command).

    Other than mac80211, no existing cfg80211 drivers
    are affected by this change because they only allow
    a single virtual interface.

    mac80211, however, now needs to be aware that the
    channel settings are per interface now, and needs
    to disallow (for now) real multi-channel operation,
    which is another important part of this patch.

    One of the immediate benefits is that you can now
    start hostapd to operate on a hardware that already
    has a connection on another virtual interface, as
    long as you specify the same channel.

    Note that two things are left unhandled (this is an
    improvement -- not a complete fix):

    * different HT/no-HT modes

    currently you could start an HT AP and then
    connect to a non-HT network on the same channel
    which would configure the hardware for no HT;
    that can be fixed fairly easily

    * CSA

    An AP we're connected to on a virtual interface
    might indicate switching channels, and in that
    case we would follow it, regardless of how many
    other interfaces are operating; this requires
    more effort to fix but is pretty rare after all

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

    Johannes Berg
     

06 May, 2010

1 commit


28 Apr, 2010

2 commits


24 Apr, 2010

1 commit


17 Apr, 2010

1 commit

  • In a scenario, where a cfg80211 driver (station mode) does not send assoc request
    and assoc response IEs in cfg80211_connect_result after a successful association
    to an AP, cfg80211 sends IWEVASSOCREQIE and IWEVASSOCRESPIE to the user space
    application with NULL data. This can cause an issue at the event recipient.

    An example of this is when cfg80211 sends IWEVASSOCREQIE and IWEVASSOCRESPIE
    events with NULL event body to wpa_supplicant. The wpa_supplicant overwrites
    the assoc request and assoc response IEs for this station with NULL data.
    If the association is WPA/WPA2, the wpa_supplicant is not able to generate
    EAPOL handshake messages, since the IEs are NULL.

    With the patch, req_ie and resp_ie will be NULL by avoiding the
    assignment if the driver has not sent the IEs to cfg80211. The event sending
    code sends the events only if resp_ie and req_ie are not NULL. This
    will ensure that the events are not sent with NULL event body.

    Signed-off-by: Nishant Sarmukadam
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Nishant Sarmukadam
     

16 Apr, 2010

1 commit


12 Apr, 2010

1 commit


09 Apr, 2010

1 commit


08 Apr, 2010

1 commit

  • cfg80211 is quite strict on allowing authentication and association
    commands only in certain states. In order to meet these requirements,
    user space applications may need to clear authentication or
    association state in some cases. Currently, this can be done with
    deauth/disassoc command, but that ends up sending out Deauthentication
    or Disassociation frame unnecessarily. Add a new nl80211 attribute to
    allow this sending of the frame be skipped, but with all other
    deauth/disassoc operations being completed.

    Similar state change is also needed for IEEE 802.11r FT protocol in
    the FT-over-DS case which does not use Authentication frame exchange
    in a transition to another BSS. For this to work with cfg80211, an
    authentication entry needs to be created for the target BSS without
    sending out an Authentication frame. The nl80211 authentication
    command can be used for this purpose, too, with the new attribute to
    indicate that the command is only for changing local state. This
    enables wpa_supplicant to complete FT-over-DS transition successfully.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville

    Jouni Malinen
     

07 Apr, 2010

1 commit


06 Apr, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
    smc91c92_cs: fix the problem of "Unable to find hardware address"
    r8169: clean up my printk uglyness
    net: Hook up cxgb4 to Kconfig and Makefile
    cxgb4: Add main driver file and driver Makefile
    cxgb4: Add remaining driver headers and L2T management
    cxgb4: Add packet queues and packet DMA code
    cxgb4: Add HW and FW support code
    cxgb4: Add register, message, and FW definitions
    netlabel: Fix several rcu_dereference() calls used without RCU read locks
    bonding: fix potential deadlock in bond_uninit()
    net: check the length of the socket address passed to connect(2)
    stmmac: add documentation for the driver.
    stmmac: fix kconfig for crc32 build error
    be2net: fix bug in vlan rx path for big endian architecture
    be2net: fix flashing on big endian architectures
    be2net: fix a bug in flashing the redboot section
    bonding: bond_xmit_roundrobin() fix
    drivers/net: Add missing unlock
    net: gianfar - align BD ring size console messages
    net: gianfar - initialize per-queue statistics
    ...

    Linus Torvalds
     

01 Apr, 2010

3 commits


31 Mar, 2010

1 commit

  • Stanse discovered that kmalloc is being called with GFP_KERNEL while
    holding this spinlock. The spinlock can be a mutex instead, which also
    enables the removal of the unlock/lock around the lock/unlock of
    cfg80211_mutex and the call to set_regdom.

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

    John W. Linville
     

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
     

25 Mar, 2010

1 commit

  • Add support for basic configuration of a connection quality monitoring to the
    nl80211 interface, and basic support for notifying about triggered monitoring
    events.

    Via this interface a user-space connection manager may configure and receive
    pre-warning events of deteriorating WLAN connection quality, and start
    preparing for roaming in advance, before the connection is already lost.

    An example usage of such a trigger is starting scanning for nearby AP's in
    an attempt to find one with better connection quality, and associate to it
    before the connection characteristics of the existing connection become too bad
    or the association is even lost, leading in a prolonged delay in connectivity.

    The interface currently supports only RSSI, but it could be later extended
    to include other parameters, such as signal-to-noise ratio, if need for that
    arises.

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

    Juuso Oikarinen
     

24 Mar, 2010

2 commits


26 Feb, 2010

1 commit


20 Feb, 2010

1 commit

  • The most needed command from nl80211, which Wireless Extensions had,
    is support for power save mode. Add a simple command to make it possible
    to enable and disable power save via nl80211.

    I was also planning about extending the interface, for example adding the
    timeout value, but after thinking more about this I decided not to do it.
    Basically there were three reasons:

    Firstly, the parameters for power save are very much hardware dependent.
    Trying to find a unified interface which would work with all hardware, and
    still make sense to users, will be very difficult.

    Secondly, IEEE 802.11 power save implementation in Linux is still in state
    of flux. We have a long way to still to go and there is no way to predict
    what kind of implementation we will have after few years. And because we
    need to support nl80211 interface a long time, practically forever, adding
    now parameters to nl80211 might create maintenance problems later on.

    Third issue are the users. Power save parameters are mostly used for
    debugging, so debugfs is better, more flexible, interface for this.
    For example, wpa_supplicant currently doesn't configure anything related
    to power save mode. It's better to strive that kernel can automatically
    optimise the power save parameters, like with help of pm qos network
    and other traffic parameters.

    Later on, when we have better understanding of power save, we can extend
    this command with more features, if there's a need for that.

    Signed-off-by: Kalle Valo
    Signed-off-by: John W. Linville

    Kalle Valo
     

19 Feb, 2010

1 commit


16 Feb, 2010

2 commits

  • This implements a new command to register for action frames
    that userspace wants to handle instead of the in-kernel
    rejection. It is then responsible for rejecting ones that
    it decided not to handle. There is no unregistration, but
    the socket can be closed for that.

    Frames that are not registered for will not be forwarded
    to userspace and will be rejected by the kernel, the
    cfg80211 API helps implementing that.

    Additionally, this patch adds a new command that allows
    doing action frame transmission from userspace. It can be
    used either to exchange action frames on the current
    operational channel (e.g., with the AP with which we are
    currently associated) or to exchange off-channel Public
    Action frames with the remain-on-channel command.

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

    Jouni Malinen
     
  • As discussed in linux-wireless mailing list, adding and removing
    stations for mesh topologies is not necessary. Since doing it triggers
    bugs, the sugestion was to simply disable it.

    Tested using a custom iw command "station new". Works only after using
    hostapd. "station del" command also works.

    Signed-off-by: Thadeu Lima de Souza Cascardo
    Cc: Johannes Berg
    Cc: Simon Raffeiner
    Cc: Andrey Yurovsky
    Cc: Javier Cardona
    Signed-off-by: John W. Linville

    Thadeu Lima de Souza Cascardo
     

15 Feb, 2010

1 commit


09 Feb, 2010

1 commit

  • Upstream radiotap has adopted the namespace
    proposal David Young made and I then took care
    of, for which I had adapted the radiotap parser
    as a library outside the kernel. This brings
    the in-kernel parser up to speed.

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

    Johannes Berg
     

05 Feb, 2010

1 commit


03 Feb, 2010

2 commits


02 Feb, 2010

2 commits

  • This adds a new regulatory hint to be used when we know all
    devices have been disconnected and idle. This can happen
    when we suspend, for instance. When we disconnect we can
    no longer assume the same regulatory rules learned from
    a country IE or beacon hints are applicable so restore
    regulatory settings to an initial state.

    Since driver hints are cached on the wiphy that called
    the hint, those hints are not reproduced onto cfg80211
    as the wiphy will respect its own wiphy->regd regardless.

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

    Luis R. Rodriguez
     
  • When cfg80211 starts it will send a core regulatory hint. This is
    sent to the global workqueue but we force processing of it by
    flushing the global workqueue. The flushing was done since
    cfg80211 needs last_request to always be populated.

    Avoid flushing the global workqueue by processing the work
    required immediately instead of putting it into a linked
    list and processing it after the flush.

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

    Luis R. Rodriguez
     

28 Jan, 2010

1 commit


27 Jan, 2010

1 commit


23 Jan, 2010

2 commits