11 Jan, 2011

1 commit


21 Dec, 2010

3 commits


17 Dec, 2010

1 commit

  • Add a new notification to indicate that a received, unprotected
    Deauthentication or Disassociation frame was dropped due to
    management frame protection being in use. This notification is
    needed to allow user space (e.g., wpa_supplicant) to implement
    SA Query procedure to recover from association state mismatch
    between an AP and STA.

    This is needed to avoid getting stuck in non-working state when MFP
    (IEEE 802.11w) is used and a protected Deauthentication or
    Disassociation frame is dropped for any reason. After that, the
    station would silently discard any unprotected Deauthentication or
    Disassociation frame that could be indicating that the AP does not
    have association for the STA (when the Reason Code would be 6 or 7).
    IEEE Std 802.11w-2009, 11.13 describes this recovery mechanism.

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

    Jouni Malinen
     

16 Dec, 2010

1 commit


14 Dec, 2010

1 commit

  • Allow userspace to specify that a given key
    is default only for unicast and/or multicast
    transmissions. Only WEP keys are for both,
    WPA/RSN keys set here are GTKs for multicast
    only. For more future flexibility, allow to
    specify all combiations.

    Wireless extensions can only set both so use
    nl80211; WEP keys (connect keys) must be set
    as default for both (but 802.1X WEP is still
    possible).

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

    Johannes Berg
     

09 Dec, 2010

1 commit


08 Dec, 2010

1 commit

  • Extend nl80211 to report an exponential weighted moving average (EWMA) of the
    signal value. Since the signal value usually fluctuates between different
    packets, an average can be more useful than the value of the last packet.

    This uses the recently added generic EWMA library function.

    --
    v2: fix ABI breakage and change factor to be a power of 2.

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     

07 Dec, 2010

2 commits

  • Instead of tying mesh activity to interface up,
    add join and leave commands for mesh. Since we
    must be backward compatible, let cfg80211 handle
    joining a mesh if a mesh ID was pre-configured
    when the device goes up.

    Note that this therefore must modify mac80211 as
    well since mac80211 needs to lose the logic to
    start the mesh on interface up.

    We now allow querying mesh parameters before the
    mesh is connected, which simply returns defaults.
    Setting them (internally renamed to "update") is
    only allowed while connected. Specify them with
    the new mesh join command instead where needed.

    In mac80211, beaconing must now also follow the
    mesh enabled/not enabled state, which is done
    by testing the mesh ID.

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

    Johannes Berg
     
  • The TTL in path selection information elements is different from
    the mesh ttl used in mesh data frames. Version 7.03 of the 11s
    draft calls this ttl 'Element TTL'.

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

    Javier Cardona
     

30 Nov, 2010

1 commit

  • With p2p, it is sometimes necessary to transmit
    a frame (typically an action frame) on another
    channel than the current channel. Enable this
    through the CMD_FRAME API, and allow it to wait
    for a response. A new command allows that wait
    to be aborted.

    However, allow userspace to specify whether or
    not it wants to allow off-channel TX, it may
    actually want to use the same channel only.

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

    Johannes Berg
     

25 Nov, 2010

2 commits


19 Nov, 2010

1 commit

  • Extend nl80211 to report an exponential weighted moving average (EWMA) of the
    signal value. Since the signal value usually fluctuates between different
    packets, an average can be more useful than the value of the last packet.

    This uses the recently added generic EWMA library function.

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     

17 Nov, 2010

2 commits

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

    Felix Fietkau
     
  • Allow setting of TX and RX antennas configuration via nl80211.

    The antenna configuration is defined as a bitmap of allowed antennas to use.
    This API can be used to mask out antennas which are not attached or should not
    be used for other reasons like regulatory concerns or special setups.

    Separate bitmaps are used for RX and TX to allow configuring different antennas
    for receiving and transmitting. Each bitmap is 32 bit long, each bit
    representing one antenna, starting with antenna 1 at the first bit. If an
    antenna bit is set, this means the driver is allowed to use this antenna for RX
    or TX respectively; if the bit is not set the hardware is not allowed to use
    this antenna.

    Using bitmaps has the benefit of allowing for a flexible configuration
    interface which can support many different configurations and which can be used
    for 802.11n as well as non-802.11n devices. Instead of relying on some hardware
    specific assumptions, drivers can use this information to know which antennas
    are actually attached to the system and derive their capabilities based on
    that.

    802.11n devices should enable or disable chains, based on which antennas are
    present (If all antennas belonging to a particular chain are disabled, the
    entire chain should be disabled). HT capabilities (like STBC, TX Beamforming,
    Antenna selection) should be calculated based on the available chains after
    applying the antenna masks. Should a 802.11n device have diversity antennas
    attached to one of their chains, diversity can be enabled or disabled based on
    the antenna information.

    Non-802.11n drivers can use the antenna masks to select RX and TX antennas and
    to enable or disable antenna diversity.

    While covering chainmasks for 802.11n and the standard "legacy" modes "fixed
    antenna 1", "fixed antenna 2" and "diversity" this API also allows more rare,
    but useful configurations as follows:

    1) Send on antenna 1, receive on antenna 2 (or vice versa). This can be used to
    have a low gain antenna for TX in order to keep within the regulatory
    constraints and a high gain antenna for RX in order to receive weaker signals
    ("speak softly, but listen harder"). This can be useful for building long-shot
    outdoor links. Another usage of this setup is having a low-noise pre-amplifier
    on antenna 1 and a power amplifier on the other antenna. This way transmit
    noise is mostly kept out of the low noise receive channel.
    (This would be bitmaps: tx 1 rx 2).

    2) Another similar setup is: Use RX diversity on both antennas, but always send
    on antenna 1. Again that would allow us to benefit from a higher gain RX
    antenna, while staying within the legal limits.
    (This would be: tx 0 rx 3).

    3) And finally there can be special experimental setups in research and
    development even with pre 802.11n hardware where more than 2 antennas are
    available. It's good to keep the API simple, yet flexible.

    Signed-off-by: Bruno Randolf

    --
    v7: Made bitmasks 32 bit wide and rebased to latest wireless-testing.
    Signed-off-by: John W. Linville

    Bruno Randolf
     

