1. 20 Mar, 2015 2 commits
    • Johannes Berg's avatar
      mac80211: don't look up destination station twice · 5041006c
      Johannes Berg authored
      There's no need to look up the destination station twice while
      building the 802.11 header for a given frame if the frame will
      actually be transmitted to the station we initially looked up.
      
      This happens for 4-addr VLAN interfaces and TDLS connections, which
      both directly send the frame to the station they looked up, though
      in the case of TDLS some station conditions need to be checked.
      
      To avoid that, add a variable indicating that we've looked up the
      station that the frame is going to be transmitted to, and avoid the
      lookup/flag checking if it already has been done.
      
      In the TDLS case, also move the authorized/wme_sta flag assignment
      to the correct place, i.e. only when that station is really used.
      Before this change, the new lookup should always have succeeded so
      that the potentially erroneous data would be overwritten.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5041006c
    • Johannes Berg's avatar
      mac80211: remove drop_unencrypted code · e8f4fb7c
      Johannes Berg authored
      This mechanism was historic, and only ever used by IBSS, which
      also doesn't need to have it as it properly manages station's
      802.1X PAE state (or, with WEP, always has a key.)
      
      Remove the mechanism to clean up the code.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      e8f4fb7c
  2. 17 Mar, 2015 5 commits
  3. 16 Mar, 2015 4 commits
  4. 06 Mar, 2015 3 commits
    • Ilan peer's avatar
      cfg80211: Schedule timeout for all CRDA calls · eeca9fce
      Ilan peer authored
      Timeout was scheduled only in case CRDA was called due to user hints,
      but was not scheduled for other cases. This can result in regulatory
      hint processing getting stuck in case that there is no CRDA configured.
      
      Change this by scheduling a timeout every time CRDA is called. In
      addition, in restore_regulatory_settings() all pending requests are
      restored (and not only the user ones).
      Signed-off-by: default avatarIlan Peer <ilan.peer@intel.com>
      Acked-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      eeca9fce
    • Ilan peer's avatar
      cfg80211: Add API to change the indoor regulatory setting · 05050753
      Ilan peer authored
      Previously, the indoor setting configuration assumed that as
      long as a station interface is connected, the indoor environment
      setting does not change. However, this assumption is problematic
      as:
      
      - It is possible that a station interface is connected to a mobile
        AP, e.g., softAP or a P2P GO, where it is possible that both the
        station and the mobile AP move out of the indoor environment making
        the indoor setting invalid. In such a case, user space has no way to
        invalidate the setting.
      - A station interface disconnection does not necessarily imply that
        the device is no longer operating in an indoor environment, e.g.,
        it is possible that the station interface is roaming but is still
        stays indoor.
      
      To handle the above, extend the indoor configuration API to allow
      user space to indicate a change of indoor settings, and allow it to
      indicate weather it controls the indoor setting, such that:
      
      1. If the user space process explicitly indicates that it is going
         to control the indoor setting, do not clear the indoor setting
         internally, unless the socket is released. The user space process
         should use the NL80211_ATTR_SOCKET_OWNER attribute in the command
         to state that it is going to control the indoor setting.
      2. Reset the indoor setting when restoring the regulatory settings in
         case it is not owned by a user space process.
      
      Based on the above, a user space tool that continuously monitors the
      indoor settings, i.e., tracking power setting, location etc., can
      indicate environment changes to the regulatory core.
      
      It should be noted that currently user space is the only provided mechanism
      used to hint to the regulatory core over the indoor/outdoor environment --
      while the country IEs do have an environment setting this has been completely
      ignored by the regulatory core by design for a while now since country IEs
      typically can contain bogus data.
      Acked-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarArikX Nemtsov <arik@wizery.com>
      Signed-off-by: default avatarIlan Peer <ilan.peer@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      05050753
    • Ilan peer's avatar
      cfg80211: Simplify the handling of regulatory indoor setting · 0c4ddcd2
      Ilan peer authored
      Directly update the indoor setting without wrapping it as
      a regulatory request, to simplify the processing.
      Acked-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarIlan Peer <ilan.peer@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      0c4ddcd2
  5. 04 Mar, 2015 12 commits
  6. 03 Mar, 2015 10 commits
  7. 28 Feb, 2015 4 commits
    • James Minor's avatar
      cfg80211-wext: return -E2BIG when buffer can't hold full BSS entry · 76a70e9c
      James Minor authored
      When using the wext compatibility code in cfg80211, part of the IEs
      can be truncated if the passed user buffer is large enough for part
      of the BSS but not large enough for all of the IEs.  This can cause
      an EAP network to show up as a PSK network.
      
      Always return -E2BIG in this case to avoid truncating data.
      
      Since this changes the control flow, use an on-stack variable for
      a small buffer instead of allocating it.
      Signed-off-by: default avatarJames Minor <james.minor@ni.com>
      [rework patch to error out immediately, use _check wrappers]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      76a70e9c
    • Johannes Berg's avatar
      wext: add checked wrappers for adding events/points to streams · 36ef906e
      Johannes Berg authored
      These checked wrappers are necessary for the next patch, which
      will use them to avoid sending out partial scan results.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      36ef906e
    • Johannes Berg's avatar
      mac80211: remove TX latency measurement code · abfbc3af
      Johannes Berg authored
      Revert commit ad38bfc9 ("mac80211: Tx frame latency statistics")
      (along with some follow-up fixes).
      
      This code turned out not to be as useful in the current form as we
      thought, and we've internally hacked it up more, but that's not
      very suitable for upstream (for now), and we might just do that
      with tracing instead.
      
      Therefore, for now at least, remove this code. We might also need
      to use the skb->tstamp field for the TCP performance issue, which
      is more important than the debugging.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      abfbc3af
    • Masashi Honma's avatar
      nl/mac80211: allow zero plink timeout to disable STA expiration · 31f909a2
      Masashi Honma authored
      Both wpa_supplicant and mac80211 have and inactivity timer. By default
      wpa_supplicant will be timed out in 5 minutes and mac80211's it is 30
      minutes. If wpa_supplicant uses a longer timer than mac80211, it will
      get unexpected disconnection by mac80211.
      
      Using 0xffffffff instead as the configured value could solve this w/o
      changing the code, but due to integer overflow in the expression used
      this doesn't work. The expression is:
      
      (current jiffies) > (frame Rx jiffies + NL80211_MESHCONF_PLINK_TIMEOUT * 250)
      
      On 32bit system, the right side would overflow and be a very small
      value if NL80211_MESHCONF_PLINK_TIMEOUT is sufficiently large,
      causing unexpectedly early disconnections.
      
      Instead allow disabling the inactivity timer to avoid this situation,
      by passing the (previously invalid and useless) value 0.
      Signed-off-by: default avatarMasashi Honma <masashi.honma@gmail.com>
      [reword/rewrap commit log]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      31f909a2