1. 27 Jul, 2009 2 commits
    • Helmut Schaa's avatar
      cfg80211: increase scan result expire time · 09f97e0f
      Helmut Schaa authored
      
      
      Using background scanning in mac80211 the time a scan needs to
      finish can exceed 10 seconds. Hence, increase the scan results
      expire time to 15 seconds which should be sufficient.
      Signed-off-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      09f97e0f
    • Johannes Berg's avatar
      cfg80211: make aware of net namespaces · 463d0183
      Johannes Berg authored
      
      
      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: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      463d0183
  2. 21 Jul, 2009 1 commit
    • Christian Lamparter's avatar
      cfg80211: double free in __cfg80211_scan_done · 9e81eccf
      Christian Lamparter authored
      
      
      This patch fixes a double free corruption in __cfg80211_scan_done:
      
       ================================================
       BUG kmalloc-512: Object already free
       ------------------------------------------------
      
       INFO: Allocated in load_elf_binary+0x18b/0x19af age=6
       INFO: Freed in load_elf_binary+0x104e/0x19af age=5
       INFO: Slab 0xffffea0001bae4c0 objects=14 used=7
       INFO: Object 0xffff88007e8a9918 @offset=6424 fp=0xffff88007e8a9488
      
       Bytes b4 0xffff88007e8a9908:  00 00 00 00 00 00 00 00 5a 5a
       [...]
       Pid: 28705, comm: rmmod Tainted: P         C 2.6.31-rc2-wl #1
       Call Trace:
        [<ffffffff810da9f4>] print_trailer+0x14e/0x16e
        [<ffffffff810daa56>] object_err+0x42/0x61
        [<ffffffff810dbcd9>] __slab_free+0x2af/0x396
        [<ffffffffa0ec9694>] ? wiphy_unregister+0x92/0x142 [cfg80211]
        [<ffffffff810dd5e3>] kfree+0x13c/0x17a
        [<ffffffffa0ec9694>] ? wiphy_unregister+0x92/0x142 [cfg80211]
        [<ffffffffa0ec9694>] wiphy_unregister+0x92/0x142 [cfg80211]
        [<ffffffffa0eed163>] ieee80211_unregister_hw+0xc8/0xff [mac80211]
        [<ffffffffa0f3fbc8>] p54_unregister_common+0x31/0x66 [p54common]
        [...]
       FIX kmalloc-512: Object at 0xffff88007e8a9918 not freed
      
      The code path which leads to the *funny* double free:
      
             request = rdev->scan_req;
             dev = dev_get_by_index(&init_net, request->ifidx);
      	/*
      	 * the driver was unloaded recently and
      	 * therefore dev_get_by_index will return NULL!
      	 */
              if (!dev)
                      goto out;
      	[...]
      	rdev->scan_req = NULL; /* not executed... */
      	[...]
       out:
              kfree(request);
      Signed-off-by: default avatarChristian Lamparter <chunkeey@web.de>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      9e81eccf
  3. 10 Jul, 2009 5 commits
  4. 07 Jul, 2009 1 commit
  5. 03 Jun, 2009 1 commit
  6. 06 May, 2009 2 commits
  7. 04 May, 2009 1 commit
  8. 22 Apr, 2009 2 commits
  9. 17 Apr, 2009 2 commits
  10. 27 Mar, 2009 1 commit
  11. 27 Feb, 2009 4 commits
    • Luis R. Rodriguez's avatar
      cfg80211: Add AP beacon regulatory hints · e38f8a7a
      Luis R. Rodriguez authored
      
      
      When devices are world roaming they cannot beacon or do active scan
      on 5 GHz or on channels 12, 13 and 14 on the 2 GHz band. Although
      we have a good regulatory API some cards may _always_ world roam, this
      is also true when a system does not have CRDA present. Devices doing world
      roaming can still passive scan, if they find a beacon from an AP on
      one of the world roaming frequencies we make the assumption we can do
      the same and we also remove the passive scan requirement.
      
      This adds support for providing beacon regulatory hints based on scans.
      This works for devices that do either hardware or software scanning.
      If a channel has not yet been marked as having had a beacon present
      on it we queue the beacon hint processing into the workqueue.
      
      All wireless devices will benefit from beacon regulatory hints from
      any wireless device on a system including new devices connected to
      the system at a later time.
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      e38f8a7a
    • Johannes Berg's avatar
      cfg80211: clean up signal type · 77965c97
      Johannes Berg authored
      
      
      It wasn't a good idea to make the signal type a per-BSS option,
      although then it is closer to the actual value. Move it to be
      a per-wiphy setting, update mac80211 to match.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      77965c97
    • Johannes Berg's avatar
      cfg80211/mac80211: fill qual.qual value/adjust max_qual.qual · a77b8552
      Johannes Berg authored
      
      
      Due to various bugs in the software stack we end up having
      to fill qual.qual; level should be used, but wpa_supplicant
      doesn't properly ignore qual.qual, NM should use qual.level
      regardless of that because qual.qual is 0 but doesn't handle
      IW_QUAL_DBM right now.
      
      So fill qual.qual with the qual.level value clamped to
      -110..-40 dBm or just the regular 'unspecified' signal level.
      This requires a mac80211 change to properly announce the
      max_qual.qual and avg_qual.qual values.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      a77b8552
    • Dan Williams's avatar
      cfg80211: age scan results on resume · cb3a8eec
      Dan Williams authored
      
      
      Scanned BSS entries are timestamped with jiffies, which doesn't
      increment across suspend and hibernate.  On resume, every BSS in the
      scan list looks like it was scanned within the last 10 seconds,
      irregardless of how long the machine was actually asleep.  Age scan
      results on resume with the time spent during sleep so userspace has a
      clue how old they really are.
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      cb3a8eec
  12. 13 Feb, 2009 4 commits