16 Nov, 2010

1 commit

  • After a module loads you will have loaded the world roaming regulatory
    domain or a custom regulatory domain. Further regulatory hints are
    welcomed and should be respected unless the regulatory hint is coming
    from a country IE as the IEEE spec allows for a country IE to be a subset
    of what is allowed by the local regulatory agencies.

    So disable all channels that do not fit a regulatory domain sent
    from a unless the hint is from a country IE and the country IE had
    no information about the band we are currently processing.

    This fixes a few regulatory issues, for example for drivers that depend
    on CRDA and had no 5 GHz freqencies allowed were not properly disabling
    5 GHz at all, furthermore it also allows users to restrict devices
    further as was intended.

    If you recieve a country IE upon association we will also disable the
    channels that are not allowed if the country IE had at least one
    channel on the respective band we are procesing.

    This was the original intention behind this design but it was
    completely overlooked...

    Cc: David Quan
    Cc: Jouni Malinen
    cc: Easwar Krishnan
    Cc: stable@kernel.org
    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     

12 Oct, 2010

1 commit


07 Oct, 2010

2 commits


06 Oct, 2010

3 commits


17 Sep, 2010

1 commit


28 Aug, 2010

1 commit

  • Some vendor specified mechanisms for 802.1X-style
    functionality use a different protocol than EAP
    (even if EAP is vendor-extensible). Allow setting
    the ethertype for the protocol when a driver has
    support for this. The default if unspecified is
    EAP, of course.

    Note: This is suitable only for station mode, not
    for AP implementation.

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

    Johannes Berg
     

25 Aug, 2010

2 commits

  • The nl80211 documentation is currently never
    generated, so problems have accumulated. Fix
    most of the trivial ones.

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

    Johannes Berg
     
  • Allow userspace to register for more than just
    action frames by giving the frame subtype, and
    make it possible to use this in various modes
    as well.

    With some tweaks and some added functionality
    this will, in the future, also be usable in AP
    mode and be able to replace the cooked monitor
    interface currently used in that case.

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

    Johannes Berg
     

25 Jun, 2010

2 commits

  • This patch adds transmit power setting type and transmit power level attributes
    to NL80211_CMD_SET_WIPHY in order to facilitate adjusting of the transmit power
    level of the device.

    The added attributes allow selection of automatic, limited or fixed transmit
    power level, with the level definable in signed mBm format.

    Signed-off-by: Juuso Oikarinen
    Signed-off-by: John W. Linville

    Juuso Oikarinen
     
  • In preparation for a TX power setting interface in the nl80211, change the
    .set_tx_power function to use mBm units instead of dBm for greater accuracy and
    smaller power levels.

    Also, already in advance move the tx_power_setting enumeration to nl80211.

    This change affects the .tx_set_power function prototype. As a result, the
    corresponding changes are needed to modules using it. These are mac80211,
    iwmc3200wifi and rndis_wlan.

    Cc: Samuel Ortiz
    Cc: Jussi Kivilinna
    Signed-off-by: Juuso Oikarinen
    Acked-by: Samuel Ortiz
    Acked-by: Jussi Kivilinna
    Signed-off-by: John W. Linville

    Juuso Oikarinen
     

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

28 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
     

25 Mar, 2010

2 commits

  • In nl80211.h, be a little more elaborate in the docs for the definitions
    NL80211_ATTR_CQM_RSSI_THOLD and NL80211_ATTR_CQM_RSSI_HYST.

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

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

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
     

16 Feb, 2010

1 commit

  • 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
     

13 Jan, 2010

2 commits

  • Store information elements from Beacon and Probe Response frames in
    separate buffers to allow both sets to be made available through
    nl80211. This allows user space applications to get access to IEs from
    Beacon frames even if we have received Probe Response frames from the
    BSS. Previously, the IEs from Probe Response frames would have
    overridden the IEs from Beacon frames.

    This feature is of somewhat limited use since most protocols include
    the same (or extended) information in Probe Response frames. However,
    there are couple of exceptions where the IEs from Beacon frames could
    be of some use: TIM IE is only included in Beacon frames (and it would
    be needed to figure out the DTIM period used in the BSS) and at least
    some implementations of Wireless Provisioning Services seem to include
    the full IE only in Beacon frames).

    The new BSS attribute for scan results is added to allow both the IE
    sets to be delivered. This is done in a way that maintains the
    previously used behavior for applications that are not aware of the
    new NL80211_BSS_BEACON_IES attribute.

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

    Jouni Malinen
     
  • Add a new NL80211_CMD_SET_TX_BITRATE_MASK command and related
    attributes to provide support for setting TX rate mask for rate
    control. This uses the existing cfg80211 set_bitrate_mask operation
    that was previously used only with WEXT compat code (SIOCSIWRATE). The
    nl80211 command allows more generic configuration of allowed rates as
    a mask instead of fixed/max rate.

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

    Jouni Malinen