1. 22 4月, 2010 1 次提交
  2. 08 4月, 2010 1 次提交
    • J
      cfg80211: Add local-state-change-only auth/deauth/disassoc · d5cdfacb
      Jouni Malinen 提交于
      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: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d5cdfacb
  3. 25 3月, 2010 1 次提交
    • J
      cfg80211: Add connection quality monitoring support to nl80211 · d6dc1a38
      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: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d6dc1a38
  4. 20 2月, 2010 1 次提交
    • K
      nl80211: add power save commands · ffb9eb3d
      Kalle Valo 提交于
      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: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ffb9eb3d
  5. 16 2月, 2010 1 次提交
    • J
      cfg80211/mac80211: allow registering for and sending action frames · 026331c4
      Jouni Malinen 提交于
      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: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      026331c4
  6. 09 2月, 2010 1 次提交
  7. 27 1月, 2010 1 次提交
  8. 23 1月, 2010 1 次提交
    • J
      cfg80211: export multiple MAC addresses in sysfs · ef15aac6
      Johannes Berg 提交于
      If a device has multiple MAC addresses, userspace will
      need to know about that. Similarly, if it allows the
      MAC addresses to vary by a bitmask.
      
      If a driver exports multiple addresses, it is assumed
      that it will be able to deal with that many different
      addresses, which need not necessarily match the ones
      programmed into the device; if a mask is set then the
      device should deal addresses within that mask based
      on an arbitrary "base address".
      
      To test it all and show how it is used, add support
      to hwsim even though it can't actually deal with
      addresses different from the default.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ef15aac6
  9. 13 1月, 2010 4 次提交
    • J
      cfg80211: Store IEs from both Beacon and Probe Response frames · 34a6eddb
      Jouni Malinen 提交于
      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: NJouni Malinen <j@w1.fi>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      34a6eddb
    • J
      nl80211: New command for setting TX rate mask for rate control · 13ae75b1
      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: NJouni Malinen <jouni.malinen@atheros.com>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      13ae75b1
    • J
      cfg80211/mac80211: Use more generic bitrate mask for rate control · 37eb0b16
      Jouni Malinen 提交于
      Extend struct cfg80211_bitrate_mask to actually use a bitfield mask
      instead of just a single fixed or maximum rate index. This change
      itself does not modify the behavior (except for debugfs files), but it
      prepares cfg80211 and mac80211 for a new nl80211 command for setting
      which rates can be used in TX rate control.
      
      Since frames are now going through the rate control algorithm
      unconditionally, the internal IEEE80211_TX_INTFL_RCALGO flag can now
      be removed. The RC implementations can use the rate_idx_mask value to
      optimize their behavior if only a single rate is enabled.
      
      The old max_rate_idx in struct ieee80211_tx_rate_control is maintained
      (but commented as deprecated) for backwards compatibility with existing
      RC implementations. Once these implementations have been updated to
      use the more generic rate_idx_mask, the max_rate_idx value can be
      removed.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      37eb0b16
    • L
      nl80211: Add new WIPHY attribute COVERAGE_CLASS · 81077e82
      Lukáš Turek 提交于
      The new attribute NL80211_ATTR_WIPHY_COVERAGE_CLASS sets IEEE 802.11
      Coverage Class, which depends on maximum distance of nodes in a
      wireless network. It's required for long distance links (more than a few
      hundred meters).
      
      The attribute is now ignored by two non-mac80211 drivers, rndis and
      iwmc3200wifi, together with WIPHY_PARAM_RETRY_SHORT and
      WIPHY_PARAM_RETRY_LONG. If it turns out to be a problem, we could split
      set_wiphy_params callback or add new capability bits.
      Signed-off-by: NLukas Turek <8an@praha12.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      81077e82
  10. 29 12月, 2009 2 次提交
  11. 23 12月, 2009 1 次提交
  12. 29 11月, 2009 1 次提交
  13. 20 11月, 2009 3 次提交
  14. 14 11月, 2009 3 次提交
  15. 12 11月, 2009 1 次提交
  16. 28 10月, 2009 1 次提交
  17. 08 10月, 2009 2 次提交
    • K
      cfg80211: add firmware and hardware version to wiphy · dfce95f5
      Kalle Valo 提交于
      It's useful to provide firmware and hardware version to user space and have a
      generic interface to retrieve them. Users can provide the version information
      in bug reports etc.
      
      Add fields for firmware and hardware version to struct wiphy.
      
      (Dropped nl80211 bits for now and modified remaining bits in favor of
      ethtool. -- JWL)
      
      Cc: Kalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      dfce95f5
    • J
      wext: refactor · 3d23e349
      Johannes Berg 提交于
      Refactor wext to
       * split out iwpriv handling
       * split out iwspy handling
       * split out procfs support
       * allow cfg80211 to have wireless extensions compat code
         w/o CONFIG_WIRELESS_EXT
      
      After this, drivers need to
       - select WIRELESS_EXT	- for wext support
       - select WEXT_PRIV	- for iwpriv support
       - select WEXT_SPY	- for iwspy support
      
      except cfg80211 -- which gets new hooks in wext-core.c
      and can then get wext handlers without CONFIG_WIRELESS_EXT.
      
      Wireless extensions procfs support is auto-selected
      based on PROC_FS and anything that requires the wext core
      (i.e. WIRELESS_EXT or CFG80211_WEXT).
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3d23e349
  18. 20 8月, 2009 1 次提交
  19. 14 8月, 2009 5 次提交
  20. 05 8月, 2009 1 次提交
  21. 04 8月, 2009 1 次提交
    • L
      cfg80211: fix regression on beacon world roaming feature · 37184244
      Luis R. Rodriguez 提交于
      A regression was added through patch a4ed90d6:
      
      "cfg80211: respect API on orig_flags on channel for beacon hint"
      
      We did indeed respect _orig flags but the intention was not clearly
      stated in the commit log. This patch fixes firmware issues picked
      up by iwlwifi when we lift passive scan of beaconing restrictions
      on channels its EEPROM has been configured to always enable.
      
      By doing so though we also disallowed beacon hints on devices
      registering their wiphy with custom world regulatory domains
      enabled, this happens to be currently ath5k, ath9k and ar9170.
      The passive scan and beacon restrictions on those devices would
      never be lifted even if we did find a beacon and the hardware did
      support such enhancements when world roaming.
      
      Since Johannes indicates iwlwifi firmware cannot be changed to
      allow beacon hinting we set up a flag now to specifically allow
      drivers to disable beacon hints for devices which cannot use them.
      
      We enable the flag on iwlwifi to disable beacon hints and by default
      enable it for all other drivers. It should be noted beacon hints lift
      passive scan flags and beacon restrictions when we receive a beacon from
      an AP on any 5 GHz non-DFS channels, and channels 12-14 on the 2.4 GHz
      band. We don't bother with channels 1-11 as those channels are allowed
      world wide.
      
      This should fix world roaming for ath5k, ath9k and ar9170, thereby
      improving scan time when we receive the first beacon from any AP,
      and also enabling beaconing operation (AP/IBSS/Mesh) on cards which
      would otherwise not be allowed to do so. Drivers not using custom
      regulatory stuff (wiphy_apply_custom_regulatory()) were not affected
      by this as the orig_flags for the channels would have been cleared
      upon wiphy registration.
      
      I tested this with a world roaming ath5k card.
      
      Cc: Jouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      37184244
  22. 30 7月, 2009 3 次提交
  23. 28 7月, 2009 1 次提交
    • J
      cfg80211: make aware of net namespaces · 463d0183
      Johannes Berg 提交于
      In order to make cfg80211/nl80211 aware of network namespaces,
      we have to do the following things:
      
       * del_virtual_intf method takes an interface index rather
         than a netdev pointer - simply change this
      
       * nl80211 uses init_net a lot, it changes to use the sender's
         network namespace
      
       * scan requests use the interface index, hold a netdev pointer
         and reference instead
      
       * we want a wiphy and its associated virtual interfaces to be
         in one netns together, so
          - we need to be able to change ns for a given interface, so
            export dev_change_net_namespace()
          - for each virtual interface set the NETIF_F_NETNS_LOCAL
            flag, and clear that flag only when the wiphy changes ns,
            to disallow breaking this invariant
      
       * when a network namespace goes away, we need to reparent the
         wiphy to init_net
      
       * cfg80211 users that support creating virtual interfaces must
         create them in the wiphy's namespace, currently this affects
         only mac80211
      
      The end result is that you can now switch an entire wiphy into
      a different network namespace with the new command
      	iw phy#<idx> set netns <pid>
      and all virtual interfaces will follow (or the operation fails).
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      463d0183
  24. 25 7月, 2009 2 次提交
    • H
      cfg80211: update misleading comment · ca3dbc20
      Helmut Schaa 提交于
      In cfg80211_scan_request n_channels refers to the total number
      of channels to scan. Update the misleading comment accordingly.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ca3dbc20
    • J
      cfg80211: rework key operation · fffd0934
      Johannes Berg 提交于
      This reworks the key operation in cfg80211, and now only
      allows, from userspace, configuring keys (via nl80211)
      after the connection has been established (in managed
      mode), the IBSS been joined (in IBSS mode), at any time
      (in AP[_VLAN] modes) or never for all the other modes.
      
      In order to do shared key authentication correctly, it
      is now possible to give a WEP key to the AUTH command.
      To configure static WEP keys, these are given to the
      CONNECT or IBSS_JOIN command directly, for a userspace
      SME it is assumed it will configure it properly after
      the connection has been established.
      
      Since mac80211 used to check the default key in IBSS
      mode to see whether or not the network is protected,
      it needs an update in that area, as well as an update
      to make use of the WEP key passed to auth() for shared
      key authentication.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      fffd0934