1. 27 Feb, 2012 3 commits
  2. 06 Feb, 2012 4 commits
    • Johannes Berg's avatar
      mac80211: redesign auth/assoc · 66e67e41
      Johannes Berg authored
      
      
      This is the second part of the auth/assoc redesign,
      the mac80211 part. This moves the auth/assoc code
      out of the work abstraction and into the MLME, so
      that we don't flip channels all the time etc.
      
      The only downside is that when we are associated,
      we need to drop the association in order to create
      a connection to another AP, but for most drivers
      this is actually desirable and the ability to do
      was never used by any applications. If we want to
      implement resource reservation with FT-OTA, we'd
      probably best do it with explicit R-O-C in wpa_s.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      66e67e41
    • Johannes Berg's avatar
      cfg80211: stop tracking authenticated state · 95de817b
      Johannes Berg authored
      
      
      To track authenticated state seems to have been
      a design mistake in cfg80211. It is possible to
      have out of band authentication (FT), tracking
      multiple authentications caused more problems
      than it ever helped, and the implementation in
      mac80211 is too complex.
      
      Remove all this complexity, and let userspace
      do whatever it wants to, mac80211 can deal with
      that just fine. Association is still tracked of
      course, but authentication no longer is. Local
      auth state changes are thus no longer of value,
      so ignore them completely.
      
      This will also help implement SAE -- asking the
      driver to do an authentication is now almost
      equivalent to sending an authentication frame,
      with the exception of shared key authentication
      which is still handled completely.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      95de817b
    • Johannes Berg's avatar
      mac80211: remove dummy STA support · 7852e361
      Johannes Berg authored
      
      
      The dummy STA support was added because I didn't
      want to change the driver API at the time. Now
      that we have state transitions triggering station
      add/remove in the driver, we only call add once a
      station reaches ASSOCIATED, so we can remove the
      dummy station stuff again.
      
      While at it, tighten the RX check and accept only
      port control (EAP) frames from the AP station if
      it's not associated yet -- in other cases there's
      no race.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      7852e361
    • Johannes Berg's avatar
      mac80211: move managed mode station state modification · c8987876
      Johannes Berg authored
      
      
      Move the station state modification right before insert,
      this just makes the current code more readable (you can
      tell that it's before insertion looking at a single
      screenful of code) right now, but some upcoming changes
      will require this.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      c8987876
  3. 30 Jan, 2012 1 commit
    • Johannes Berg's avatar
      mac80211: station state transition error handling · 83d5cc01
      Johannes Berg authored
      
      
      In the future, when we start notifying drivers,
      state transitions could potentially fail. To make
      it easier to distinguish between programming bugs
      and driver failures:
       * rename sta_info_move_state() to
         sta_info_pre_move_state() which can only be
         called before the station is inserted (and
         check this with a new station flag).
       * rename sta_info_move_state_checked() to just
         plain sta_info_move_state(), as it will be
         the regular function that can fail for more
         than just one reason (bad transition or an
         error from the driver)
      
      This makes the programming model easier -- one of
      the functions can only be called before insertion
      and can't fail, the other can fail.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      83d5cc01
  4. 27 Jan, 2012 2 commits
  5. 24 Jan, 2012 1 commit
  6. 18 Jan, 2012 1 commit
    • Johannes Berg's avatar
      mac80211: fix work removal on deauth request · bc4934bc
      Johannes Berg authored
      
      
      When deauth is requested while an auth or assoc
      work item is in progress, we currently delete it
      without regard for any state it might need to
      clean up. Fix it by cleaning up for those items.
      
      In the case Pontus found, the problem manifested
      itself as such:
      
      authenticate with 00:23:69:aa:dd:7b (try 1)
      authenticated
      failed to insert Dummy STA entry for the AP (error -17)
      deauthenticating from 00:23:69:aa:dd:7b by local choice (reason=2)
      
      It could also happen differently if the driver
      uses the tx_sync callback.
      
      We can't just call the ->done() method of the work
      items because that will lock up due to the locking
      in cfg80211. This fix isn't very clean, but that
      seems acceptable since I have patches pending to
      remove this code completely.
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarPontus Fuchs <pontus.fuchs@gmail.com>
      Tested-by: default avatarPontus Fuchs <pontus.fuchs@gmail.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      bc4934bc
  7. 04 Jan, 2012 1 commit
  8. 19 Dec, 2011 1 commit
  9. 15 Dec, 2011 3 commits
  10. 21 Nov, 2011 2 commits
  11. 17 Nov, 2011 1 commit
  12. 09 Nov, 2011 2 commits
  13. 07 Nov, 2011 1 commit
  14. 02 Nov, 2011 1 commit
  15. 31 Oct, 2011 2 commits
  16. 03 Oct, 2011 1 commit
  17. 30 Sep, 2011 2 commits
    • Johannes Berg's avatar
      mac80211: optimise station flags · c2c98fde
      Johannes Berg authored
      
      
      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: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      c2c98fde
    • Arik Nemtsov's avatar
      nl80211/mac80211: allow adding TDLS peers as stations · 07ba55d7
      Arik Nemtsov authored
      
      
      When adding a TDLS peer STA, mark it with a new flag in both nl80211 and
      mac80211. Before adding a peer, make sure the wiphy supports TDLS and
      our operating mode is appropriate (managed).
      
      In addition, make sure all peers are removed on disassociation.
      
      A TDLS peer is first added just before link setup is initiated. In later
      setup stages we have more info about peer supported rates, capabilities,
      etc. This info is reported via nl80211_set_station().
      
      Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
      Cc: Kalyan C Gaddam <chakkal@iit.edu>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      07ba55d7
  18. 27 Sep, 2011 2 commits
  19. 19 Sep, 2011 1 commit
  20. 14 Sep, 2011 2 commits
  21. 13 Sep, 2011 1 commit
  22. 26 Aug, 2011 1 commit
    • Guy Eilam's avatar
      mac80211: fix race condition between assoc_done and first EAP packet · 2a33bee2
      Guy Eilam authored
      
      
      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: default avatarGuy Eilam <guy@wizery.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      2a33bee2
  23. 25 Aug, 2011 1 commit
  24. 20 Jul, 2011 1 commit
  25. 19 Jul, 2011 1 commit
  26. 18 Jul, 2011 1 commit