1. 12 4月, 2012 1 次提交
    • J
      mac80211: add explicit monitor interface if needed · 4b6f1dd6
      Johannes Berg 提交于
      The queue mapping redesign that I'm planning to do
      will break pure injection unless we handle monitor
      interfaces explicitly. One possible option would
      be to have the driver tell mac80211 about monitor
      mode queues etc., but that would duplicate the API
      since we already need to have queue assignments
      handled per virtual interface.
      
      So in order to solve this, have a virtual monitor
      interface that is added whenever all active vifs
      are monitors. We could also use the state of one
      of the monitor interfaces, but managing that would
      be complicated, so allocate separate state.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4b6f1dd6
  2. 11 4月, 2012 2 次提交
  3. 13 3月, 2012 1 次提交
  4. 07 3月, 2012 2 次提交
  5. 28 2月, 2012 2 次提交
  6. 21 2月, 2012 1 次提交
  7. 20 12月, 2011 1 次提交
  8. 16 12月, 2011 1 次提交
  9. 09 11月, 2011 1 次提交
  10. 01 11月, 2011 1 次提交
  11. 04 10月, 2011 1 次提交
    • E
      mac80211: pass vif param to conf_tx() callback · 8a3a3c85
      Eliad Peller 提交于
      tx params should be configured per interface.
      add ieee80211_vif param to the conf_tx callback,
      and change all the drivers that use this callback.
      
      The following spatch was used:
      @rule1@
      struct ieee80211_ops ops;
      identifier conf_tx_op;
      @@
      	ops.conf_tx = conf_tx_op;
      
      @rule2@
      identifier rule1.conf_tx_op;
      identifier hw, queue, params;
      @@
      	conf_tx_op (
      -		struct ieee80211_hw *hw,
      +		struct ieee80211_hw *hw, struct ieee80211_vif *vif,
      		u16 queue,
      		const struct ieee80211_tx_queue_params *params) {...}
      Signed-off-by: NEliad Peller <eliad@wizery.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8a3a3c85
  12. 11 8月, 2011 1 次提交
  13. 28 6月, 2011 1 次提交
  14. 02 6月, 2011 1 次提交
    • J
      mac80211_hwsim driver support userspace frame tx/rx · 7882513b
      Javier Lopez 提交于
      This patch adds to mac80211_hwsim the capability to send traffic via
      userspace.
      
      Frame exchange between kernel and user spaces is done through generic
      netlink communication protocol. A new generic netlink family
      MAC80211_HWSIM is proposed, this family contains three basic commands
      HWSIM_CMD_REGISTER, which is the command used to register a new
      traffic listener, HWSIM_CMD_FRAME, to exchange the frames from kernel
      to user and vice-versa, and HWSIM_CMD_TX_INFO_FRAME which returns
      from user all the information about retransmissions, rates, rx signal,
      and so on.
      
      How it works:
      
      Once the driver is loaded the MAC80211_HWSIM family will be registered.
      In the absence of userspace daemon, the driver itselfs implements a
      perfect wireless medium as it did in the past. When a daemon sends a
      HWSIM_CMD_REGISTER command, the module stores the application PID, and
      from this moment all frames will be sent to the registered daemon.
      
      The user space application will be in charge of process/forward all
      frames broadcast by any mac80211_hwsim radio. If the user application
      is stopped, the kernel module will detect the release of the socket
      and it will switch back to in-kernel perfect channel simulation.
      
      The userspace daemon must be waiting for incoming HWSIM_CMD_FRAME
      commands sent from kernel, for each HWSIM_CMD_FRAME command the
      application will try to broadcast this frame to all mac80211_hwsim
      radios, however the application may decide to forward/drop this frame.
      In the case of forwarding the frame, a new HWSIM_CMD_FRAME command will
      be created, all necessary attributes will be populated and the frame
      will be sent back to the kernel.
      
      Also after the frame broadcast phase, a HWSIM_CMD_TX_INFO_FRAME
      command will be sent from userspace to kernel, this command contains
      all the information regarding the transmission, such as number of
      tries, rates, ack signal, etc.
      
      You can find the actual implementation of wireless mediumd daemon
      (wmediumd) at:
      
      * Last version tarball: https://github.com/jlopex/cozybit/tarball/master
      * Or visiting my github tree: https://github.com/jlopex/cozybit/treeSigned-off-by: NJavier Lopez <jlopex@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7882513b
  15. 06 5月, 2011 1 次提交
  16. 31 3月, 2011 1 次提交
  17. 26 2月, 2011 1 次提交
    • J
      mac80211: make tx() operation return void · 7bb45683
      Johannes Berg 提交于
      The return value of the tx operation is commonly
      misused by drivers, leading to errors. All drivers
      will drop frames if they fail to TX the frame, and
      they must also properly manage the queues (if they
      didn't, mac80211 would already warn).
      
      Removing the ability for drivers to return a BUSY
      value also allows significant cleanups of the TX
      TX handling code in mac80211.
      
      Note that this also fixes a bug in ath9k_htc, the
      old "return -1" there was wrong.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k]
      Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00]
      Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi]
      Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx]
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7bb45683
  18. 20 1月, 2011 1 次提交
    • J
      mac80211: track receiver's aggregation reorder buffer size · 0b01f030
      Johannes Berg 提交于
      The aggregation code currently doesn't implement the
      buffer size negotiation. It will always request a max
      buffer size (which is fine, if a little pointless, as
      the mac80211 code doesn't know and might just use 0
      instead), but if the peer requests a smaller size it
      isn't possible to honour this request.
      
      In order to fix this, look at the buffer size in the
      addBA response frame, keep track of it and pass it to
      the driver in the ampdu_action callback when called
      with the IEEE80211_AMPDU_TX_OPERATIONAL action. That
      way the driver can limit the number of subframes in
      aggregates appropriately.
      
      Note that this doesn't fix any drivers apart from the
      addition of the new argument -- they all need to be
      updated separately to use this variable!
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0b01f030
  19. 16 11月, 2010 1 次提交
  20. 17 9月, 2010 1 次提交
  21. 28 8月, 2010 1 次提交
  22. 25 8月, 2010 1 次提交
  23. 19 8月, 2010 1 次提交
  24. 28 7月, 2010 1 次提交
  25. 19 6月, 2010 1 次提交
  26. 03 6月, 2010 1 次提交
  27. 08 5月, 2010 1 次提交
    • J
      mac80211: improve HT channel handling · 0aaffa9b
      Johannes Berg 提交于
      Currently, when one interface switches HT mode,
      all others will follow along. This is clearly
      undesirable, since the new one might switch to
      no-HT while another one is operating in HT.
      
      Address this issue by keeping track of the HT
      mode per interface, and allowing only changes
      that are compatible, i.e. switching into HT40+
      is not possible when another interface is in
      HT40-, in that case the second one needs to
      fall back to HT20.
      
      Also, to allow drivers to know what's going on,
      store the per-interface HT mode (channel type)
      in the virtual interface's bss_conf.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0aaffa9b
  28. 04 5月, 2010 2 次提交
  29. 28 4月, 2010 1 次提交
  30. 20 4月, 2010 1 次提交
  31. 09 4月, 2010 1 次提交
  32. 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
  33. 20 2月, 2010 1 次提交
  34. 09 2月, 2010 1 次提交
  35. 23 1月, 2010 1 次提交
    • J
      cfg80211: export multiple MAC addresses in sysfs · ef15aac6
      Johannes Berg 提交于
      If a device has multiple MAC addresses, userspace will
      need to know about that. Similarly, if it allows the
      MAC addresses to vary by a bitmask.
      
      If a driver exports multiple addresses, it is assumed
      that it will be able to deal with that many different
      addresses, which need not necessarily match the ones
      programmed into the device; if a mask is set then the
      device should deal addresses within that mask based
      on an arbitrary "base address".
      
      To test it all and show how it is used, add support
      to hwsim even though it can't actually deal with
      addresses different from the default.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ef15aac6
  36. 29 12月, 2009 1 次提交