1. 01 4月, 2010 1 次提交
  2. 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
  3. 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
  4. 19 2月, 2010 1 次提交
  5. 16 2月, 2010 2 次提交
  6. 20 1月, 2010 1 次提交
  7. 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
  8. 29 12月, 2009 3 次提交
  9. 22 12月, 2009 1 次提交
  10. 29 11月, 2009 1 次提交
  11. 20 11月, 2009 3 次提交
    • J
      cfg80211: disallow bridging managed/adhoc interfaces · ad4bb6f8
      Johannes Berg 提交于
      A number of people have tried to add a wireless interface
      (in managed mode) to a bridge and then complained that it
      doesn't work. It cannot work, however, because in 802.11
      networks all packets need to be acknowledged and as such
      need to be sent to the right address. Promiscuous doesn't
      help here. The wireless address format used for these
      links has only space for three addresses, the
       * transmitter, which must be equal to the sender (origin)
       * receiver (on the wireless medium), which is the AP in
         the case of managed mode
       * the recipient (destination), which is on the APs local
         network segment
      
      In an IBSS, it is similar, but the receiver and recipient
      must match and the third address is used as the BSSID.
      
      To avoid such mistakes in the future, disallow adding a
      wireless interface to a bridge.
      
      Felix has recently added a four-address mode to the AP
      and client side that can be used (after negotiating that
      it is possible, which must happen out-of-band by setting
      up both sides) for bridging, so allow that case.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ad4bb6f8
    • J
      cfg80211: introduce capability for 4addr mode · 9bc383de
      Johannes Berg 提交于
      It's very likely that not many devices will support
      four-address mode in station or AP mode so introduce
      capability bits for both modes, set them in mac80211
      and check them when userspace tries to use the mode.
      Also, keep track of 4addr in cfg80211 (wireless_dev)
      and not in mac80211 any more. mac80211 can also be
      improved for the VLAN case by not looking at the
      4addr flag but maintaining the station pointer for
      it correctly. However, keep track of use_4addr for
      station mode in mac80211 to avoid all the derefs.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9bc383de
    • J
      cfg80211: convert bools into flags · 5be83de5
      Johannes Berg 提交于
      We've accumulated a number of options for wiphys
      which make more sense as flags as we keep adding
      more. Convert the existing ones.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5be83de5
  12. 14 11月, 2009 5 次提交
  13. 12 11月, 2009 1 次提交
  14. 03 11月, 2009 1 次提交
    • J
      cfg80211: validate scan channels · 584991dc
      Johannes Berg 提交于
      Currently it is possible to request a scan on only
      disabled channels, which could be problematic for
      some drivers. Reject such scans, and also ignore
      disabled channels that are given. This resuls in
      the scan begin/end event only including channels
      that are actually used.
      
      This makes the mac80211 check for disabled channels
      superfluous. At the same time, remove the no-IBSS
      check from mac80211 -- nothing says that we should
      not find any networks on channels that cannot be
      used for an IBSS, even when operating in IBSS mode.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      584991dc
  15. 09 10月, 2009 1 次提交
  16. 08 10月, 2009 2 次提交
  17. 29 8月, 2009 2 次提交
  18. 14 8月, 2009 4 次提交
  19. 30 7月, 2009 3 次提交
    • J
      cfg80211: combine iwfreq implementations · 0e82ffe3
      Johannes Berg 提交于
      Until now we implemented iwfreq for managed mode, we
      needed to keep the implementations separate, but now
      that we have all versions implemented we can combine
      them and export just one handler.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0e82ffe3
    • J
      nl80211: add missing parameter clearing · c0b2bbd8
      Johannes Berg 提交于
      Jouni and Maxim reported an oops when using wpa_supplicant -Dnl80211,
      which seems to be due to random data being contained in the crypto
      settings for the assoc() command. This seems to be due to the missing
      memset here, so add it -- it's certainly missing but I'm not 100%
      certain that it will fix the problem.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c0b2bbd8
    • J
      cfg80211: fix circular lock dependency (1) · bc43b28c
      Johannes Berg 提交于
      Luis reported this lockdep complaint, that he had also
      reported earlier but when trying to analyse I had been
      locking at the wrong code, and never saw the problem:
      
      (slightly abridged)
      =======================================================
      [ INFO: possible circular locking dependency detected ]
      2.6.31-rc4-wl #6
      -------------------------------------------------------
      wpa_supplicant/3799 is trying to acquire lock:
       (cfg80211_mutex){+.+.+.}, at: [<ffffffffa009246a>] cfg80211_get_dev_from_ifindex+0x1a/0x90 [cfg80211]
      
      but task is already holding lock:
       (rtnl_mutex){+.+.+.}, at: [<ffffffff81400ff2>] rtnl_lock+0x12/0x20
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #1 (rtnl_mutex){+.+.+.}:
             [<ffffffff810857b6>] __lock_acquire+0xd76/0x12b0
             [<ffffffff81085dd3>] lock_acquire+0xe3/0x120
             [<ffffffff814ee7a4>] mutex_lock_nested+0x44/0x350
             [<ffffffff81400ff2>] rtnl_lock+0x12/0x20
             [<ffffffffa009f6a5>] nl80211_send_reg_change_event+0x1f5/0x2a0 [cfg80211]
             [<ffffffffa009529e>] set_regdom+0x28e/0x4c0 [cfg80211]
      
      -> #0 (cfg80211_mutex){+.+.+.}:
             [<ffffffff8108587b>] __lock_acquire+0xe3b/0x12b0
             [<ffffffff81085dd3>] lock_acquire+0xe3/0x120
             [<ffffffff814ee7a4>] mutex_lock_nested+0x44/0x350
             [<ffffffffa009246a>] cfg80211_get_dev_from_ifindex+0x1a/0x90 [cfg80211]
             [<ffffffffa009813f>] get_rdev_dev_by_info_ifindex+0x6f/0xa0 [cfg80211]
             [<ffffffffa009b12b>] nl80211_set_interface+0x3b/0x260 [cfg80211]
      
      When looking at the correct code, the problem is quite
      obvious. I'm not entirely sure which code paths lead
      here, so until I can analyse it better let's just use
      RCU to avoid the problem.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      bc43b28c
  20. 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
  21. 25 7月, 2009 2 次提交
    • 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