1. 01 4月, 2010 1 次提交
  2. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  3. 11 3月, 2010 1 次提交
  4. 13 1月, 2010 2 次提交
    • J
      mac80211: remove unused type argument · 2d46d7c1
      Johannes Berg 提交于
      The type argument to DEBUGFS_ADD() isn't used
      and can be removed, it's around from before
      the conversion to debugfs_remove_recursive().
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2d46d7c1
    • J
      cfg80211/mac80211: Use more generic bitrate mask for rate control · 37eb0b16
      Jouni Malinen 提交于
      Extend struct cfg80211_bitrate_mask to actually use a bitfield mask
      instead of just a single fixed or maximum rate index. This change
      itself does not modify the behavior (except for debugfs files), but it
      prepares cfg80211 and mac80211 for a new nl80211 command for setting
      which rates can be used in TX rate control.
      
      Since frames are now going through the rate control algorithm
      unconditionally, the internal IEEE80211_TX_INTFL_RCALGO flag can now
      be removed. The RC implementations can use the rate_idx_mask value to
      optimize their behavior if only a single rate is enabled.
      
      The old max_rate_idx in struct ieee80211_tx_rate_control is maintained
      (but commented as deprecated) for backwards compatibility with existing
      RC implementations. Once these implementations have been updated to
      use the more generic rate_idx_mask, the max_rate_idx value can be
      removed.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      37eb0b16
  5. 29 12月, 2009 1 次提交
    • J
      mac80211: generalise work handling · af6b6374
      Johannes Berg 提交于
      In order to use auth/assoc for different purposes
      other than MLME, it needs to be split up. For other
      purposes, a generic work handling (potentially on
      another channel) will be useful.
      
      To achieve that, this patch moves much of the MLME
      work handling out of mlme into a new work API. The
      API can currently handle probing a specific AP,
      authentication and association. The MLME previously
      handled probe/authentication as one step and will
      continue to do so, but they are separate in the new
      work handling.
      
      Work items are RCU-managed to be able to check for
      existence of an item for a specific frame in the RX
      path, but they can be re-used which the MLME right
      now will do for its combined probe/auth step.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      af6b6374
  6. 23 12月, 2009 1 次提交
  7. 22 12月, 2009 1 次提交
    • J
      mac80211: reduce reliance on netdev · 47846c9b
      Johannes Berg 提交于
      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
      sdata->vif.addr.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      47846c9b
  8. 14 11月, 2009 1 次提交
  9. 31 10月, 2009 1 次提交
    • J
      cfg80211/mac80211: use debugfs_remove_recursive · 7bcfaf2f
      Johannes Berg 提交于
      We can save a lot of code and pointers in the structs
      by using debugfs_remove_recursive().
      
      First, change cfg80211 to use debugfs_remove_recursive()
      so that drivers do not need to clean up any files they
      added to the per-wiphy debugfs (if and only if they are
      ok to be accessed until after wiphy_unregister!).
      
      Then also make mac80211 use debugfs_remove_recursive()
      where necessary -- it need not remove per-wiphy files
      as cfg80211 now removes those, but netdev etc. files
      still need to be handled but can now be removed without
      needing struct dentry pointers to all of them.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7bcfaf2f
  10. 20 8月, 2009 1 次提交
  11. 11 7月, 2009 4 次提交
  12. 28 2月, 2009 1 次提交
    • 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
  13. 01 11月, 2008 2 次提交
  14. 28 10月, 2008 1 次提交
  15. 15 10月, 2008 1 次提交
  16. 16 9月, 2008 3 次提交
  17. 27 8月, 2008 1 次提交
    • J
      mac80211: Fix debugfs file add/del for netdev · 93015f0f
      Jouni Malinen 提交于
      Previous version was using incorrect union structures for non-AP
      interfaces when adding and removing max_ratectrl_rateidx and
      force_unicast_rateidx entries. Depending on the vif type, this ended
      up in corrupting debugfs entries since the dentries inside different
      union structures ended up going being on top of eachother.. As the
      end result, debugfs files were being left behind with references to
      freed data (instant kernel oops on access) and directories were not
      removed properly when unloading mac80211 drivers. This patch fixes
      those issues by using only a single union structure based on the vif
      type.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      93015f0f
  18. 15 7月, 2008 2 次提交
    • J
      mac80211: revamp virtual interface handling · 75636525
      Johannes Berg 提交于
      This patch revamps the virtual interface handling and makes the
      code much easier to follow. Fewer functions, better names, less
      spaghetti code.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      75636525
    • J
      mac80211: make master netdev handling sane · 3e122be0
      Johannes Berg 提交于
      Currently, almost every interface type has a 'bss' pointer
      pointing to BSS information. This BSS information, however,
      is for a _local_ BSS, not for the BSS we joined, so having
      it on a STA mode interface makes little sense, but now they
      have it pointing to the master device, which is an AP mode
      virtual interface. However, except for some bitrate control
      data, this pointer is only used in AP/VLAN modes (for power
      saving stations.)
      
      Overall, it is not necessary to even have the master netdev
      be a valid virtual interface, and it doesn't have to be on
      the list of interfaces either.
      
      This patch changes the master netdev to be special, it now
       - no longer is on the list of virtual interfaces, which
         lets me remove a lot of tests for that
       - no longer has sub_if_data attached, since that isn't used
      
      Additionally, this patch changes some vlan/ap mode handling
      that is related to these 'bss' pointers described above (but
      in the VLAN case they actually make sense because there they
      point to the AP they belong to); it also adds some debugging
      code to IEEE80211_DEV_TO_SUB_IF to validate it is not called
      on the master netdev any more.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3e122be0
  19. 22 5月, 2008 1 次提交
  20. 08 5月, 2008 1 次提交
  21. 09 4月, 2008 2 次提交
  22. 02 4月, 2008 2 次提交
  23. 07 3月, 2008 1 次提交
  24. 01 3月, 2008 1 次提交
  25. 29 1月, 2008 4 次提交
  26. 11 10月, 2007 2 次提交
    • J
      [PATCH] mac80211: validate VLAN interfaces better · 0ec3ca44
      Johannes Berg 提交于
      This patch changes mac80211 to verify that VLAN interfaces
      are valid and not bother drivers about them any more.
      VLAN interfaces are now only valid when an AP interface
      is up with the same MAC address, and are automatically
      turned off when the AP interface is set down.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Cc: Jouni Malinen <j@w1.fi>
      Signed-off-by: NMichael Wu <flamingice@sourmilk.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0ec3ca44
    • J
      [PATCH] mac80211: revamp interface and filter configuration · 4150c572
      Johannes Berg 提交于
      Drivers are currently supposed to keep track of monitor
      interfaces if they allow so-called "hard" monitor, and
      they are also supposed to keep track of multicast etc.
      
      This patch changes that, replaces the set_multicast_list()
      callback with a new configure_filter() callback that takes
      filter flags (FIF_*) instead of interface flags (IFF_*).
      For a driver, this means it should open the filter as much
      as necessary to get all frames requested by the filter flags.
      Accordingly, the filter flags are named "positively", e.g.
      FIF_ALLMULTI.
      
      Multicast filtering is a bit special in that drivers that
      have no multicast address filters need to allow multicast
      frames through when either the FIF_ALLMULTI flag is set or
      when the mc_count value is positive.
      
      At the same time, drivers are no longer notified about
      monitor interfaces at all, this means they now need to
      implement the start() and stop() callbacks and the new
      change_filter_flags() callback. Also, the start()/stop()
      ordering changed, start() is now called *before* any
      add_interface() as it really should be, and stop() after
      any remove_interface().
      
      The patch also changes the behaviour of setting the bssid
      to multicast for scanning when IEEE80211_HW_NO_PROBE_FILTERING
      is set; the IEEE80211_HW_NO_PROBE_FILTERING flag is removed
      and the filter flag FIF_BCN_PRBRESP_PROMISC introduced.
      This is a lot more efficient for hardware like b43 that
      supports it and other hardware can still set the BSSID
      to all-ones.
      
      Driver modifications by Johannes Berg (b43 & iwlwifi), Michael Wu
      (rtl8187, adm8211, and p54), Larry Finger (b43legacy), and
      Ivo van Doorn (rt2x00).
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NMichael Wu <flamingice@sourmilk.net>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4150c572