1. 22 12月, 2009 1 次提交
    • J
      mac80211: reduce reliance on netdev · 47846c9b
      Johannes Berg 提交于
      For bluetooth 3, we will most likely not have
      a netdev for a virtual interface (sdata), so
      prepare for that by reducing the reliance on
      having a netdev. This patch moves the name
      and address fields into the sdata struct and
      uses them from there all over. Some work is
      needed to keep them sync'ed, but that's not
      a lot of work and in slow paths anyway.
      
      In doing so, this also reduces the number of
      pointer dereferences in many places, because
      of things like sdata->dev->dev_addr becoming
      sdata->vif.addr.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      47846c9b
  2. 01 12月, 2009 1 次提交
    • 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
  3. 29 11月, 2009 2 次提交
  4. 24 11月, 2009 1 次提交
  5. 20 11月, 2009 2 次提交
    • 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
      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
  6. 19 11月, 2009 6 次提交
  7. 14 11月, 2009 3 次提交
  8. 12 11月, 2009 2 次提交
  9. 31 10月, 2009 3 次提交
    • J
      mac80211: remove sent_ps_buffered · ff9458d3
      Johannes Berg 提交于
      This variable is set once, and tested once.
      However, the code path that can set it is
      mutually exclusive with the code path that
      tests it, so the test is always true. Thus
      we also don't need to set it either and can
      just remove the variable.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ff9458d3
    • J
      mac80211: split hardware scan by band · 4d36ec58
      Johannes Berg 提交于
      There's currently a very odd bug in mac80211 -- a
      hardware scan that is done while the hardware is
      really operating on 2.4 GHz will include CCK rates
      in the probe request frame, even on 5 GHz (if the
      driver uses the mac80211 IEs). Vice versa, if the
      hardware is operating on 5 GHz the 2.4 GHz probe
      requests will not include CCK rates even though
      they should.
      
      Fix this by splitting up cfg80211 scan requests by
      band -- recalculating the IEs every time -- and
      requesting only per-band scans from the driver.
      
      Apparently this bug hasn't been a problem yet, but
      it is imaginable that some older access points get
      confused if confronted with such behaviour.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4d36ec58
    • J
      cfg80211/mac80211: use debugfs_remove_recursive · 7bcfaf2f
      Johannes Berg 提交于
      We can save a lot of code and pointers in the structs
      by using debugfs_remove_recursive().
      
      First, change cfg80211 to use debugfs_remove_recursive()
      so that drivers do not need to clean up any files they
      added to the per-wiphy debugfs (if and only if they are
      ok to be accessed until after wiphy_unregister!).
      
      Then also make mac80211 use debugfs_remove_recursive()
      where necessary -- it need not remove per-wiphy files
      as cfg80211 now removes those, but netdev etc. files
      still need to be handled but can now be removed without
      needing struct dentry pointers to all of them.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7bcfaf2f
  10. 01 9月, 2009 1 次提交
  11. 29 8月, 2009 3 次提交
  12. 20 8月, 2009 2 次提交
  13. 14 8月, 2009 4 次提交
  14. 05 8月, 2009 3 次提交
    • I
      mac80211: FIF_PSPOLL filter flag · e3b90ca2
      Igor Perminov 提交于
      When an interface is configured in the AP mode, the mac80211
      implementation doesn't inform the driver to receive PS Poll frames.
      It leads to inability to communicate with power-saving stations
      reliably.
      The FIF_CONTROL flag isn't passed by mac80211 to
      ieee80211_ops.configure_filter when an interface is in the AP mode.
      And it's ok, because we don't want to receive ACK frames and other
      control ones, but only PS Poll ones.
      
      This patch introduces the FIF_PSPOLL filter flag in addition to
      FIF_CONTROL, which means for the driver "pass PS Poll frames".
      
      This flag is passed to the driver:
      A) When an interface is configured in the AP mode.
      B) In all cases, when the FIF_CONTROL flag was passed earlier (in
      addition to it).
      Signed-off-by: NIgor Perminov <igor.perminov@inbox.ru>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e3b90ca2
    • M
      mac80211: Retry probe request few times · a43abf29
      Maxim Levitsky 提交于
      Retry 5 times  (chosen arbitary ), before assuming
      that station is out of range.
      
      Fixes frequent disassociations while connected to weak,
      and sometimes even strong access points.
      Signed-off-by: NMaxim Levitky <maximlevitsky@gmail.com>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a43abf29
    • L
      mac80211: redefine usage of the mac80211 workqueue · 42935eca
      Luis R. Rodriguez 提交于
      The mac80211 workqueue exists to enable mac80211 and drivers
      to queue their own work on a single threaded workqueue. mac80211
      takes care to flush the workqueue during suspend but we never
      really had requirements on drivers for how they should use
      the workqueue in consideration for suspend.
      
      We extend mac80211 to document how the mac80211 workqueue should
      be used, how it should not be used and finally move raw access to
      the workqueue to mac80211 only. Drivers and mac80211 use helpers
      to queue work onto the mac80211 workqueue:
      
        * ieee80211_queue_work()
        * ieee80211_queue_delayed_work()
      
      These helpers will now warn if mac80211 already completed its
      suspend cycle and someone is trying to queue work. mac80211
      flushes the mac80211 workqueue prior to suspend a few times,
      but we haven't taken the care to ensure drivers won't add more
      work after suspend. To help with this we add a warning when
      someone tries to add work and mac80211 already completed the
      suspend cycle.
      
      Drivers should ensure they cancel any work or delayed work
      in the mac80211 stop() callback.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      42935eca
  15. 30 7月, 2009 1 次提交
  16. 28 7月, 2009 4 次提交
  17. 25 7月, 2009 1 次提交