1. 09 11月, 2011 1 次提交
  2. 01 10月, 2011 3 次提交
    • 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: 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
  3. 15 9月, 2011 4 次提交
  4. 26 8月, 2011 2 次提交
    • A
      mac80211: allow action frames with unknown BSSID in GO mode · a21fa87e
      Arik Nemtsov 提交于
      When operating as a P2P GO, we receive some P2P action frames where the
      BSSID is set to the peer MAC address. Specifically, this occurs for
      invitation responses. These are valid action frames and they should be
      passed up.
      Signed-off-by: NArik Nemtsov <arik@wizery.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a21fa87e
    • 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
  5. 23 8月, 2011 2 次提交
  6. 14 7月, 2011 1 次提交
    • J
      mac80211: allow driver to disconnect after resume · 95acac61
      Johannes Berg 提交于
      In WoWLAN, devices may use crypto keys for TX/RX
      and could also implement GTK rekeying. If the
      driver isn't able to retrieve replay counters and
      similar information from the device upon resume,
      or if the device isn't responsive due to platform
      issues, it isn't safe to keep the connection up
      as GTK rekey messages from during the sleep time
      could be replayed against it.
      
      The only protection against that is disconnecting
      from the AP. Modifying mac80211 to do that while
      it is resuming would be very complex and invasive
      in the case that the driver requires a reconfig,
      so do it after it has resumed completely. In that
      case, however, packets might be replayed since it
      can then only happen after TX/RX are up again, so
      mark keys for interfaces that need to disconnect
      as "tainted" and drop all packets that are sent
      or received with those keys.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      95acac61
  7. 08 7月, 2011 1 次提交
    • J
      mac80211: simplify RX PN/IV handling · 9e26297a
      Johannes Berg 提交于
      The current rx->queue value is slightly confusing.
      It is set to 16 on non-QoS frames, including data,
      and then used for sequence number and PN/IV checks.
      Until recently, we had a TKIP IV checking bug that
      had been introduced in 2008 to fix a seqno issue.
      Before that, we always used TID 0 for checking the
      PN or IV on non-QoS packets.
      
      Go back to the old status for PN/IV checks using
      the TID 0 counter for non-QoS by splitting up the
      rx->queue value into "seqno_idx" and "security_idx"
      in order to avoid confusion in the future. They
      each have special rules on the value used for non-
      QoS data frames.
      
      Since the handling is now unified, also revert the
      special TKIP handling from my patch
      "mac80211: fix TKIP replay vulnerability".
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9e26297a
  8. 28 6月, 2011 1 次提交
  9. 17 5月, 2011 2 次提交
  10. 12 5月, 2011 2 次提交
  11. 03 5月, 2011 1 次提交
  12. 27 4月, 2011 1 次提交
  13. 20 4月, 2011 1 次提交
  14. 14 4月, 2011 1 次提交
  15. 13 4月, 2011 1 次提交
  16. 05 4月, 2011 1 次提交
  17. 31 3月, 2011 2 次提交
  18. 29 3月, 2011 1 次提交
    • D
      mac80211: fix aggregation frame release during timeout · 499fe9a4
      Daniel Halperin 提交于
      Suppose the aggregation reorder buffer looks like this:
      
      x-T-R1-y-R2,
      
      where x and y are frames that have not been received, T is a received
      frame that has timed out, and R1,R2 are received frames that have not
      yet timed out. The proper behavior in this scenario is to move the
      window past x (skipping it), release T and R1, and leave the window at y
      until y is received or R2 times out.
      
      As written, this code will instead leave the window at R1, because it
      has not yet timed out. Fix this by exiting the reorder loop only when
      the frame that has not timed out AND there are skipped frames earlier in
      the current valid window.
      Signed-off-by: NDaniel Halperin <dhalperi@cs.washington.edu>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      499fe9a4
  19. 02 3月, 2011 1 次提交
  20. 24 2月, 2011 1 次提交
  21. 15 2月, 2011 1 次提交
  22. 08 2月, 2011 2 次提交
  23. 05 2月, 2011 3 次提交
    • B
      mac80211: Optimize scans on current operating channel. · b23b025f
      Ben Greear 提交于
      This should decrease un-necessary flushes, on/off channel work,
      and channel changes in cases where the only scanned channel is
      the current operating channel.
      
      * Removes SCAN_OFF_CHANNEL flag, uses SDATA_STATE_OFFCHANNEL
        and is-scanning flags instead.
      
      * Add helper method to determine if we are currently configured
        for the operating channel.
      
      * Do no blindly go off/on channel in work.c  Instead, only call
        appropriate on/off code when we really need to change channels.
        Always enable offchannel-ps mode when starting work,
        and disable it when we are done.
      
      * Consolidate ieee80211_offchannel_stop_station and
        ieee80211_offchannel_stop_beaconing, call it
        ieee80211_offchannel_stop_vifs instead.
      
      * Accept non-beacon frames when scanning on operating channel.
      
      * Scan state machine optimized to minimize on/off channel
        transitions.  Also, when going on-channel, go ahead and
        re-enable beaconing.  We're going to be there for 200ms,
        so seems like some useful beaconing could happen.
        Always enable offchannel-ps mode when starting software
        scan, and disable it when we are done.
      
      * Grab local->mtx earlier in __ieee80211_scan_completed_finish
        so that we are protected when calling hw_config(), etc.
      
      * Pass probe-responses up the stack if scanning on local
        channel, so that mlme can take a look.
      Signed-off-by: NBen Greear <greearb@candelatech.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b23b025f
    • F
      mac80211: do not send duplicate data frames to the cooked monitor interface · b1f93314
      Felix Fietkau 提交于
      I can't think of a valid use case for this aside from debugging (which can
      also be done with a real monitor interface), and dropping these frames saves
      some precious CPU cycles.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b1f93314
    • R
      mac80211: do not restart ps timer during scan or offchannel · 8c99f691
      Rajkumar Manoharan 提交于
      While leaving oper channel, STA informs sleep state to AP to
      stop sending data. Till sending ack for the nullfunc, AP
      continues to send the data to STA which restarts ps_timer that
      is causing unnecessary nullfunc exchange on timer expiry
      when the STA was already moved to offchannel. So don't restart ps_timer
      on data reception during scan. This issue was identified by
      the following warning.
      
      WARNING: at net/mac80211/tx.c:661 invoke_tx_handlers+0xf07/0x1330 [mac80211]
      wlan0: Dropped data frame as no usable bitrate found while scanning and
      associated. Target station: 00:03:7f:0b:a6:1b on 5 GHz band
      Call Trace:
        [<ffffffffa0413ba7>] invoke_tx_handlers+0xf07/0x1330 [mac80211]
        [<ffffffffa0414056>] ieee80211_tx+0x86/0x2c0 [mac80211]
        [<ffffffffa0414345>] ieee80211_xmit+0xb5/0x1d0 [mac80211]
        [<ffffffffa04037e0>] ieee80211_dynamic_ps_enable_work+0x0/0xb0 [mac80211]
        [<ffffffffa04158cf>] ieee80211_tx_skb+0x4f/0x60 [mac80211]
        [<ffffffffa04026e6>] ieee80211_send_nullfunc+0x46/0x60 [mac80211]
        [<ffffffffa0403885>] ieee80211_dynamic_ps_enable_work+0xa5/0xb0 [mac80211]
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NRajkumar Manoharan <rmanoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8c99f691
  24. 04 2月, 2011 2 次提交
  25. 29 1月, 2011 1 次提交
  26. 22 1月, 2011 1 次提交