1. 07 2月, 2012 4 次提交
  2. 31 1月, 2012 4 次提交
  3. 25 1月, 2012 2 次提交
  4. 17 1月, 2012 1 次提交
  5. 13 1月, 2012 1 次提交
  6. 05 1月, 2012 1 次提交
    • M
      mac80211: fix kernel panic in IBSS due to a regression · e46a2cf9
      Mohammed Shafi Shajakhan 提交于
      kernel panic occurs when we create an IBSS mode and leave it for
      sometime without any joiner and this is introduced by the
      commit ec2b774e where we don't
      put proper braces for 'list_for_each_entry_safe' and we pass an
      invalid 'sta' pointer to __sta_info_destroy
      
      EIP is at __list_add+0xe/0xa0
      EAX: f3b63db4 EBX: 00000000 ECX: eab88c1c EDX: 00000000
      ESI: 00000000 EDI: 00000246 EBP: f3b63d80 ESP: f3b63d58
      DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process kworker/u:2 (pid: 198, ti=f3b62000 task=f3afbea0
      task.ti=f3b62000)
      Stack:
      00000000 00000000 f9ef9821 00000000 00000000 eab88c30
      f3b63d80 c017f623
      eab88bf0 eab88bf0 f3b63dd0 c066f925 00000000 00000002
      00000000 f9ef9821
      f3b63da0 c0180a2b eab88c1c eab88c30 00000002 f3afbea0
      eab88bf4 f3b63db4
       Call Trace:
      [<f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
      [mac80211]
      [<c017f623>] ? debug_mutex_add_waiter+0x23/0x60
      [<c066f925>] __mutex_lock_common+0xd5/0x390
      [<f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
      [mac80211]
      [<c0180a2b>] ? trace_hardirqs_off+0xb/0x10
      [<c066fd37>] mutex_lock_nested+0x47/0x60
      [<f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
      [mac80211]
      [<f9ef9821>] __ieee80211_stop_tx_ba_session+0x31/0x60
      [mac80211]
      [<f9ef8989>] ieee80211_sta_tear_down_BA_sessions+0x39/0x60 [mac80211]
      [<f9ef1a67>] __sta_info_destroy+0x57/0x780 [mac80211]
      [<f9ef2223>] ieee80211_sta_expire+0x93/0xb0 [mac80211]
      [<f9efc8f6>] ieee80211_ibss_work+0x2d6/0x530 [mac80211]
      
      Cc: Marek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e46a2cf9
  7. 22 12月, 2011 1 次提交
  8. 20 12月, 2011 1 次提交
  9. 16 12月, 2011 5 次提交
  10. 14 12月, 2011 1 次提交
    • Y
      mac80211: Purge A-MPDU TX queues before station destructions · 42624d49
      Yogesh Ashok Powar 提交于
      When a station leaves suddenly while ampdu traffic to that station is still
      running, there is a possibility that the ampdu pending queues are not freed due
      to a race condition leading to memory leaks. In '__sta_info_destroy' when we
      attempt to destroy the ampdu sessions in 'ieee80211_sta_tear_down_BA_sessions',
      the driver calls 'ieee80211_stop_tx_ba_cb_irqsafe' to delete the ampdu
      structures (tid_tx) and splice the pending queues and this job gets queued in
      sdata workqueue. However, the sta entry can get destroyed before the above work
      gets scheduled and hence the race.
      
      Purging the queues and freeing the tid_tx to avoid the leak. The better solution
      would be to fix the race, but that can be taken up in a separate patch.
      Signed-off-by: NNishant Sarmukadam <nishants@marvell.com>
      Signed-off-by: NYogesh Ashok Powar <yogeshp@marvell.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      42624d49
  11. 29 11月, 2011 1 次提交
  12. 08 11月, 2011 1 次提交
  13. 15 10月, 2011 1 次提交
  14. 01 10月, 2011 11 次提交
    • J
      mac80211: allow out-of-band EOSP notification · 37fbd908
      Johannes Berg 提交于
      iwlwifi has a separate EOSP notification from
      the device, and to make use of that properly
      it needs to be passed to mac80211. To be able
      to mix with tx_status_irqsafe and rx_irqsafe
      it also needs to be an "_irqsafe" version in
      the sense that it goes through the tasklet,
      the actual flag clearing would be IRQ-safe
      but doing it directly would cause reordering
      issues.
      
      This is needed in the case of a P2P GO going
      into an absence period without transmitting
      any frames that should be driver-released as
      in this case there's no other way to inform
      mac80211 that the service period ended. Note
      that for drivers that don't use the _irqsafe
      functions another version of this function
      will be required.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      37fbd908
    • J
      mac80211: explicitly notify drivers of frame release · 40b96408
      Johannes Berg 提交于
      iwlwifi needs to know the number of frames that are
      going to be sent to a station while it is asleep so
      it can properly handle the uCode blocking of that
      station.
      
      Before uAPSD, we got by by telling the device that
      a single frame was going to be released whenever we
      encountered IEEE80211_TX_CTL_POLL_RESPONSE. With
      uAPSD, however, that is no longer possible since
      there could be more than a single frame.
      
      To support this model, add a new callback to notify
      drivers when frames are going to be released.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      40b96408
    • J
      mac80211: optimise station flags · c2c98fde
      Johannes Berg 提交于
      The flaglock in struct sta_info has long been
      something that I wanted to get rid of, this
      finally does the conversion to atomic bitops.
      
      The conversion itself is straight-forward in
      most places, a few things needed to change a
      bit since we can no longer use multiple bits
      at the same time.
      
      On x86-64, this is a fairly significant code
      size reduction:
         text	   data	    bss	    dec	    hex
       427861	  23648	   1008	 452517	  6e7a5	before
       425383	  23648	    976	 450007	  6ddd7	after
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c2c98fde
    • J
      mac80211: reply only once to each PS-poll · deeaee19
      Johannes Berg 提交于
      If a PS-poll frame is retried (but was received)
      there is no way to detect that since it has no
      sequence number. As a consequence, the standard
      asks us to not react to PS-poll frames until the
      response to one made it out (was ACKed or lost).
      
      Implement this by using the WLAN_STA_SP flags to
      also indicate a PS-Poll "service period" and the
      IEEE80211_TX_STATUS_EOSP flag for the response
      packet to indicate the end of the "SP" as usual.
      
      We could use separate flags, but that will most
      likely completely confuse drivers, and while the
      standard doesn't exclude simultaneously polling
      using uAPSD and PS-Poll, doing that seems quite
      problematic.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      deeaee19
    • J
      mac80211: send (QoS) Null if no buffered frames · ce662b44
      Johannes Berg 提交于
      For PS-poll, there's a possible race between
      us expiring a frame and the station polling
      for it -- send it a null frame in that case.
      
      For uAPSD, the standard says that we have to
      send a frame in each SP, so send null if we
      don't have any other frames.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ce662b44
    • J
      mac80211: implement uAPSD · 47086fc5
      Johannes Berg 提交于
      Add uAPSD support to mac80211. This is probably not
      possible with all devices, so advertising it with
      the cfg80211 flag will be left up to drivers that
      want it.
      
      Due to my previous patches it is now a fairly
      straight-forward extension. Drivers need to have
      accurate TX status reporting for the EOSP frame.
      For drivers that buffer themselves, the provided
      APIs allow releasing the right number of frames,
      but then drivers need to set EOSP and more-data
      themselves. This is documented in more detail in
      the new code itself.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      47086fc5
    • J
      mac80211: allow releasing driver-buffered frames · 4049e09a
      Johannes Berg 提交于
      If there are frames for a station buffered in
      the driver, mac80211 announces those in the TIM
      IE but there's no way to release them. Add new
      API to release such frames and use it when the
      station polls for a frame.
      
      Since the API will soon also be used for uAPSD
      it is easily extensible.
      
      Note that before this change drivers announcing
      driver-buffered frames in the TIM bit actually
      will respond to a PS-Poll with a potentially
      lower priority frame (if there are any frames
      buffered in mac80211), after this patch a driver
      that hasn't been changed will no longer respond
      at all. This only affects ath9k, which will need
      to be fixed to implement the new API.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4049e09a
    • J
      mac80211: split PS buffers into ACs · 948d887d
      Johannes Berg 提交于
      For uAPSD support we'll need to have per-AC PS
      buffers. As this is a major undertaking, split
      the buffers before really adding support for
      uAPSD. This already makes some reference to the
      uapsd_queues variable, but for now that will
      never be non-zero.
      
      Since book-keeping is complicated, also change
      the logic for keeping a maximum of frames only
      and allow 64 frames per AC (up from 128 for a
      station).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      948d887d
    • J
      mac80211: also expire filtered frames · 60750397
      Johannes Berg 提交于
      mac80211 will expire normal PS-buffered frames, but
      if the device rejected some frames for a sleeping
      station, these won't be on the ps_tx_buf queue but
      on the tx_filtered queue instead; this is done to
      avoid reordering.
      
      However, mac80211 will not expire frames from the
      filtered queue, let's fix that.
      
      Also add a more comments to what all this expiry is
      doing and how it works.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      60750397
    • J
      mac80211: unify TIM bit handling · c868cb35
      Johannes Berg 提交于
      Currently, the TIM bit for a given station is set
      and cleared all over the place. Since the logic to
      set/clear it will become much more complex when we
      add uAPSD support, as a first step let's collect
      the entire logic in one place. This requires a few
      small adjustments to other places.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c868cb35
    • J
      mac80211: let drivers inform it about per TID buffered frames · 042ec453
      Johannes Berg 提交于
      For uAPSD implementation, it is necessary to know on
      which ACs frames are buffered. mac80211 obviously
      knows about the frames it has buffered itself, but
      with aggregation many drivers buffer frames. Thus,
      mac80211 needs to be informed about this.
      
      For now, since we don't have APSD in any form, this
      will unconditionally set the TIM bit for the station
      but later with uAPSD only some ACs might cause the
      TIM bit to be set.
      
      ath9k is the only driver using this API and I only
      modify it in the most basic way, it won't be able
      to implement uAPSD with this yet. But it can't do
      that anyway since there's no way to selectively
      release frames to the peer yet.
      
      Since drivers will buffer frames per TID, let them
      inform mac80211 on a per TID basis, mac80211 will
      then sort out the AC mapping itself.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      042ec453
  15. 15 9月, 2011 1 次提交
  16. 14 9月, 2011 1 次提交
  17. 26 8月, 2011 2 次提交
    • G
      mac80211: fix race condition between assoc_done and first EAP packet · 2a33bee2
      Guy Eilam 提交于
      When associating to an AP, the station might miss the first EAP
      packet that the AP sends due to a race condition between the association
      success procedure and the rx flow in mac80211.
      In such cases, the packet might fall in ieee80211_rx_h_check due to
      the fact that the relevant rx->sta wasn't allocated yet.
      Allocation of the relevant station info struct before actually
      sending the association request and setting it with a new
      dummy_sta flag solve this problem.
      The station will accept only EAP packets from the AP while it
      is in the pre-association/dummy state.
      This dummy station entry is not seen by normal sta_info_get()
      calls, only by sta_info_get_bss_rx().
      The driver is not notified for the first insertion of the
      dummy station. The driver is notified only after the association
      is complete and the dummy flag is removed from the station entry.
      That way, all the rest of the code flow should be untouched by
      this change.
      Signed-off-by: NGuy Eilam <guy@wizery.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2a33bee2
    • G
      mac80211: refactor sta_info_insert_rcu to 3 main stages · 8c71df7a
      Guy Eilam 提交于
      Divided the sta_info_insert_rcu function to 3 mini-functions:
      sta_info_insert_check - the initial checks done when inserting
      a new station
      sta_info_insert_ibss - the function that handles the station
      addition for IBSS interfaces
      sta_info_insert_non_ibss - the function that handles the station
      addition in other cases
      
      The outer API was not changed.
      The refactoring was done for better usage of the different
      stages in the station addition in new scenarios added
      in the next commit.
      Signed-off-by: NGuy Eilam <guy@wizery.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8c71df7a
  18. 12 8月, 2011 1 次提交