1. 22 5月, 2008 1 次提交
    • I
      rt2x00: trim skb_frame_desc to 32 bytes · 5a6e5999
      Ivo van Doorn 提交于
      Remove frame_type from skb_frame_desc and pass it
      as argument to rt2x00debug_dump_frame().
      
      Change data_len and desc_len to unsigned short
      to save another 4 bytes in skb_frame_desc. Note that
      this was the only location where the data_len and
      desc_len was not yet treated as unsigned short.
      
      This trim is required to help mac80211 with adding
      the TX control and TX status informtation into the
      skb->cb structure. When that happens, drivers will
      have approximately 40 bytes left to use freely.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5a6e5999
  2. 15 5月, 2008 1 次提交
    • B
      mac80211: use hardware flags for signal/noise units · 566bfe5a
      Bruno Randolf 提交于
      trying to clean up the signal/noise code. the previous code in mac80211 had
      confusing names for the related variables, did not have much definition of
      what units of signal and noise were provided and used implicit mechanisms from
      the wireless extensions.
      
      this patch introduces hardware capability flags to let the hardware specify
      clearly if it can provide signal and noise level values and which units it can
      provide. this also anticipates possible new units like RCPI in the future.
      
      for signal:
      
        IEEE80211_HW_SIGNAL_UNSPEC - unspecified, unknown, hw specific
        IEEE80211_HW_SIGNAL_DB     - dB difference to unspecified reference point
        IEEE80211_HW_SIGNAL_DBM    - dBm, difference to 1mW
      
      for noise we currently only have dBm:
      
        IEEE80211_HW_NOISE_DBM     - dBm, difference to 1mW
      
      if IEEE80211_HW_SIGNAL_UNSPEC or IEEE80211_HW_SIGNAL_DB is used the driver has
      to provide the maximum value (max_signal) it reports in order for applications
      to make sense of the signal values.
      
      i tried my best to find out for each driver what it can provide and update it
      but i'm not sure (?) for some of them and used the more conservative guess in
      doubt. this can be fixed easily after this patch has been merged by changing
      the hardware flags of the driver.
      
      DRIVER          SIGNAL    MAX	NOISE   QUAL
      -----------------------------------------------------------------
      adm8211         unspec(?) 100   n/a     missing
      at76_usb        unspec(?) (?)   unused  missing
      ath5k           dBm             dBm     percent rssi
      b43legacy       dBm             dBm     percent jssi(?)
      b43             dBm             dBm     percent jssi(?)
      iwl-3945        dBm             dBm     percent snr+more
      iwl-4965        dBm             dBm     percent snr+more
      p54             unspec    127   n/a     missing
      rt2x00          dBm	        n/a     percent rssi+tx/rx frame success
        rt2400        dBm             n/a
        rt2500pci     dBm             n/a
        rt2500usb     dBm             n/a
        rt61pci       dBm             n/a
        rt73usb       dBm             n/a
      rtl8180         unspec(?) 65    n/a     (?)
      rtl8187         unspec(?) 65    (?)     noise(?)
      zd1211          dB(?)     100   n/a     percent
      
      drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      566bfe5a
  3. 13 5月, 2008 1 次提交
    • I
      rt2x00: Fix broken recover-on-error path · ed499983
      Ivo van Doorn 提交于
      During initialization the initialize() callback function
      in rt2x00pci and rt2x00usb will cleanup the mess they made.
      
      rt2x00lib shouldn't call uninitialize because the callback function already
      cleaned up _and_ the DEVICE_INITIALIZED isn't set which causes the
      rt2x00lib_uninitialize() to halt directly anyway. All that is required
      to be cleaned up by rt2x00lib is the queue, and that can be done by
      calling rt2x00queue_uninitialize() directly.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ed499983
  4. 08 5月, 2008 2 次提交
  5. 02 5月, 2008 1 次提交
  6. 17 4月, 2008 1 次提交
  7. 09 4月, 2008 1 次提交
  8. 02 4月, 2008 2 次提交
  9. 28 3月, 2008 1 次提交
    • I
      rt2x00: Ignore set_state(STATE_SLEEP) failure · 9896322a
      Ivo van Doorn 提交于
      Some hardware never seem to accept the "goto sleep" command, since the legacy
      drivers don't have suspend and resume handlers the entire code for it was
      basically a educated guess (based on the "enable radio" code).
      This patch will only print a warning when the "goto sleep" command fails, and
      just continues as usual. Perhaps that means the device will not reach a sleep
      state and consumes more power then it should, but it is equally possible it
      simply needs some seconds longer to sleep. Anyway, by making the command
      non-fatal it will not block the rest of the suspend procedure.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9896322a
  10. 26 3月, 2008 2 次提交
    • I
      rt2x00: Fix rate detection for invalid signals · 866a0503
      Ivo van Doorn 提交于
      It has been observed on rt2500pci hardware that some
      frames received with signal 0x0C do not have the OFDM
      flag set.
      
      Signals can have 2 meanings:
       1) The PLCP value
       2) The bitrate * 10
      
      For rt2500pci (1) is for frames received with a OFDM rate,
      and (2) is for frames received with a CCK rate.
      But 0x0C is a invalid bitrate value but is a valid PLCP
      value for 54Mbs (obvious OFDM rate).
      This means that it is possible that the hardware does not
      set the OFDM bit correctly under all circumstances.
      This results in rt2x00 failing to detect the rate and
      mac80211 triggering a WARN_ON() and dropping the frame.
      
      To bypass this, print a warning when such a frame is received,
      and reset the rate to the lowest supported rate for the current band.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      866a0503
    • I
      rt2x00: Add dev_flags to rx descriptor · 19d30e02
      Ivo van Doorn 提交于
      The rxdone_entry_desc structure contains 3 fields
      which are always 1 or 0. We can safe 8 bytes by
      replacing them with a single dev_flags fields which
      contain the flags for those settings.
      
      Additionally we can remove the OFDM flag since it
      is no longer used since the introduction of the
      SIGNAL_PLCP flag.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      19d30e02
  11. 19 3月, 2008 1 次提交
  12. 14 3月, 2008 7 次提交
  13. 01 3月, 2008 15 次提交
    • G
      rt2x00: Fix hw mode registration with mac80211. · 47ac2683
      Gertjan van Wingerde 提交于
      The supported_bands field of struct hw_mode_spec now represents a bitfield,
      so bitfield operators need to be tested with when setting the band data.
      
      The current code generates the following warning:
      
      [176624.986244] WARNING: at /usr/local/src/incoming/compat-wireless-2.6/net/wireless/core.c:269 wiphy_register()
      [176624.986249] Pid: 12548, comm: modprobe Tainted: P        2.6.24.2#4
      [176624.986251]
      [176624.986251] Call Trace:
      [176624.986277]  [<ffffffff881c56bf>] :cfg80211:wiphy_register+0x17f/0x1a0
      [176624.986282]  [<ffffffff881ddf80>] :rt61pci:rt61pci_eepromregister_write+0x0/0x80
      [176624.986302]  [<ffffffff88b7e4bc>] :mac80211:ieee80211_register_hw+0x2c/0x2b0
      [176624.986310]  [<ffffffff881cdc80>] :rt2x00lib:rt2x00lib_probe_dev+0x350/0x3f0
      [176624.986318]  [<ffffffff881d74b9>] :rt2x00pci:rt2x00pci_probe+0x149/0x200
      [176624.986325]  [<ffffffff8030c858>] pci_device_probe+0xf8/0x170
      [176624.986331]  [<ffffffff803594fc>] driver_probe_device+0x9c/0x1c0
      [176624.986335]  [<ffffffff80359700>] __driver_attach+0x0/0xb0
      [176624.986337]  [<ffffffff803597a5>] __driver_attach+0xa5/0xb0
      [176624.986341]  [<ffffffff8035877d>] bus_for_each_dev+0x4d/0x80
      [176624.986347]  [<ffffffff80358b8c>] bus_add_driver+0xac/0x210
      [176624.986351]  [<ffffffff8030cad3>] __pci_register_driver+0x73/0xc0
      [176624.986357]  [<ffffffff8025689e>] sys_init_module+0x18e/0x1a20
      [176624.986374]  [<ffffffff8020c42e>] system_call+0x7e/0x83
      Signed-off-by: NGertjan van Wingerde <gwingerde@kpnplanet.nl>
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      47ac2683
    • I
      rt2x00: Cleanup mode registration · 31562e80
      Ivo van Doorn 提交于
      Don't wildly pass any number for num_rates to rt2x00lib,
      instead pass which type of rates are supported (CCK, OFDM).
      Same for num_modes but then for the 2GHZ and 5GHZ band.
      
      This makes the interface look much nicer and makes
      extending it later easier.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      31562e80
    • I
      rt2x00: Don't report driver generated frames to tx_status() · baf26a7e
      Ivo van Doorn 提交于
      This adds a new flag for the skb_frame_desc structure which is used to tag
      rts/cts frames that are generated by the driver. Through the tag we can
      recognize frames we have generated ourselves, so we don't report their tx
      status to mac80211.
      
      This patch is based on the original patch by
      Mattias Nissler <mattias.nissler@gmx.de>.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      baf26a7e
    • I
      rt2x00: Fix rate initialization · 8f5fa7f0
      Ivo van Doorn 提交于
      Fix typo in rate initialization. This fixes the WARN_ON()
      in net/wireless/util.cpp:83
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8f5fa7f0
    • I
      rt2x00: Make use of MAC80211_LED_TRIGGERS · a9450b70
      Ivo van Doorn 提交于
      Make use of the led triggers provided by mac80211 to control
      the led status. This can be enabled through a per-driver
      configuration option which will automatically enable the
      generic handler in rt2x00lib.
      
      This has been enabled for rt2500usb and rt73usb for the moment
      since the led class will call set_brightness in irq context which
      will not work correctly with the usb drivers who need to sleep.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a9450b70
    • I
      rt2x00: Use ieee80211_channel_to_frequency() · f2a3c7f5
      Ivo van Doorn 提交于
      No need to perform the calculation ourselves when
      wireless provides a helper function for it.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f2a3c7f5
    • I
      rt2x00: Remove HWMODE_{A,B,G} · f5507ce9
      Ivo van Doorn 提交于
      rt2500usb initialized the SIFS and EIFS without using the
      values coming from rt2x000lib. After this is fixed HWMODE_{A,B,G}
      is now unused and can be removed in favour of the ieee80211_band
      enumeration which could still be usefull later.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f5507ce9
    • I
      rt2x00: Rate structure overhaul · 70e2fed4
      Ivo van Doorn 提交于
      Recent changes to the rate structure registration broke rt2x00,
      the hw_value was reduced from 32bits to 16bits while rt2x00 used
      the full 32bits. However the way rt2x00 used the value was inflexible
      and needed to be changed anyway.
      
      This patch creates a array containing information for each rate,
      the hw_value passed to mac80211 is the index value for that array
      including a field to indicate if short preamble should be enabled.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      70e2fed4
    • J
      cfg80211 API for channels/bitrates, mac80211 and driver conversion · 8318d78a
      Johannes Berg 提交于
      This patch creates new cfg80211 wiphy API for channel and bitrate
      registration and converts mac80211 and drivers to the new API. The
      old mac80211 API is completely ripped out. All drivers (except ath5k)
      are updated to the new API, in many cases I expect that optimisations
      can be done.
      
      Along with the regulatory code I've also ripped out the
      IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, I believe it to be
      unnecessary if the hardware simply gives us whatever channels it wants
      to support and we then enable/disable them as required, which is pretty
      much required for travelling.
      
      Additionally, the patch adds proper "basic" rate handling for STA
      mode interface, AP mode interface will have to have new API added
      to allow userspace to set the basic rate set, currently it'll be
      empty... However, the basic rate handling will need to be moved to
      the BSS conf stuff.
      
      I do expect there to be bugs in this, especially wrt. transmit
      power handling where I'm basically clueless about how it should work.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8318d78a
    • I
      rt2x00: Move beacon and atim queue defines into rt2x00 · 5957da4c
      Ivo van Doorn 提交于
      As Johannes Berg indicated the BEACON and AFTER_BEACON
      queue indeces in mac80211 should be removed because they
      are too hardware specific. This patch adds the queue index
      defines into rt2x00queue.h and removes the dependency of
      the defines inside mac80211.h.
      
      Also move rt2x00pci_beacon_update() into rt2400pci and
      rt2500pci individually since it is no longer a generic
      function since rt61 and rt2800 no longer use that.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5957da4c
    • I
      rt2x00: Initialize QID from queue->qid · 091ed315
      Ivo van Doorn 提交于
      The QID_MGMT is assigned to the beacon and atim queue
      during initialization. This means we don't need a seperate
      check in write_tx_desc()..
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      091ed315
    • I
      rt2x00: Add per-interface structure · 6bb40dd1
      Ivo van Doorn 提交于
      Rework the interface handling. Delete the interface structure
      and replace it with a per-interface structure. This changes the
      way rt2x00 handles the active interface drastically.
      
      Copy ieee80211_bss_conf to the this rt2x00_intf structure during
      the bss_info_changed() callback function. This will allow us to
      reference it later, and removes the requirement for the device flag
      SHORT_PREAMBLE flag which is interface specific.
      
      Drivers receive the option to give the maximum number of virtual
      interfaces the device can handle. Virtual interface support:
      rt2400pci: 1 sta or 1 ap, * monitor interfaces
      rt2500pci: 1 sta or 1 ap, * monitor interfaces
      rt2500usb: 1 sta or 1 ap, * monitor interfaces
      rt61pci: 1 sta or 4 ap, * monitor interfaces
      rt73usb: 1 sta or 4 ap, * monitor interfaces
      
      At the moment none of the drivers support AP and STA interfaces
      simultaneously, this is a hardware limitation so future support
      will be very unlikely.
      
      Each interface structure receives its dedicated beacon entry,
      with this we can easily work with beaconing while multiple master
      mode interfaces are currently active.
      
      The configuration handlers for the MAC, BSSID and type are
      often called together since they all belong to the interface
      configuration. Merge the 3 configuration calls and cleanup
      the API between rt2x00lib and the drivers. While we are cleaning
      up the interface configuration anyway, we might as well clean up
      the configuration handler as well.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6bb40dd1
    • I
      rt2x00: Driver requiring firmware should select crc algo · 9404ef34
      Ivo van Doorn 提交于
      The driver should select what CRC algorithm is required
      when performing a checksum on the firmware.
      
      rt61pci & rt73usb require crc-itu-t
      rt2800pci & rt2800usb require crc-ccitt
      
      Legacy 2800pci/usb driver uses crc-itu-t + bit order reversion,
      but that is just inefficient especially since the end result is
      the same as a different algorithm which is also available as library. ;)
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9404ef34
    • I
      rt2x00: Queue handling overhaul · 181d6902
      Ivo van Doorn 提交于
      This introduces a big queue handling overhaul, this also
      renames "ring" to "queues".
      
      Move queue handling into rt2x00queue.c and the matching header,
      use Kerneldoc to improve rt2x00 library documentation.
      
      Access to the queues is now protected under a spinlock, this
      to prevent race conditions which could corrupt the indexing
      system of the queue.
      
      Each queue entry allocates x bytes for driver/device specific data,
      this cleans up the queue structure significantly and improves
      code readability.
      
      rt2500usb no longer needs 2 entries in the beacon queue to correctly
      send out the guardian byte. This is now handled in the entry specific
      structure.
      
      rt61 and rt73 now use the correct descriptor size for beacon frames,
      since this data is written into the registers not the entire TXD
      descriptor was used but instead of a subset of it named TXINFO.
      
      Finally this also fixes numerous other bugs related to incorrect
      beacon handling or beacon related code.
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      181d6902
    • I
      rt2x00: Update copyright notice · 811aa9ca
      Ivo van Doorn 提交于
      Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      811aa9ca
  14. 28 2月, 2008 3 次提交
  15. 29 1月, 2008 1 次提交