1. 09 2月, 2010 2 次提交
    • J
      mac80211: fix deferred hardware scan requests · c0ce77b8
      Johannes Berg 提交于
      Reinette found the reason for the warnings that
      happened occasionally when a hw-offloaded scan
      finished; her description of the problem:
      
        mac80211 will defer the handling of scan requests if it is
        busy with management work at the time. The scan requests
        are deferred and run after the work has completed. When
        this occurs there are currently two problems.
      
        * The scan request for hardware scan is not fully populated
          with the band and channels to scan not initialized.
      
        * When the scan is queued the state is not correctly updated
          to reflect that a scan is in progress. The problem here is
          that when the driver completes the scan and calls
          ieee80211_scan_completed() a warning will be triggered
          since mac80211 was not aware that a scan was in progress.
      
      The reason is that the queued scan work will start
      the hw scan right away when the hw_scan_req struct
      has already been allocated. However, in the first
      pass it will not have been filled, which happens
      at the same time as setting the bits. To fix this,
      simply move the allocation after the pending work
      test as well, so that the first iteration of the
      scan work will call __ieee80211_start_scan() even
      in the hardware scan case.
      Bug-identified-by: NReinette Chatre <reinette.chatre@intel.com>
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c0ce77b8
    • B
      mac80211: Fix probe request filtering in IBSS mode · 0da780c2
      Benoit Papillault 提交于
      We only reply to probe request if either the requested SSID is the
      broadcast SSID or if the requested SSID matches our own SSID. This
      latter case was not properly handled since we were replying to different
      SSID with the same length as our own SSID.
      Signed-off-by: NBenoit Papillault <benoit.papillault@free.fr>
      Cc: stable@kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0da780c2
  2. 02 2月, 2010 6 次提交
  3. 27 1月, 2010 2 次提交
    • J
      mac80211: wait for beacon before enabling powersave · 56007a02
      Johannes Berg 提交于
      Because DTIM information is required for powersave
      but is only conveyed in beacons, wait for a beacon
      before enabling powersave, and change the way the
      information is conveyed to the driver accordingly.
      
      mwl8k doesn't currently seem to implement PS but
      requires the DTIM period in a different way; after
      talking to Lennert we agreed to just have mwl8k do
      the parsing itself in the finalize_join work.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Acked-by: NLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      56007a02
    • Z
      mac80211: fix NULL pointer dereference when ftrace is enabled · 3092ad05
      Zhu Yi 提交于
      I got below kernel oops when I try to bring down the network interface if
      ftrace is enabled. The root cause is drv_ampdu_action() is passed with a
      NULL ssn pointer in the BA session tear down case. We need to check and
      avoid dereferencing it in trace entry assignment.
      
      BUG: unable to handle kernel NULL pointer dereference
      Modules linked in: at (null)
      IP: [<f98fe02a>] ftrace_raw_event_drv_ampdu_action+0x10a/0x160 [mac80211]
      *pde = 00000000
      Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
      [...]
      Call Trace:
       [<f98fdf20>] ? ftrace_raw_event_drv_ampdu_action+0x0/0x160 [mac80211]
       [<f98dac4c>] ? __ieee80211_stop_rx_ba_session+0xfc/0x220 [mac80211]
       [<f98d97fb>] ? ieee80211_sta_tear_down_BA_sessions+0x3b/0x50 [mac80211]
       [<f98dc6f6>] ? ieee80211_set_disassoc+0xe6/0x230 [mac80211]
       [<f98dc6ac>] ? ieee80211_set_disassoc+0x9c/0x230 [mac80211]
       [<f98dcbb8>] ? ieee80211_mgd_deauth+0x158/0x170 [mac80211]
       [<f98e4bdb>] ? ieee80211_deauth+0x1b/0x20 [mac80211]
       [<f8987f49>] ? __cfg80211_mlme_deauth+0xe9/0x120 [cfg80211]
       [<f898b870>] ? __cfg80211_disconnect+0x170/0x1d0 [cfg80211]
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: stable@kernel.org
      Signed-off-by: NZhu Yi <yi.zhu@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3092ad05
  4. 26 1月, 2010 5 次提交
  5. 24 1月, 2010 1 次提交
  6. 23 1月, 2010 4 次提交
  7. 20 1月, 2010 9 次提交
  8. 19 1月, 2010 1 次提交
  9. 16 1月, 2010 4 次提交
  10. 13 1月, 2010 6 次提交
    • K
      mac80211: check uapsd state for dynamic power save · 0c74211d
      Kalle Valo 提交于
      To make U-APSD client mode effective, we must not wake up from dynamic power
      save when transmitting frames. So if dynamic power save is enabled, it needs
      check the queue the transmitted packet is in and decide if we need to wake
      up or not.
      
      In a perfect world, where all packets would have correct QoS tags, U-APSD
      enabled queues should not trigger wakeup from power save. But in the real
      world, where very few packets have correct QoS tags, this won't work. For
      example, if only voip class has U-APSD enabled and we send a packet in voip
      class, but the packets we receive are in best effort class, we would receive
      the packets with the legacy power save method. And that would increase
      latencies too much from a voip application point of view.
      
      The workaround is to enable U-APSD for all qeueus and still use dynamic ps
      wakeup for all other queues except voip. That way we can still save power
      with a voip application and not sacrifice latency. Normal traffic (in
      background, best effort or video class) would still trigger wakeup from
      dynamic power save.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0c74211d
    • K
      mac80211: create tx handler for dynamic ps · 5c1b98a5
      Kalle Valo 提交于
      Currently dynamic ps check is in ieee80211_xmit(), but it's cleaner
      to have a separate tx handler for this. Also this is a prerequisite for
      U-APSD client mode which needs to know the queue frame is in.
      
      Also need_dynamic_ps() function is embedded to the tx handler.
      
      No functional changes expect that the code is run in a later phase than
      originally.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5c1b98a5
    • K
      mac80211: add debugfs interface for U-APSD queue configuration · 50ae0cf1
      Kalle Valo 提交于
      Because it's not yet decided how to configure which queues are U-APSD
      enabled, add a debugfs interface for testing purposes.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      50ae0cf1
    • K
      mac80211: add U-APSD client support · ab13315a
      Kalle Valo 提交于
      Add Unscheduled Automatic Power-Save Delivery (U-APSD) client support. The
      idea is that the data frames from the client trigger AP to send the buffered
      frames with ACs which have U-APSD enabled. This decreases latency and makes it
      possible to save even more power.
      
      Driver needs to use IEEE80211_HW_UAPSD to enable the feature. The current
      implementation assumes that firmware takes care of the wakeup and
      hardware needing IEEE80211_HW_PS_NULLFUNC_STACK is not yet supported.
      
      Tested with wl1251 on a Nokia N900 and Cisco Aironet 1231G AP and running
      various test traffic with ping.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ab13315a
    • J
      mac80211: remove unused type argument · 2d46d7c1
      Johannes Berg 提交于
      The type argument to DEBUGFS_ADD() isn't used
      and can be removed, it's around from before
      the conversion to debugfs_remove_recursive().
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2d46d7c1
    • L
      mac80211: flush workqueue before calling driver ->stop() method · 678f415f
      Lennert Buytenhek 提交于
      Since commit "mwl8k: handle station database update for AP's sta entry
      via ->sta_notify()", mwl8k every now and then gets a command timeout
      when ifconfig'ing a STA interface down.  This turns out to be due to
      mwl8k_stop() being called while the work queue item that was scheduled
      by mwl8k_sta_notify() to remove the STA entry for the associated AP is
      still queued, and the former disables interrupts so that when the
      latter eventually runs, a command completion interrupt is never seen.
      
      Fix this by changing ieee80211_stop_device() so that the workqueue is
      flushed before drv_stop() is called, instead of doing it the other way
      around as is done now.  (As ->stop() is allowed to sleep, there isn't
      any reason for drivers to queue work from within it.)
      Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      678f415f