1. 03 11月, 2009 1 次提交
    • J
      mac80211: check interface is down before type change · c1f9a764
      Johannes Berg 提交于
      For some strange reason the netif_running() check
      ended up after the actual type change instead of
      before, potentially causing all kinds of problems
      if the interface is up while changing the type;
      one of the problems manifests itself as a warning:
      
      WARNING: at net/mac80211/iface.c:651 ieee80211_teardown_sdata+0xda/0x1a0 [mac80211]()
      Hardware name: Aspire one
      Pid: 2596, comm: wpa_supplicant Tainted: G        W  2.6.31-10-generic #32-Ubuntu
      Call Trace:
       [] warn_slowpath_common+0x6d/0xa0
       [] warn_slowpath_null+0x15/0x20
       [] ieee80211_teardown_sdata+0xda/0x1a0 [mac80211]
       [] ieee80211_if_change_type+0x4a/0xc0 [mac80211]
       [] ieee80211_change_iface+0x61/0xa0 [mac80211]
       [] cfg80211_wext_siwmode+0xc7/0x120 [cfg80211]
       [] ioctl_standard_call+0x58/0xf0
      
      (http://www.kerneloops.org/searchweek.php?search=ieee80211_teardown_sdata)
      
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: stable@kernel.org
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c1f9a764
  2. 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
  3. 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
  4. 25 7月, 2009 1 次提交
  5. 11 7月, 2009 13 次提交
  6. 11 6月, 2009 1 次提交
  7. 04 6月, 2009 4 次提交
  8. 14 5月, 2009 3 次提交
  9. 12 5月, 2009 2 次提交
  10. 07 5月, 2009 3 次提交
  11. 23 4月, 2009 4 次提交
  12. 28 3月, 2009 4 次提交
    • J
      nl80211: Check iftype in cfg80211 code · eec60b03
      Jouni Malinen 提交于
      We do not want to require all the drivers using cfg80211 to need to do
      this. In addition, make the error values consistent by using
      EOPNOTSUPP instead of semi-random assortment of errno values.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      eec60b03
    • J
      nl80211: Check that netif_runnin is true in cfg80211 code · 35a8efe1
      Jouni Malinen 提交于
      We do not want to require all the drivers using cfg80211 to need to do
      this or to be prepared to handle these commands when the interface is
      down.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      35a8efe1
    • 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
  13. 06 3月, 2009 1 次提交
  14. 28 2月, 2009 1 次提交