1. 21 Dec, 2009 1 commit
    • Johannes Berg's avatar
      mac80211: reduce reliance on netdev · 47846c9b
      Johannes Berg authored
      For bluetooth 3, we will most likely not have
      a netdev for a virtual interface (sdata), so
      prepare for that by reducing the reliance on
      having a netdev. This patch moves the name
      and address fields into the sdata struct and
      uses them from there all over. Some work is
      needed to keep them sync'ed, but that's not
      a lot of work and in slow paths anyway.
      In doing so, this also reduces the number of
      pointer dereferences in many places, because
      of things like sdata->dev->dev_addr becoming
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  2. 30 Nov, 2009 1 commit
    • Johannes Berg's avatar
      mac80211: fix spurious delBA handling · 827d42c9
      Johannes Berg authored
      Lennert Buytenhek noticed that delBA handling in mac80211
      was broken and has remotely triggerable problems, some of
      which are due to some code shuffling I did that ended up
      changing the order in which things were done -- this was
        commit d75636ef
        Author: Johannes Berg <johannes@sipsolutions.net>
        Date:   Tue Feb 10 21:25:53 2009 +0100
          mac80211: RX aggregation: clean up stop session
      and other parts were already present in the original
        commit d92684e6
        Author: Ron Rindjunsky <ron.rindjunsky@intel.com>
        Date:   Mon Jan 28 14:07:22 2008 +0200
            mac80211: A-MPDU Tx add delBA from recipient support
      The first problem is that I moved a BUG_ON before various
      checks -- thereby making it possible to hit. As the comment
      indicates, the BUG_ON can be removed since the ampdu_action
      callback must already exist when the state is != IDLE.
      The second problem isn't easily exploitable but there's a
      race condition due to unconditionally setting the state to
      OPERATIONAL when a delBA frame is received, even when no
      aggregation session was ever initiated. All the drivers
      accept stopping the session even then, but that opens a
      race window where crashes could happen before the driver
      accepts it. Right now, a WARN_ON may happen with non-HT
      drivers, while the race opens only for HT drivers.
      For this case, there are two things necessary to fix it:
       1) don't process spurious delBA frames, and be more careful
          about the session state; don't drop the lock
       2) HT drivers need to be prepared to handle a session stop
          even before the session was really started -- this is
          true for all drivers (that support aggregation) but
          iwlwifi which can be fixed easily. The other HT drivers
          (ath9k and ar9170) are behaving properly already.
      Reported-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  3. 18 Nov, 2009 2 commits
  4. 30 Oct, 2009 1 commit
  5. 22 Apr, 2009 2 commits
    • Johannes Berg's avatar
      cfg80211: clean up includes · d3236553
      Johannes Berg authored
      Trying to separate header files into net/wireless.h and
      net/cfg80211.h has been a source of confusion. Remove
      net/wireless.h (because there also is the linux/wireless.h)
      and subsume everything into net/cfg80211.h -- except the
      definitions for regulatory structures which get moved to
      a new header net/regulatory.h.
      The "new" net/cfg80211.h is now divided into sections.
      There are no real changes in this patch but code shuffling
      and some very minor documentation fixes.
      I have also, to make things reflect reality, put in a
      copyright line for Luis to net/regulatory.h since that
      is probably exclusively written by him but was formerly
      in a file that only had my copyright line.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      mac80211: move ieee80211_enable_ht function to mlme.c · d5522e03
      Johannes Berg authored
      It really belongs into that file since it is only relevant
      for managed mode. Move 1:1, not even whitespace changes,
      but make it static and remove from header file.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  6. 27 Feb, 2009 2 commits
    • Sujith's avatar
      mac80211: Extend the rate control API with an update callback · 81cb7623
      Sujith authored
      The AP can switch dynamically between 20/40 Mhz channel width,
      in which case we switch the local operating channel, but the
      rate control algorithm is not notified. This patch adds a new callback
      to indicate such changes to the RC algorithm.
      Currently, HT channel width change is notified, but this callback
      can be used to indicate any new requirements that might come up later on.
      Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      mac80211: split IBSS/managed code · 46900298
      Johannes Berg authored
      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: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  7. 13 Feb, 2009 4 commits
  8. 29 Jan, 2009 4 commits
  9. 13 Jan, 2009 1 commit
  10. 19 Dec, 2008 1 commit
  11. 25 Nov, 2008 1 commit
  12. 10 Nov, 2008 1 commit
  13. 31 Oct, 2008 3 commits
    • Sujith's avatar
      mac80211: Re-enable aggregation · 8b30b1fe
      Sujith authored
      Wireless HW without any dedicated queues for aggregation
      do not need the ampdu_queues mechanism present right now
      in mac80211. Since mac80211 is still incomplete wrt TX MQ
      changes, do not allow aggregation sessions for drivers that
      set ampdu_queues.
      This is only an interim hack until Intel fixes the requeue issue.
      Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
      Signed-off-by: default avatarLuis Rodriguez <Luis.Rodriguez@Atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      mac80211: rewrite HT handling · ae5eb026
      Johannes Berg authored
      The HT handling has the following deficiencies, which I've
      (partially) fixed:
       * it always uses the AP info even if there is no AP,
         hence has no chance of working as an AP
       * it pretends to be HW config, but really is per-BSS
       * channel sanity checking is left to the drivers
       * it generally lets the driver control too much
      HT enabling is still wrong with this patch if you have more than
      one virtual STA mode interface, but that never happens currently.
      Once WDS, IBSS or AP/VLAN gets HT capabilities, it will also be
      wrong, see the comment in ieee80211_enable_ht().
      Additionally, this fixes a number of bugs:
       * mac80211: ieee80211_set_disassoc doesn't notify the driver any
                   more since the refactoring
       * iwl-agn-rs: always uses the HT capabilities from the wrong stuff
                     mac80211 gives it rather than the actual peer STA
       * ath9k: a number of bugs resulting from the broken HT API
      I'm not entirely happy with putting the HT capabilities into
      struct ieee80211_sta as restricted to our own HT TX capabilities,
      but I see no cleaner solution for now.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      802.11: clean up/fix HT support · d9fe60de
      Johannes Berg authored
      This patch cleans up a number of things:
       * the unusable definition of the HT capabilities/HT information
         information elements
       * variable names that are hard to understand
       * mac80211: move ieee80211_handle_ht to ht.c and remove the unused
                   enable_ht parameter
       * mac80211: fix bug with MCS rate 32 in ieee80211_handle_ht
       * mac80211: fix bug with casting the result of ieee80211_bss_get_ie
                   to an information element _contents_ rather than the
                   whole element, add size checking (another out-of-bounds
                   access bug fixed!)
       * mac80211: remove some unused return values in favour of BUG_ON
       * a few minor other things
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  14. 27 Oct, 2008 1 commit
  15. 15 Sep, 2008 2 commits
  16. 11 Sep, 2008 4 commits