1. 01 12月, 2009 2 次提交
    • J
      mac80211: fix spurious delBA handling · 827d42c9
      Johannes Berg 提交于
      Lennert Buytenhek noticed that delBA handling in mac80211
      was broken and has remotely triggerable problems, some of
      which are due to some code shuffling I did that ended up
      changing the order in which things were done -- this was
      
        commit d75636ef
        Author: Johannes Berg <johannes@sipsolutions.net>
        Date:   Tue Feb 10 21:25:53 2009 +0100
      
          mac80211: RX aggregation: clean up stop session
      
      and other parts were already present in the original
      
        commit d92684e6
        Author: Ron Rindjunsky <ron.rindjunsky@intel.com>
        Date:   Mon Jan 28 14:07:22 2008 +0200
      
            mac80211: A-MPDU Tx add delBA from recipient support
      
      The first problem is that I moved a BUG_ON before various
      checks -- thereby making it possible to hit. As the comment
      indicates, the BUG_ON can be removed since the ampdu_action
      callback must already exist when the state is != IDLE.
      
      The second problem isn't easily exploitable but there's a
      race condition due to unconditionally setting the state to
      OPERATIONAL when a delBA frame is received, even when no
      aggregation session was ever initiated. All the drivers
      accept stopping the session even then, but that opens a
      race window where crashes could happen before the driver
      accepts it. Right now, a WARN_ON may happen with non-HT
      drivers, while the race opens only for HT drivers.
      
      For this case, there are two things necessary to fix it:
       1) don't process spurious delBA frames, and be more careful
          about the session state; don't drop the lock
      
       2) HT drivers need to be prepared to handle a session stop
          even before the session was really started -- this is
          true for all drivers (that support aggregation) but
          iwlwifi which can be fixed easily. The other HT drivers
          (ath9k and ar9170) are behaving properly already.
      Reported-by: NLennert Buytenhek <buytenh@marvell.com>
      Cc: stable@kernel.org
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      827d42c9
    • J
      mac80211: fix two remote exploits · 4253119a
      Johannes Berg 提交于
      Lennert Buytenhek noticed a remotely triggerable problem
      in mac80211, which is due to some code shuffling I did
      that ended up changing the order in which things were
      done -- this was in
      
        commit d75636ef
        Author: Johannes Berg <johannes@sipsolutions.net>
        Date:   Tue Feb 10 21:25:53 2009 +0100
      
          mac80211: RX aggregation: clean up stop session
      
      The problem is that the BUG_ON moved before the various
      checks, and as such can be triggered.
      
      As the comment indicates, the BUG_ON can be removed since
      the ampdu_action callback must already exist when the
      state is OPERATIONAL.
      
      A similar code path leads to a WARN_ON in
      ieee80211_stop_tx_ba_session, which can also be removed.
      
      Cc: stable@kernel.org [2.6.29+]
      Cc: Lennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4253119a
  2. 20 11月, 2009 1 次提交
    • J
      mac80211: fix resume · ceb99fe0
      Johannes Berg 提交于
      When mac80211 resumes, it currently first sets suspended
      to false so the driver can start doing things and we can
      receive frames.
      
      However, if we actually receive frames then it can end
      up starting some work which adds timers and then later
      runs into a BUG_ON in the timer code because it tries
      add_timer() on a pending timer.
      
      Fix this by keeping track of the resuming process by
      introducing a new variable 'resuming' which gets set to
      true early on instead of setting 'suspended' to false,
      and allow queueing work but not receiving frames while
      resuming.
      Reported-by: NMaxim Levitsky <maximlevitsky@gmail.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ceb99fe0
  3. 19 11月, 2009 1 次提交
    • J
      mac80211: fix addba timer (again...) · 8ade0082
      Johannes Berg 提交于
      commit 2171abc5
        Author: Johannes Berg <johannes@sipsolutions.net>
        Date:   Thu Oct 29 08:34:00 2009 +0100
      
            mac80211: fix addba timer
      
      left a problem in there, even if the timer was
      never started it could be deleted and then added.
      
      Linus pointed out that del_timer_sync() isn't
      actually needed if we make the timer able to
      deal with no longer being needed when it gets
      queued _while_ we're in the locked section that
      also deletes it. For that the timer function only
      needs to check the HT_ADDBA_RECEIVED_MSK bit as
      well as the HT_ADDBA_REQUESTED_MSK bit, only if
      the former is clear should it do anything.
      
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8ade0082
  4. 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
  5. 31 10月, 2009 3 次提交
  6. 28 10月, 2009 4 次提交
  7. 13 10月, 2009 3 次提交
  8. 12 10月, 2009 1 次提交
  9. 08 10月, 2009 2 次提交
  10. 30 9月, 2009 1 次提交
    • I
      mac80211: Fix [re]association power saving issue on AP side · 1f08e84f
      Igor Perminov 提交于
      Consider the following step-by step:
      1. A STA authenticates and associates with the AP and exchanges
      traffic.
      2. The STA reports to the AP that it is going to PS state.
      3. Some time later the STA device goes to the stand-by mode (not only
      its wi-fi card, but the device itself) and drops the association state
      without sending a disassociation frame.
      4. The STA device wakes up and begins authentication with an
      Auth frame as it hasn't been authenticated/associated previously.
      
      At the step 4 the AP "remembers" the STA and considers it is still in
      the PS state, so the AP buffers frames, which it has to send to the STA.
      But the STA isn't actually in the PS state and so it neither checks
      TIM bits nor reports to the AP that it isn't power saving.
      Because of that authentication/[re]association fails.
      
      To fix authentication/[re]association stage of this issue, Auth, Assoc
      Resp and Reassoc Resp frames are transmitted disregarding of STA's power
      saving state.
      
      N.B. This patch doesn't fix further data frame exchange after
      authentication/[re]association. A patch in hostapd is required to fix
      that.
      Signed-off-by: NIgor Perminov <igor.perminov@inbox.ru>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1f08e84f
  11. 29 9月, 2009 1 次提交
  12. 23 9月, 2009 2 次提交
    • J
      mac80211: fix DTIM setting · 6a211bf1
      Johannes Berg 提交于
      When the DTIM setting is read from beacons, mac80211 will
      assume it is 1 if the TIM IE is not present or the value
      is 0. This sounds fine, but the same function processes
      probe responses as well, which don't have a TIM IE. This
      leads to overwriting any values previously parsed out of
      beacon frames.
      
      Thus, instead of checking for the presence of the TIM IE
      when setting the default, simply check whether the DTIM
      period value is valid already. If the TIM IE is not there
      then the value cannot be valid (it is initialised to 0)
      and probe responses received after beacons will not lead
      to overwriting an already valid value.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6a211bf1
    • P
      rc80211_minstrel: fix contention window calculation · 909a2035
      Pavel Roskin 提交于
      The contention window is supposed to be a power of two minus one, i.e.
      15, 31, 63, 127...  minstrel_rate_init() forgets to subtract 1, so the
      sequence becomes 15, 32, 66, 134...
      
      Bug reported by Dan Halperin <dhalperi@cs.washington.edu>
      Signed-off-by: NPavel Roskin <proski@gnu.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      909a2035
  13. 17 9月, 2009 1 次提交
  14. 12 9月, 2009 1 次提交
    • M
      net: Add DEVTYPE support for Ethernet based devices · 384912ed
      Marcel Holtmann 提交于
      The Ethernet framing is used for a lot of devices these days. Most
      prominent are WiFi and WiMAX based devices. However for userspace
      application it is important to classify these devices correctly and
      not only see them as Ethernet devices. The daemons like HAL, DeviceKit
      or even NetworkManager with udev support tries to do the classification
      in userspace with a lot trickery and extra system calls. This is not
      good and actually reaches its limitations. Especially since the kernel
      does know the type of the Ethernet device it is pretty stupid.
      
      To solve this problem the underlying device type needs to be set and
      then the value will be exported as DEVTYPE via uevents and available
      within udev.
      
        # cat /sys/class/net/wlan0/uevent
        DEVTYPE=wlan
        INTERFACE=wlan0
        IFINDEX=5
      
      This is similar to subsystems like USB and SCSI that distinguish
      between hosts, devices, disks, partitions etc.
      
      The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual
      device type. All device types are free form, but for convenience the
      same strings as used with RFKILL are choosen.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      384912ed
  15. 03 9月, 2009 1 次提交
  16. 02 9月, 2009 1 次提交
  17. 01 9月, 2009 1 次提交
  18. 29 8月, 2009 9 次提交
  19. 20 8月, 2009 4 次提交