1. 19 11月, 2012 1 次提交
    • J
      mac80211: support radiotap vendor namespace RX data · 90b9e446
      Johannes Berg 提交于
      In some cases, in particular for experimentation, it
      can be useful to be able to add vendor namespace data
      to received frames in addition to the normal radiotap
      data.
      
      Allow doing this through mac80211 by adding fields to
      the RX status descriptor that describe the data while
      the data itself is prepended to the frame.
      
      Also add some example code to hwsim, but don't enable
      it because it doesn't use a proper OUI identifier.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      90b9e446
  2. 14 11月, 2012 1 次提交
  3. 10 11月, 2012 1 次提交
    • J
      mac80211: clarify interface iteration and make it configurable · 8b2c9824
      Johannes Berg 提交于
      During hardware restart, all interfaces are iterated even
      though they haven't been re-added to the driver, document
      this behaviour. The same also happens during resume, which
      is even more confusing since all of the interfaces were
      previously removed from the driver. Make this optional so
      drivers relying on the current behaviour can still use it,
      but to let drivers that don't want this behaviour disable
      it.
      
      Also convert all API users, keeping the old semantics
      except in hwsim, where the new normal ones are desired.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8b2c9824
  4. 30 10月, 2012 2 次提交
    • J
      mac80211_hwsim: print per interface TX power · cbc668a7
      Johannes Berg 提交于
      Just for debugging, print the interface TX
      power whenever it changes.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      cbc668a7
    • J
      mac80211_hwsim: allow using channel contexts · e8261171
      Johannes Berg 提交于
      To use mac80211_hwsim for testing channel contexts it
      has to support them, and for that it has to support
      hw scan and hw-remain-on-channel.
      
      Since it's pure software, the off-channel activities
      are really not off-channel but listening and sending
      on a second channel. Also, the multi-channel isn't
      really doing TDM, it's just on both channels at the
      same time.
      
      For testing purposes, you can specify the number of
      concurrent channels with a module parameter, it is
      set to one by default. When set to two or more, the
      userspace API for wmediumd is disabled as it has no
      provisions for multi-channel yet.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e8261171
  5. 11 9月, 2012 1 次提交
  6. 06 9月, 2012 1 次提交
  7. 20 8月, 2012 1 次提交
  8. 31 7月, 2012 1 次提交
  9. 27 7月, 2012 1 次提交
  10. 17 7月, 2012 1 次提交
  11. 06 7月, 2012 1 次提交
  12. 03 7月, 2012 1 次提交
  13. 29 6月, 2012 1 次提交
    • T
      net: Use NLMSG_DEFAULT_SIZE in combination with nlmsg_new() · 58050fce
      Thomas Graf 提交于
      Using NLMSG_GOODSIZE results in multiple pages being used as
      nlmsg_new() will automatically add the size of the netlink
      header to the payload thus exceeding the page limit.
      
      NLMSG_DEFAULT_SIZE takes this into account.
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Cc: Jiri Pirko <jpirko@redhat.com>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Sergey Lapin <slapin@ossfans.org>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
      Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Reviewed-by: NJiri Pirko <jpirko@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      58050fce
  14. 25 6月, 2012 1 次提交
    • J
      mac80211_hwsim: fix smatch/sparse complaints · d0f718c1
      Johannes Berg 提交于
      The code is fine in both cases as-is, but we can
      write it slightly differently to fix smatch/sparse
      complaints:
       * compare the skb pointer (which we use as a cookie)
         by casting the skb to unsigned long rather than the
         cookie to a pointer (fixes "different address spaces")
       * when transmitting, data->channel must be assigned,
         don't check it (fixes "dereferenced before check")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d0f718c1
  15. 09 6月, 2012 1 次提交
  16. 05 6月, 2012 1 次提交
  17. 16 5月, 2012 1 次提交
  18. 17 4月, 2012 1 次提交
  19. 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
  20. 11 4月, 2012 2 次提交
  21. 02 4月, 2012 1 次提交
  22. 13 3月, 2012 1 次提交
  23. 07 3月, 2012 2 次提交
  24. 28 2月, 2012 2 次提交
  25. 21 2月, 2012 1 次提交
  26. 20 12月, 2011 1 次提交
  27. 16 12月, 2011 1 次提交
  28. 09 11月, 2011 1 次提交
  29. 01 11月, 2011 1 次提交
  30. 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
  31. 11 8月, 2011 1 次提交
  32. 28 6月, 2011 1 次提交
  33. 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
  34. 06 5月, 2011 1 次提交
  35. 31 3月, 2011 1 次提交
  36. 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