1. 23 4月, 2009 6 次提交
  2. 28 3月, 2009 12 次提交
    • J
      mac80211/iwlwifi: move virtual A-MDPU queue bookkeeping to iwlwifi · e4e72fb4
      Johannes Berg 提交于
      This patch removes all the virtual A-MPDU-queue bookkeeping from
      mac80211. Curiously, iwlwifi already does its own bookkeeping, so
      it doesn't require much changes except where it needs to handle
      starting and stopping the queues in mac80211.
      
      To handle the queue stop/wake properly, we rewrite the software
      queue number for aggregation frames and internally to iwlwifi keep
      track of the queues that map into the same AC queue, and only talk
      to mac80211 about the AC queue. The implementation requires calling
      two new functions, iwl_stop_queue and iwl_wake_queue instead of the
      mac80211 counterparts.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: Reinette Chattre <reinette.chatre@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e4e72fb4
    • J
      mac80211: fix aggregation to not require queue stop · cd8ffc80
      Johannes Berg 提交于
      Instead of stopping the entire AC queue when enabling aggregation
      (which was only done for hardware with aggregation queues) buffer
      the packets for each station, and release them to the pending skb
      queue once aggregation is turned on successfully.
      
      We get a little more code, but it becomes conceptually simpler and
      we can remove the entire virtual queue mechanism from mac80211 in
      a follow-up patch.
      
      This changes how mac80211 behaves towards drivers that support
      aggregation but have no hardware queues -- those drivers will now
      not be handed packets while the aggregation session is being
      established, but only after it has been fully established.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cd8ffc80
    • J
      mac80211: rework the pending packets code · 2a577d98
      Johannes Berg 提交于
      The pending packets code is quite incomprehensible, uses memory barriers
      nobody really understands, etc. This patch reworks it entirely, using
      the queue spinlock, proper stop bits and the skb queues themselves to
      indicate whether packets are pending or not (rather than a separate
      variable like before).
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Reviewed-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2a577d98
    • J
      mac80211: rewrite fragmentation · 2de8e0d9
      Johannes Berg 提交于
      Fragmentation currently uses an allocated array to store the
      fragment skbs, and then keeps track of which have been sent
      and which are still pending etc. This is rather complicated;
      make it simpler by just chaining the fragments into skb->next
      and removing from that list when sent. Also simplifies all
      code that needs to touch fragments, since it now only needs
      to walk the skb->next list.
      
      This is a prerequisite for fixing the stored packet code,
      which I need to do for proper aggregation packet storing.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Reviewed-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2de8e0d9
    • K
      mac80211: add beacon filtering support · 04de8381
      Kalle Valo 提交于
      Add IEEE80211_HW_BEACON_FILTERING flag so that driver inform that it supports
      beacon filtering. Drivers need to call the new function
      ieee80211_beacon_loss() to notify about beacon loss.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      04de8381
    • K
      mac80211: track beacons separately from the rx path activity · 15b7b062
      Kalle Valo 提交于
      Separate beacon and rx path tracking in preparation for the beacon filtering
      support. At the same time change ieee80211_associated() to look a bit simpler.
      
      Probe requests are now sent only after IEEE80211_PROBE_IDLE_TIME, which
      is now set to 60 seconds.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      15b7b062
    • K
      mac80211: decrease execution of the associated timer · 3cf335d5
      Kalle Valo 提交于
      Currently the timer is triggering every two seconds
      (IEEE80211_MONITORING_INTERVAL). Decrease the timer to only trigger during
      data idle periods to avoid waking up CPU unnecessary. The timer will
      still trigger during idle periods, that needs to be fixed later.
      
      There's also a functional change that probe requests are sent only when the
      data path is idle, earlier they were sent also while there was activity
      on the data path.
      
      This is also preparation for the beacon filtering support. Thanks to
      Johannes Berg for the idea.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3cf335d5
    • J
      mac80211: remove mixed-cell and userspace MLME code · 7986cf95
      Johannes Berg 提交于
      Neither can currently be set from userspace, so there's no
      regression potential, and neither will be supported from
      userspace since the new userspace APIs allow the SME, which
      is in userspace, to control all we need.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7986cf95
    • J
      nl80211: Remove NL80211_CMD_SET_MGMT_EXTRA_IE · 65fc73ac
      Jouni Malinen 提交于
      The functionality that NL80211_CMD_SET_MGMT_EXTRA_IE provided can now
      be achieved with cleaner design by adding IE(s) into
      NL80211_CMD_TRIGGER_SCAN, NL80211_CMD_AUTHENTICATE,
      NL80211_CMD_ASSOCIATE, NL80211_CMD_DEAUTHENTICATE, and
      NL80211_CMD_DISASSOCIATE.
      
      Since this is a very recently added command and there are no known (or
      known planned) applications using NL80211_CMD_SET_MGMT_EXTRA_IE and
      taken into account how much extra complexity it adds to the IE
      processing we have now (and need to add in the future to fix IE order
      in couple of frames), it looks like the best option is to just remove
      the implementation of this command for now. The enum values themselves
      are left to avoid changing the nl80211 command or attribute numbers.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      65fc73ac
    • J
      mac80211: resume properly, add suspend/resume test · 827b1fb4
      Johannes Berg 提交于
      When mac80211 resumes, it currently doesn't reconfigure the interfaces
      entirely and also doesn't reconfigure BSS information -- fix this.
      
      Also, to be able to test this, add a debugfs file that just calls
      the suspend/resume code to see what happens when we go through that,
      without needing the time-consuming suspend/resume cycle.
      
      (Original version broke the build for CONFIG_PM=n.  Define alternative
      functions for that situation. -- JWL)
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      827b1fb4
    • J
      nl80211: Add MLME primitives to support external SME · 636a5d36
      Jouni Malinen 提交于
      This patch adds new nl80211 commands to allow user space to request
      authentication and association (and also deauthentication and
      disassociation). The commands are structured to allow separate
      authentication and association steps, i.e., the interface between
      kernel and user space is similar to the MLME SAP interface in IEEE
      802.11 standard and an user space application takes the role of the
      SME.
      
      The patch introduces MLME-AUTHENTICATE.request,
      MLME-{,RE}ASSOCIATE.request, MLME-DEAUTHENTICATE.request, and
      MLME-DISASSOCIATE.request primitives. The authentication and
      association commands request the actual operations in two steps
      (assuming the driver supports this; if not, separate authentication
      step is skipped; this could end up being a separate "connect"
      command).
      
      The initial implementation for mac80211 uses the current
      net/mac80211/mlme.c for actual sending and processing of management
      frames and the new nl80211 commands will just stop the current state
      machine from moving automatically from authentication to association.
      Future cleanup may move more of the MLME operations into cfg80211.
      
      The goal of this design is to provide more control of authentication and
      association process to user space without having to move the full MLME
      implementation. This should be enough to allow IEEE 802.11r FT protocol
      and 802.11s SAE authentication to be implemented. Obviously, this will
      also bring the extra benefit of not having to use WEXT for association
      requests with mac80211. An example implementation of a user space SME
      using the new nl80211 commands is available for wpa_supplicant.
      
      This patch is enough to get IEEE 802.11r FT protocol working with
      over-the-air mechanism (over-the-DS will need additional MLME
      primitives for handling the FT Action frames).
      Signed-off-by: NJouni Malinen <j@w1.fi>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      636a5d36
    • J
      mac80211: stop queues across suspend/resume · 25420604
      Johannes Berg 提交于
      Even though userland probably cannot submit packets, there might
      still be some coming, and that's no good when the driver doesn't
      expect them. Stop the queues across suspend/resume.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      25420604
  3. 17 3月, 2009 1 次提交
    • H
      mac80211: handle failed scan requests in STA mode · af88b907
      Helmut Schaa 提交于
      If cfg80211 requests a scan it awaits either a return code != 0 from
      the scan function or the cfg80211_scan_done to be called. In case of
      a STA mac80211's scan function ever returns 0 and queues the scan request.
      If ieee80211_sta_work is executed and ieee80211_start_scan fails for
      some reason cfg80211_scan_done will never be called but cfg80211 still
      thinks the scan was triggered successfully and will refuse any future
      scan requests due to drv->scan_req not being cleaned up.
      
      If a scan is triggered from within the MLME a similar problem appears. If
      ieee80211_start_scan returns an error, local->scan_req will not be reset
      and mac80211 will refuse any future scan requests.
      
      Hence, in both cases call ieee80211_scan_failed (which notifies cfg80211
      and resets local->scan_req) if ieee80211_start_scan returns an error.
      Signed-off-by: NHelmut Schaa <helmut.schaa@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      af88b907
  4. 28 2月, 2009 4 次提交
    • A
      mac80211: Introduce a generic commit() to apply changes · 79f6440c
      Alina Friedrichsen 提交于
      This patch introduces a generic commit() function which initiate a
      new network joining process. It should be called after some interface
      config changes, so that the changes get applied more cleanly. Currently
      set_ssid() and set_bssid() call it. Others can be added in future
      patches.
      
      In version 1 the header files was forgotten, sorry.
      Signed-off-by: NAlina Friedrichsen <x-alina@gmx.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      79f6440c
    • J
      nl80211: Optional IEs into scan request · 70692ad2
      Jouni Malinen 提交于
      This extends the NL80211_CMD_TRIGGER_SCAN command to allow applications
      to specify a set of information element(s) to be added into Probe
      Request frames with NL80211_ATTR_IE. This provides support for the
      MLME-SCAN.request primitive parameter VendorSpecificInfo and can be
      used, e.g., to implement WPS scanning.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Acked-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      70692ad2
    • J
      mac80211: split IBSS/managed code · 46900298
      Johannes Berg 提交于
      This patch splits out the ibss code and data from managed (station) mode.
      The reason to do this is to better separate the state machines, and have
      the code be contained better so it gets easier to determine what exactly
      a given change will affect, that in turn makes it easier to understand.
      
      This is quite some churn, especially because I split sdata->u.sta into
      sdata->u.mgd and sdata->u.ibss, but I think it's easier to maintain that
      way. I've also shuffled around some code -- null function sending is only
      applicable to managed interfaces so put that into that file, some other
      functions are needed from various places so put them into util, and also
      rearranged the prototypes in ieee80211_i.h accordingly.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      46900298
    • J
      mac80211: fix aggregation for hardware with ampdu queues · 96f5e66e
      Johannes Berg 提交于
      Hardware with AMPDU queues currently has broken aggregation.
      
      This patch fixes it by making all A-MPDUs go over the regular AC queues,
      but keeping track of the hardware queues in mac80211. As a first rough
      version, it actually stops the AC queue for extended periods of time,
      which can be removed by adding buffering internal to mac80211, but is
      currently not a huge problem because people rarely use multiple TIDs
      that are in the same AC (and iwlwifi currently doesn't operate as AP).
      
      This is a short-term fix, my current medium-term plan, which I hope to
      execute soon as well, but am not sure can finish before .30, looks like
      this:
       1) rework the internal queuing layer in mac80211 that we use for
          fragments if the driver stopped queue in the middle of a fragmented
          frame to be able to queue more frames at once (rather than just a
          single frame with its fragments)
       2) instead of stopping the entire AC queue, queue up the frames in a
          per-station/per-TID queue during aggregation session initiation,
          when the session has come up take all those frames and put them
          onto the queue from 1)
       3) push the ampdu queue layer abstraction this patch introduces in
          mac80211 into the driver, and remove the virtual queue stuff from
          mac80211 again
      
      This plan will probably also affect ath9k in that mac80211 queues the
      frames instead of passing them down, even when there are no ampdu queues.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      96f5e66e
  5. 14 2月, 2009 9 次提交
  6. 12 2月, 2009 1 次提交
  7. 30 1月, 2009 7 次提交