1. 08 11月, 2012 2 次提交
  2. 06 11月, 2012 1 次提交
    • J
      wireless: add utility function to get P2P attribute · 0ee45355
      Johannes Berg 提交于
      Parsing the P2P attributes can be tricky as their
      contents can be split across multiple (vendor) IEs.
      Thus, it's not possible to parse them like IEs (by
      returning a pointer to the data.) Instead, provide
      a function that copies the attribute data into a
      caller-provided buffer and returns the size needed
      (useful in case the buffer was too small.)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      0ee45355
  3. 05 11月, 2012 2 次提交
  4. 30 10月, 2012 2 次提交
    • J
      cfg80211: allow per interface TX power setting · c8442118
      Johannes Berg 提交于
      The TX power setting is currently per wiphy (hardware
      device) but with multi-channel capabilities that doesn't
      make much sense any more.
      
      Allow drivers (and mac80211) to advertise support for
      per-interface TX power configuration. When the TX power
      is configured for the wiphy, the wdev will be NULL and
      the driver can still handle that, but when a wdev is
      given the TX power can be set only for that wdev now.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c8442118
    • J
      nl80211: move "can set channel" check · 71fe96bf
      Johannes Berg 提交于
      Setting the wdev to NULL when the channel can't be
      set for that interface type (to treat the channel
      setting for the wiphy/monitor) currently works, but
      is confusing in the code if netdev/wdev aren't both
      set/unset in the same way. Move the check whether
      the channel can be set to where it's needed so that
      wdev and netdev are always both assigned or NULL.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      71fe96bf
  5. 27 10月, 2012 2 次提交
  6. 24 10月, 2012 1 次提交
  7. 18 10月, 2012 10 次提交
  8. 17 10月, 2012 2 次提交
  9. 15 10月, 2012 1 次提交
  10. 25 9月, 2012 1 次提交
    • V
      cfg80211: Fix regulatory check for 60GHz band frequencies · 64629b9d
      Vladimir Kondratiev 提交于
      The current regulatory code on cfg80211 performs a check to
      see if a regulatory rule belongs to an IEEE band so that if
      a Country IE is received and no rules are specified for a
      band (which is allowed by IEEE) those bands are left intact.
      The current band check assumes a rule is bound to a band
      if the rule's start or end frequency is less than 2 GHz
      apart from the center of frequency being inspected.
      
      In order to support 60 GHz for 802.11ad we need to increase
      this to account for the channel spacing of 2160 MHz whereby
      a channel somewhere in the middle of a regulatory rule may
      be more than 2 GHz apart from either the beginning or
      end of the frequency rule.
      
      Without a fix for this even though channels 1-3 are allowed world
      wide on the rule (57240 - 63720 @ 2160), channel 2 at 60480 MHz
      will end up getting disabled given that it is 3240 MHz from
      both the frequency rule start and end frequency. Fix this by
      using 2 GHz separation assumption for the 2.4 and 5 GHz bands
      but for 60 GHz use a 10 GHz separation before assuming a rule
      is not part of the band.
      
      Since we have no 802.11ad drivers yet merged this change has
      no impact to existing Linux upstream device drivers.
      Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
      Acked-by: NLuis R. Rodriguez <mcgrof@do-not-panic.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      64629b9d
  11. 19 9月, 2012 3 次提交
    • L
      cfg80211: fix possible circular lock on reg_regdb_search() · a85d0d7f
      Luis R. Rodriguez 提交于
      When call_crda() is called we kick off a witch hunt search
      for the same regulatory domain on our internal regulatory
      database and that work gets kicked off on a workqueue, this
      is done while the cfg80211_mutex is held. If that workqueue
      kicks off it will first lock reg_regdb_search_mutex and
      later cfg80211_mutex but to ensure two CPUs will not contend
      against cfg80211_mutex the right thing to do is to have the
      reg_regdb_search() wait until the cfg80211_mutex is let go.
      
      The lockdep report is pasted below.
      
      cfg80211: Calling CRDA to update world regulatory domain
      
      ======================================================
      [ INFO: possible circular locking dependency detected ]
      3.3.8 #3 Tainted: G           O
      -------------------------------------------------------
      kworker/0:1/235 is trying to acquire lock:
       (cfg80211_mutex){+.+...}, at: [<816468a4>] set_regdom+0x78c/0x808 [cfg80211]
      
      but task is already holding lock:
       (reg_regdb_search_mutex){+.+...}, at: [<81646828>] set_regdom+0x710/0x808 [cfg80211]
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #2 (reg_regdb_search_mutex){+.+...}:
             [<800a8384>] lock_acquire+0x60/0x88
             [<802950a8>] mutex_lock_nested+0x54/0x31c
             [<81645778>] is_world_regdom+0x9f8/0xc74 [cfg80211]
      
      -> #1 (reg_mutex#2){+.+...}:
             [<800a8384>] lock_acquire+0x60/0x88
             [<802950a8>] mutex_lock_nested+0x54/0x31c
             [<8164539c>] is_world_regdom+0x61c/0xc74 [cfg80211]
      
      -> #0 (cfg80211_mutex){+.+...}:
             [<800a77b8>] __lock_acquire+0x10d4/0x17bc
             [<800a8384>] lock_acquire+0x60/0x88
             [<802950a8>] mutex_lock_nested+0x54/0x31c
             [<816468a4>] set_regdom+0x78c/0x808 [cfg80211]
      
      other info that might help us debug this:
      
      Chain exists of:
        cfg80211_mutex --> reg_mutex#2 --> reg_regdb_search_mutex
      
       Possible unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(reg_regdb_search_mutex);
                                     lock(reg_mutex#2);
                                     lock(reg_regdb_search_mutex);
        lock(cfg80211_mutex);
      
       *** DEADLOCK ***
      
      3 locks held by kworker/0:1/235:
       #0:  (events){.+.+..}, at: [<80089a00>] process_one_work+0x230/0x460
       #1:  (reg_regdb_work){+.+...}, at: [<80089a00>] process_one_work+0x230/0x460
       #2:  (reg_regdb_search_mutex){+.+...}, at: [<81646828>] set_regdom+0x710/0x808 [cfg80211]
      
      stack backtrace:
      Call Trace:
      [<80290fd4>] dump_stack+0x8/0x34
      [<80291bc4>] print_circular_bug+0x2ac/0x2d8
      [<800a77b8>] __lock_acquire+0x10d4/0x17bc
      [<800a8384>] lock_acquire+0x60/0x88
      [<802950a8>] mutex_lock_nested+0x54/0x31c
      [<816468a4>] set_regdom+0x78c/0x808 [cfg80211]
      Reported-by: NFelix Fietkau <nbd@openwrt.org>
      Tested-by: NFelix Fietkau <nbd@openwrt.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLuis R. Rodriguez <mcgrof@do-not-panic.com>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a85d0d7f
    • P
      cfg80211/nl80211: Notify connection request failure in AP mode · ed44a951
      Pandiyarajan Pitchaimuthu 提交于
      In AP mode, when a station requests connection to an AP and if the
      request is failed for particular reason, userspace is notified about the
      failure through NL80211_CMD_CONN_FAILED command. Reason for the failure
      is sent through the attribute NL80211_ATTR_CONN_FAILED_REASON.
      Signed-off-by: NPandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ed44a951
    • A
      wireless: remove unreachable code · f3baed51
      Alan Cox 提交于
      The only case where intersected_rd can become non NULL is within an if. All
      paths from that if return, so the end chunk has therefore squawked its
      last and is no more.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f3baed51
  12. 11 9月, 2012 1 次提交
  13. 05 9月, 2012 4 次提交
  14. 20 8月, 2012 2 次提交
    • J
      cfg80211: add P2P Device abstraction · 98104fde
      Johannes Berg 提交于
      In order to support using a different MAC address
      for the P2P Device address we must first have a
      P2P Device abstraction that can be assigned a MAC
      address.
      
      This abstraction will also be useful to support
      offloading P2P operations to the device, e.g.
      periodic listen for discoverability.
      
      Currently, the driver is responsible for assigning
      a MAC address to the P2P Device, but this could be
      changed by allowing a MAC address to be given to
      the NEW_INTERFACE command.
      
      As it has no associated netdev, a P2P Device can
      only be identified by its wdev identifier but the
      previous patches allowed using the wdev identifier
      in various APIs, e.g. remain-on-channel.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      98104fde
    • J
      wireless: add radiotap A-MPDU status field · 48613ece
      Johannes Berg 提交于
      Define the A-MPDU status field in radiotap, also
      update the radiotap parser for it and the MCS field
      that was apparently missed last time.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      48613ece
  15. 07 8月, 2012 1 次提交
  16. 02 8月, 2012 2 次提交
  17. 31 7月, 2012 1 次提交
  18. 25 7月, 2012 1 次提交
  19. 18 7月, 2012 1 次提交