1. 09 2月, 2010 5 次提交
    • J
      mac80211: allow station add/remove to sleep · 34e89507
      Johannes Berg 提交于
      Many drivers would like to sleep during station
      addition and removal, and currently have a high
      complexity there from not being able to.
      
      This introduces two new callbacks sta_add() and
      sta_remove() that drivers can implement instead
      of using sta_notify() and that can sleep, and
      the new sta_add() callback is also allowed to
      fail.
      
      The reason we didn't do this previously is that
      the IBSS code wants to insert stations from the
      RX path, which is a tasklet, so cannot sleep.
      This patch will keep the station allocation in
      that path, but moves adding the station to the
      driver out of line. Since the addition can now
      fail, we can have IBSS peer structs the driver
      rejected -- in that case we still talk to the
      station but never tell the driver about it in
      the control.sta pointer. If there will ever be
      a driver that has a low limit on the number of
      stations and that cannot talk to any stations
      that are not known to it, we need to do come up
      with a new strategy of handling larger IBSSs,
      maybe quicker expiry or rejecting peers.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      34e89507
    • J
      mac80211: don't probe if we have probe response · 070bb547
      Johannes Berg 提交于
      We can now easily determine whether we already
      have probe response information for the BSS we
      are asked to connect to, in which case there's
      little point in probing the BSS again.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      070bb547
    • J
      wireless: update radiotap parser · 33e5a2f7
      Johannes Berg 提交于
      Upstream radiotap has adopted the namespace
      proposal David Young made and I then took care
      of, for which I had adapted the radiotap parser
      as a library outside the kernel. This brings
      the in-kernel parser up to speed.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      33e5a2f7
    • 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 3 次提交
    • 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