1. 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
  2. 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
  3. 13 1月, 2010 3 次提交
    • 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
    • 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
  4. 29 12月, 2009 1 次提交
    • J
      cfg80211: add remain-on-channel command · 9588bbd5
      Jouni Malinen 提交于
      Add new commands for requesting the driver to remain awake
      on a specified channel for the specified amount of time
      (and another command to cancel such an operation). This
      can be used to implement userspace-controlled off-channel
      operations, like Public Action frame exchange on another
      channel than the operation channel.
      
      The off-channel operation should behave similarly to scan,
      i.e. the local station (if associated) moves into power
      save mode to request the AP to buffer frames for it and
      then moves to the other channel to allow the off-channel
      operation to be completed. The duration parameter can be
      used to request enough time to receive a response from
      the target station.
      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>
      9588bbd5
  5. 29 11月, 2009 1 次提交
  6. 14 11月, 2009 3 次提交
  7. 12 11月, 2009 1 次提交
  8. 08 10月, 2009 1 次提交
  9. 14 8月, 2009 1 次提交
    • J
      nl80211: add generation number to all dumps · f5ea9120
      Johannes Berg 提交于
      In order for userspace to be able to figure out whether
      it obtained a consistent snapshot of data or not when
      using netlink dumps, we need to have a generation number
      in each dump message that indicates whether the list has
      changed or not -- its value is arbitrary.
      
      This patch adds such a number to all dumps, this needs
      some mac80211 involvement to keep track of a generation
      number to start with when adding/removing mesh paths or
      stations.
      
      The wiphy and netdev lists can be fully handled within
      cfg80211, of course, but generation numbers need to be
      stored there as well.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f5ea9120
  10. 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
  11. 25 7月, 2009 3 次提交
    • J
      nl80211: report BSS status · 48ab905d
      Johannes Berg 提交于
      When connected to a BSS, or joined to an IBSS, we'll want
      to know in userspace without using wireless extensions, so
      report the BSS status in the BSS list. Userspace can query
      the BSS list, display all the information and retrieve the
      station information as well.
      
      For example (from hwsim):
      
      $ iw dev wlan1 scan dump
      BSS 02:00:00:00:00:00 (on wlan1) -- associated
      	freq: 2462
      	beacon interval: 100
      	capability: ESS ShortSlotTime (0x0401)
      	signal: -50.00 dBm
      	SSID: j
      	Supported rates: 1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0
      	DS Paramater set: channel 11
      	ERP: <no flags>
      	Extended supported rates: 24.0 36.0 48.0 54.0
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      48ab905d
    • 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
    • J
      nl80211: introduce new key attributes · b9454e83
      Johannes Berg 提交于
      We will soon want to nest key attributes into
      some new attribute for configuring static WEP
      keys at connect() and ibss_join() time, so we
      need nested attributes for that. However, key
      attributes right now are 'global'. This patch
      thus introduces new nested attributes for the
      key settings and functions for parsing them.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b9454e83
  12. 11 7月, 2009 3 次提交
    • J
      cfg80211: let SME control reassociation vs. association · 3e5d7649
      Johannes Berg 提交于
      Since we don't really know that well in the kernel,
      let's let the SME control whether it wants to use
      reassociation or not, by allowing it to give the
      previous BSSID in the associate() parameters.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3e5d7649
    • S
      cfg80211: connect/disconnect API · b23aa676
      Samuel Ortiz 提交于
      This patch introduces the cfg80211 connect/disconnect API.
      The goal here is to run the AUTH and ASSOC steps in one call.
      This is needed for some fullmac cards that run both steps
      directly from the target, after the host driver sends a
      connect command.
      
      Additionally, all the new crypto parameters for connect()
      are now also valid for associate() -- although associate
      requires the IEs to be used, the information can be useful
      for drivers and should be given.
      Signed-off-by: NSamuel Ortiz <samuel.ortiz@intel.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b23aa676
    • J
      cfg80211: introduce nl80211 testmode command · aff89a9b
      Johannes Berg 提交于
      This introduces a new NL80211_CMD_TESTMODE for testing
      and calibration use with nl80211. There's no multiplexing
      like like iwpriv had, and the command is not available by
      default, it needs to be explicitly enabled in Kconfig and
      shouldn't be enabled in most kernels.
      
      The command requires a wiphy index or interface index to
      identify the device to operate on, and the new TESTDATA
      attribute. There also is API for sending replies to the
      command, and testmode multicast messages (on a testmode
      multicast group).
      
      I've also updated mac80211 to be able to pass through the
      command to the driver, since it itself doesn't implement
      the testmode command.
      
      Additionally, to give people an idea of how to use the
      command, I've added a little code to hwsim that makes use
      of the new command to set the powersave mode, this is
      currently done via debugfs and should remain there, and
      the testmode command only serves as an example of how to
      use this best -- with nested netlink attributes in the
      TESTDATA attribute. A hwsim testmode tool can be found at
      http://git.sipsolutions.net/hwsim.git/. This tool is BSD
      licensed so people can easily use it as a basis for their
      own internal fabrication and validation tools.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      aff89a9b
  13. 14 5月, 2009 3 次提交
  14. 12 5月, 2009 1 次提交
    • J
      nl80211 : Add support for configuring MFP · dc6382ce
      Jouni Malinen 提交于
      NL80211_CMD_ASSOCIATE request must be able to indicate whether
      management frame protection (IEEE 802.11w) is being used. mac80211 was
      able to use MFP in client mode only with WEXT, but the new
      NL80211_ATTR_USE_MFP attribute will allow this to be done with
      nl80211, too.
      
      Since we are currently using nl80211 for MFP only with drivers that
      use user space SME, only MFP disabled and required values are
      used. However, the NL80211_ATTR_USE_MFP attribute is an enum that can
      be extended with MFP optional in the future, if that is needed with
      some drivers (e.g., if the RSN IE is generated by the driver).
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      dc6382ce
  15. 23 4月, 2009 8 次提交
  16. 28 3月, 2009 4 次提交
    • J
      nl80211: Remove NL80211_CMD_SET_MGMT_EXTRA_IE · 65fc73ac
      Jouni Malinen 提交于
      The functionality that NL80211_CMD_SET_MGMT_EXTRA_IE provided can now
      be achieved with cleaner design by adding IE(s) into
      NL80211_CMD_TRIGGER_SCAN, NL80211_CMD_AUTHENTICATE,
      NL80211_CMD_ASSOCIATE, NL80211_CMD_DEAUTHENTICATE, and
      NL80211_CMD_DISASSOCIATE.
      
      Since this is a very recently added command and there are no known (or
      known planned) applications using NL80211_CMD_SET_MGMT_EXTRA_IE and
      taken into account how much extra complexity it adds to the IE
      processing we have now (and need to add in the future to fix IE order
      in couple of frames), it looks like the best option is to just remove
      the implementation of this command for now. The enum values themselves
      are left to avoid changing the nl80211 command or attribute numbers.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      65fc73ac
    • J
      nl80211: Add MLME primitives to support external SME · 636a5d36
      Jouni Malinen 提交于
      This patch adds new nl80211 commands to allow user space to request
      authentication and association (and also deauthentication and
      disassociation). The commands are structured to allow separate
      authentication and association steps, i.e., the interface between
      kernel and user space is similar to the MLME SAP interface in IEEE
      802.11 standard and an user space application takes the role of the
      SME.
      
      The patch introduces MLME-AUTHENTICATE.request,
      MLME-{,RE}ASSOCIATE.request, MLME-DEAUTHENTICATE.request, and
      MLME-DISASSOCIATE.request primitives. The authentication and
      association commands request the actual operations in two steps
      (assuming the driver supports this; if not, separate authentication
      step is skipped; this could end up being a separate "connect"
      command).
      
      The initial implementation for mac80211 uses the current
      net/mac80211/mlme.c for actual sending and processing of management
      frames and the new nl80211 commands will just stop the current state
      machine from moving automatically from authentication to association.
      Future cleanup may move more of the MLME operations into cfg80211.
      
      The goal of this design is to provide more control of authentication and
      association process to user space without having to move the full MLME
      implementation. This should be enough to allow IEEE 802.11r FT protocol
      and 802.11s SAE authentication to be implemented. Obviously, this will
      also bring the extra benefit of not having to use WEXT for association
      requests with mac80211. An example implementation of a user space SME
      using the new nl80211 commands is available for wpa_supplicant.
      
      This patch is enough to get IEEE 802.11r FT protocol working with
      over-the-air mechanism (over-the-DS will need additional MLME
      primitives for handling the FT Action frames).
      Signed-off-by: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      636a5d36
    • J
      nl80211: Event notifications for MLME events · 6039f6d2
      Jouni Malinen 提交于
      Add new nl80211 event notifications (and a new multicast group, "mlme")
      for informing user space about received and processed Authentication,
      (Re)Association Response, Deauthentication, and Disassociation frames in
      station and IBSS modes (i.e., MLME SAP interface primitives
      MLME-AUTHENTICATE.confirm, MLME-ASSOCIATE.confirm,
      MLME-REASSOCIATE.confirm, MLME-DEAUTHENTICATE.indicate, and
      MLME-DISASSOCIATE.indication). The event data is encapsulated as the 802.11
      management frame since we already have the frame in that format and it
      includes all the needed information.
      
      This is the initial step in providing MLME SAP interface for
      authentication and association with nl80211. In other words, kernel code
      will act as the MLME and a user space application can control it as the
      SME.
      Signed-off-by: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6039f6d2
    • J
      nl80211: export supported commands · 8fdc621d
      Johannes Berg 提交于
      This makes nl80211 export the supported commands (command groups)
      per wiphy so userspace has an idea what it can do -- this will be
      required reading for userspace when we introduce auth/assoc /or/
      connect for older hardware that cannot separate auth and assoc.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8fdc621d
  17. 17 3月, 2009 2 次提交
  18. 28 2月, 2009 1 次提交
  19. 14 2月, 2009 1 次提交