linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Please pull 'upstream' branch of rt2x00
@ 2007-04-28 20:45 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-04-28 20:45 UTC (permalink / raw)
  To: John Linville, linux-wireless

Hi John,

A new update of rt2x00 is ready. :)

Perhaps the most interesting thing would be the removal
of passive scan support, because it was a purely software based
solution that (if really required) could best be resolved in mac80211
rather then the driver for devices that don't support such a thing in the
hardware.
The rest is just code being moved around, (more specifically code being moved
from the drivers toward rt2x00lib/pci/usb. There aren't any specific bugfixes made.

Ivo

---

The following changes since commit 9e4fd17309d0acddd1748c76f6bd35a0c85446b6:
  Johannes Berg (1):
        clarify locking comment in cfg80211

are found in the git repository at:

  http://git.serialmonkey.com/rt2x00.git/ upstream

Ivo van Doorn (38):
      rt2x00: Move beaconhandling into rt2x00{usb,pci} modules
      rt2x00: Fix rt2x00pci, rt2x00usb, rt2x00mac module/debug enviroment
      rt2x00: Move common rxdone and txdone code into rt2x00lib
      rt2x00: Set rf_base during channel configuration
      rt2x00: Move initialize() and uninitialize() into rt2x00pci/rt2x00usb
      rt2x00: Fix spellin error
      rt2x00: Move ieee80211_hw init & registration into rt2x00lib
      rt2x00: Fix hardware mode registration order
      rt2x00: Add struct debugsfs pointer to rt2x00dev
      rt2x00: Fix debugfs related compile problem
      rt2x00: Explicit return type for rt2x00debug_register
      rt2x00: Fix sparse errors
      rt2x00: Move alloc_rings into rt2x00lib
      rt2x00: Move device allocation into rt2x00lib
      rt2x00: Make rt2x00debug const
      rt2x00: Minor fixes (comment & headers)
      rt2x00: Create rt2x00_ops structure
      rt2x00: rt2x00pci shouldn't use DRV_NAME for irq registration
      rt2x00: Rename rt(25)73 identifications
      rt2x00: Move PCI/USB handlers into rt2x00pci/usb modules
      rt2x00: Fix hw mode registration
      rt2x00: Fix NULL pointer exeption during init_hw
      rt2x00: Fix sparse warnings
      rt2x00: Fix ERROR strings
      rt2x00: Move rf values outside functions
      rt2x00: Allocate enough rings
      rt2x00: Move write_tx_data functions into rt2x00pci/usb
      rt2x00: Fix compilation error when not selecting rt61pci and rt73usb
      rt2x00: Add return statement to rt2x00lib_alloc_dev
      rt2x00: Create dummy rt2x00lib_firmware_load_wait()
      rt2x00: Move write_tx_desc initialization into rt2x00lib
      rt2x00: Remove ENTRY_RTS_CTS_FRAME flag
      rt2x00: Fix check for Acked frames
      Merge branch 'wireless-dev'
      rt2x00: Remove passive scanning support
      rt2x00: Set channel_change_time to 0
      rt2x00: Move USB txdone handler into rt2x00usb
      rt2x00: rt61 should call ieee80211_wake_queue only for correct queues

 drivers/net/wireless/mac80211/rt2x00/Makefile      |    2 +
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.c   | 1303 +++------------
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.h   |    9 +-
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.c   | 1496 ++++--------------
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.h   |    7 -
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.c   | 1448 +++--------------
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.h   |    2 -
 drivers/net/wireless/mac80211/rt2x00/rt2x00.h      |  165 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.c |   27 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.h |    7 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c   |  689 +++++++-
 drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h   |   70 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00mac.c   |  166 +--
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.c   |  587 +++++++
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.h   |   50 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.c   |  637 +++++++
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.h   |   44 +-
 drivers/net/wireless/mac80211/rt2x00/rt61pci.c     | 1731 ++++---------------
 drivers/net/wireless/mac80211/rt2x00/rt61pci.h     |    7 -
 drivers/net/wireless/mac80211/rt2x00/rt73usb.c     | 1597 ++++---------------
 drivers/net/wireless/mac80211/rt2x00/rt73usb.h     |    4 +-
 21 files changed, 3553 insertions(+), 6495 deletions(-)
 create mode 100644 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.c
 create mode 100644 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.c

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-05-07 14:44 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-05-07 14:44 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the latest rt2x00 update. It is a rather small one.
Only 1 real fix, and the second path is cosmetic since it
will start a proper versioning of rt2x00.

This will most likely be the last pull request for the next 1 or 2 months
due to developer/time/health shortage.

The TODO list for rt2x00 has been expanding over the last few days,
so as soon as I am fully back there will be quite a lot to do. ;)
(http://rt2x00.serialmonkey.com/wiki/index.php?title=Rt2x00_beta#rt2x00_beta_status_page)

Ivo

---

The following changes since commit 5209b1eff0b1891d8bb002eb067a11b4caa5f5bc:
  John W. Linville (1):
        Merge branch 'from-linus'

are found in the git repository at:

  http://git.serialmonkey.com/rt2x00.git/ upstream

Ivo van Doorn (2):
      rt2x00: release 2.0.0
      Merge branch 'wireless-dev'

Jan Kiszka (1):
      rt2x00: Fix master beacon setup

 drivers/net/wireless/mac80211/rt2x00/rt2400pci.c |    8 +++-----
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.c |    8 +++-----
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.c |    8 +++-----
 drivers/net/wireless/mac80211/rt2x00/rt2x00.h    |    3 +--
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c |   17 -----------------
 drivers/net/wireless/mac80211/rt2x00/rt2x00mac.c |   14 +++++++++++++-
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.c |   17 -----------------
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.c |   19 +------------------
 drivers/net/wireless/mac80211/rt2x00/rt61pci.c   |    8 +++-----
 drivers/net/wireless/mac80211/rt2x00/rt73usb.c   |    8 +++-----
 10 files changed, 30 insertions(+), 80 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-06-03 12:25 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-06-03 12:25 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the new rt2x00 release: 2.0.1
It contains many patches since the previous release.
It doesn't address any major bugs that have been
reported, but the code has been cleaned up.

The most notable change is the addition of rfkill support. :)

Ivo

---

The following changes since commit 2e6c9eed7541f3e2a23a469f08e5be3ec28a129f:
  James Ketrenos (1):
        Add iwlwifi wireless drivers

are available in the git repository at:

  git://git.serialmonkey.com/rt2x00.git/ upstream

Gertjan van Wingerde (8):
      rt2x00: Move rxd_size and txd_size fields.
      rt2x00: Update firmware loading interface.
      rt2x00: Initialisation cleanup.
      Move firmware loading code out of main rt2x00lib source file.
      Fix debug support.
      Let lowlevel driver decide on firmware names.
      rt2x00: Provide cleaner firmware loading interface to lowlevel driver.
      rt2x00: Deregister debugs at firmware loading failure.

Ivo van Doorn (34):
      rt2x00: Add rfkill support
      rt2x00: Use MODULE_FIRMWARE
      rt2x00: cosmetic - rename CONFIG_RT2X00_DEBUGFS
      rt2x00: Move crc-itu-t usage into rt2x00lib
      rt2x00: Remove channel_change_time usage
      rt2x00: Apply the 80 character line rule
      rt2x00: Prevent forward declaration of functions
      rt2x00: When toggling RX the link tuner should also be toggled
      rt2x00: Move generic link_tuner code into rt2x00lib
      rt2x00: Make rt2400 link tuner work like legacy driver
      rt2x00: Remove activity_led
      rt2x00: Make sure link tuning follows Legacy guidelines
      rt2x00: Use correct values for r24, r25 and r26
      rt2x00: Add EEPROM recovery data
      rt2x00: Correctly initialize rt73usb PHY_CSR1
      rt2x00: Use defines for chipset assignments
      rt2x00: Merge kick_beacon_gen and kick_tx_queue
      rt2x00: Merge radio control functions into 1 callback function
      rt2x00: Make promisc mode available to USB devices
      rt2x00: Make use of open / stop handlers
      rt2x00: Cleanup flag handling
      rt2x00: Use linux/bitops.h
      rt2x00: Add FIELD8 and matching handlers
      rt2x00: Move drv_name field into rt2x00_ops
      rt2x00: rt2x00lib is in charge of forcing promisc mode
      rt2x00: Make debug messages more informative
      rt2x00: Fix rt61 typo
      rt2x00: Move CONFIG_RT2X00_LIB_DEBUGFS ifdef out of rt2x00dev.c
      rt2x00: Reduce indentation for txpower handlers
      rt2x00: Define ARCSR2, ARCSR3, ARCSR4 and ARCSR5 registers
      rt2x00: Fix compilation errors for rt2x00-rfkill
      Merge branch 'wireless-dev'
      rt2x00: Merge LENGTH_LOW and LENGTH_HIGH
      rt2x00: Release rt2x00 2.0.1

 drivers/net/wireless/mac80211/rt2x00/Kconfig       |   33 +-
 drivers/net/wireless/mac80211/rt2x00/Makefile      |   10 +-
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.c   |  401 +++++++------
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.h   |   65 ++-
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.c   |  486 +++++++++-------
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.h   |   61 ++-
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.c   |  542 +++++++++++-------
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.h   |   29 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00.h      |  407 +++++++------
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.c |   39 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.h |   22 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c   |  264 ++++-----
 .../net/wireless/mac80211/rt2x00/rt2x00firmware.c  |  129 +++++
 .../net/wireless/mac80211/rt2x00/rt2x00firmware.h  |   49 ++
 drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h   |   15 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00mac.c   |  179 +++---
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.c   |   98 ++--
 .../net/wireless/mac80211/rt2x00/rt2x00rfkill.c    |  133 +++++
 .../net/wireless/mac80211/rt2x00/rt2x00rfkill.h    |   51 ++
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.c   |   76 ++--
 drivers/net/wireless/mac80211/rt2x00/rt61pci.c     |  601 ++++++++++++--------
 drivers/net/wireless/mac80211/rt2x00/rt61pci.h     |   33 +-
 drivers/net/wireless/mac80211/rt2x00/rt73usb.c     |  589 +++++++++++--------
 drivers/net/wireless/mac80211/rt2x00/rt73usb.h     |   33 +-
 24 files changed, 2589 insertions(+), 1756 deletions(-)
 create mode 100644 drivers/net/wireless/mac80211/rt2x00/rt2x00firmware.c
 create mode 100644 drivers/net/wireless/mac80211/rt2x00/rt2x00firmware.h
 create mode 100644 drivers/net/wireless/mac80211/rt2x00/rt2x00rfkill.c
 create mode 100644 drivers/net/wireless/mac80211/rt2x00/rt2x00rfkill.h

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-06-19 18:18 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-06-19 18:18 UTC (permalink / raw)
  To: John Linville, linux-wireless, rt2400-devel

Hi John,

Here is the 2.0.2 release of rt2x00.
As usual most changes are code cleaning,
followed by code moving into the library modules.
Unfortunately, this round still does not contain real bugfixes.
Hopefully the next release will really bugfixes. ;)

The actuall diff is quite big, but that is mainly because
of the cleanup in the register access functions which caused
all register functions to be renamed (which prevents namespace
pollution).

Ivo

---

The following changes since commit 9181e959da76d85d688d8ec763702ed2f3b4edf9:
  John W. Linville (1):
        rt2x00firmware.c: include delay.h to avoid build error on ppc64

are available in the git repository at:

  git://git.serialmonkey.com/rt2x00.git/ upstream

Gertjan van Wingerde (1):
      rt2x00: Clean up register access functions.

Ivo van Doorn (32):
      rt2x00: Remove debug module parameter
      rt2x00: Cleanup header
      rt2x00: *_bbp_check should not return magic value
      rt2x00: rt2400pci - Use BBPCSR for txdesc
      rt2x00: Make antenna selection more transparent
      rt2x00: Don't hardcode beacon interval
      rt2x00: Move config requirement into rt2x00lib
      rt2x00: Remove pointless 0xff checks
      rt2x00: Correct *_bbp_check
      rt2x00: Correctly set the flags for the correct flags field
      rt2x00: Remove unsused structure
      rt2x00: Don't export config functions to outside rt2x00lib
      Merge branch 'wireless-dev'
      rt2x00: Constify txd_size and rxd_size
      rt2x00: rt2x00lib_disable_radio should call toggle_rx
      rt2x00: Move USB radio enabling/disabling into rt2x00usb
      rt2x00: Remove ring->type
      rt2x00: Split rings into tx and rx arrays
      rt2x00: Split tx ring array into tx and bcn
      rt2x00: Move rt2x00{pci,usb} shared code into rt2x00lib
      rt2x00: Move ring allocation into rt2x00lib
      Merge branch 'wireless-dev'
      rt2x00: Fix ring array iteration
      rt2x00: Remove huge macro functions
      rt2x00: Include rt2x00firmware.h
      rt2x00: Move ring allocation partially into rt2x00lib
      rt2x00: Remove unused library call fields
      rt2x00: rt61 and rt73 do not support Atim
      rt2x00: link_tuner should be toggled when the radio is toggled
      rt2x00: Add EEPROM recovery code for mac address
      Merge branch 'wireless-dev'
      rt2x00: Release rt2x00 2.0.2

Mattias Nissler (1):
      rt73: Prevent oops when usb device is disconnected.

 drivers/net/wireless/mac80211/rt2x00/rt2400pci.c   |  627 ++++++---------
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.h   |   28 +-
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.c   |  673 +++++++---------
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.h   |   34 +-
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.c   |  660 ++++++---------
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.h   |   38 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00.h      |  120 ++--
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c   |  540 ++++++++++---
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.h   |   60 ++
 .../net/wireless/mac80211/rt2x00/rt2x00firmware.c  |    7 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h   |   13 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00mac.c   |   52 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.c   |  283 +------
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.h   |   29 +
 .../net/wireless/mac80211/rt2x00/rt2x00rfkill.c    |    4 -
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.c   |  323 +++-----
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.h   |   14 +-
 drivers/net/wireless/mac80211/rt2x00/rt61pci.c     |  858 +++++++++-----------
 drivers/net/wireless/mac80211/rt2x00/rt61pci.h     |   43 +-
 drivers/net/wireless/mac80211/rt2x00/rt73usb.c     |  758 +++++++----------
 drivers/net/wireless/mac80211/rt2x00/rt73usb.h     |   43 +-
 21 files changed, 2363 insertions(+), 2844 deletions(-)
 create mode 100644 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.h

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-07-20  8:11 Ivo van Doorn
  2007-07-20  8:13 ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2007-07-20  8:11 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Finally the 2.0.3 release of rt2x00 is here :)

And as promised since actually contains bugfixes
The hightlights are a working link tuner which finally
makes sure all drivers come close to being actually
useable.

Also a small change in statistics, rt2x00 will now only report the RSSI to mac80211.
The reporting of Noise values have been removed,
since rt2x00 cannot measure the noise and previously
reported the sensitivity value determined by the link_tuner.
And I am not completely sure if that is a desired behavior, since the preference
would be a measured value I guess.

Also I still have to determine what a good value for the Signal reporting
should be. With only a RSSI reporting I feel rt2x00 isn't reporting all that it can...

Ivo

---

The following changes since commit a7008e4ecc4ec69a9868105ce7f805a6ab486d69:
  Johannes Berg (1):
        mac80211: regdomain.c needs to include ieee80211_i.h

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ master

Adam Baker (1):
      rt2x00: Set Maximum sensitivity when not receiving

Ivo van Doorn (42):
      rt2x00: Remove usage of open and stop callbacks
      rt2x00: Fix rfkill compilation
      rt2x00: rfkill should use input_poll device
      rt2x00: Fix promisc mode check
      rt2x00: Put debugfs_intf inbetween DEBUGFS defines
      rt2x00: Cleanup debug messages
      rt2x00: Remove ENTRY_TXD_NEW_SEQ flag
      rt2x00: Remove DRV_NAME define from rt2x00.h
      rt2x00: Remove device & mac_addr fields
      rt2x00: Use the mac80211 provided workqueue
      rt2x00: Don't wake device on resume
      rt2x00: Move interrupt toggling into seperate function
      rt2x00: Round LINK_TUNER_INTERVAL up
      rt2x00: Set the IEEE80211_HW_NO_PROBE_FILTERING flag
      rt2x00: Add rt2570 chipset revisions
      rt2x00: Split TXD_ENTRY_AVAILABLE
      rt2x00: rt61 should check the CIPHER_ERROR bit
      rt2x00: Fix reporting false rate during rx
      rt2x00: Correctly exit the firmware load function
      rt2x00: Fix link tuner limitation for rt2400pci
      rt2x00: Cleanup Kconfig dependencies and selects
      rt2x00: Defer firmware loading untill ifup
      rt2x00: Change register definition ordering
      rt2x00: Correctly initialize PSCSR2 in rt2400.
      rt2x00: Introduce the walking average
      rt2x00: Remove noise reporting
      rt2x00: Fix RSSI value reading / reporting / link tuning
      rt2x00: Use prefetch for ring loop
      rt2x00: Use the register field defines
      rt2x00: Move initialization of rings into rt2x00usb
      rt2x00: Move usb_interrupt_rxdone into rt2x00usb
      rt2x00: Fix RX skb allocation
      rt2x00: KConfig layout correction
      rt2x00: Set DEVICE_ENABLED_RADIO_HW when rfkill is disabled
      rt2x00: Change word argument for debug_access_t
      rt2x00: Suspend/Resume Don't register/reregister device
      Merge branch 'wireless-dev'
      rt2x00: Fix CTS frame requirement detection
      rt2x00: Don't cut FCS in RX frames
      rt2x00: Use delayed_work_pending
      rt2x00: Don't enable/disable link tuner twice
      rt2x00: Release 2.0.3

 drivers/net/wireless/mac80211/rt2x00/Kconfig       |   91 ++++----
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.c   |  167 ++++++-------
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.h   |   45 ++--
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.c   |  191 +++++++-------
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.h   |   54 +++--
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.c   |  176 ++++---------
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.h   |   61 +++--
 drivers/net/wireless/mac80211/rt2x00/rt2x00.h      |  141 +++++++----
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.h |    2 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c   |   86 +------
 .../net/wireless/mac80211/rt2x00/rt2x00firmware.c  |   77 ++----
 .../net/wireless/mac80211/rt2x00/rt2x00firmware.h  |    6 -
 drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h   |    7 -
 drivers/net/wireless/mac80211/rt2x00/rt2x00mac.c   |  131 ++++------
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.c   |   52 ++++-
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.h   |   16 +-
 .../net/wireless/mac80211/rt2x00/rt2x00rfkill.c    |   62 +++--
 .../net/wireless/mac80211/rt2x00/rt2x00rfkill.h    |    7 +
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.c   |  156 +++++++++---
 drivers/net/wireless/mac80211/rt2x00/rt61pci.c     |  264 +++++++++++++-------
 drivers/net/wireless/mac80211/rt2x00/rt61pci.h     |   77 ++++--
 drivers/net/wireless/mac80211/rt2x00/rt73usb.c     |  242 ++++++++++---------
 drivers/net/wireless/mac80211/rt2x00/rt73usb.h     |   81 ++++---
 23 files changed, 1166 insertions(+), 1026 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2007-07-20  8:11 Ivo van Doorn
@ 2007-07-20  8:13 ` Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-07-20  8:13 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, rt2400-devel

Hi,

One additional note I forgot to mention:

> The following changes since commit a7008e4ecc4ec69a9868105ce7f805a6ab486d69:
>   Johannes Berg (1):
>         mac80211: regdomain.c needs to include ieee80211_i.h
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ master

Please note the new location of the Git repository ;)
Because of problems with the git.serialmonkey repository
we have now moved to git.kernel.org. :)

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-07-25 20:49 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-07-25 20:49 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Today a very quick release of 2.0.4,
reason for this quick followup on 2.0.3 are the fixes
regarding the USB ID and the rt61pci interrupts.

The latter one (hopefully) resolves an bugreport recently
raised in the Fedora Bugzilla. (I'll update the report in a few seconds)

And yes I have read the mails of today regarding patch submissions,
so I'll start sending the individual patches as well along with this pull request. ;)

Short note about the state of rt2x00:
  - Code cleaning is progressing, next version will probably contain
    the result of Lindent run. But after that I don't expect big changes regarding
    code style.

  - Writing "Magical" values to the registers has been reduced as much as possible,
    most values that are still magical are really magic and I have no clue on what they
    exactly mean, except that those values should be written. ;)

  - Suspend/resume is completely broken. I am not sure how the device should
    correctly suspend/resume. Most important points on this area are
    deregistering/registering ieee80211_hw and reassociation after resume.
    I am gathering some more info on this, and will post a bigger report on the mailinglist
    in a few days.

  - Statistics reading. Noise and Signal are still empty...
    It would really be nice to have some value to report for these statistics.

  - Bug reports show definite progress, rt2x00 doesn't really seem to break things,
    but neither is it doing a usefull things...

Ivo

---

The following changes since commit 9cc4f5142dd983d178b158e782d5e60900e48270:
  Michael Wu (1):
        mac80211: use more GFP_KERNEL instead of GFP_ATOMIC

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Adam Baker (1):
      rt2x00: Don't export unneeded symbols

Ivo van Doorn (13):
      rt2x00: Check permissions on debugfs write
      Merge branch 'wireless-dev'
      rt2x00: Use rts_cts_rate for CTS frames
      rt2x00: Cleanup allocation/initialization
      rt2x00: rt61pci interrupts are called on MCU CMD done
      rt2x00: Reduce requirement for debugfs wrapper functions
      rt2x00: Don't toggle promisc mode in link_tuner
      rt2x00: Fix MAC address initialization for multiple interfaces
      Merge branch 'wireless-dev'
      rt2x00: Check for all errors on RXdone
      rt2x00: Parse chipset revision for RT chip validation
      rt2x00: Release 2.0.4
      Merge branch 'wireless-dev'

 drivers/net/wireless/mac80211/rt2x00/rt2400pci.c   |   83 +--
 drivers/net/wireless/mac80211/rt2x00/rt2400pci.h   |    2 +-
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.c   |   90 +---
 drivers/net/wireless/mac80211/rt2x00/rt2500pci.h   |    2 +-
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.c   |  105 ++---
 drivers/net/wireless/mac80211/rt2x00/rt2500usb.h   |    4 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00.h      |   17 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.c |  237 +++------
 drivers/net/wireless/mac80211/rt2x00/rt2x00debug.h |   27 +-
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c   |  560 ++++++++++----------
 drivers/net/wireless/mac80211/rt2x00/rt2x00dev.h   |    1 -
 drivers/net/wireless/mac80211/rt2x00/rt2x00mac.c   |   57 ++-
 drivers/net/wireless/mac80211/rt2x00/rt2x00pci.c   |   58 ++-
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.c   |  126 +++--
 drivers/net/wireless/mac80211/rt2x00/rt2x00usb.h   |    1 -
 drivers/net/wireless/mac80211/rt2x00/rt61pci.c     |   99 ++---
 drivers/net/wireless/mac80211/rt2x00/rt61pci.h     |    2 +-
 drivers/net/wireless/mac80211/rt2x00/rt73usb.c     |  100 ++---
 drivers/net/wireless/mac80211/rt2x00/rt73usb.h     |    2 +-
 19 files changed, 731 insertions(+), 842 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-07-31 18:36 Ivo van Doorn
  2007-08-01 17:05 ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2007-07-31 18:36 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is a new release of rt2x00: 2.0.5
Don't let the 25 patches fool you, there are 2 _very_ big patches among them. ;)
The 2 biggest are (as announced earlier) the results of a Lindent run,
and the result of a code cleanup. After those 2 patches the code is hopefully
clean enough to be accepted upstream when rt2x00 is a bit more stable.
In any case further code cleanup patches won't/shouldn't be so big anymore.

Some interesting features in this release:
 - rt73usb no longer crashes in adhoc mode (But neither does it work)
 - rf registers can now be read/written through debugfs
 - Monitor interfaces should now capture everything
 - Signal reporting
 - Correct suspend/resume handling

Ivo

---

The following changes since commit 6e46e62d22ed4b5282d3b9592483e901a9f2643f:
  Zhu Yi (1):
        iwlwifi: update version stamp to 0.1.5

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (25):
      rt2x00: Remove rt73usb_get_tsf
      rt2x00: Put rf register value detection in function
      rt2x00: Don't toggle tuner bit for non-RF2523 chips
      rt2x00: Add reset_tuner handler
      rt2x00: rt2500usb needs to reset BBP 24, 25 and 61
      rt2x00: Cleanup RF register reading/writing
      rt2x00: Add RF register contents to Debugfs
      rt2x00: Fix invalid RF array reading
      rt2x00: Increase RF_SIZE
      rt2x00: rt2x00pci should use rf_size
      rt2x00: Correctly handle RF 0 writing
      rt2x00: Rename init_hw -> probe_hw
      rt2x00: Move interface init/deinit into rt2x00dev
      rt2x00: Fix interface opening/closing on suspend/resume
      rt2x00: Lindent
      rt2x00: Call all configure handlers during resume
      rt2x00: Big rt2x00 cleanup
      rt2x00: Add Multicast/Broadcast filtering
      rt2x00: Include <linux/delay.h>
      rt2x00: Periodically read statistics
      rt2x00: Don't check for preamble in RXdone
      rt2x00: Configure type during add_interface
      rt2x00: Add Signal reporting
      rt2x00: rt2x00 2.0.5
      Merge branch 'wireless-dev'

 drivers/net/wireless/Makefile         |    2 +-
 drivers/net/wireless/rt2400pci.c      |  620 +++++++++++----------
 drivers/net/wireless/rt2400pci.h      |    3 +-
 drivers/net/wireless/rt2500pci.c      |  695 +++++++++++++-----------
 drivers/net/wireless/rt2500pci.h      |    2 +
 drivers/net/wireless/rt2500usb.c      |  686 +++++++++++++-----------
 drivers/net/wireless/rt2500usb.h      |   35 +-
 drivers/net/wireless/rt2x00.h         |  861 +++++++++---------------------
 drivers/net/wireless/rt2x00config.c   |  177 ++++++
 drivers/net/wireless/rt2x00debug.c    |  101 +++--
 drivers/net/wireless/rt2x00debug.h    |   32 +-
 drivers/net/wireless/rt2x00dev.c      |  470 +++++++++++------
 drivers/net/wireless/rt2x00dev.h      |   59 --
 drivers/net/wireless/rt2x00firmware.c |   45 +-
 drivers/net/wireless/rt2x00firmware.h |   43 --
 drivers/net/wireless/rt2x00lib.h      |  137 +++---
 drivers/net/wireless/rt2x00mac.c      |  283 +++++-----
 drivers/net/wireless/rt2x00pci.c      |  140 +++--
 drivers/net/wireless/rt2x00pci.h      |   38 +-
 drivers/net/wireless/rt2x00reg.h      |  270 +++++++++
 drivers/net/wireless/rt2x00rfkill.c   |   41 +-
 drivers/net/wireless/rt2x00rfkill.h   |   58 --
 drivers/net/wireless/rt2x00ring.h     |  242 ++++++++
 drivers/net/wireless/rt2x00usb.c      |  177 ++++---
 drivers/net/wireless/rt2x00usb.h      |   40 +-
 drivers/net/wireless/rt61pci.c        |  966 +++++++++++++++++----------------
 drivers/net/wireless/rt61pci.h        |    3 +-
 drivers/net/wireless/rt73usb.c        |  870 ++++++++++++++++--------------
 drivers/net/wireless/rt73usb.h        |    3 +-
 29 files changed, 3870 insertions(+), 3229 deletions(-)
 create mode 100644 drivers/net/wireless/rt2x00config.c
 delete mode 100644 drivers/net/wireless/rt2x00dev.h
 delete mode 100644 drivers/net/wireless/rt2x00firmware.h
 create mode 100644 drivers/net/wireless/rt2x00reg.h
 delete mode 100644 drivers/net/wireless/rt2x00rfkill.h
 create mode 100644 drivers/net/wireless/rt2x00ring.h

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2007-07-31 18:36 Ivo van Doorn
@ 2007-08-01 17:05 ` Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-01 17:05 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Thanks for the quick pull on rt2x00.git,
but I have a short question:

> Ivo van Doorn (25):
>       rt2x00: Remove rt73usb_get_tsf
>       rt2x00: Put rf register value detection in function
>       rt2x00: Don't toggle tuner bit for non-RF2523 chips
>       rt2x00: Add reset_tuner handler
>       rt2x00: rt2500usb needs to reset BBP 24, 25 and 61
>       rt2x00: Cleanup RF register reading/writing
>       rt2x00: Add RF register contents to Debugfs
>       rt2x00: Fix invalid RF array reading
>       rt2x00: Increase RF_SIZE
>       rt2x00: rt2x00pci should use rf_size
>       rt2x00: Correctly handle RF 0 writing
>       rt2x00: Rename init_hw -> probe_hw
>       rt2x00: Move interface init/deinit into rt2x00dev
>       rt2x00: Fix interface opening/closing on suspend/resume
>       rt2x00: Lindent
>       rt2x00: Call all configure handlers during resume
>       rt2x00: Big rt2x00 cleanup
>       rt2x00: Add Multicast/Broadcast filtering
>       rt2x00: Include <linux/delay.h>
>       rt2x00: Periodically read statistics
>       rt2x00: Don't check for preamble in RXdone
>       rt2x00: Configure type during add_interface
>       rt2x00: Add Signal reporting

The above have been merged nicely,
but where did the following patch go to?

>       rt2x00: rt2x00 2.0.5

Was this intentionally dropped,
or was there a weird git problem somewhere?

Thanks,

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-08-02 15:45 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-02 15:45 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is rt2x00 version 2.0.6,
unfortunately 2.0.5 was broken and unusable.

Problem has been found and fixed, so together with
some other small changes here is 2.0.6 :)

This one should be safe to be merged with FC kernels. ;)

Ivo

---

The following changes since commit 515c4dbee8271ff66fde61304309b1992e430502:
  John W. Linville (1):
        Merge branch 'upstream' of git://git.kernel.org/.../ivd/rt2x00

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (7):
      Merge branch 'wireless-dev'
      rt2x00: Add new USB ID for Buffalo rt73usb
      rt2x00: Update rssi before signal calculation
      rt2x00: Return 0 when the offset != 0
      rt2x00: rt2x00lib_config_mac_addr should call config_mac
      rt2x00: Release rt2x00 2.0.6
      Merge branch 'wireless-dev'

 drivers/net/wireless/rt2x00.h       |    2 +-
 drivers/net/wireless/rt2x00config.c |    4 ++--
 drivers/net/wireless/rt2x00debug.c  |    6 ++++++
 drivers/net/wireless/rt2x00dev.c    |    2 +-
 drivers/net/wireless/rt73usb.c      |    2 ++
 5 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index c5c1773..77556fe 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -41,7 +41,7 @@
  * Module information.
  * DRV_NAME should be set within the individual module source files.
  */
-#define DRV_VERSION	"2.0.5"
+#define DRV_VERSION	"2.0.6"
 #define DRV_PROJECT	"http://rt2x00.serialmonkey.com"
 
 /*
diff --git a/drivers/net/wireless/rt2x00config.c b/drivers/net/wireless/rt2x00config.c
index 3733a84..11d5646 100644
--- a/drivers/net/wireless/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00config.c
@@ -37,13 +37,13 @@
 void rt2x00lib_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *mac)
 {
 	if (mac)
-		rt2x00dev->ops->lib->config_bssid(rt2x00dev, mac);
+		rt2x00dev->ops->lib->config_mac_addr(rt2x00dev, mac);
 }
 
 void rt2x00lib_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 {
 	if (bssid)
-		rt2x00dev->ops->lib->config_mac_addr(rt2x00dev, bssid);
+		rt2x00dev->ops->lib->config_bssid(rt2x00dev, bssid);
 }
 
 void rt2x00lib_config_packet_filter(struct rt2x00_dev *rt2x00dev, int filter)
diff --git a/drivers/net/wireless/rt2x00debug.c b/drivers/net/wireless/rt2x00debug.c
index ffc95bb..d6c4cfe 100644
--- a/drivers/net/wireless/rt2x00debug.c
+++ b/drivers/net/wireless/rt2x00debug.c
@@ -124,6 +124,9 @@ static ssize_t rt2x00debug_read_##__name(struct file *file,	\
 	size_t size;						\
 	__type value;						\
 								\
+	if (*offset)						\
+		return 0;					\
+								\
 	if (intf->offset_##__name > debug->__name.word_count)	\
 		return -EINVAL;					\
 								\
@@ -151,6 +154,9 @@ static ssize_t rt2x00debug_write_##__name(struct file *file,	\
 	size_t size;						\
 	__type value;						\
 								\
+	if (*offset)						\
+		return 0;					\
+								\
 	if (!capable(CAP_NET_ADMIN))				\
 		return -EPERM;					\
 								\
diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index a584fbe..28ddbe0 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -349,11 +349,11 @@ void rt2x00lib_rxdone(struct data_entry *entry, char *data,
 		}
 	}
 
+	rt2x00_update_link_rssi(&rt2x00dev->link, rssi);
 	rt2x00dev->link.rx_success++;
 	rx_status->rate = val;
 	rx_status->signal = rt2x00lib_calculate_link_signal(rt2x00dev);
 	rx_status->ssi = rssi;
-	rt2x00_update_link_rssi(&rt2x00dev->link, rssi);
 
 	/*
 	 * Let's allocate a sk_buff where we can store the received data in,
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 48fb38e..2f0bf29 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -1884,6 +1884,8 @@ static struct usb_device_id rt73usb_device_table[] = {
 	{ USB_DEVICE(0x050d, 0x905b), USB_DEVICE_DATA(&rt73usb_ops) },
 	/* Billionton */
 	{ USB_DEVICE(0x1631, 0xc019), USB_DEVICE_DATA(&rt73usb_ops) },
+	/* Buffalo */
+	{ USB_DEVICE(0x0411, 0x00f4), USB_DEVICE_DATA(&rt73usb_ops) },
 	/* CNet */
 	{ USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt73usb_ops) },
 	{ USB_DEVICE(0x1371, 0x9032), USB_DEVICE_DATA(&rt73usb_ops) },

^ permalink raw reply related	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-08-19 18:18 Ivo van Doorn
  2007-08-19 18:21 ` [PATCH 01/30] rt2x00: Correctly configure packet filter in monitor mode Ivo van Doorn
                   ` (30 more replies)
  0 siblings, 31 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:18 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Well finally rt2x00 2.0.7 is released, unfortunately it will
not be the last release in the 2.0.* series as promised earlier.

This series contains lots of bugfixes, but some of the more
critical issues are still present. rt2x00 is however becoming
more usable for more people, so the progress is there. ;)

I'll do my best to make the next release 2.0.8 the last in the
2.0.* series so 2.1.0 can be moved upstream. :)

Ivo

---
The following changes since commit f5a420590f3f6a45ee5bca0048640f0f24852315:
  John W. Linville (1):
        Merge branch 'b43' into everything

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (27):
      rt2x00: Correctly configure packet filter in monitor mode
      rt2x00: Clear MAC and BSSID when non-monitor interface goes down
      rt2x00: Check return value of usb_control_msg()
      rt2x00: Clear all fields on start_link_tune()
      rt2x00: Don't increase rx_failed for individual frames
      rt2x00: Set vgc_level during reset_tuner
      rt2x00: Schedule beacon update
      rt2x00: Be consistent with unsigned
      rt2x00: Correctly reset TX/RX success/failed counters
      rt2x00: Rework RF register handling
      rt2x00: rt2x00_ring_free returns invalid length
      rt2x00: Use caching for USB transfers
      rt2x00: Cleanup set_state for rt61 and rt73
      rt2x00: Fix register initialization ordering
      rt2x00: memset descriptor before use
      rt2x00: Remove IEEE80211_HW_WEP_INCLUDE_IV flag
      rt2x00: Cleanup TXD flags
      rt2x00: Add byte-ordering annotation for MAC and BSSID
      rt2x00: Correctly set TXD retry flag
      rt2x00: Move rt2x00 files into rt2x00 folder
      rt2x00: Add file pattern to MAINTAINER entry
      rt2x00: Fix PLCP setup
      rt2x00: Clean up RATEMASK handling
      rt2x00: Add rt2x00lib_reset_link_tuner()
      rt2x00: Always check if mac80211 requested TX status update
      rt2x00: Lindent
      rt2x00: rt2x00 2.0.7

Luca Tettamanti (1):
      Fix off-by-one error in debugfs helpers

Mattias Nissler (2):
      rt2x00: Fix width of filter field.
      rt2x00: Store firmware in memory

 MAINTAINERS                                        |    1 +
 drivers/net/wireless/Kconfig                       |  131 +------
 drivers/net/wireless/Makefile                      |   23 +-
 drivers/net/wireless/rt2x00/Kconfig                |  130 ++++++
 drivers/net/wireless/rt2x00/Makefile               |   22 +
 drivers/net/wireless/{ => rt2x00}/rt2400pci.c      |  149 ++++---
 drivers/net/wireless/{ => rt2x00}/rt2400pci.h      |    0 
 drivers/net/wireless/{ => rt2x00}/rt2500pci.c      |  409 ++++++++++--------
 drivers/net/wireless/{ => rt2x00}/rt2500pci.h      |    0 
 drivers/net/wireless/{ => rt2x00}/rt2500usb.c      |  382 +++++++++-------
 drivers/net/wireless/{ => rt2x00}/rt2500usb.h      |    0 
 drivers/net/wireless/{ => rt2x00}/rt2x00.h         |   56 ++-
 drivers/net/wireless/{ => rt2x00}/rt2x00config.c   |   14 +-
 drivers/net/wireless/{ => rt2x00}/rt2x00debug.c    |   23 +-
 drivers/net/wireless/{ => rt2x00}/rt2x00debug.h    |    0 
 drivers/net/wireless/{ => rt2x00}/rt2x00dev.c      |  221 ++++++----
 drivers/net/wireless/{ => rt2x00}/rt2x00firmware.c |   43 ++-
 drivers/net/wireless/{ => rt2x00}/rt2x00lib.h      |    5 +
 drivers/net/wireless/{ => rt2x00}/rt2x00mac.c      |   15 +-
 drivers/net/wireless/{ => rt2x00}/rt2x00pci.c      |    7 +-
 drivers/net/wireless/{ => rt2x00}/rt2x00pci.h      |    0 
 drivers/net/wireless/{ => rt2x00}/rt2x00reg.h      |   56 ++-
 drivers/net/wireless/{ => rt2x00}/rt2x00rfkill.c   |    0 
 drivers/net/wireless/{ => rt2x00}/rt2x00ring.h     |    6 +-
 drivers/net/wireless/{ => rt2x00}/rt2x00usb.c      |  114 ++++-
 drivers/net/wireless/{ => rt2x00}/rt2x00usb.h      |   60 +++-
 drivers/net/wireless/{ => rt2x00}/rt61pci.c        |  466 ++++++++------------
 drivers/net/wireless/{ => rt2x00}/rt61pci.h        |    0 
 drivers/net/wireless/{ => rt2x00}/rt73usb.c        |  471 +++++++++++---------
 drivers/net/wireless/{ => rt2x00}/rt73usb.h        |    0 
 30 files changed, 1532 insertions(+), 1272 deletions(-)
 create mode 100644 drivers/net/wireless/rt2x00/Kconfig
 create mode 100644 drivers/net/wireless/rt2x00/Makefile
 rename drivers/net/wireless/{ => rt2x00}/rt2400pci.c (94%)
 rename drivers/net/wireless/{ => rt2x00}/rt2400pci.h (100%)
 rename drivers/net/wireless/{ => rt2x00}/rt2500pci.c (84%)
 rename drivers/net/wireless/{ => rt2x00}/rt2500pci.h (100%)
 rename drivers/net/wireless/{ => rt2x00}/rt2500usb.c (81%)
 rename drivers/net/wireless/{ => rt2x00}/rt2500usb.h (100%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00.h (94%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00config.c (92%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00debug.c (94%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00debug.h (100%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00dev.c (85%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00firmware.c (84%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00lib.h (94%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00mac.c (97%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00pci.c (98%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00pci.h (100%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00reg.h (80%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00rfkill.c (100%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00ring.h (96%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00usb.c (85%)
 rename drivers/net/wireless/{ => rt2x00}/rt2x00usb.h (65%)
 rename drivers/net/wireless/{ => rt2x00}/rt61pci.c (89%)
 rename drivers/net/wireless/{ => rt2x00}/rt61pci.h (100%)
 rename drivers/net/wireless/{ => rt2x00}/rt73usb.c (82%)
 rename drivers/net/wireless/{ => rt2x00}/rt73usb.h (100%)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* [PATCH 01/30] rt2x00: Correctly configure packet filter in monitor mode
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
@ 2007-08-19 18:21 ` Ivo van Doorn
  2007-08-19 18:21 ` [PATCH 02/30] rt2x00: Clear MAC and BSSID when non-monitor interface goes down Ivo van Doorn
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:21 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From a065c6ce407b30a02777761794e77ee6cfa8663e Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 12:50:42 +0200
Subject: [PATCH 01/30] rt2x00: Correctly configure packet filter in monitor mode

If there is a non-monitor interface present
the packet should be strict (even if a monitor interface is present!).
When there is only 1 interface present which is in monitor mode
we should start accepting _all_ frames.
This also means there is no special packet filtering in monitor mode,
so don't check for monitor mode in the set_multicast_list handler.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c    |   19 +++++++++++++------
 drivers/net/wireless/rt2500pci.c    |   19 +++++++++++++------
 drivers/net/wireless/rt2500usb.c    |   19 +++++++++++++------
 drivers/net/wireless/rt2x00config.c |   12 ------------
 drivers/net/wireless/rt2x00mac.c    |    6 ------
 drivers/net/wireless/rt61pci.c      |   21 ++++++++++++++-------
 drivers/net/wireless/rt73usb.c      |   21 ++++++++++++++-------
 7 files changed, 67 insertions(+), 50 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index 757d749..d97fa31 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -305,15 +305,22 @@ static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, int type)
 	else
 		rt2x00_set_field32(&reg, RXCSR0_DROP_TODS, 0);
 
-	rt2x00_set_field32(&reg, RXCSR0_DROP_CRC, 1);
-	if (is_monitor_present(&rt2x00dev->interface)) {
-		rt2x00_set_field32(&reg, RXCSR0_DROP_PHYSICAL, 0);
-		rt2x00_set_field32(&reg, RXCSR0_DROP_CONTROL, 0);
-		rt2x00_set_field32(&reg, RXCSR0_DROP_VERSION_ERROR, 0);
-	} else {
+	/*
+	 * If there is a non-monitor interface present
+	 * the packet should be strict (even if a monitor interface is present!).
+	 * When there is only 1 interface present which is in monitor mode
+	 * we should start accepting _all_ frames.
+	 */
+	if (is_interface_present(&rt2x00dev->interface)) {
+		rt2x00_set_field32(&reg, RXCSR0_DROP_CRC, 1);
 		rt2x00_set_field32(&reg, RXCSR0_DROP_PHYSICAL, 1);
 		rt2x00_set_field32(&reg, RXCSR0_DROP_CONTROL, 1);
 		rt2x00_set_field32(&reg, RXCSR0_DROP_VERSION_ERROR, 1);
+	} else if (is_monitor_present(&rt2x00dev->interface)) {
+		rt2x00_set_field32(&reg, RXCSR0_DROP_CRC, 0);
+		rt2x00_set_field32(&reg, RXCSR0_DROP_PHYSICAL, 0);
+		rt2x00_set_field32(&reg, RXCSR0_DROP_CONTROL, 0);
+		rt2x00_set_field32(&reg, RXCSR0_DROP_VERSION_ERROR, 0);
 	}
 
 	rt2x00pci_register_write(rt2x00dev, RXCSR0, reg);
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index dd98aa4..0a0fa22 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -309,15 +309,22 @@ static void rt2500pci_config_type(struct rt2x00_dev *rt2x00dev, const int type)
 	else
 		rt2x00_set_field32(&reg, RXCSR0_DROP_TODS, 0);
 
-	rt2x00_set_field32(&reg, RXCSR0_DROP_CRC, 1);
-	if (is_monitor_present(&rt2x00dev->interface)) {
-		rt2x00_set_field32(&reg, RXCSR0_DROP_PHYSICAL, 0);
-		rt2x00_set_field32(&reg, RXCSR0_DROP_CONTROL, 0);
-		rt2x00_set_field32(&reg, RXCSR0_DROP_VERSION_ERROR, 0);
-	} else {
+	/*
+	 * If there is a non-monitor interface present
+	 * the packet should be strict (even if a monitor interface is present!).
+	 * When there is only 1 interface present which is in monitor mode
+	 * we should start accepting _all_ frames.
+	 */
+	if (is_interface_present(&rt2x00dev->interface)) {
+		rt2x00_set_field32(&reg, RXCSR0_DROP_CRC, 1);
 		rt2x00_set_field32(&reg, RXCSR0_DROP_PHYSICAL, 1);
 		rt2x00_set_field32(&reg, RXCSR0_DROP_CONTROL, 1);
 		rt2x00_set_field32(&reg, RXCSR0_DROP_VERSION_ERROR, 1);
+	} else if (is_monitor_present(&rt2x00dev->interface)) {
+		rt2x00_set_field32(&reg, RXCSR0_DROP_CRC, 0);
+		rt2x00_set_field32(&reg, RXCSR0_DROP_PHYSICAL, 0);
+		rt2x00_set_field32(&reg, RXCSR0_DROP_CONTROL, 0);
+		rt2x00_set_field32(&reg, RXCSR0_DROP_VERSION_ERROR, 0);
 	}
 
 	rt2x00pci_register_write(rt2x00dev, RXCSR0, reg);
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index e09fb9f..ad400dd 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -314,15 +314,22 @@ static void rt2500usb_config_type(struct rt2x00_dev *rt2x00dev, const int type)
 	else
 		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_TODS, 0);
 
-	rt2x00_set_field16(&reg, TXRX_CSR2_DROP_CRC, 1);
-	if (is_monitor_present(&rt2x00dev->interface)) {
-		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_PHYSICAL, 0);
-		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_CONTROL, 0);
-		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_VERSION_ERROR, 0);
-	} else {
+	/*
+	 * If there is a non-monitor interface present
+	 * the packet should be strict (even if a monitor interface is present!).
+	 * When there is only 1 interface present which is in monitor mode
+	 * we should start accepting _all_ frames.
+	 */
+	if (is_interface_present(&rt2x00dev->interface)) {
+		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_CRC, 1);
 		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_PHYSICAL, 1);
 		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_CONTROL, 1);
 		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_VERSION_ERROR, 1);
+	} else if (is_monitor_present(&rt2x00dev->interface)) {
+		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_CRC, 0);
+		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_PHYSICAL, 0);
+		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_CONTROL, 0);
+		rt2x00_set_field16(&reg, TXRX_CSR2_DROP_VERSION_ERROR, 0);
 	}
 
 	rt2500usb_register_write(rt2x00dev, TXRX_CSR2, reg);
diff --git a/drivers/net/wireless/rt2x00config.c b/drivers/net/wireless/rt2x00config.c
index 11d5646..4fec0af 100644
--- a/drivers/net/wireless/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00config.c
@@ -48,18 +48,6 @@ void rt2x00lib_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 
 void rt2x00lib_config_packet_filter(struct rt2x00_dev *rt2x00dev, int filter)
 {
-	struct interface *intf = &rt2x00dev->interface;
-
-	/*
-	 * When a monitor interface is present,
-	 * we should force enable all modes.
-	 */
-	if (is_monitor_present(intf)) {
-		filter = IFF_PROMISC | IFF_MULTICAST | IFF_BROADCAST;
-		if (intf->filter != filter)
-			__set_bit(PACKET_FILTER_PENDING, &rt2x00dev->flags);
-	}
-
 	/*
 	 * Only configure the device when something has changed,
 	 * or if we are in RESET state in which case all configuration
diff --git a/drivers/net/wireless/rt2x00mac.c b/drivers/net/wireless/rt2x00mac.c
index 205f10f..c384767 100644
--- a/drivers/net/wireless/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00mac.c
@@ -333,12 +333,6 @@ void rt2x00mac_set_multicast_list(struct ieee80211_hw *hw,
 	rt2x00dev->interface.filter = flags;
 
 	/*
-	 * No filtering in monitor mode.
-	 */
-	if (is_monitor_present(&rt2x00dev->interface))
-		return;
-
-	/*
 	 * Raise the pending bit to indicate the
 	 * packet filter should be updated.
 	 */
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index 00f66e0..7f3a00b 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -338,17 +338,24 @@ static void rt61pci_config_type(struct rt2x00_dev *rt2x00dev, const int type)
 	else
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_TO_DS, 0);
 
-	rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CRC, 1);
-	if (is_monitor_present(&rt2x00dev->interface)) {
-		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_PHYSICAL, 0);
-		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CONTROL, 0);
-		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_VERSION_ERROR, 0);
-		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_ACK_CTS, 0);
-	} else {
+	/*
+	 * If there is a non-monitor interface present
+	 * the packet should be strict (even if a monitor interface is present!).
+	 * When there is only 1 interface present which is in monitor mode
+	 * we should start accepting _all_ frames.
+	 */
+	if (is_interface_present(&rt2x00dev->interface)) {
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CRC, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_PHYSICAL, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CONTROL, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_VERSION_ERROR, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_ACK_CTS, 1);
+	} else if (is_monitor_present(&rt2x00dev->interface)) {
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CRC, 0);
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_PHYSICAL, 0);
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CONTROL, 0);
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_VERSION_ERROR, 0);
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_ACK_CTS, 0);
 	}
 
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR0, reg);
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 2f0bf29..90e2b29 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -313,17 +313,24 @@ static void rt73usb_config_type(struct rt2x00_dev *rt2x00dev, const int type)
 	else
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_TO_DS, 0);
 
-	rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CRC, 1);
-	if (is_monitor_present(&rt2x00dev->interface)) {
-		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_PHYSICAL, 0);
-		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CONTROL, 0);
-		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_VERSION_ERROR, 0);
-		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_ACK_CTS, 0);
-	} else {
+	/*
+	 * If there is a non-monitor interface present
+	 * the packet should be strict (even if a monitor interface is present!).
+	 * When there is only 1 interface present which is in monitor mode
+	 * we should start accepting _all_ frames.
+	 */
+	if (is_interface_present(&rt2x00dev->interface)) {
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CRC, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_PHYSICAL, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CONTROL, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_VERSION_ERROR, 1);
 		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_ACK_CTS, 1);
+	} else if (is_monitor_present(&rt2x00dev->interface)) {
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CRC, 0);
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_PHYSICAL, 0);
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_CONTROL, 0);
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_VERSION_ERROR, 0);
+		rt2x00_set_field32(&reg, TXRX_CSR0_DROP_ACK_CTS, 0);
 	}
 
 	rt73usb_register_write(rt2x00dev, TXRX_CSR0, reg);
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 02/30] rt2x00: Clear MAC and BSSID when non-monitor interface goes down
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
  2007-08-19 18:21 ` [PATCH 01/30] rt2x00: Correctly configure packet filter in monitor mode Ivo van Doorn
@ 2007-08-19 18:21 ` Ivo van Doorn
  2007-08-19 18:21 ` [PATCH 03/30] rt2x00: Check return value of usb_control_msg() Ivo van Doorn
                   ` (28 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:21 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From f027057821e22cf353fd37e3c139dc908c85bffe Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 12:51:46 +0200
Subject: [PATCH 02/30] rt2x00: Clear MAC and BSSID when non-monitor interface goes down

When the non-monitor interface goes down the BSSID and MAC address
should be cleared inside the registers to prevent acking of frames.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00.h    |    2 +-
 drivers/net/wireless/rt2x00dev.c |    8 ++++++--
 drivers/net/wireless/rt2x00mac.c |    4 ++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index 77556fe..b06cda6 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -290,7 +290,7 @@ struct interface {
 	/*
 	 * MAC of the device.
 	 */
-	u8 *mac;
+	u8 mac[ETH_ALEN];
 
 	/*
 	 * BBSID of the AP to associate with.
diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index 28ddbe0..1597d2d 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -920,12 +920,16 @@ void rt2x00lib_deinit_interface(struct rt2x00_dev *rt2x00dev)
 
 	/*
 	 * If no interfaces are present, we should disable the radio
-	 * Otherwise check which interface needs to be initialized.
+	 * Otherwise configure the mac_address and bssid and check
+	 * which interface needs to be initialized.
 	 */
 	if (!is_monitor_present(intf) && !is_interface_present(intf))
 		rt2x00lib_disable_radio(rt2x00dev);
-	else if (is_monitor_present(intf) ^ is_interface_present(intf))
+	else if (is_monitor_present(intf) ^ is_interface_present(intf)) {
+		rt2x00lib_config_mac_addr(rt2x00dev, intf->mac);
+		rt2x00lib_config_bssid(rt2x00dev, intf->bssid);
 		rt2x00lib_config_type(rt2x00dev, intf->type);
+	}
 
 	/*
 	 * If we are in reset mode, the device must be deinitialized.
diff --git a/drivers/net/wireless/rt2x00mac.c b/drivers/net/wireless/rt2x00mac.c
index c384767..31fe0f1 100644
--- a/drivers/net/wireless/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00mac.c
@@ -192,7 +192,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
 		intf->type = conf->type;
 		if (conf->type == IEEE80211_IF_TYPE_AP)
 			memcpy(&intf->bssid, conf->mac_addr, ETH_ALEN);
-		intf->mac = conf->mac_addr;
+		memcpy(&intf->mac, conf->mac_addr, ETH_ALEN);
 		intf->filter = 0;
 	}
 
@@ -232,7 +232,7 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
 		intf->id = 0;
 		intf->type = INVALID_INTERFACE;
 		memset(&intf->bssid, 0x00, ETH_ALEN);
-		intf->mac = NULL;
+		memset(&intf->mac, 0x00, ETH_ALEN);
 		intf->filter = 0;
 	}
 
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 03/30] rt2x00: Check return value of usb_control_msg()
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
  2007-08-19 18:21 ` [PATCH 01/30] rt2x00: Correctly configure packet filter in monitor mode Ivo van Doorn
  2007-08-19 18:21 ` [PATCH 02/30] rt2x00: Clear MAC and BSSID when non-monitor interface goes down Ivo van Doorn
@ 2007-08-19 18:21 ` Ivo van Doorn
  2007-08-19 18:22 ` [PATCH 04/30] rt2x00: Clear all fields on start_link_tune() Ivo van Doorn
                   ` (27 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:21 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 91de0ebc5c8e4c6799b4de5b34301a0884c085d2 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 12:52:33 +0200
Subject: [PATCH 03/30] rt2x00: Check return value of usb_control_msg()

Check the return value of usb_control_msg and try
to determine the best course of action:
 - Bail out immediately
 - Increase timeout value
 - Try again

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00usb.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00usb.c b/drivers/net/wireless/rt2x00usb.c
index 38804d7..05ae870 100644
--- a/drivers/net/wireless/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00usb.c
@@ -47,6 +47,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
 	    interface_to_usbdev(rt2x00dev_usb(rt2x00dev));
 	int status;
 	unsigned int i;
+	unsigned int time = timeout;
 
 	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
 		status = usb_control_msg(usb_dev,
@@ -54,9 +55,20 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
 					  usb_rcvctrlpipe(usb_dev, 0) :
 					  usb_sndctrlpipe(usb_dev, 0)),
 					 request, type, value, offset,
-					 buffer, buffer_length, timeout);
+					 buffer, buffer_length, time);
+
 		if (status >= 0)
 			return 0;
+
+		/*
+		 * Check for errors,
+		 * -ETIMEDOUT: We need a bit more time to complete.
+		 * -ENODEV: Device has disappeared, no point continuing.
+		 */
+		if (status == -ETIMEDOUT)
+			time *= 2;
+		else if (status == -ENODEV)
+			break;
 	}
 
 	ERROR(rt2x00dev,
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 04/30] rt2x00: Clear all fields on start_link_tune()
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (2 preceding siblings ...)
  2007-08-19 18:21 ` [PATCH 03/30] rt2x00: Check return value of usb_control_msg() Ivo van Doorn
@ 2007-08-19 18:22 ` Ivo van Doorn
  2007-08-19 18:22 ` [PATCH 05/30] rt2x00: Don't increase rx_failed for individual frames Ivo van Doorn
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:22 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 643e88e4fca8b22d60f718226bede9f033b3e869 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 12:55:02 +0200
Subject: [PATCH 04/30] rt2x00: Clear all fields on start_link_tune()

All variables inside the link structure need to be
cleared when calling start_link_tune().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00dev.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index 1597d2d..b7191cc 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -73,6 +73,10 @@ static void rt2x00_start_link_tune(struct rt2x00_dev *rt2x00dev)
 	rt2x00dev->link.avg_rssi = 0;
 	rt2x00dev->link.vgc_level = 0;
 	rt2x00dev->link.false_cca = 0;
+	rt2x00dev->link.rx_success = 0;
+	rt2x00dev->link.rx_failed = 0;
+	rt2x00dev->link.tx_success = 0;
+	rt2x00dev->link.tx_failed = 0;
 
 	/*
 	 * Reset the link tuner.
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 05/30] rt2x00: Don't increase rx_failed for individual frames
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (3 preceding siblings ...)
  2007-08-19 18:22 ` [PATCH 04/30] rt2x00: Clear all fields on start_link_tune() Ivo van Doorn
@ 2007-08-19 18:22 ` Ivo van Doorn
  2007-08-19 18:23 ` [PATCH 06/30] rt2x00: Set vgc_level during reset_tuner Ivo van Doorn
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:22 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 53237308ec1ca8f3b3679c7e04cfe467bfeef077 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 12:55:29 +0200
Subject: [PATCH 05/30] rt2x00: Don't increase rx_failed for individual frames

Add the size argument to fill_rxdone.
This will make the return value of rxdone more meaningfull
(valid frame or invalid frame) and don't increase the
rx_failed counter when a invalid frame is encountered.
This will prevent the signal value to be very low
when monitor mode is enabled and invalid frames are passed
to the device.
Note that dropping of these frames will disappear in the
future when mac80211 receives the correct patches that
will allow us to send corrupt packages to it.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |    9 ++++-----
 drivers/net/wireless/rt2500pci.c |    9 ++++-----
 drivers/net/wireless/rt2500usb.c |    9 ++++-----
 drivers/net/wireless/rt2x00.h    |    2 +-
 drivers/net/wireless/rt2x00pci.c |    7 ++++---
 drivers/net/wireless/rt2x00usb.c |    6 ++++--
 drivers/net/wireless/rt61pci.c   |    9 ++++-----
 drivers/net/wireless/rt73usb.c   |    9 ++++-----
 8 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index d97fa31..1506666 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -1203,7 +1203,7 @@ static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
  * RX control handlers
  */
 static int rt2400pci_fill_rxdone(struct data_entry *entry,
-				 int *signal, int *rssi, int *ofdm)
+				 int *signal, int *rssi, int *ofdm, int *size)
 {
 	struct data_desc *rxd = entry->priv;
 	u32 word0;
@@ -1213,10 +1213,8 @@ static int rt2400pci_fill_rxdone(struct data_entry *entry,
 	rt2x00_desc_read(rxd, 2, &word2);
 
 	if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR) ||
-	    rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR)) {
-		entry->ring->rt2x00dev->link.rx_failed++;
+	    rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR))
 		return -EINVAL;
-	}
 
 	/*
 	 * Obtain the status about this packet.
@@ -1225,8 +1223,9 @@ static int rt2400pci_fill_rxdone(struct data_entry *entry,
 	*rssi = rt2x00_get_field32(word2, RXD_W2_RSSI) -
 	    entry->ring->rt2x00dev->rssi_offset;
 	*ofdm = 0;
+	*size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
 
-	return rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
+	return 0;
 }
 
 /*
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index 0a0fa22..445ec3e 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -1381,7 +1381,7 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
  * RX control handlers
  */
 static int rt2500pci_fill_rxdone(struct data_entry *entry,
-				 int *signal, int *rssi, int *ofdm)
+				 int *signal, int *rssi, int *ofdm, int *size)
 {
 	struct data_desc *rxd = entry->priv;
 	u32 word0;
@@ -1392,17 +1392,16 @@ static int rt2500pci_fill_rxdone(struct data_entry *entry,
 
 	if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR) ||
 	    rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR) ||
-	    rt2x00_get_field32(word0, RXD_W0_ICV_ERROR)) {
-		entry->ring->rt2x00dev->link.rx_failed++;
+	    rt2x00_get_field32(word0, RXD_W0_ICV_ERROR))
 		return -EINVAL;
-	}
 
 	*signal = rt2x00_get_field32(word2, RXD_W2_SIGNAL);
 	*rssi = rt2x00_get_field32(word2, RXD_W2_RSSI) -
 	    entry->ring->rt2x00dev->rssi_offset;
 	*ofdm = rt2x00_get_field32(word0, RXD_W0_OFDM);
+	*size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
 
-	return rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
+	return 0;
 }
 
 /*
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index ad400dd..29b675c 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -1178,7 +1178,7 @@ static void rt2500usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
  * RX control handlers
  */
 static int rt2500usb_fill_rxdone(struct data_entry *entry,
-				 int *signal, int *rssi, int *ofdm)
+				 int *signal, int *rssi, int *ofdm, int *size)
 {
 	struct urb *urb = entry->priv;
 	struct data_desc *rxd = (struct data_desc *)(entry->skb->data +
@@ -1192,10 +1192,8 @@ static int rt2500usb_fill_rxdone(struct data_entry *entry,
 
 	if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR) ||
 	    rt2x00_get_field32(word0, RXD_W0_PHYSICAL_ERROR) ||
-	    rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR)) {
-		entry->ring->rt2x00dev->link.rx_failed++;
+	    rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR))
 		return -EINVAL;
-	}
 
 	/*
 	 * Obtain the status about this packet.
@@ -1204,8 +1202,9 @@ static int rt2500usb_fill_rxdone(struct data_entry *entry,
 	*rssi = rt2x00_get_field32(word1, RXD_W1_RSSI) -
 	    entry->ring->rt2x00dev->rssi_offset;
 	*ofdm = rt2x00_get_field32(word0, RXD_W0_OFDM);
+	*size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
 
-	return rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
+	return;
 }
 
 /*
diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index b06cda6..4b8906e 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -402,7 +402,7 @@ struct rt2x00lib_ops {
 	 * RX control handlers
 	 */
 	int (*fill_rxdone) (struct data_entry *entry,
-			    int *signal, int *rssi, int *ofdm);
+			    int *signal, int *rssi, int *ofdm, int *size);
 
 	/*
 	 * Configuration handlers.
diff --git a/drivers/net/wireless/rt2x00pci.c b/drivers/net/wireless/rt2x00pci.c
index bf62dd0..c54b30f 100644
--- a/drivers/net/wireless/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00pci.c
@@ -124,6 +124,7 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
 	struct data_entry *entry;
 	struct data_desc *rxd;
 	u32 desc;
+	int retval;
 	int signal;
 	int rssi;
 	int ofdm;
@@ -137,9 +138,9 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
 		if (rt2x00_get_field32(desc, RXD_ENTRY_OWNER_NIC))
 			break;
 
-		size = rt2x00dev->ops->lib->fill_rxdone(entry, &signal,
-							&rssi, &ofdm);
-		if (size < 0)
+		retval = rt2x00dev->ops->lib->fill_rxdone(entry, &signal,
+							  &rssi, &ofdm, &size);
+		if (retval)
 			goto skip_entry;
 
 		/*
diff --git a/drivers/net/wireless/rt2x00usb.c b/drivers/net/wireless/rt2x00usb.c
index 05ae870..6dd0801 100644
--- a/drivers/net/wireless/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00usb.c
@@ -295,6 +295,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
 	struct data_entry *entry = (struct data_entry *)urb->context;
 	struct data_ring *ring = entry->ring;
 	struct rt2x00_dev *rt2x00dev = ring->rt2x00dev;
+	int retval;
 	int signal;
 	int rssi;
 	int ofdm;
@@ -312,8 +313,9 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
 	if (urb->actual_length < entry->ring->desc_size || urb->status)
 		goto skip_entry;
 
-	size = rt2x00dev->ops->lib->fill_rxdone(entry, &signal, &rssi, &ofdm);
-	if (size < 0)
+	retval = rt2x00dev->ops->lib->fill_rxdone(entry, &signal, &rssi,
+						  &ofdm, &size);
+	if (retval)
 		goto skip_entry;
 
 	/*
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index 7f3a00b..e292572 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -1797,7 +1797,7 @@ static int rt61pci_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
 }
 
 static int rt61pci_fill_rxdone(struct data_entry *entry,
-			       int *signal, int *rssi, int *ofdm)
+			       int *signal, int *rssi, int *ofdm, int *size)
 {
 	struct data_desc *rxd = entry->priv;
 	u32 word0;
@@ -1807,10 +1807,8 @@ static int rt61pci_fill_rxdone(struct data_entry *entry,
 	rt2x00_desc_read(rxd, 1, &word1);
 
 	if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR) ||
-	    rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR)) {
-		entry->ring->rt2x00dev->link.rx_failed++;
+	    rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR))
 		return -EINVAL;
-	}
 
 	/*
 	 * Obtain the status about this packet.
@@ -1818,8 +1816,9 @@ static int rt61pci_fill_rxdone(struct data_entry *entry,
 	*signal = rt2x00_get_field32(word1, RXD_W1_SIGNAL);
 	*rssi = rt61pci_agc_to_rssi(entry->ring->rt2x00dev, word1);
 	*ofdm = rt2x00_get_field32(word0, RXD_W0_OFDM);
+	*size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
 
-	return rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
+	return 0;
 }
 
 /*
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 90e2b29..149f5ee 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -1432,7 +1432,7 @@ static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
 }
 
 static int rt73usb_fill_rxdone(struct data_entry *entry,
-			       int *signal, int *rssi, int *ofdm)
+			       int *signal, int *rssi, int *ofdm, int *size)
 {
 	struct data_desc *rxd = (struct data_desc *)entry->skb->data;
 	u32 word0;
@@ -1442,10 +1442,8 @@ static int rt73usb_fill_rxdone(struct data_entry *entry,
 	rt2x00_desc_read(rxd, 1, &word1);
 
 	if (rt2x00_get_field32(word0, RXD_W0_CRC_ERROR) ||
-	    rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR)) {
-		entry->ring->rt2x00dev->link.rx_failed++;
+	    rt2x00_get_field32(word0, RXD_W0_CIPHER_ERROR))
 		return -EINVAL;
-	}
 
 	/*
 	 * Obtain the status about this packet.
@@ -1453,13 +1451,14 @@ static int rt73usb_fill_rxdone(struct data_entry *entry,
 	*signal = rt2x00_get_field32(word1, RXD_W1_SIGNAL);
 	*rssi = rt73usb_agc_to_rssi(entry->ring->rt2x00dev, word1);
 	*ofdm = rt2x00_get_field32(word0, RXD_W0_OFDM);
+	*size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
 
 	/*
 	 * Pull the skb to clear the descriptor area.
 	 */
 	skb_pull(entry->skb, entry->ring->desc_size);
 
-	return rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
+	return 0;
 }
 
 /*
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 06/30] rt2x00: Set vgc_level during reset_tuner
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (4 preceding siblings ...)
  2007-08-19 18:22 ` [PATCH 05/30] rt2x00: Don't increase rx_failed for individual frames Ivo van Doorn
@ 2007-08-19 18:23 ` Ivo van Doorn
  2007-08-19 18:23 ` [PATCH 07/30] rt2x00: Schedule beacon update Ivo van Doorn
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:23 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From dc0c67691b4f794fcaad97ddc36f4e9354658d6e Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 12:55:51 +0200
Subject: [PATCH 06/30] rt2x00: Set vgc_level during reset_tuner

Reset the vgc_level to the correct AGC VGC value
that has just been written to the register during
reset_tuner.
This will assure that the value will be valid
when it is used during the link tuner.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |    1 +
 drivers/net/wireless/rt2500pci.c |    1 +
 drivers/net/wireless/rt2500usb.c |    4 +++-
 drivers/net/wireless/rt61pci.c   |    1 +
 drivers/net/wireless/rt73usb.c   |    1 +
 5 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index 1506666..d8628e6 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -655,6 +655,7 @@ static void rt2400pci_link_stats(struct rt2x00_dev *rt2x00dev)
 static void rt2400pci_reset_tuner(struct rt2x00_dev *rt2x00dev)
 {
 	rt2400pci_bbp_write(rt2x00dev, 13, 0x08);
+	rt2x00dev->link.vgc_level = 0x08;
 }
 
 static void rt2400pci_link_tuner(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index 445ec3e..4d195de 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -755,6 +755,7 @@ static void rt2500pci_link_stats(struct rt2x00_dev *rt2x00dev)
 static void rt2500pci_reset_tuner(struct rt2x00_dev *rt2x00dev)
 {
 	rt2500pci_bbp_write(rt2x00dev, 17, 0x48);
+	rt2x00dev->link.vgc_level = 0x48;
 }
 
 static void rt2500pci_link_tuner(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index 29b675c..581cc6f 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -728,6 +728,8 @@ static void rt2500usb_reset_tuner(struct rt2x00_dev *rt2x00dev)
 	rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_VGC, &eeprom);
 	value = rt2x00_get_field16(eeprom, EEPROM_BBPTUNE_VGCUPPER);
 	rt2500usb_bbp_write(rt2x00dev, 17, value);
+
+	rt2x00dev->link.vgc_level = value;
 }
 
 static void rt2500usb_link_tuner(struct rt2x00_dev *rt2x00dev)
@@ -1204,7 +1206,7 @@ static int rt2500usb_fill_rxdone(struct data_entry *entry,
 	*ofdm = rt2x00_get_field32(word0, RXD_W0_OFDM);
 	*size = rt2x00_get_field32(word0, RXD_W0_DATABYTE_COUNT);
 
-	return;
+	return 0;
 }
 
 /*
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index e292572..7c52a4e 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -968,6 +968,7 @@ static void rt61pci_link_stats(struct rt2x00_dev *rt2x00dev)
 static void rt61pci_reset_tuner(struct rt2x00_dev *rt2x00dev)
 {
 	rt61pci_bbp_write(rt2x00dev, 17, 0x20);
+	rt2x00dev->link.vgc_level = 0x20;
 }
 
 static void rt61pci_link_tuner(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 149f5ee..74e4173 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -858,6 +858,7 @@ static void rt73usb_link_stats(struct rt2x00_dev *rt2x00dev)
 static void rt73usb_reset_tuner(struct rt2x00_dev *rt2x00dev)
 {
 	rt73usb_bbp_write(rt2x00dev, 17, 0x20);
+	rt2x00dev->link.vgc_level = 0x20;
 }
 
 static void rt73usb_link_tuner(struct rt2x00_dev *rt2x00dev)
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 07/30] rt2x00: Schedule beacon update
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (5 preceding siblings ...)
  2007-08-19 18:23 ` [PATCH 06/30] rt2x00: Set vgc_level during reset_tuner Ivo van Doorn
@ 2007-08-19 18:23 ` Ivo van Doorn
  2007-08-19 18:24 ` [PATCH 08/30] rt2x00: Fix width of filter field Ivo van Doorn
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:23 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From ddf86b88ab735fac340b1fae078a6433ed1a8fce Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 12:56:18 +0200
Subject: [PATCH 07/30] rt2x00: Schedule beacon update

ieee80211_beacon_get Doesn't allow to be called
from interrupt context. Schedule the call using
a workqueue.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |    2 +-
 drivers/net/wireless/rt2500pci.c |    2 +-
 drivers/net/wireless/rt2x00.h    |    7 ++++++-
 drivers/net/wireless/rt2x00dev.c |   25 +++++++++++++++++++++----
 drivers/net/wireless/rt2x00mac.c |    2 +-
 drivers/net/wireless/rt61pci.c   |    2 +-
 6 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index d8628e6..8365171 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -1306,7 +1306,7 @@ static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)
 	 * 1 - Beacon timer expired interrupt.
 	 */
 	if (rt2x00_get_field32(reg, CSR7_TBCN_EXPIRE))
-		rt2x00lib_beacondone(rt2x00dev, IEEE80211_TX_QUEUE_BEACON);
+		rt2x00lib_beacondone(rt2x00dev);
 
 	/*
 	 * 2 - Rx ring done interrupt.
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index 4d195de..a794989 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -1482,7 +1482,7 @@ static irqreturn_t rt2500pci_interrupt(int irq, void *dev_instance)
 	 * 1 - Beacon timer expired interrupt.
 	 */
 	if (rt2x00_get_field32(reg, CSR7_TBCN_EXPIRE))
-		rt2x00lib_beacondone(rt2x00dev, IEEE80211_TX_QUEUE_BEACON);
+		rt2x00lib_beacondone(rt2x00dev);
 
 	/*
 	 * 2 - Rx ring done interrupt.
diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index 4b8906e..31f8a13 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -589,6 +589,11 @@ struct rt2x00_dev {
 	struct ieee80211_rx_status rx_status;
 
 	/*
+	 * Beacon scheduled work.
+	 */
+	struct work_struct beacon_work;
+
+	/*
 	 * Data ring arrays for RX, TX and Beacon.
 	 * The Beacon array also contains the Atim ring
 	 * if that is supported by the device.
@@ -725,7 +730,7 @@ struct data_ring *rt2x00lib_get_ring(struct rt2x00_dev *rt2x00dev,
 /*
  * Interrupt context handlers.
  */
-void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev, const int queue);
+void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev);
 void rt2x00lib_txdone(struct data_entry *entry,
 		      const int status, const int retry);
 void rt2x00lib_rxdone(struct data_entry *entry, char *data,
diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index b7191cc..7f3eaf1 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -90,8 +90,7 @@ static void rt2x00_start_link_tune(struct rt2x00_dev *rt2x00dev)
 static void rt2x00_stop_link_tune(struct rt2x00_dev *rt2x00dev)
 {
 	if (delayed_work_pending(&rt2x00dev->link.work))
-		cancel_rearming_delayed_workqueue(rt2x00dev->hw->workqueue,
-						  &rt2x00dev->link.work);
+		cancel_rearming_delayed_work(&rt2x00dev->link.work);
 }
 
 /*
@@ -139,6 +138,12 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev)
 		return;
 
 	/*
+	 * Stop beacon generation.
+	 */
+	if (work_pending(&rt2x00dev->beacon_work))
+		cancel_work_sync(&rt2x00dev->beacon_work);
+
+	/*
 	 * Stop the TX queues.
 	 */
 	ieee80211_stop_queues(rt2x00dev->hw);
@@ -252,9 +257,12 @@ static void rt2x00lib_link_tuner(struct work_struct *work)
 /*
  * Interrupt context handlers.
  */
-void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev, const int queue)
+static void rt2x00lib_beacondone_scheduled(struct work_struct *work)
 {
-	struct data_ring *ring = rt2x00lib_get_ring(rt2x00dev, queue);
+	struct rt2x00_dev *rt2x00dev =
+	    container_of(work, struct rt2x00_dev, beacon_work);
+	struct data_ring *ring =
+	    rt2x00lib_get_ring(rt2x00dev, IEEE80211_TX_QUEUE_BEACON);
 	struct data_entry *entry = rt2x00_get_data_entry(ring);
 	struct sk_buff *skb;
 
@@ -269,6 +277,14 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev, const int queue)
 
 	dev_kfree_skb(skb);
 }
+
+void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)
+{
+	if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags))
+		return;
+
+	queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->beacon_work);
+}
 EXPORT_SYMBOL_GPL(rt2x00lib_beacondone);
 
 void rt2x00lib_txdone(struct data_entry *entry,
@@ -1012,6 +1028,7 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
 	/*
 	 * Initialize configuration work.
 	 */
+	INIT_WORK(&rt2x00dev->beacon_work, rt2x00lib_beacondone_scheduled);
 	INIT_DELAYED_WORK(&rt2x00dev->link.work, rt2x00lib_link_tuner);
 
 	/*
diff --git a/drivers/net/wireless/rt2x00mac.c b/drivers/net/wireless/rt2x00mac.c
index 31fe0f1..2b1b910 100644
--- a/drivers/net/wireless/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00mac.c
@@ -157,7 +157,7 @@ int rt2x00mac_reset(struct ieee80211_hw *hw)
 	 */
 	if (intf->type == IEEE80211_IF_TYPE_AP ||
 	    intf->type == IEEE80211_IF_TYPE_IBSS)
-		rt2x00lib_beacondone(rt2x00dev, IEEE80211_TX_QUEUE_BEACON);
+		rt2x00lib_beacondone(rt2x00dev);
 
 exit:
 	__clear_bit(INTERFACE_RESET, &rt2x00dev->flags);
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index 7c52a4e..edacb46 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -1927,7 +1927,7 @@ static irqreturn_t rt61pci_interrupt(int irq, void *dev_instance)
 	 * 1 - Beacon timer expired interrupt.
 	 */
 	if (rt2x00_get_field32(reg, INT_SOURCE_CSR_BEACON_DONE))
-		rt2x00lib_beacondone(rt2x00dev, IEEE80211_TX_QUEUE_BEACON);
+		rt2x00lib_beacondone(rt2x00dev);
 
 	/*
 	 * 2 - Rx ring done interrupt.
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 08/30] rt2x00: Fix width of filter field.
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (6 preceding siblings ...)
  2007-08-19 18:23 ` [PATCH 07/30] rt2x00: Schedule beacon update Ivo van Doorn
@ 2007-08-19 18:24 ` Ivo van Doorn
  2007-08-19 18:24 ` [PATCH 09/30] rt2x00: Be consistent with unsigned Ivo van Doorn
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:24 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 47c06acef36889c67594dadb4a29879d28c8415b Mon Sep 17 00:00:00 2001
From: Mattias Nissler <mattias.nissler@gmx.de>
Date: Sat, 4 Aug 2007 19:18:44 +0200
Subject: [PATCH 08/30] rt2x00: Fix width of filter field.

The filter field needs to be declared unsigned short instead of char
in order to hold all relevant IFF_* flags.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index 31f8a13..0db81eb 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -304,7 +304,7 @@ struct interface {
 	 * the monitor mode interfaces are removed, while a
 	 * non-monitor mode interface remains.
 	 */
-	char filter;
+	unsigned short filter;
 
 	/*
 	 * Monitor mode count, the number of interfaces
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 09/30] rt2x00: Be consistent with unsigned
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (7 preceding siblings ...)
  2007-08-19 18:24 ` [PATCH 08/30] rt2x00: Fix width of filter field Ivo van Doorn
@ 2007-08-19 18:24 ` Ivo van Doorn
  2007-08-19 18:24 ` [PATCH 10/30] rt2x00: Correctly reset TX/RX success/failed counters Ivo van Doorn
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:24 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From cdc01c652d3b058111e8a2567649e198c7c77cc5 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:00:39 +0200
Subject: [PATCH 09/30] rt2x00: Be consistent with unsigned

unsigned should be used consistently,
all values used as flags should be unsigned
and the ring identifier should also be unsigned everywhere.

char is not consistently signed over all platforms,
make the signedness more explicit where it is demanded
so we resolve some warnings of the type:
"warning: comparison is always false due to limited range of data type"

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |    8 +++++---
 drivers/net/wireless/rt2500pci.c |    8 +++++---
 drivers/net/wireless/rt2500usb.c |    8 +++++---
 drivers/net/wireless/rt2x00.h    |    9 +++++----
 drivers/net/wireless/rt61pci.c   |   14 ++++++++------
 drivers/net/wireless/rt73usb.c   |   14 ++++++++------
 6 files changed, 36 insertions(+), 25 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index 8365171..aa1209b 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -278,7 +278,7 @@ static void rt2400pci_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 }
 
 static void rt2400pci_config_packet_filter(struct rt2x00_dev *rt2x00dev,
-					   const int filter)
+					   const unsigned int filter)
 {
 	int promisc = !!(filter & IFF_PROMISC);
 	u32 reg;
@@ -561,7 +561,8 @@ static void rt2400pci_config_duration(struct rt2x00_dev *rt2x00dev,
 	rt2x00pci_register_write(rt2x00dev, CSR12, reg);
 }
 
-static void rt2400pci_config(struct rt2x00_dev *rt2x00dev, const int flags,
+static void rt2400pci_config(struct rt2x00_dev *rt2x00dev,
+			     const unsigned int flags,
 			     struct ieee80211_conf *conf)
 {
 	int short_slot_time = conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME;
@@ -1177,7 +1178,8 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 /*
  * TX data initialization
  */
-static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
+static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
+				    unsigned int queue)
 {
 	u32 reg;
 
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index a794989..3a1da1f 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -278,7 +278,7 @@ static void rt2500pci_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 }
 
 static void rt2500pci_config_packet_filter(struct rt2x00_dev *rt2x00dev,
-					   const int filter)
+					   const unsigned int filter)
 {
 	int promisc = !!(filter & IFF_PROMISC);
 	int multicast = !!(filter & IFF_MULTICAST);
@@ -672,7 +672,8 @@ static void rt2500pci_config_duration(struct rt2x00_dev *rt2x00dev,
 	rt2x00pci_register_write(rt2x00dev, CSR12, reg);
 }
 
-static void rt2500pci_config(struct rt2x00_dev *rt2x00dev, const int flags,
+static void rt2500pci_config(struct rt2x00_dev *rt2x00dev,
+			     const unsigned int flags,
 			     struct ieee80211_conf *conf)
 {
 	int short_slot_time = conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME;
@@ -1355,7 +1356,8 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 /*
  * TX data initialization
  */
-static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
+static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
+				    unsigned int queue)
 {
 	u32 reg;
 
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index 581cc6f..71b7bf2 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -283,7 +283,7 @@ static void rt2500usb_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 }
 
 static void rt2500usb_config_packet_filter(struct rt2x00_dev *rt2x00dev,
-					   const int filter)
+					   const unsigned int filter)
 {
 	int promisc = !!(filter & IFF_PROMISC);
 	int multicast = !!(filter & IFF_MULTICAST);
@@ -625,7 +625,8 @@ static void rt2500usb_config_duration(struct rt2x00_dev *rt2x00dev,
 	rt2500usb_register_write(rt2x00dev, TXRX_CSR18, reg);
 }
 
-static void rt2500usb_config(struct rt2x00_dev *rt2x00dev, const int flags,
+static void rt2500usb_config(struct rt2x00_dev *rt2x00dev,
+			     const unsigned int flags,
 			     struct ieee80211_conf *conf)
 {
 	int short_slot_time = conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME;
@@ -1153,7 +1154,8 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 /*
  * TX data initialization
  */
-static void rt2500usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
+static void rt2500usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
+				    unsigned int queue)
 {
 	u16 reg;
 
diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index 0db81eb..5c6d7d0 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -310,7 +310,7 @@ struct interface {
 	 * Monitor mode count, the number of interfaces
 	 * in monitor mode that that have been added.
 	 */
-	char monitor_count;
+	unsigned short monitor_count;
 };
 
 static inline int is_interface_present(struct interface *intf)
@@ -396,7 +396,8 @@ struct rt2x00lib_ops {
 	int (*write_tx_data) (struct rt2x00_dev *rt2x00dev,
 			      struct data_ring *ring, struct sk_buff *skb,
 			      struct ieee80211_tx_control *control);
-	void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, int queue);
+	void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev,
+			       unsigned int queue);
 
 	/*
 	 * RX control handlers
@@ -410,9 +411,9 @@ struct rt2x00lib_ops {
 	void (*config_mac_addr) (struct rt2x00_dev *rt2x00dev, u8 *mac);
 	void (*config_bssid) (struct rt2x00_dev *rt2x00dev, u8 *bssid);
 	void (*config_packet_filter) (struct rt2x00_dev *rt2x00dev,
-				      const int filter);
+				      const unsigned int filter);
 	void (*config_type) (struct rt2x00_dev *rt2x00dev, const int type);
-	void (*config) (struct rt2x00_dev *rt2x00dev, const int flags,
+	void (*config) (struct rt2x00_dev *rt2x00dev, const unsigned int flags,
 			struct ieee80211_conf *conf);
 #define CONFIG_UPDATE_PHYMODE		( 1 << 1 )
 #define CONFIG_UPDATE_CHANNEL		( 1 << 2 )
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index edacb46..f592397 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -307,7 +307,7 @@ static void rt61pci_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 }
 
 static void rt61pci_config_packet_filter(struct rt2x00_dev *rt2x00dev,
-					 const int filter)
+					 const unsigned int filter)
 {
 	int promisc = !!(filter & IFF_PROMISC);
 	int multicast = !!(filter & IFF_MULTICAST);
@@ -846,7 +846,8 @@ static void rt61pci_config_duration(struct rt2x00_dev *rt2x00dev,
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg);
 }
 
-static void rt61pci_config(struct rt2x00_dev *rt2x00dev, const int flags,
+static void rt61pci_config(struct rt2x00_dev *rt2x00dev,
+			   const unsigned int flags,
 			   struct ieee80211_conf *conf)
 {
 	int short_slot_time = conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME;
@@ -1726,7 +1727,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 /*
  * TX data initialization
  */
-static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
+static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
+				  unsigned int queue)
 {
 	u32 reg;
 
@@ -1759,8 +1761,8 @@ static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
 static int rt61pci_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
 {
 	u16 eeprom;
-	char offset;
-	char lna;
+	u8 offset;
+	u8 lna;
 
 	lna = rt2x00_get_field32(rxd_w1, RXD_W1_RSSI_LNA);
 	switch (lna) {
@@ -1960,7 +1962,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
 	u32 reg;
 	u16 word;
 	u8 *mac;
-	char value;
+	s8 value;
 
 	rt2x00pci_register_read(rt2x00dev, E2PROM_CSR, &reg);
 
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 74e4173..9f059ce 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -282,7 +282,7 @@ static void rt73usb_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 }
 
 static void rt73usb_config_packet_filter(struct rt2x00_dev *rt2x00dev,
-					 const int filter)
+					 const unsigned int filter)
 {
 	int promisc = !!(filter & IFF_PROMISC);
 	int multicast = !!(filter & IFF_MULTICAST);
@@ -742,7 +742,8 @@ static void rt73usb_config_duration(struct rt2x00_dev *rt2x00dev,
 	rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg);
 }
 
-static void rt73usb_config(struct rt2x00_dev *rt2x00dev, const int flags,
+static void rt73usb_config(struct rt2x00_dev *rt2x00dev,
+			   const unsigned int flags,
 			   struct ieee80211_conf *conf)
 {
 	int short_slot_time = conf->flags & IEEE80211_CONF_SHORT_SLOT_TIME;
@@ -1370,7 +1371,8 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 /*
  * TX data initialization
  */
-static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
+static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
+				  unsigned int queue)
 {
 	u32 reg;
 
@@ -1390,8 +1392,8 @@ static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, int queue)
 static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1)
 {
 	u16 eeprom;
-	char offset;
-	char lna;
+	u8 offset;
+	u8 lna;
 
 	lna = rt2x00_get_field32(rxd_w1, RXD_W1_RSSI_LNA);
 	switch (lna) {
@@ -1469,7 +1471,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
 {
 	u16 word;
 	u8 *mac;
-	char value;
+	s8 value;
 
 	rt2x00usb_eeprom_read(rt2x00dev, rt2x00dev->eeprom, EEPROM_SIZE);
 
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 10/30] rt2x00: Correctly reset TX/RX success/failed counters
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (8 preceding siblings ...)
  2007-08-19 18:24 ` [PATCH 09/30] rt2x00: Be consistent with unsigned Ivo van Doorn
@ 2007-08-19 18:24 ` Ivo van Doorn
  2007-08-19 18:25 ` [PATCH 11/30] rt2x00: Rework RF register handling Ivo van Doorn
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:24 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 9e26ed7c8a87978caf02f8c6510bab37007c5259 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:01:14 +0200
Subject: [PATCH 10/30] rt2x00: Correctly reset TX/RX success/failed counters

The TX/RX Success/Failed counters should be reset
_before_ updating the statistics. Otherwise all signal
quality calculations will be done with a rx_failed count
of 0.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |    5 +----
 drivers/net/wireless/rt2500pci.c |    5 +----
 drivers/net/wireless/rt2500usb.c |    5 +----
 drivers/net/wireless/rt2x00dev.c |   22 ++++++++++++----------
 drivers/net/wireless/rt61pci.c   |    5 +----
 drivers/net/wireless/rt73usb.c   |    5 +----
 6 files changed, 17 insertions(+), 30 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index aa1209b..8ebfae8 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -634,7 +634,6 @@ static void rt2400pci_disable_led(struct rt2x00_dev *rt2x00dev)
  */
 static void rt2400pci_link_stats(struct rt2x00_dev *rt2x00dev)
 {
-	int fcs;
 	u32 reg;
 	u8 bbp;
 
@@ -642,9 +641,7 @@ static void rt2400pci_link_stats(struct rt2x00_dev *rt2x00dev)
 	 * Update FCS error count from register.
 	 */
 	rt2x00pci_register_read(rt2x00dev, CNT0, &reg);
-	fcs = rt2x00_get_field32(reg, CNT0_FCS_ERROR);
-	rt2x00dev->link.rx_failed += fcs;
-	rt2x00dev->low_level_stats.dot11FCSErrorCount += fcs;
+	rt2x00dev->link.rx_failed = rt2x00_get_field32(reg, CNT0_FCS_ERROR);
 
 	/*
 	 * Update False CCA count from register.
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index 3a1da1f..a5bfb00 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -735,16 +735,13 @@ static void rt2500pci_disable_led(struct rt2x00_dev *rt2x00dev)
  */
 static void rt2500pci_link_stats(struct rt2x00_dev *rt2x00dev)
 {
-	int fcs;
 	u32 reg;
 
 	/*
 	 * Update FCS error count from register.
 	 */
 	rt2x00pci_register_read(rt2x00dev, CNT0, &reg);
-	fcs = rt2x00_get_field32(reg, CNT0_FCS_ERROR);
-	rt2x00dev->link.rx_failed += fcs;
-	rt2x00dev->low_level_stats.dot11FCSErrorCount += fcs;
+	rt2x00dev->link.rx_failed = rt2x00_get_field32(reg, CNT0_FCS_ERROR);
 
 	/*
 	 * Update False CCA count from register.
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index 71b7bf2..e9f6747 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -690,16 +690,13 @@ static void rt2500usb_disable_led(struct rt2x00_dev *rt2x00dev)
  */
 static void rt2500usb_link_stats(struct rt2x00_dev *rt2x00dev)
 {
-	int fcs;
 	u16 reg;
 
 	/*
 	 * Update FCS error count from register.
 	 */
 	rt2500usb_register_read(rt2x00dev, STA_CSR0, &reg);
-	fcs = rt2x00_get_field16(reg, STA_CSR0_FCS_ERROR);
-	rt2x00dev->link.rx_failed += fcs;
-	rt2x00dev->low_level_stats.dot11FCSErrorCount += fcs;
+	rt2x00dev->link.rx_failed = rt2x00_get_field16(reg, STA_CSR0_FCS_ERROR);
 
 	/*
 	 * Update False CCA count from register.
diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index 7f3eaf1..f952595 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -225,9 +225,21 @@ static void rt2x00lib_link_tuner(struct work_struct *work)
 	    container_of(work, struct rt2x00_dev, link.work.work);
 
 	/*
+	 * Reset statistics.
+	 * This will cause the signal value to be
+	 * based on the statistics of the last second.
+	 */
+	rt2x00dev->link.rx_success = 0;
+	rt2x00dev->link.rx_failed = 0;
+	rt2x00dev->link.tx_success = 0;
+	rt2x00dev->link.tx_failed = 0;
+
+	/*
 	 * Update statistics.
 	 */
 	rt2x00dev->ops->lib->link_stats(rt2x00dev);
+	rt2x00dev->low_level_stats.dot11FCSErrorCount +=
+	    rt2x00dev->link.rx_failed;
 
 	/*
 	 * Only perform the link tuning when Link tuning
@@ -237,16 +249,6 @@ static void rt2x00lib_link_tuner(struct work_struct *work)
 		rt2x00dev->ops->lib->link_tuner(rt2x00dev);
 
 	/*
-	 * Reset statistics.
-	 * This will cause the signal value to be
-	 * based on the statistics of the last second.
-	 */
-	rt2x00dev->link.rx_success = 0;
-	rt2x00dev->link.rx_failed = 0;
-	rt2x00dev->link.tx_success = 0;
-	rt2x00dev->link.tx_failed = 0;
-
-	/*
 	 * Increase tuner counter, and reschedule the next link tuner run.
 	 */
 	rt2x00dev->link.count++;
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index f592397..8c6c778 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -947,16 +947,13 @@ static void rt61pci_activity_led(struct rt2x00_dev *rt2x00dev, int rssi)
  */
 static void rt61pci_link_stats(struct rt2x00_dev *rt2x00dev)
 {
-	int fcs;
 	u32 reg;
 
 	/*
 	 * Update FCS error count from register.
 	 */
 	rt2x00pci_register_read(rt2x00dev, STA_CSR0, &reg);
-	fcs = rt2x00_get_field32(reg, STA_CSR0_FCS_ERROR);
-	rt2x00dev->link.rx_failed += fcs;
-	rt2x00dev->low_level_stats.dot11FCSErrorCount += fcs;
+	rt2x00dev->link.rx_failed = rt2x00_get_field32(reg, STA_CSR0_FCS_ERROR);
 
 	/*
 	 * Update False CCA count from register.
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 9f059ce..30d4189 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -836,16 +836,13 @@ static void rt73usb_activity_led(struct rt2x00_dev *rt2x00dev, int rssi)
  */
 static void rt73usb_link_stats(struct rt2x00_dev *rt2x00dev)
 {
-	int fcs;
 	u32 reg;
 
 	/*
 	 * Update FCS error count from register.
 	 */
 	rt73usb_register_read(rt2x00dev, STA_CSR0, &reg);
-	fcs = rt2x00_get_field32(reg, STA_CSR0_FCS_ERROR);
-	rt2x00dev->link.rx_failed += fcs;
-	rt2x00dev->low_level_stats.dot11FCSErrorCount += fcs;
+	rt2x00dev->link.rx_failed = rt2x00_get_field32(reg, STA_CSR0_FCS_ERROR);
 
 	/*
 	 * Update False CCA count from register.
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 11/30] rt2x00: Rework RF register handling
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (9 preceding siblings ...)
  2007-08-19 18:24 ` [PATCH 10/30] rt2x00: Correctly reset TX/RX success/failed counters Ivo van Doorn
@ 2007-08-19 18:25 ` Ivo van Doorn
  2007-08-19 18:25 ` [PATCH 12/30] rt2x00: Store firmware in memory Ivo van Doorn
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:25 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From bd6c96f98df0e85bf9985bee8df71750e3ec2f20 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:01:58 +0200
Subject: [PATCH 11/30] rt2x00: Rework RF register handling

Move RF registers inside static constant arrays.
This has several benefits:
	- We can easily inform rt2x00lib which channels we support
	- We don't have to use lots of if/switch statements
	- Easy comparison against legacy driver values
	- Bug fix for rt73usb: Some chips have 21bit RF values.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |   44 +++---
 drivers/net/wireless/rt2500pci.c |  256 ++++++++++++++++++-----------
 drivers/net/wireless/rt2500usb.c |  266 ++++++++++++++++++-------------
 drivers/net/wireless/rt2x00.h    |    9 +-
 drivers/net/wireless/rt2x00dev.c |   34 ++---
 drivers/net/wireless/rt61pci.c   |  332 ++++++++++++++------------------------
 drivers/net/wireless/rt73usb.c   |  281 +++++++++++++++++---------------
 7 files changed, 619 insertions(+), 603 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index 8ebfae8..7bd975d 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -419,28 +419,15 @@ static void rt2400pci_config_phymode(struct rt2x00_dev *rt2x00dev,
 	rt2400pci_config_rate(rt2x00dev, rate->val2);
 }
 
-static void rt2400pci_get_rf_vals(struct rt2x00_dev *rt2x00dev,
-				  const int value, const int channel,
-				  struct rf_reg *reg)
-{
-	reg->rf1 = 0x00022058;
-	reg->rf2 = value;
-	if (rt2x00_rf(&rt2x00dev->chip, RF2420))
-		reg->rf3 = 0x00000111;
-	else
-		reg->rf3 = 0x00000101;
-	reg->rf4 = 0;
-}
-
 static void rt2400pci_config_channel(struct rt2x00_dev *rt2x00dev,
-				     const int value, const int channel)
+				     const int index, const int channel)
 {
-	struct rf_reg reg;
+	struct rf_channel reg;
 
 	/*
 	 * Fill rf_reg structure.
 	 */
-	rt2400pci_get_rf_vals(rt2x00dev, value, channel, &reg);
+	memcpy(&reg, &rt2x00dev->spec.channels[index], sizeof(reg));
 
 	/*
 	 * Switch on tuning bits.
@@ -1434,10 +1421,21 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
  * RF value list for RF2420 & RF2421
  * Supports: 2.4 GHz
  */
-static const u32 rf_vals_bg[] = {
-	0x000c1fda, 0x000c1fee, 0x000c2002, 0x000c2016, 0x000c202a,
-	0x000c203e, 0x000c2052, 0x000c2066, 0x000c207a, 0x000c208e,
-	0x000c20a2, 0x000c20b6, 0x000c20ca, 0x000c20fa
+static const struct rf_channel rf_vals_bg[] = {
+	{ 1,  0x00022058, 0x000c1fda, 0x00000101, 0 },
+	{ 2,  0x00022058, 0x000c1fee, 0x00000101, 0 },
+	{ 3,  0x00022058, 0x000c2002, 0x00000101, 0 },
+	{ 4,  0x00022058, 0x000c2016, 0x00000101, 0 },
+	{ 5,  0x00022058, 0x000c202a, 0x00000101, 0 },
+	{ 6,  0x00022058, 0x000c203e, 0x00000101, 0 },
+	{ 7,  0x00022058, 0x000c2052, 0x00000101, 0 },
+	{ 8,  0x00022058, 0x000c2066, 0x00000101, 0 },
+	{ 9,  0x00022058, 0x000c207a, 0x00000101, 0 },
+	{ 10, 0x00022058, 0x000c208e, 0x00000101, 0 },
+	{ 11, 0x00022058, 0x000c20a2, 0x00000101, 0 },
+	{ 12, 0x00022058, 0x000c20b6, 0x00000101, 0 },
+	{ 13, 0x00022058, 0x000c20ca, 0x00000101, 0 },
+	{ 14, 0x00022058, 0x000c20fa, 0x00000101, 0 },
 };
 
 static void rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
@@ -1479,12 +1477,12 @@ static void rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	 */
 	spec->num_modes = 1;
 	spec->num_rates = 4;
-	spec->num_channels = 14;
 	spec->tx_power_a = NULL;
 	spec->tx_power_bg = txpower;
 	spec->tx_power_default = DEFAULT_TXPOWER;
-	spec->chan_val_a = NULL;
-	spec->chan_val_bg = rf_vals_bg;
+
+	spec->num_channels = ARRAY_SIZE(rf_vals_bg);
+	spec->channels = rf_vals_bg;
 }
 
 static int rt2400pci_probe_hw(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index a5bfb00..d6b88f6 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -432,75 +432,17 @@ static void rt2500pci_config_phymode(struct rt2x00_dev *rt2x00dev,
 	rt2500pci_config_rate(rt2x00dev, rate->val2);
 }
 
-static const struct {
-	unsigned int chip;
-	u32 val[3];
-} rf_vals[] = {
-	{ RF2522,	{ 0x00002050, 0x00000101, 0x00000000 } },
-	{ RF2523,	{ 0x00022010, 0x000e0111, 0x00000a1b } },
-	{ RF2524,	{ 0x00032020, 0x00000101, 0x00000a1b } },
-	{ RF2525,	{ 0x00022020, 0x00060111, 0x00000a1b } },
-	{ RF2525E,	{ 0x00022020, 0x00060111, 0x00000a0b } },
-};
-
-static void rt2500pci_get_rf_vals(struct rt2x00_dev *rt2x00dev,
-				  const int value, const int channel,
-				  struct rf_reg *reg)
-{
-	unsigned int i;
-
-	reg->rf1 = 0;
-	reg->rf2 = value;
-	reg->rf3 = 0;
-	reg->rf4 = 0;
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF5222)) {
-		reg->rf3 = 0x00000101;
-		if (channel < 14) {
-			reg->rf1 = 0x00022020;
-			reg->rf4 = 0x00000a0b;
-		} else if (channel == 14) {
-			reg->rf1 = 0x00022010;
-			reg->rf4 = 0x00000a1b;
-		} else if (channel < 64) {
-			reg->rf1 = 0x00022010;
-			reg->rf4 = 0x00000a1f;
-		} else if (channel < 140) {
-			reg->rf1 = 0x00022010;
-			reg->rf4 = 0x00000a0f;
-		} else if (channel < 161) {
-			reg->rf1 = 0x00022020;
-			reg->rf4 = 0x00000a07;
-		}
-	} else {
-		if (rt2x00_rf(&rt2x00dev->chip, RF2525) ||
-		    rt2x00_rf(&rt2x00dev->chip, RF2525E))
-			reg->rf2 |= 0x00080000;
-
-		for (i = 0; i < ARRAY_SIZE(rf_vals); i++) {
-			if (rt2x00_rf(&rt2x00dev->chip, rf_vals[i].chip)) {
-				reg->rf1 = rf_vals[i].val[0];
-				reg->rf3 = rf_vals[i].val[1];
-				reg->rf4 = rf_vals[i].val[2];
-			}
-		}
-
-		if (rt2x00_rf(&rt2x00dev->chip, RF2525E) && channel == 14)
-			reg->rf4 |= 0x00000010;
-	}
-}
-
 static void rt2500pci_config_channel(struct rt2x00_dev *rt2x00dev,
-				     const int value, const int channel,
+				     const int index, const int channel,
 				     const int txpower)
 {
-	struct rf_reg reg;
+	struct rf_channel reg;
 	u8 r70;
 
 	/*
 	 * Fill rf_reg structure.
 	 */
-	rt2500pci_get_rf_vals(rt2x00dev, value, channel, &reg);
+	memcpy(&reg, &rt2x00dev->spec.channels[index], sizeof(reg));
 
 	/*
 	 * Set TXpower.
@@ -1647,42 +1589,155 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
  * RF value list for RF2522
  * Supports: 2.4 GHz
  */
-static const u32 rf_vals_bg_2522[] = {
-	0x000c1fda, 0x000c1fee, 0x000c2002, 0x000c2016, 0x000c202a,
-	0x000c203e, 0x000c2052, 0x000c2066, 0x000c207a, 0x000c208e,
-	0x000c20a2, 0x000c20b6, 0x000c20ca, 0x000c20fa
+static const struct rf_channel rf_vals_bg_2522[] = {
+	{ 1,  0x00002050, 0x000c1fda, 0x00000101, 0 },
+	{ 2,  0x00002050, 0x000c1fee, 0x00000101, 0 },
+	{ 3,  0x00002050, 0x000c2002, 0x00000101, 0 },
+	{ 4,  0x00002050, 0x000c2016, 0x00000101, 0 },
+	{ 5,  0x00002050, 0x000c202a, 0x00000101, 0 },
+	{ 6,  0x00002050, 0x000c203e, 0x00000101, 0 },
+	{ 7,  0x00002050, 0x000c2052, 0x00000101, 0 },
+	{ 8,  0x00002050, 0x000c2066, 0x00000101, 0 },
+	{ 9,  0x00002050, 0x000c207a, 0x00000101, 0 },
+	{ 10, 0x00002050, 0x000c208e, 0x00000101, 0 },
+	{ 11, 0x00002050, 0x000c20a2, 0x00000101, 0 },
+	{ 12, 0x00002050, 0x000c20b6, 0x00000101, 0 },
+	{ 13, 0x00002050, 0x000c20ca, 0x00000101, 0 },
+	{ 14, 0x00002050, 0x000c20fa, 0x00000101, 0 },
 };
 
 /*
- * RF value list for RF2523, RF2524 & RF2525
+ * RF value list for RF2523
  * Supports: 2.4 GHz
  */
-static const u32 rf_vals_bg_252x[] = {
-	0x00000c9e, 0x00000ca2, 0x00000ca6, 0x00000caa, 0x00000cae,
-	0x00000cb2, 0x00000cb6, 0x00000cba, 0x00000cbe, 0x00000d02,
-	0x00000d06, 0x00000d0a, 0x00000d0e, 0x00000d1a
+static const struct rf_channel rf_vals_bg_2523[] = {
+	{ 1,  0x00022010, 0x00000c9e, 0x000e0111, 0x00000a1b },
+	{ 2,  0x00022010, 0x00000ca2, 0x000e0111, 0x00000a1b },
+	{ 3,  0x00022010, 0x00000ca6, 0x000e0111, 0x00000a1b },
+	{ 4,  0x00022010, 0x00000caa, 0x000e0111, 0x00000a1b },
+	{ 5,  0x00022010, 0x00000cae, 0x000e0111, 0x00000a1b },
+	{ 6,  0x00022010, 0x00000cb2, 0x000e0111, 0x00000a1b },
+	{ 7,  0x00022010, 0x00000cb6, 0x000e0111, 0x00000a1b },
+	{ 8,  0x00022010, 0x00000cba, 0x000e0111, 0x00000a1b },
+	{ 9,  0x00022010, 0x00000cbe, 0x000e0111, 0x00000a1b },
+	{ 10, 0x00022010, 0x00000d02, 0x000e0111, 0x00000a1b },
+	{ 11, 0x00022010, 0x00000d06, 0x000e0111, 0x00000a1b },
+	{ 12, 0x00022010, 0x00000d0a, 0x000e0111, 0x00000a1b },
+	{ 13, 0x00022010, 0x00000d0e, 0x000e0111, 0x00000a1b },
+	{ 14, 0x00022010, 0x00000d1a, 0x000e0111, 0x00000a03 },
 };
 
 /*
- * RF value list for RF2525E & RF5222
+ * RF value list for RF2524
  * Supports: 2.4 GHz
  */
-static const u32 rf_vals_bg_5x[] = {
-	0x00001136, 0x0000113a, 0x0000113e, 0x00001182, 0x00001186,
-	0x0000118a, 0x0000118e, 0x00001192, 0x00001196, 0x0000119a,
-	0x0000119e, 0x000011a2, 0x000011a6, 0x000011ae
+static const struct rf_channel rf_vals_bg_2524[] = {
+	{ 1,  0x00032020, 0x00000c9e, 0x00000101, 0x00000a1b },
+	{ 2,  0x00032020, 0x00000ca2, 0x00000101, 0x00000a1b },
+	{ 3,  0x00032020, 0x00000ca6, 0x00000101, 0x00000a1b },
+	{ 4,  0x00032020, 0x00000caa, 0x00000101, 0x00000a1b },
+	{ 5,  0x00032020, 0x00000cae, 0x00000101, 0x00000a1b },
+	{ 6,  0x00032020, 0x00000cb2, 0x00000101, 0x00000a1b },
+	{ 7,  0x00032020, 0x00000cb6, 0x00000101, 0x00000a1b },
+	{ 8,  0x00032020, 0x00000cba, 0x00000101, 0x00000a1b },
+	{ 9,  0x00032020, 0x00000cbe, 0x00000101, 0x00000a1b },
+	{ 10, 0x00032020, 0x00000d02, 0x00000101, 0x00000a1b },
+	{ 11, 0x00032020, 0x00000d06, 0x00000101, 0x00000a1b },
+	{ 12, 0x00032020, 0x00000d0a, 0x00000101, 0x00000a1b },
+	{ 13, 0x00032020, 0x00000d0e, 0x00000101, 0x00000a1b },
+	{ 14, 0x00032020, 0x00000d1a, 0x00000101, 0x00000a03 },
 };
 
 /*
- * RF value list for RF5222 (supplement to rf_vals_bg_5x)
- * Supports: 5.2 GHz
+ * RF value list for RF2525
+ * Supports: 2.4 GHz
+ */
+static const struct rf_channel rf_vals_bg_2525[] = {
+	{ 1,  0x00022020, 0x00080c9e, 0x00060111, 0x00000a1b },
+	{ 2,  0x00022020, 0x00080ca2, 0x00060111, 0x00000a1b },
+	{ 3,  0x00022020, 0x00080ca6, 0x00060111, 0x00000a1b },
+	{ 4,  0x00022020, 0x00080caa, 0x00060111, 0x00000a1b },
+	{ 5,  0x00022020, 0x00080cae, 0x00060111, 0x00000a1b },
+	{ 6,  0x00022020, 0x00080cb2, 0x00060111, 0x00000a1b },
+	{ 7,  0x00022020, 0x00080cb6, 0x00060111, 0x00000a1b },
+	{ 8,  0x00022020, 0x00080cba, 0x00060111, 0x00000a1b },
+	{ 9,  0x00022020, 0x00080cbe, 0x00060111, 0x00000a1b },
+	{ 10, 0x00022020, 0x00080d02, 0x00060111, 0x00000a1b },
+	{ 11, 0x00022020, 0x00080d06, 0x00060111, 0x00000a1b },
+	{ 12, 0x00022020, 0x00080d0a, 0x00060111, 0x00000a1b },
+	{ 13, 0x00022020, 0x00080d0e, 0x00060111, 0x00000a1b },
+	{ 14, 0x00022020, 0x00080d1a, 0x00060111, 0x00000a03 },
+};
+
+/*
+ * RF value list for RF2525e
+ * Supports: 2.4 GHz
  */
-static const u32 rf_vals_a_5x[] = {
-	0x00018896, 0x0001889a, 0x0001889e, 0x000188a2, 0x000188a6,
-	0x000188aa, 0x000188ae, 0x000188b2, 0x00008802, 0x00008806,
-	0x0000880a, 0x0000880e, 0x00008812, 0x00008816, 0x0000881a,
-	0x0000881e, 0x00008822, 0x00008826, 0x0000882a, 0x000090a6,
-	0x000090ae, 0x000090b6, 0x000090be
+static const struct rf_channel rf_vals_bg_2525e[] = {
+	{ 1,  0x00022020, 0x00081136, 0x00060111, 0x00000a0b },
+	{ 2,  0x00022020, 0x0008113a, 0x00060111, 0x00000a0b },
+	{ 3,  0x00022020, 0x0008113e, 0x00060111, 0x00000a0b },
+	{ 4,  0x00022020, 0x00081182, 0x00060111, 0x00000a0b },
+	{ 5,  0x00022020, 0x00081186, 0x00060111, 0x00000a0b },
+	{ 6,  0x00022020, 0x0008118a, 0x00060111, 0x00000a0b },
+	{ 7,  0x00022020, 0x0008118e, 0x00060111, 0x00000a0b },
+	{ 8,  0x00022020, 0x00081192, 0x00060111, 0x00000a0b },
+	{ 9,  0x00022020, 0x00081196, 0x00060111, 0x00000a0b },
+	{ 10, 0x00022020, 0x0008119a, 0x00060111, 0x00000a0b },
+	{ 11, 0x00022020, 0x0008119e, 0x00060111, 0x00000a0b },
+	{ 12, 0x00022020, 0x000811a2, 0x00060111, 0x00000a0b },
+	{ 13, 0x00022020, 0x000811a6, 0x00060111, 0x00000a0b },
+	{ 14, 0x00022020, 0x000811ae, 0x00060111, 0x00000a1b },
+};
+
+/*
+ * RF value list for RF5222
+ * Supports: 2.4 GHz & 5.2 GHz
+ */
+static const struct rf_channel rf_vals_5222[] = {
+	{ 1,  0x00022020, 0x00001136, 0x00000101, 0x00000a0b },
+	{ 2,  0x00022020, 0x0000113a, 0x00000101, 0x00000a0b },
+	{ 3,  0x00022020, 0x0000113e, 0x00000101, 0x00000a0b },
+	{ 4,  0x00022020, 0x00001182, 0x00000101, 0x00000a0b },
+	{ 5,  0x00022020, 0x00001186, 0x00000101, 0x00000a0b },
+	{ 6,  0x00022020, 0x0000118a, 0x00000101, 0x00000a0b },
+	{ 7,  0x00022020, 0x0000118e, 0x00000101, 0x00000a0b },
+	{ 8,  0x00022020, 0x00001192, 0x00000101, 0x00000a0b },
+	{ 9,  0x00022020, 0x00001196, 0x00000101, 0x00000a0b },
+	{ 10, 0x00022020, 0x0000119a, 0x00000101, 0x00000a0b },
+	{ 11, 0x00022020, 0x0000119e, 0x00000101, 0x00000a0b },
+	{ 12, 0x00022020, 0x000011a2, 0x00000101, 0x00000a0b },
+	{ 13, 0x00022020, 0x000011a6, 0x00000101, 0x00000a0b },
+	{ 14, 0x00022020, 0x000011ae, 0x00000101, 0x00000a1b },
+
+	/* 802.11 UNI / HyperLan 2 */
+	{ 36, 0x00022010, 0x00018896, 0x00000101, 0x00000a1f },
+	{ 40, 0x00022010, 0x0001889a, 0x00000101, 0x00000a1f },
+	{ 44, 0x00022010, 0x0001889e, 0x00000101, 0x00000a1f },
+	{ 48, 0x00022010, 0x000188a2, 0x00000101, 0x00000a1f },
+	{ 52, 0x00022010, 0x000188a6, 0x00000101, 0x00000a1f },
+	{ 66, 0x00022010, 0x000188aa, 0x00000101, 0x00000a1f },
+	{ 60, 0x00022010, 0x000188ae, 0x00000101, 0x00000a1f },
+	{ 64, 0x00022010, 0x000188b2, 0x00000101, 0x00000a1f },
+
+	/* 802.11 HyperLan 2 */
+	{ 100, 0x00022010, 0x00008802, 0x00000101, 0x00000a0f },
+	{ 104, 0x00022010, 0x00008806, 0x00000101, 0x00000a0f },
+	{ 108, 0x00022010, 0x0000880a, 0x00000101, 0x00000a0f },
+	{ 112, 0x00022010, 0x0000880e, 0x00000101, 0x00000a0f },
+	{ 116, 0x00022010, 0x00008812, 0x00000101, 0x00000a0f },
+	{ 120, 0x00022010, 0x00008816, 0x00000101, 0x00000a0f },
+	{ 124, 0x00022010, 0x0000881a, 0x00000101, 0x00000a0f },
+	{ 128, 0x00022010, 0x0000881e, 0x00000101, 0x00000a0f },
+	{ 132, 0x00022010, 0x00008822, 0x00000101, 0x00000a0f },
+	{ 136, 0x00022010, 0x00008826, 0x00000101, 0x00000a0f },
+
+	/* 802.11 UNII */
+	{ 140, 0x00022010, 0x0000882a, 0x00000101, 0x00000a0f },
+	{ 149, 0x00022020, 0x000090a6, 0x00000101, 0x00000a07 },
+	{ 153, 0x00022020, 0x000090ae, 0x00000101, 0x00000a07 },
+	{ 157, 0x00022020, 0x000090b6, 0x00000101, 0x00000a07 },
+	{ 161, 0x00022020, 0x000090be, 0x00000101, 0x00000a07 },
 };
 
 static void rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
@@ -1724,26 +1779,29 @@ static void rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	 */
 	spec->num_modes = 2;
 	spec->num_rates = 12;
-	spec->num_channels = 14;
 	spec->tx_power_a = NULL;
 	spec->tx_power_bg = txpower;
 	spec->tx_power_default = DEFAULT_TXPOWER;
-	spec->chan_val_a = NULL;
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF2522))
-		spec->chan_val_bg = rf_vals_bg_2522;
-	else if (rt2x00_rf(&rt2x00dev->chip, RF2523) ||
-		 rt2x00_rf(&rt2x00dev->chip, RF2524) ||
-		 rt2x00_rf(&rt2x00dev->chip, RF2525))
-		spec->chan_val_bg = rf_vals_bg_252x;
-	else if (rt2x00_rf(&rt2x00dev->chip, RF2525E) ||
-		 rt2x00_rf(&rt2x00dev->chip, RF5222))
-		spec->chan_val_bg = rf_vals_bg_5x;
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF5222)) {
+
+	if (rt2x00_rf(&rt2x00dev->chip, RF2522)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2522);
+		spec->channels = rf_vals_bg_2522;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2523)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2523);
+		spec->channels = rf_vals_bg_2523;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2524)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2524);
+		spec->channels = rf_vals_bg_2524;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2525)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2525);
+		spec->channels = rf_vals_bg_2525;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2525E)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2525e);
+		spec->channels = rf_vals_bg_2525e;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF5222)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_5222);
+		spec->channels = rf_vals_5222;
 		spec->num_modes = 3;
-		spec->num_channels += 23;
-		spec->chan_val_a = rf_vals_a_5x;
 	}
 }
 
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index e9f6747..25d0aec 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -429,84 +429,16 @@ static void rt2500usb_config_phymode(struct rt2x00_dev *rt2x00dev,
 	}
 }
 
-static const struct {
-	unsigned int chip;
-	u32 val[3];
-} rf_vals[] = {
-	{ RF2522,	{ 0x00002050, 0x00000101, 0x00000000 } },
-	{ RF2523,	{ 0x00022010, 0x000e0111, 0x00000a1b } },
-	{ RF2524,	{ 0x00032020, 0x00000101, 0x00000a1b } },
-	{ RF2525,	{ 0x00022020, 0x00060111, 0x00000a1b } },
-	{ RF2525E,	{ 0x00022010, 0x00060111, 0x00000000 } },
-};
-
-static void rt2500usb_get_rf_vals(struct rt2x00_dev *rt2x00dev,
-				  const int value, const int channel,
-				  struct rf_reg *reg)
-{
-	unsigned int i;
-
-	reg->rf1 = 0;
-	reg->rf2 = value;
-	reg->rf3 = 0;
-	reg->rf4 = 0;
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF5222)) {
-		reg->rf3 = 0x00000101;
-		if (channel < 14) {
-			reg->rf1 = 0x00022020;
-			reg->rf4 = 0x00000a0b;
-		} else if (channel == 14) {
-			reg->rf1 = 0x00022010;
-			reg->rf4 = 0x00000a1b;
-		} else if (channel < 64) {
-			reg->rf1 = 0x00022010;
-			reg->rf4 = 0x00000a1f;
-		} else if (channel < 140) {
-			reg->rf1 = 0x00022010;
-			reg->rf4 = 0x00000a0f;
-		} else if (channel < 161) {
-			reg->rf1 = 0x00022020;
-			reg->rf4 = 0x00000a07;
-		}
-	} else {
-		if (rt2x00_rf(&rt2x00dev->chip, RF2525))
-			reg->rf2 |= 0x00080000;
-
-		for (i = 0; i < ARRAY_SIZE(rf_vals); i++) {
-			if (rt2x00_rf(&rt2x00dev->chip, rf_vals[i].chip)) {
-				reg->rf1 = rf_vals[i].val[0];
-				reg->rf3 = rf_vals[i].val[1];
-				reg->rf4 = rf_vals[i].val[2];
-			}
-		}
-
-		if ((rt2x00_rf(&rt2x00dev->chip, RF2523) ||
-		     rt2x00_rf(&rt2x00dev->chip, RF2524) ||
-		     rt2x00_rf(&rt2x00dev->chip, RF2525)) &&
-		     channel == 14)
-			reg->rf4 &= ~0x00000018;
-		else if (rt2x00_rf(&rt2x00dev->chip, RF2525E)) {
-			if (channel & 0x01)
-				reg->rf4 = 0x00000e1b;
-			else
-				reg->rf4 = 0x00000e07;
-			if (channel == 14)
-				reg->rf4 = 0x00000e23;
-		}
-	}
-}
-
 static void rt2500usb_config_channel(struct rt2x00_dev *rt2x00dev,
-				     const int value, const int channel,
+				     const int index, const int channel,
 				     const int txpower)
 {
-	struct rf_reg reg;
+	struct rf_channel reg;
 
 	/*
 	 * Fill rf_reg structure.
 	 */
-	rt2500usb_get_rf_vals(rt2x00dev, value, channel, &reg);
+	memcpy(&reg, &rt2x00dev->spec.channels[index], sizeof(reg));
 
 	/*
 	 * Set TXpower.
@@ -1374,45 +1306,155 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
  * RF value list for RF2522
  * Supports: 2.4 GHz
  */
-static const u32 rf_vals_bg_2522[] = {
-	0x000c1fda, 0x000c1fee, 0x000c2002, 0x000c2016, 0x000c202a,
-	0x000c203e, 0x000c2052, 0x000c2066, 0x000c207a, 0x000c208e,
-	0x000c20a2, 0x000c20b6, 0x000c20ca, 0x000c20fa
+static const struct rf_channel rf_vals_bg_2522[] = {
+	{ 1,  0x00002050, 0x000c1fda, 0x00000101, 0 },
+	{ 2,  0x00002050, 0x000c1fee, 0x00000101, 0 },
+	{ 3,  0x00002050, 0x000c2002, 0x00000101, 0 },
+	{ 4,  0x00002050, 0x000c2016, 0x00000101, 0 },
+	{ 5,  0x00002050, 0x000c202a, 0x00000101, 0 },
+	{ 6,  0x00002050, 0x000c203e, 0x00000101, 0 },
+	{ 7,  0x00002050, 0x000c2052, 0x00000101, 0 },
+	{ 8,  0x00002050, 0x000c2066, 0x00000101, 0 },
+	{ 9,  0x00002050, 0x000c207a, 0x00000101, 0 },
+	{ 10, 0x00002050, 0x000c208e, 0x00000101, 0 },
+	{ 11, 0x00002050, 0x000c20a2, 0x00000101, 0 },
+	{ 12, 0x00002050, 0x000c20b6, 0x00000101, 0 },
+	{ 13, 0x00002050, 0x000c20ca, 0x00000101, 0 },
+	{ 14, 0x00002050, 0x000c20fa, 0x00000101, 0 },
+};
+
+/*
+ * RF value list for RF2523
+ * Supports: 2.4 GHz
+ */
+static const struct rf_channel rf_vals_bg_2523[] = {
+	{ 1,  0x00022010, 0x00000c9e, 0x000e0111, 0x00000a1b },
+	{ 2,  0x00022010, 0x00000ca2, 0x000e0111, 0x00000a1b },
+	{ 3,  0x00022010, 0x00000ca6, 0x000e0111, 0x00000a1b },
+	{ 4,  0x00022010, 0x00000caa, 0x000e0111, 0x00000a1b },
+	{ 5,  0x00022010, 0x00000cae, 0x000e0111, 0x00000a1b },
+	{ 6,  0x00022010, 0x00000cb2, 0x000e0111, 0x00000a1b },
+	{ 7,  0x00022010, 0x00000cb6, 0x000e0111, 0x00000a1b },
+	{ 8,  0x00022010, 0x00000cba, 0x000e0111, 0x00000a1b },
+	{ 9,  0x00022010, 0x00000cbe, 0x000e0111, 0x00000a1b },
+	{ 10, 0x00022010, 0x00000d02, 0x000e0111, 0x00000a1b },
+	{ 11, 0x00022010, 0x00000d06, 0x000e0111, 0x00000a1b },
+	{ 12, 0x00022010, 0x00000d0a, 0x000e0111, 0x00000a1b },
+	{ 13, 0x00022010, 0x00000d0e, 0x000e0111, 0x00000a1b },
+	{ 14, 0x00022010, 0x00000d1a, 0x000e0111, 0x00000a03 },
 };
 
 /*
- * RF value list for RF2523, RF2524 & RF2525
+ * RF value list for RF2524
  * Supports: 2.4 GHz
  */
-static const u32 rf_vals_bg_252x[] = {
-	0x00000c9e, 0x00000ca2, 0x00000ca6, 0x00000caa, 0x00000cae,
-	0x00000cb2, 0x00000cb6, 0x00000cba, 0x00000cbe, 0x00000d02,
-	0x00000d06, 0x00000d0a, 0x00000d0e, 0x00000d1a
+static const struct rf_channel rf_vals_bg_2524[] = {
+	{ 1,  0x00032020, 0x00000c9e, 0x00000101, 0x00000a1b },
+	{ 2,  0x00032020, 0x00000ca2, 0x00000101, 0x00000a1b },
+	{ 3,  0x00032020, 0x00000ca6, 0x00000101, 0x00000a1b },
+	{ 4,  0x00032020, 0x00000caa, 0x00000101, 0x00000a1b },
+	{ 5,  0x00032020, 0x00000cae, 0x00000101, 0x00000a1b },
+	{ 6,  0x00032020, 0x00000cb2, 0x00000101, 0x00000a1b },
+	{ 7,  0x00032020, 0x00000cb6, 0x00000101, 0x00000a1b },
+	{ 8,  0x00032020, 0x00000cba, 0x00000101, 0x00000a1b },
+	{ 9,  0x00032020, 0x00000cbe, 0x00000101, 0x00000a1b },
+	{ 10, 0x00032020, 0x00000d02, 0x00000101, 0x00000a1b },
+	{ 11, 0x00032020, 0x00000d06, 0x00000101, 0x00000a1b },
+	{ 12, 0x00032020, 0x00000d0a, 0x00000101, 0x00000a1b },
+	{ 13, 0x00032020, 0x00000d0e, 0x00000101, 0x00000a1b },
+	{ 14, 0x00032020, 0x00000d1a, 0x00000101, 0x00000a03 },
 };
 
 /*
- * RF value list for RF2525E
+ * RF value list for RF2525
  * Supports: 2.4 GHz
  */
-static const u32 rf_vals_bg_2525e[] = {
-	0x0000089a, 0x0000089e, 0x0000089e, 0x000008a2, 0x000008a2,
-	0x000008a6, 0x000008a6, 0x000008aa, 0x000008aa, 0x000008ae,
-	0x000008ae, 0x000008b2, 0x000008b2, 0x000008b6
+static const struct rf_channel rf_vals_bg_2525[] = {
+	{ 1,  0x00022020, 0x00080c9e, 0x00060111, 0x00000a1b },
+	{ 2,  0x00022020, 0x00080ca2, 0x00060111, 0x00000a1b },
+	{ 3,  0x00022020, 0x00080ca6, 0x00060111, 0x00000a1b },
+	{ 4,  0x00022020, 0x00080caa, 0x00060111, 0x00000a1b },
+	{ 5,  0x00022020, 0x00080cae, 0x00060111, 0x00000a1b },
+	{ 6,  0x00022020, 0x00080cb2, 0x00060111, 0x00000a1b },
+	{ 7,  0x00022020, 0x00080cb6, 0x00060111, 0x00000a1b },
+	{ 8,  0x00022020, 0x00080cba, 0x00060111, 0x00000a1b },
+	{ 9,  0x00022020, 0x00080cbe, 0x00060111, 0x00000a1b },
+	{ 10, 0x00022020, 0x00080d02, 0x00060111, 0x00000a1b },
+	{ 11, 0x00022020, 0x00080d06, 0x00060111, 0x00000a1b },
+	{ 12, 0x00022020, 0x00080d0a, 0x00060111, 0x00000a1b },
+	{ 13, 0x00022020, 0x00080d0e, 0x00060111, 0x00000a1b },
+	{ 14, 0x00022020, 0x00080d1a, 0x00060111, 0x00000a03 },
+};
+
+/*
+ * RF value list for RF2525e
+ * Supports: 2.4 GHz
+ */
+static const struct rf_channel rf_vals_bg_2525e[] = {
+	{ 1,  0x00022010, 0x0000089a, 0x00060111, 0x00000e1b },
+	{ 2,  0x00022010, 0x0000089e, 0x00060111, 0x00000e07 },
+	{ 3,  0x00022010, 0x0000089e, 0x00060111, 0x00000e1b },
+	{ 4,  0x00022010, 0x000008a2, 0x00060111, 0x00000e07 },
+	{ 5,  0x00022010, 0x000008a2, 0x00060111, 0x00000e1b },
+	{ 6,  0x00022010, 0x000008a6, 0x00060111, 0x00000e07 },
+	{ 7,  0x00022010, 0x000008a6, 0x00060111, 0x00000e1b },
+	{ 8,  0x00022010, 0x000008aa, 0x00060111, 0x00000e07 },
+	{ 9,  0x00022010, 0x000008aa, 0x00060111, 0x00000e1b },
+	{ 10, 0x00022010, 0x000008ae, 0x00060111, 0x00000e07 },
+	{ 11, 0x00022010, 0x000008ae, 0x00060111, 0x00000e1b },
+	{ 12, 0x00022010, 0x000008b2, 0x00060111, 0x00000e07 },
+	{ 13, 0x00022010, 0x000008b2, 0x00060111, 0x00000e1b },
+	{ 14, 0x00022010, 0x000008b6, 0x00060111, 0x00000e23 },
 };
 
 /*
  * RF value list for RF5222
  * Supports: 2.4 GHz & 5.2 GHz
  */
-static const u32 rf_vals_abg_5222[] = {
-	0x00001136, 0x0000113a, 0x0000113e, 0x00001182, 0x00001186,
-	0x0000118a, 0x0000118e, 0x00001192, 0x00001196, 0x0000119a,
-	0x0000119e, 0x000011a2, 0x000011a6, 0x000011ae, 0x0001889a,
-	0x0001889a, 0x0001889e, 0x000188a2, 0x000188a6, 0x000188aa,
-	0x000188ae, 0x000188b2, 0x00008802, 0x00008806, 0x0000880a,
-	0x0000880e, 0x00008812, 0x00008816, 0x0000881a, 0x0000881e,
-	0x00008822, 0x00008826, 0x0000882a, 0x000090a6, 0x000090ae,
-	0x000090b6, 0x000090be
+static const struct rf_channel rf_vals_5222[] = {
+	{ 1,  0x00022020, 0x00001136, 0x00000101, 0x00000a0b },
+	{ 2,  0x00022020, 0x0000113a, 0x00000101, 0x00000a0b },
+	{ 3,  0x00022020, 0x0000113e, 0x00000101, 0x00000a0b },
+	{ 4,  0x00022020, 0x00001182, 0x00000101, 0x00000a0b },
+	{ 5,  0x00022020, 0x00001186, 0x00000101, 0x00000a0b },
+	{ 6,  0x00022020, 0x0000118a, 0x00000101, 0x00000a0b },
+	{ 7,  0x00022020, 0x0000118e, 0x00000101, 0x00000a0b },
+	{ 8,  0x00022020, 0x00001192, 0x00000101, 0x00000a0b },
+	{ 9,  0x00022020, 0x00001196, 0x00000101, 0x00000a0b },
+	{ 10, 0x00022020, 0x0000119a, 0x00000101, 0x00000a0b },
+	{ 11, 0x00022020, 0x0000119e, 0x00000101, 0x00000a0b },
+	{ 12, 0x00022020, 0x000011a2, 0x00000101, 0x00000a0b },
+	{ 13, 0x00022020, 0x000011a6, 0x00000101, 0x00000a0b },
+	{ 14, 0x00022020, 0x000011ae, 0x00000101, 0x00000a1b },
+
+	/* 802.11 UNI / HyperLan 2 */
+	{ 36, 0x00022010, 0x00018896, 0x00000101, 0x00000a1f },
+	{ 40, 0x00022010, 0x0001889a, 0x00000101, 0x00000a1f },
+	{ 44, 0x00022010, 0x0001889e, 0x00000101, 0x00000a1f },
+	{ 48, 0x00022010, 0x000188a2, 0x00000101, 0x00000a1f },
+	{ 52, 0x00022010, 0x000188a6, 0x00000101, 0x00000a1f },
+	{ 66, 0x00022010, 0x000188aa, 0x00000101, 0x00000a1f },
+	{ 60, 0x00022010, 0x000188ae, 0x00000101, 0x00000a1f },
+	{ 64, 0x00022010, 0x000188b2, 0x00000101, 0x00000a1f },
+
+	/* 802.11 HyperLan 2 */
+	{ 100, 0x00022010, 0x00008802, 0x00000101, 0x00000a0f },
+	{ 104, 0x00022010, 0x00008806, 0x00000101, 0x00000a0f },
+	{ 108, 0x00022010, 0x0000880a, 0x00000101, 0x00000a0f },
+	{ 112, 0x00022010, 0x0000880e, 0x00000101, 0x00000a0f },
+	{ 116, 0x00022010, 0x00008812, 0x00000101, 0x00000a0f },
+	{ 120, 0x00022010, 0x00008816, 0x00000101, 0x00000a0f },
+	{ 124, 0x00022010, 0x0000881a, 0x00000101, 0x00000a0f },
+	{ 128, 0x00022010, 0x0000881e, 0x00000101, 0x00000a0f },
+	{ 132, 0x00022010, 0x00008822, 0x00000101, 0x00000a0f },
+	{ 136, 0x00022010, 0x00008826, 0x00000101, 0x00000a0f },
+
+	/* 802.11 UNII */
+	{ 140, 0x00022010, 0x0000882a, 0x00000101, 0x00000a0f },
+	{ 149, 0x00022020, 0x000090a6, 0x00000101, 0x00000a07 },
+	{ 153, 0x00022020, 0x000090ae, 0x00000101, 0x00000a07 },
+	{ 157, 0x00022020, 0x000090b6, 0x00000101, 0x00000a07 },
+	{ 161, 0x00022020, 0x000090be, 0x00000101, 0x00000a07 },
 };
 
 static void rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
@@ -1455,27 +1497,29 @@ static void rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	 */
 	spec->num_modes = 2;
 	spec->num_rates = 12;
-	spec->num_channels = 14;
 	spec->tx_power_a = NULL;
 	spec->tx_power_bg = txpower;
 	spec->tx_power_default = DEFAULT_TXPOWER;
-	spec->chan_val_a = NULL;
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF2522))
-		spec->chan_val_bg = rf_vals_bg_2522;
-	else if (rt2x00_rf(&rt2x00dev->chip, RF2523) ||
-		 rt2x00_rf(&rt2x00dev->chip, RF2524) ||
-		 rt2x00_rf(&rt2x00dev->chip, RF2525))
-		spec->chan_val_bg = rf_vals_bg_252x;
-	else if (rt2x00_rf(&rt2x00dev->chip, RF2525E))
-		spec->chan_val_bg = rf_vals_bg_2525e;
-	else if (rt2x00_rf(&rt2x00dev->chip, RF5222))
-		spec->chan_val_bg = rf_vals_abg_5222;
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF5222)) {
+
+	if (rt2x00_rf(&rt2x00dev->chip, RF2522)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2522);
+		spec->channels = rf_vals_bg_2522;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2523)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2523);
+		spec->channels = rf_vals_bg_2523;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2524)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2524);
+		spec->channels = rf_vals_bg_2524;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2525)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2525);
+		spec->channels = rf_vals_bg_2525;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2525E)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2525e);
+		spec->channels = rf_vals_bg_2525e;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF5222)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_5222);
+		spec->channels = rf_vals_5222;
 		spec->num_modes = 3;
-		spec->num_channels += 23;
-		spec->chan_val_a = &rf_vals_abg_5222[14];
 	}
 }
 
diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index 5c6d7d0..cfd5384 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -168,10 +168,10 @@ struct rt2x00_chip {
 };
 
 /*
- * RF register collection structure
- * This structure contains the value for all RF register words.
+ * RF register values that belong to a particular channel.
  */
-struct rf_reg {
+struct rf_channel {
+	int channel;
 	u32 rf1;
 	u32 rf2;
 	u32 rf3;
@@ -346,8 +346,7 @@ struct hw_mode_spec {
 	/*
 	 * Device/chipset specific value.
 	 */
-	const u32 *chan_val_a;
-	const u32 *chan_val_bg;
+	const struct rf_channel *channels;
 };
 
 /*
diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index f952595..3671f74 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -611,29 +611,17 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev,
 	/*
 	 * Initialize Channel list.
 	 */
-	for (i = 0; i < 14; i++)
-		rt2x00lib_channel(&channels[i], i + 1,
-				  spec->tx_power_bg[i], spec->chan_val_bg[i]);
-
-	if (spec->num_channels > 14) {
-		for (i = 14; i < spec->num_channels; i++) {
-			if (i < 22)
-				channels[i].chan = 36;
-			else if (i < 33)
-				channels[i].chan = 100;
-			else
-				channels[i].chan = 149;
-			channels[i].chan += ((i - 14) * 4);
-
-			if (spec->tx_power_a)
-				tx_power = spec->tx_power_a[i];
-			else
-				tx_power = spec->tx_power_default;
-
-			rt2x00lib_channel(&channels[i],
-					  channels[i].chan, tx_power,
-					  spec->chan_val_a[i]);
-		}
+	for (i = 0; i < spec->num_channels; i++) {
+		if (spec->channels[i].channel <= 14)
+			tx_power = spec->tx_power_bg[i];
+		else if (spec->tx_power_a)
+			tx_power = spec->tx_power_a[i];
+		else
+			tx_power = spec->tx_power_default;
+
+		rt2x00lib_channel(&channels[i],
+				  spec->channels[i].channel,
+				  tx_power, i);
 	}
 
 	/*
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index 8c6c778..d0c2323 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -436,192 +436,17 @@ static void rt61pci_config_phymode(struct rt2x00_dev *rt2x00dev,
 	rt61pci_config_rate(rt2x00dev, rate->val2);
 }
 
-static void rt61pci_get_rf_vals(struct rt2x00_dev *rt2x00dev,
-				const int value, const int channel,
-				struct rf_reg *reg)
-{
-	reg->rf1 = 0;
-	reg->rf2 = value;
-	reg->rf3 = 0;
-	reg->rf4 = 0;
-
-	if (!test_bit(CONFIG_RF_SEQUENCE, &rt2x00dev->flags) || channel <= 14)
-		reg->rf1 = 0x00002ccc;
-	else if (channel == 36 ||
-		(channel >= 100 && channel <= 116) ||
-		channel >= 157)
-		reg->rf1 = 0x00002cd4;
-	else
-		reg->rf1 = 0x00002cd0;
-
-	if (channel <= 14) {
-		reg->rf3 = 0x00068455;
-	} else if (!test_bit(CONFIG_RF_SEQUENCE, &rt2x00dev->flags)) {
-		if (channel >= 36 && channel <= 48)
-			reg->rf3 = 0x0009be55;
-		else if (channel >= 52 && channel <= 64)
-			reg->rf3 = 0x0009ae55;
-		else if (channel >= 100 && channel <= 112)
-			reg->rf3 = 0x000bae55;
-		else
-			reg->rf3 = 0x000bbe55;
-	} else {
-		switch (channel) {
-		case 36:
-		case 40:
-		case 44:
-			reg->rf3 = 0x00098455;
-			break;
-		case 48:
-			reg->rf3 = 0x00098655;
-			break;
-		case 52:
-			reg->rf3 = 0x00098855;
-			break;
-		case 56:
-			reg->rf3 = 0x00098c55;
-		case 60:
-			reg->rf3 = 0x00098e55;
-			break;
-		case 64:
-			reg->rf3 = 0x00099255;
-			break;
-		case 100:
-		case 104:
-		case 108:
-			reg->rf3 = 0x000b9855;
-			break;
-		case 112:
-		case 116:
-		case 120:
-		case 124:
-			reg->rf3 = 0x000b9a55;
-			break;
-		case 128:
-		case 132:
-			reg->rf3 = 0x000b9c55;
-			break;
-		case 136:
-		case 140:
-			reg->rf3 = 0x000b9e55;
-			break;
-		case 149:
-		case 153:
-		case 157:
-		case 161:
-		case 165:
-			reg->rf3 = 0x000ba255;
-			break;
-		}
-	}
-
-	if (channel < 14) {
-		if (channel & 1)
-			reg->rf4 = 0x000ffa0b;
-		else
-			reg->rf4 = 0x000ffa1f;
-	} else if (channel == 14) {
-		reg->rf4 = 0x000ffa13;
-	} else if (!test_bit(CONFIG_RF_SEQUENCE, &rt2x00dev->flags)) {
-		switch (channel) {
-		case 36:
-		case 56:
-		case 116:
-		case 136:
-			reg->rf4 = 0x000ffa23;
-			break;
-		case 40:
-		case 60:
-		case 100:
-		case 120:
-		case 140:
-			reg->rf4 = 0x000ffa03;
-			break;
-		case 44:
-		case 64:
-		case 104:
-		case 124:
-			reg->rf4 = 0x000ffa0b;
-			break;
-		case 48:
-		case 108:
-		case 128:
-			reg->rf4 = 0x000ffa13;
-			break;
-		case 52:
-		case 112:
-		case 132:
-			reg->rf4 = 0x000ffa1b;
-			break;
-		case 149:
-			reg->rf4 = 0x000ffa1f;
-			break;
-		case 153:
-			reg->rf4 = 0x000ffa27;
-			break;
-		case 157:
-			reg->rf4 = 0x000ffa07;
-			break;
-		case 161:
-			reg->rf4 = 0x000ffa0f;
-			break;
-		case 165:
-			reg->rf4 = 0x000ffa17;
-			break;
-		}
-	} else {
-		switch (channel) {
-		case 36:
-		case 40:
-		case 60:
-		case 140:
-		case 100:
-		case 104:
-		case 108:
-		case 112:
-		case 116:
-		case 120:
-			reg->rf4 = 0x000c0a03;
-			break;
-		case 44:
-		case 64:
-		case 124:
-		case 149:
-			reg->rf4 = 0x000c0a1b;
-			break;
-		case 48:
-		case 128:
-		case 153:
-			reg->rf4 = 0x000c0a0b;
-			break;
-		case 52:
-		case 132:
-			reg->rf4 = 0x000c0a23;
-			break;
-		case 56:
-		case 136:
-			reg->rf4 = 0x000c0a13;
-			break;
-		case 157:
-		case 161:
-		case 165:
-			reg->rf4 = 0x000c0a17;
-			break;
-		}
-	}
-}
-
 static void rt61pci_config_channel(struct rt2x00_dev *rt2x00dev,
-				   const int value, const int channel,
+				   const int index, const int channel,
 				   const int txpower)
 {
-	struct rf_reg reg;
+	struct rf_channel reg;
 	u8 bbp = 0;
 
 	/*
 	 * Fill rf_reg structure.
 	 */
-	rt61pci_get_rf_vals(rt2x00dev, value, channel, &reg);
+	memcpy(&reg, &rt2x00dev->spec.channels[index], sizeof(reg));
 
 	/*
 	 * Set TXpower.
@@ -666,7 +491,7 @@ static void rt61pci_config_channel(struct rt2x00_dev *rt2x00dev,
 static void rt61pci_config_txpower(struct rt2x00_dev *rt2x00dev,
 				   const int txpower)
 {
-	struct rf_reg rf;
+	struct rf_channel rf;
 
 	rt2x00_rf_read(rt2x00dev, 1, &rf.rf1);
 	rt2x00_rf_read(rt2x00dev, 2, &rf.rf2);
@@ -2176,37 +2001,117 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
 }
 
 /*
- * RF value list for RF5225, RF5325, RF2527 & RF2529
- * Supports: 2.4 GHz
+ * RF value list for RF5225 & RF5325
+ * Supports: 2.4 GHz & 5.2 GHz, rf_sequence disabled
  */
-static const u32 rf_vals_bg[] = {
-	0x00004786, 0x00004786, 0x0000478a, 0x0000478a, 0x0000478e,
-	0x0000478e, 0x00004792, 0x00004792, 0x00004796, 0x00004796,
-	0x0000479a, 0x0000479a, 0x0000479e, 0x000047a2
+static const struct rf_channel rf_vals_noseq[] = {
+	{ 1,  0x00002ccc, 0x00004786, 0x00068455, 0x000ffa0b },
+	{ 2,  0x00002ccc, 0x00004786, 0x00068455, 0x000ffa1f },
+	{ 3,  0x00002ccc, 0x0000478a, 0x00068455, 0x000ffa0b },
+	{ 4,  0x00002ccc, 0x0000478a, 0x00068455, 0x000ffa1f },
+	{ 5,  0x00002ccc, 0x0000478e, 0x00068455, 0x000ffa0b },
+	{ 6,  0x00002ccc, 0x0000478e, 0x00068455, 0x000ffa1f },
+	{ 7,  0x00002ccc, 0x00004792, 0x00068455, 0x000ffa0b },
+	{ 8,  0x00002ccc, 0x00004792, 0x00068455, 0x000ffa1f },
+	{ 9,  0x00002ccc, 0x00004796, 0x00068455, 0x000ffa0b },
+	{ 10, 0x00002ccc, 0x00004796, 0x00068455, 0x000ffa1f },
+	{ 11, 0x00002ccc, 0x0000479a, 0x00068455, 0x000ffa0b },
+	{ 12, 0x00002ccc, 0x0000479a, 0x00068455, 0x000ffa1f },
+	{ 13, 0x00002ccc, 0x0000479e, 0x00068455, 0x000ffa0b },
+	{ 14, 0x00002ccc, 0x000047a2, 0x00068455, 0x000ffa13 },
+
+	/* 802.11 UNI / HyperLan 2 */
+	{ 36, 0x00002ccc, 0x0000499a, 0x0009be55, 0x000ffa23 },
+	{ 40, 0x00002ccc, 0x000049a2, 0x0009be55, 0x000ffa03 },
+	{ 44, 0x00002ccc, 0x000049a6, 0x0009be55, 0x000ffa0b },
+	{ 48, 0x00002ccc, 0x000049aa, 0x0009be55, 0x000ffa13 },
+	{ 52, 0x00002ccc, 0x000049ae, 0x0009ae55, 0x000ffa1b },
+	{ 56, 0x00002ccc, 0x000049b2, 0x0009ae55, 0x000ffa23 },
+	{ 60, 0x00002ccc, 0x000049ba, 0x0009ae55, 0x000ffa03 },
+	{ 64, 0x00002ccc, 0x000049be, 0x0009ae55, 0x000ffa0b },
+
+	/* 802.11 HyperLan 2 */
+	{ 100, 0x00002ccc, 0x00004a2a, 0x000bae55, 0x000ffa03 },
+	{ 104, 0x00002ccc, 0x00004a2e, 0x000bae55, 0x000ffa0b },
+	{ 108, 0x00002ccc, 0x00004a32, 0x000bae55, 0x000ffa13 },
+	{ 112, 0x00002ccc, 0x00004a36, 0x000bae55, 0x000ffa1b },
+	{ 116, 0x00002ccc, 0x00004a3a, 0x000bbe55, 0x000ffa23 },
+	{ 120, 0x00002ccc, 0x00004a82, 0x000bbe55, 0x000ffa03 },
+	{ 124, 0x00002ccc, 0x00004a86, 0x000bbe55, 0x000ffa0b },
+	{ 128, 0x00002ccc, 0x00004a8a, 0x000bbe55, 0x000ffa13 },
+	{ 132, 0x00002ccc, 0x00004a8e, 0x000bbe55, 0x000ffa1b },
+	{ 136, 0x00002ccc, 0x00004a92, 0x000bbe55, 0x000ffa23 },
+
+	/* 802.11 UNII */
+	{ 140, 0x00002ccc, 0x00004a9a, 0x000bbe55, 0x000ffa03 },
+	{ 149, 0x00002ccc, 0x00004aa2, 0x000bbe55, 0x000ffa1f },
+	{ 153, 0x00002ccc, 0x00004aa6, 0x000bbe55, 0x000ffa27 },
+	{ 157, 0x00002ccc, 0x00004aae, 0x000bbe55, 0x000ffa07 },
+	{ 161, 0x00002ccc, 0x00004ab2, 0x000bbe55, 0x000ffa0f },
+	{ 165, 0x00002ccc, 0x00004ab6, 0x000bbe55, 0x000ffa17 },
+
+	/* MMAC(Japan)J52 ch 34,38,42,46 */
+	{ 34, 0x00002ccc, 0x0000499a, 0x0009be55, 0x000ffa0b },
+	{ 38, 0x00002ccc, 0x0000499e, 0x0009be55, 0x000ffa13 },
+	{ 42, 0x00002ccc, 0x000049a2, 0x0009be55, 0x000ffa1b },
+	{ 46, 0x00002ccc, 0x000049a6, 0x0009be55, 0x000ffa23 },
 };
 
 /*
- * RF value list for RF5225 & RF5325 (supplement to vals_bg)
- * Supports: 5.2 GHz, rf_sequence disabled
+ * RF value list for RF5225 & RF5325
+ * Supports: 2.4 GHz & 5.2 GHz, rf_sequence enabled
  */
-static const u32 rf_vals_a_5x_noseq[] = {
-	0x0000499a, 0x000049a2, 0x000049a6, 0x000049aa, 0x000049ae,
-	0x000049b2, 0x000049ba, 0x000049be, 0x00004a2a, 0x00004a2e,
-	0x00004a32, 0x00004a36, 0x00004a3a, 0x00004a82, 0x00004a86,
-	0x00004a8a, 0x00004a8e, 0x00004a92, 0x00004a9a, 0x00004aa2,
-	0x00004aa6, 0x00004aae, 0x00004ab2, 0x00004ab6
-};
-
-/*
- * RF value list for RF5225 & RF5325 (supplement to vals_bg)
- * Supports: 5.2 GHz, rf_sequence enabled
- */
-static const u32 rf_vals_a_5x_seq[] = {
-	0x0004481a, 0x00044682, 0x00044686, 0x0004468e, 0x00044692,
-	0x0004469a, 0x000446a2, 0x000446a6, 0x0004489a, 0x000448a2,
-	0x000448aa, 0x000448b2, 0x000448ba, 0x00044702, 0x00044706,
-	0x0004470e, 0x00044712, 0x0004471a, 0x00044722, 0x0004472e,
-	0x00044736, 0x0004490a, 0x00044912, 0x0004491a
+static const struct rf_channel rf_vals_seq[] = {
+	{ 1,  0x00002ccc, 0x00004786, 0x00068455, 0x000ffa0b },
+	{ 2,  0x00002ccc, 0x00004786, 0x00068455, 0x000ffa1f },
+	{ 3,  0x00002ccc, 0x0000478a, 0x00068455, 0x000ffa0b },
+	{ 4,  0x00002ccc, 0x0000478a, 0x00068455, 0x000ffa1f },
+	{ 5,  0x00002ccc, 0x0000478e, 0x00068455, 0x000ffa0b },
+	{ 6,  0x00002ccc, 0x0000478e, 0x00068455, 0x000ffa1f },
+	{ 7,  0x00002ccc, 0x00004792, 0x00068455, 0x000ffa0b },
+	{ 8,  0x00002ccc, 0x00004792, 0x00068455, 0x000ffa1f },
+	{ 9,  0x00002ccc, 0x00004796, 0x00068455, 0x000ffa0b },
+	{ 10, 0x00002ccc, 0x00004796, 0x00068455, 0x000ffa1f },
+	{ 11, 0x00002ccc, 0x0000479a, 0x00068455, 0x000ffa0b },
+	{ 12, 0x00002ccc, 0x0000479a, 0x00068455, 0x000ffa1f },
+	{ 13, 0x00002ccc, 0x0000479e, 0x00068455, 0x000ffa0b },
+	{ 14, 0x00002ccc, 0x000047a2, 0x00068455, 0x000ffa13 },
+
+	/* 802.11 UNI / HyperLan 2 */
+	{ 36, 0x00002cd4, 0x0004481a, 0x00098455, 0x000c0a03 },
+	{ 40, 0x00002cd0, 0x00044682, 0x00098455, 0x000c0a03 },
+	{ 44, 0x00002cd0, 0x00044686, 0x00098455, 0x000c0a1b },
+	{ 48, 0x00002cd0, 0x0004468e, 0x00098655, 0x000c0a0b },
+	{ 52, 0x00002cd0, 0x00044692, 0x00098855, 0x000c0a23 },
+	{ 56, 0x00002cd0, 0x0004469a, 0x00098c55, 0x000c0a13 },
+	{ 60, 0x00002cd0, 0x000446a2, 0x00098e55, 0x000c0a03 },
+	{ 64, 0x00002cd0, 0x000446a6, 0x00099255, 0x000c0a1b },
+
+	/* 802.11 HyperLan 2 */
+	{ 100, 0x00002cd4, 0x0004489a, 0x000b9855, 0x000c0a03 },
+	{ 104, 0x00002cd4, 0x000448a2, 0x000b9855, 0x000c0a03 },
+	{ 108, 0x00002cd4, 0x000448aa, 0x000b9855, 0x000c0a03 },
+	{ 112, 0x00002cd4, 0x000448b2, 0x000b9a55, 0x000c0a03 },
+	{ 116, 0x00002cd4, 0x000448ba, 0x000b9a55, 0x000c0a03 },
+	{ 120, 0x00002cd0, 0x00044702, 0x000b9a55, 0x000c0a03 },
+	{ 124, 0x00002cd0, 0x00044706, 0x000b9a55, 0x000c0a1b },
+	{ 128, 0x00002cd0, 0x0004470e, 0x000b9c55, 0x000c0a0b },
+	{ 132, 0x00002cd0, 0x00044712, 0x000b9c55, 0x000c0a23 },
+	{ 136, 0x00002cd0, 0x0004471a, 0x000b9e55, 0x000c0a13 },
+
+	/* 802.11 UNII */
+	{ 140, 0x00002cd0, 0x00044722, 0x000b9e55, 0x000c0a03 },
+	{ 149, 0x00002cd0, 0x0004472e, 0x000ba255, 0x000c0a1b },
+	{ 153, 0x00002cd0, 0x00044736, 0x000ba255, 0x000c0a0b },
+	{ 157, 0x00002cd4, 0x0004490a, 0x000ba255, 0x000c0a17 },
+	{ 161, 0x00002cd4, 0x00044912, 0x000ba255, 0x000c0a17 },
+	{ 165, 0x00002cd4, 0x0004491a, 0x000ba255, 0x000c0a17 },
+
+	/* MMAC(Japan)J52 ch 34,38,42,46 */
+	{ 34, 0x00002ccc, 0x0000499a, 0x0009be55, 0x000c0a0b },
+	{ 38, 0x00002ccc, 0x0000499e, 0x0009be55, 0x000c0a13 },
+	{ 42, 0x00002ccc, 0x000049a2, 0x0009be55, 0x000c0a1b },
+	{ 46, 0x00002ccc, 0x000049a6, 0x0009be55, 0x000c0a23 },
 };
 
 static void rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
@@ -2248,27 +2153,28 @@ static void rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	 */
 	spec->num_modes = 2;
 	spec->num_rates = 12;
-	spec->num_channels = 14;
 	spec->tx_power_a = NULL;
 	spec->tx_power_bg = txpower;
 	spec->tx_power_default = DEFAULT_TXPOWER;
-	spec->chan_val_a = NULL;
-	spec->chan_val_bg = rf_vals_bg;
+
+	if (!test_bit(CONFIG_RF_SEQUENCE, &rt2x00dev->flags)) {
+		spec->num_channels = 14;
+		spec->channels = rf_vals_noseq;
+	} else {
+		spec->num_channels = 14;
+		spec->channels = rf_vals_seq;
+	}
 
 	if (rt2x00_rf(&rt2x00dev->chip, RF5225) ||
 	    rt2x00_rf(&rt2x00dev->chip, RF5325)) {
 		spec->num_modes = 3;
-		spec->num_channels += 24;
+		spec->num_channels = ARRAY_SIZE(rf_vals_seq);
 
 		txpower = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START);
 		for (i = 0; i < 14; i++)
 			txpower[i] = TXPOWER_FROM_DEV(txpower[i]);
 
 		spec->tx_power_a = txpower;
-		if (!test_bit(CONFIG_RF_SEQUENCE, &rt2x00dev->flags))
-			spec->chan_val_a = rf_vals_a_5x_noseq;
-		else
-			spec->chan_val_a = rf_vals_a_5x_seq;
 	}
 }
 
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 30d4189..413725c 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -194,7 +194,13 @@ static void rt73usb_rf_write(const struct rt2x00_dev *rt2x00dev,
 rf_write:
 	reg = 0;
 	rt2x00_set_field32(&reg, PHY_CSR4_VALUE, value);
-	rt2x00_set_field32(&reg, PHY_CSR4_NUMBER_OF_BITS, 20);
+
+	if (rt2x00_rf(&rt2x00dev->chip, RF5225) ||
+	    rt2x00_rf(&rt2x00dev->chip, RF2527))
+		rt2x00_set_field32(&reg, PHY_CSR4_NUMBER_OF_BITS, 21);
+	else
+		rt2x00_set_field32(&reg, PHY_CSR4_NUMBER_OF_BITS, 20);
+
 	rt2x00_set_field32(&reg, PHY_CSR4_IF_SELECT, 0);
 	rt2x00_set_field32(&reg, PHY_CSR4_BUSY, 1);
 
@@ -406,123 +412,17 @@ static void rt73usb_config_phymode(struct rt2x00_dev *rt2x00dev,
 	rt73usb_config_rate(rt2x00dev, rate->val2);
 }
 
-static const struct {
-	unsigned int chip;
-	u32 val[3];
-} rf_vals[] = {
-	{ RF5226,	{ 0x00002c0c, 0x00068255 } },
-	{ RF2528,	{ 0x00002c0c, 0x00068255 } },
-	{ RF5225,	{ 0x00002ccc, 0x00000000 } },
-	{ RF2527,	{ 0x00002ccc, 0x00068455 } },
-};
-
-static void rt73usb_get_rf_vals(struct rt2x00_dev *rt2x00dev,
-				const int value, const int channel,
-				struct rf_reg *reg)
-{
-	unsigned int i;
-
-	reg->rf1 = 0;
-	reg->rf2 = value;
-	reg->rf3 = 0;
-	reg->rf4 = 0;
-
-	for (i = 0; i < ARRAY_SIZE(rf_vals); i++) {
-		if (rt2x00_rf(&rt2x00dev->chip, rf_vals[i].chip)) {
-			reg->rf1 = rf_vals[i].val[0];
-			reg->rf3 = rf_vals[i].val[1];
-		}
-	}
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF5225) ||
-	    rt2x00_rf(&rt2x00dev->chip, RF2527))
-		reg->rf2 |= 0x00004000;
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF5225)) {
-		if (channel <= 14)
-			reg->rf3 = 0x00068455;
-		else if (channel >= 36 && channel <= 48)
-			reg->rf3 = 0x0009be55;
-		else if (channel >= 52 && channel <= 64)
-			reg->rf3 = 0x0009ae55;
-		else if (channel >= 100 && channel <= 112)
-			reg->rf3 = 0x000bae55;
-		else
-			reg->rf3 = 0x000bbe55;
-	}
-
-	if (channel < 14) {
-		if (channel & 0x01)
-			reg->rf4 = 0x000fea0b;
-		else
-			reg->rf4 = 0x000fea1f;
-	} else if (channel == 14) {
-		reg->rf4 = 0x000fea13;
-	} else {
-		switch (channel) {
-		case 36:
-		case 56:
-		case 116:
-		case 136:
-			reg->rf4 = 0x000fea23;
-			break;
-		case 40:
-		case 60:
-		case 100:
-		case 120:
-		case 140:
-			reg->rf4 = 0x000fea03;
-			break;
-		case 44:
-		case 64:
-		case 104:
-		case 124:
-			reg->rf4 = 0x000fea0b;
-			break;
-		case 48:
-		case 108:
-		case 128:
-			reg->rf4 = 0x000fea13;
-			break;
-		case 52:
-		case 112:
-		case 132:
-			reg->rf4 = 0x000fea1b;
-			break;
-		case 149:
-			reg->rf4 = 0x000fea1f;
-			break;
-		case 153:
-			reg->rf4 = 0x000fea27;
-			break;
-		case 157:
-			reg->rf4 = 0x000fea07;
-			break;
-		case 161:
-			reg->rf4 = 0x000fea0f;
-			break;
-		case 165:
-			reg->rf4 = 0x000fea17;
-			break;
-		}
-	}
-
-	if (rt2x00_rf(&rt2x00dev->chip, RF2527) ||
-	    rt2x00_rf(&rt2x00dev->chip, RF5225))
-		reg->rf4 |= 0x00010000;
-}
-
 static void rt73usb_config_channel(struct rt2x00_dev *rt2x00dev,
-				   const int value, const int channel,
+				   const int index, const int channel,
 				   const int txpower)
 {
-	struct rf_reg reg;
+	struct rf_channel reg;
 	u8 bbp = 0;
 
 	/*
 	 * Fill rf_reg structure.
 	 */
-	rt73usb_get_rf_vals(rt2x00dev, value, channel, &reg);
+	memcpy(&reg, &rt2x00dev->spec.channels[index], sizeof(reg));
 
 	/*
 	 * Set TXpower.
@@ -563,7 +463,7 @@ static void rt73usb_config_channel(struct rt2x00_dev *rt2x00dev,
 static void rt73usb_config_txpower(struct rt2x00_dev *rt2x00dev,
 				   const int txpower)
 {
-	struct rf_reg rf;
+	struct rf_channel rf;
 
 	rt2x00_rf_read(rt2x00dev, 1, &rf.rf1);
 	rt2x00_rf_read(rt2x00dev, 2, &rf.rf2);
@@ -1654,27 +1554,141 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
 }
 
 /*
- * RF value list for RF5226, RF2528, RF5225 & RF2527
+ * RF value list for RF2528
  * Supports: 2.4 GHz
  */
-static const u32 rf_vals_bg[] = {
-	0x00000786, 0x00000786, 0x0000078a, 0x0000078a, 0x0000078e,
-	0x0000078e, 0x00000792, 0x00000792, 0x00000796, 0x00000796,
-	0x0000079a, 0x0000079a, 0x0000079e, 0x000007a2
+static const struct rf_channel rf_vals_bg_2528[] = {
+	{ 1,  0x00002c0c, 0x00000786, 0x00068255, 0x000fea0b },
+	{ 2,  0x00002c0c, 0x00000786, 0x00068255, 0x000fea1f },
+	{ 3,  0x00002c0c, 0x0000078a, 0x00068255, 0x000fea0b },
+	{ 4,  0x00002c0c, 0x0000078a, 0x00068255, 0x000fea1f },
+	{ 5,  0x00002c0c, 0x0000078e, 0x00068255, 0x000fea0b },
+	{ 6,  0x00002c0c, 0x0000078e, 0x00068255, 0x000fea1f },
+	{ 7,  0x00002c0c, 0x00000792, 0x00068255, 0x000fea0b },
+	{ 8,  0x00002c0c, 0x00000792, 0x00068255, 0x000fea1f },
+	{ 9,  0x00002c0c, 0x00000796, 0x00068255, 0x000fea0b },
+	{ 10, 0x00002c0c, 0x00000796, 0x00068255, 0x000fea1f },
+	{ 11, 0x00002c0c, 0x0000079a, 0x00068255, 0x000fea0b },
+	{ 12, 0x00002c0c, 0x0000079a, 0x00068255, 0x000fea1f },
+	{ 13, 0x00002c0c, 0x0000079e, 0x00068255, 0x000fea0b },
+	{ 14, 0x00002c0c, 0x000007a2, 0x00068255, 0x000fea13 },
+};
+
+/*
+ * RF value list for RF5226
+ * Supports: 2.4 GHz & 5.2 GHz
+ */
+static const struct rf_channel rf_vals_5226[] = {
+	{ 1,  0x00002c0c, 0x00000786, 0x00068255, 0x000fea0b },
+	{ 2,  0x00002c0c, 0x00000786, 0x00068255, 0x000fea1f },
+	{ 3,  0x00002c0c, 0x0000078a, 0x00068255, 0x000fea0b },
+	{ 4,  0x00002c0c, 0x0000078a, 0x00068255, 0x000fea1f },
+	{ 5,  0x00002c0c, 0x0000078e, 0x00068255, 0x000fea0b },
+	{ 6,  0x00002c0c, 0x0000078e, 0x00068255, 0x000fea1f },
+	{ 7,  0x00002c0c, 0x00000792, 0x00068255, 0x000fea0b },
+	{ 8,  0x00002c0c, 0x00000792, 0x00068255, 0x000fea1f },
+	{ 9,  0x00002c0c, 0x00000796, 0x00068255, 0x000fea0b },
+	{ 10, 0x00002c0c, 0x00000796, 0x00068255, 0x000fea1f },
+	{ 11, 0x00002c0c, 0x0000079a, 0x00068255, 0x000fea0b },
+	{ 12, 0x00002c0c, 0x0000079a, 0x00068255, 0x000fea1f },
+	{ 13, 0x00002c0c, 0x0000079e, 0x00068255, 0x000fea0b },
+	{ 14, 0x00002c0c, 0x000007a2, 0x00068255, 0x000fea13 },
+
+	/* 802.11 UNI / HyperLan 2 */
+	{ 36, 0x00002c0c, 0x0000099a, 0x00098255, 0x000fea23 },
+	{ 40, 0x00002c0c, 0x000009a2, 0x00098255, 0x000fea03 },
+	{ 44, 0x00002c0c, 0x000009a6, 0x00098255, 0x000fea0b },
+	{ 48, 0x00002c0c, 0x000009aa, 0x00098255, 0x000fea13 },
+	{ 52, 0x00002c0c, 0x000009ae, 0x00098255, 0x000fea1b },
+	{ 56, 0x00002c0c, 0x000009b2, 0x00098255, 0x000fea23 },
+	{ 60, 0x00002c0c, 0x000009ba, 0x00098255, 0x000fea03 },
+	{ 64, 0x00002c0c, 0x000009be, 0x00098255, 0x000fea0b },
+
+	/* 802.11 HyperLan 2 */
+	{ 100, 0x00002c0c, 0x00000a2a, 0x000b8255, 0x000fea03 },
+	{ 104, 0x00002c0c, 0x00000a2e, 0x000b8255, 0x000fea0b },
+	{ 108, 0x00002c0c, 0x00000a32, 0x000b8255, 0x000fea13 },
+	{ 112, 0x00002c0c, 0x00000a36, 0x000b8255, 0x000fea1b },
+	{ 116, 0x00002c0c, 0x00000a3a, 0x000b8255, 0x000fea23 },
+	{ 120, 0x00002c0c, 0x00000a82, 0x000b8255, 0x000fea03 },
+	{ 124, 0x00002c0c, 0x00000a86, 0x000b8255, 0x000fea0b },
+	{ 128, 0x00002c0c, 0x00000a8a, 0x000b8255, 0x000fea13 },
+	{ 132, 0x00002c0c, 0x00000a8e, 0x000b8255, 0x000fea1b },
+	{ 136, 0x00002c0c, 0x00000a92, 0x000b8255, 0x000fea23 },
+
+	/* 802.11 UNII */
+	{ 140, 0x00002c0c, 0x00000a9a, 0x000b8255, 0x000fea03 },
+	{ 149, 0x00002c0c, 0x00000aa2, 0x000b8255, 0x000fea1f },
+	{ 153, 0x00002c0c, 0x00000aa6, 0x000b8255, 0x000fea27 },
+	{ 157, 0x00002c0c, 0x00000aae, 0x000b8255, 0x000fea07 },
+	{ 161, 0x00002c0c, 0x00000ab2, 0x000b8255, 0x000fea0f },
+	{ 165, 0x00002c0c, 0x00000ab6, 0x000b8255, 0x000fea17 },
+
+	/* MMAC(Japan)J52 ch 34,38,42,46 */
+	{ 34, 0x00002c0c, 0x0008099a, 0x000da255, 0x000d3a0b },
+	{ 38, 0x00002c0c, 0x0008099e, 0x000da255, 0x000d3a13 },
+	{ 42, 0x00002c0c, 0x000809a2, 0x000da255, 0x000d3a1b },
+	{ 46, 0x00002c0c, 0x000809a6, 0x000da255, 0x000d3a23 },
 };
 
 /*
- * RF value list for RF5226 & RF5225 (supplement to vals_bg)
- * Supports: 5.2 GHz
+ * RF value list for RF5225 & RF2527
+ * Supports: 2.4 GHz & 5.2 GHz
  */
-static const u32 rf_vals_a_5x[] = {
-	0x0000099a, 0x000009a2, 0x000009a6, 0x000009aa, 0x000009ae,
-	0x000009b2, 0x000009ba, 0x000009be, 0x00000a2a, 0x00000a2e,
-	0x00000a32, 0x00000a36, 0x00000a3a, 0x00000a82, 0x00000a86,
-	0x00000a8a, 0x00000a8e, 0x00000a92, 0x00000a9a, 0x00000aa2,
-	0x00000aa6, 0x00000aae, 0x00000ab2, 0x00000ab6
+static const struct rf_channel rf_vals_5225_2527[] = {
+	{ 1,  0x00002ccc, 0x00004786, 0x00068455, 0x000ffa0b },
+	{ 2,  0x00002ccc, 0x00004786, 0x00068455, 0x000ffa1f },
+	{ 3,  0x00002ccc, 0x0000478a, 0x00068455, 0x000ffa0b },
+	{ 4,  0x00002ccc, 0x0000478a, 0x00068455, 0x000ffa1f },
+	{ 5,  0x00002ccc, 0x0000478e, 0x00068455, 0x000ffa0b },
+	{ 6,  0x00002ccc, 0x0000478e, 0x00068455, 0x000ffa1f },
+	{ 7,  0x00002ccc, 0x00004792, 0x00068455, 0x000ffa0b },
+	{ 8,  0x00002ccc, 0x00004792, 0x00068455, 0x000ffa1f },
+	{ 9,  0x00002ccc, 0x00004796, 0x00068455, 0x000ffa0b },
+	{ 10, 0x00002ccc, 0x00004796, 0x00068455, 0x000ffa1f },
+	{ 11, 0x00002ccc, 0x0000479a, 0x00068455, 0x000ffa0b },
+	{ 12, 0x00002ccc, 0x0000479a, 0x00068455, 0x000ffa1f },
+	{ 13, 0x00002ccc, 0x0000479e, 0x00068455, 0x000ffa0b },
+	{ 14, 0x00002ccc, 0x000047a2, 0x00068455, 0x000ffa13 },
+
+	/* 802.11 UNI / HyperLan 2 */
+	{ 36, 0x00002ccc, 0x0000499a, 0x0009be55, 0x000ffa23 },
+	{ 40, 0x00002ccc, 0x000049a2, 0x0009be55, 0x000ffa03 },
+	{ 44, 0x00002ccc, 0x000049a6, 0x0009be55, 0x000ffa0b },
+	{ 48, 0x00002ccc, 0x000049aa, 0x0009be55, 0x000ffa13 },
+	{ 52, 0x00002ccc, 0x000049ae, 0x0009ae55, 0x000ffa1b },
+	{ 56, 0x00002ccc, 0x000049b2, 0x0009ae55, 0x000ffa23 },
+	{ 60, 0x00002ccc, 0x000049ba, 0x0009ae55, 0x000ffa03 },
+	{ 64, 0x00002ccc, 0x000049be, 0x0009ae55, 0x000ffa0b },
+
+	/* 802.11 HyperLan 2 */
+	{ 100, 0x00002ccc, 0x00004a2a, 0x000bae55, 0x000ffa03 },
+	{ 104, 0x00002ccc, 0x00004a2e, 0x000bae55, 0x000ffa0b },
+	{ 108, 0x00002ccc, 0x00004a32, 0x000bae55, 0x000ffa13 },
+	{ 112, 0x00002ccc, 0x00004a36, 0x000bae55, 0x000ffa1b },
+	{ 116, 0x00002ccc, 0x00004a3a, 0x000bbe55, 0x000ffa23 },
+	{ 120, 0x00002ccc, 0x00004a82, 0x000bbe55, 0x000ffa03 },
+	{ 124, 0x00002ccc, 0x00004a86, 0x000bbe55, 0x000ffa0b },
+	{ 128, 0x00002ccc, 0x00004a8a, 0x000bbe55, 0x000ffa13 },
+	{ 132, 0x00002ccc, 0x00004a8e, 0x000bbe55, 0x000ffa1b },
+	{ 136, 0x00002ccc, 0x00004a92, 0x000bbe55, 0x000ffa23 },
+
+	/* 802.11 UNII */
+	{ 140, 0x00002ccc, 0x00004a9a, 0x000bbe55, 0x000ffa03 },
+	{ 149, 0x00002ccc, 0x00004aa2, 0x000bbe55, 0x000ffa1f },
+	{ 153, 0x00002ccc, 0x00004aa6, 0x000bbe55, 0x000ffa27 },
+	{ 157, 0x00002ccc, 0x00004aae, 0x000bbe55, 0x000ffa07 },
+	{ 161, 0x00002ccc, 0x00004ab2, 0x000bbe55, 0x000ffa0f },
+	{ 165, 0x00002ccc, 0x00004ab6, 0x000bbe55, 0x000ffa17 },
+
+	/* MMAC(Japan)J52 ch 34,38,42,46 */
+	{ 34, 0x00002ccc, 0x0000499a, 0x0009be55, 0x000ffa0b },
+	{ 38, 0x00002ccc, 0x0000499e, 0x0009be55, 0x000ffa13 },
+	{ 42, 0x00002ccc, 0x000049a2, 0x0009be55, 0x000ffa1b },
+	{ 46, 0x00002ccc, 0x000049a6, 0x0009be55, 0x000ffa23 },
 };
 
+
 static void rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 {
 	struct hw_mode_spec *spec = &rt2x00dev->spec;
@@ -1714,24 +1728,33 @@ static void rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	 */
 	spec->num_modes = 2;
 	spec->num_rates = 12;
-	spec->num_channels = 14;
 	spec->tx_power_a = NULL;
 	spec->tx_power_bg = txpower;
 	spec->tx_power_default = DEFAULT_TXPOWER;
-	spec->chan_val_a = NULL;
-	spec->chan_val_bg = rf_vals_bg;
+
+	if (rt2x00_rf(&rt2x00dev->chip, RF2528)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_bg_2528);
+		spec->channels = rf_vals_bg_2528;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF5226)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_5226);
+		spec->channels = rf_vals_5226;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF2527)) {
+		spec->num_channels = 14;
+		spec->channels = rf_vals_5225_2527;
+	} else if (rt2x00_rf(&rt2x00dev->chip, RF5225)) {
+		spec->num_channels = ARRAY_SIZE(rf_vals_5225_2527);
+		spec->channels = rf_vals_5225_2527;
+	}
 
 	if (rt2x00_rf(&rt2x00dev->chip, RF5225) ||
 	    rt2x00_rf(&rt2x00dev->chip, RF5226)) {
 		spec->num_modes = 3;
-		spec->num_channels += 24;
 
 		txpower = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START);
 		for (i = 0; i < 14; i++)
 			txpower[i] = TXPOWER_FROM_DEV(txpower[i]);
 
 		spec->tx_power_a = txpower;
-		spec->chan_val_a = rf_vals_a_5x;
 	}
 }
 
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 12/30] rt2x00: Store firmware in memory
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (10 preceding siblings ...)
  2007-08-19 18:25 ` [PATCH 11/30] rt2x00: Rework RF register handling Ivo van Doorn
@ 2007-08-19 18:25 ` Ivo van Doorn
  2007-08-19 18:54   ` Michael Buesch
  2007-08-19 18:26 ` [PATCH 13/30] rt2x00: rt2x00_ring_free returns invalid length Ivo van Doorn
                   ` (18 subsequent siblings)
  30 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:25 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 6d620c9670f54eb0ce06bd771556e4ac413a2c48 Mon Sep 17 00:00:00 2001
From: Mattias Nissler <mattias.nissler@gmx.de>
Date: Sun, 5 Aug 2007 15:32:38 +0200
Subject: [PATCH 12/30] rt2x00: Store firmware in memory

Because hard disks are likely not yet up when resuming, we cannot load
the firmware image from disk then. Work around this problem by keeping
the firmware image in memory once it is loaded.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00.h         |    6 ++++
 drivers/net/wireless/rt2x00dev.c      |    5 ++++
 drivers/net/wireless/rt2x00firmware.c |   43 +++++++++++++++++++++++++-------
 drivers/net/wireless/rt2x00lib.h      |    4 +++
 4 files changed, 48 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index cfd5384..de1365f 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -30,6 +30,7 @@
 #include <linux/prefetch.h>
 #include <linux/skbuff.h>
 #include <linux/workqueue.h>
+#include <linux/firmware.h>
 
 #include <net/mac80211.h>
 
@@ -601,6 +602,11 @@ struct rt2x00_dev {
 	struct data_ring *rx;
 	struct data_ring *tx;
 	struct data_ring *bcn;
+
+	/*
+	 * Firmware image.
+	 */
+	const struct firmware *fw;
 };
 
 /*
diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index 3671f74..50c604c 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -1091,6 +1091,11 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev)
 	rt2x00lib_remove_hw(rt2x00dev);
 
 	/*
+	 * Free firmware image.
+	 */
+	rt2x00lib_free_firmware(rt2x00dev);
+
+	/*
 	 * Free ring structures.
 	 */
 	rt2x00lib_free_rings(rt2x00dev);
diff --git a/drivers/net/wireless/rt2x00firmware.c b/drivers/net/wireless/rt2x00firmware.c
index 63834f9..143e793 100644
--- a/drivers/net/wireless/rt2x00firmware.c
+++ b/drivers/net/wireless/rt2x00firmware.c
@@ -29,14 +29,13 @@
 #define DRV_NAME "rt2x00lib"
 
 #include <linux/crc-itu-t.h>
-#include <linux/firmware.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 
 #include "rt2x00.h"
 #include "rt2x00lib.h"
 
-int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
+static int rt2x00lib_request_firmware(struct rt2x00_dev *rt2x00dev)
 {
 	struct device *device = wiphy_dev(rt2x00dev->hw->wiphy);
 	const struct firmware *fw;
@@ -85,19 +84,43 @@ int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
 		goto exit;
 	}
 
-	/*
-	 * Send firmware to the device.
-	 */
-	retval = rt2x00dev->ops->lib->load_firmware(rt2x00dev,
-						    fw->data, fw->size);
-	if (retval)
-		goto exit;
-
 	INFO(rt2x00dev, "Firmware detected - version: %d.%d.\n",
 	     fw->data[fw->size - 4], fw->data[fw->size - 3]);
 
+	rt2x00dev->fw = fw;
+
+	return 0;
+
 exit:
 	release_firmware(fw);
 
 	return retval;
 }
+
+int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
+{
+	int retval;
+
+	if (!rt2x00dev->fw) {
+		retval = rt2x00lib_request_firmware(rt2x00dev);
+		if (retval)
+			return retval;
+	}
+
+	/*
+	 * Send firmware to the device.
+	 */
+	retval = rt2x00dev->ops->lib->load_firmware(rt2x00dev,
+						    rt2x00dev->fw->data,
+						    rt2x00dev->fw->size);
+	return retval;
+}
+
+void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
+{
+	if (rt2x00dev->fw) {
+		release_firmware(rt2x00dev->fw);
+		rt2x00dev->fw = NULL;
+	}
+}
+
diff --git a/drivers/net/wireless/rt2x00lib.h b/drivers/net/wireless/rt2x00lib.h
index 1a28292..1560f73 100644
--- a/drivers/net/wireless/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00lib.h
@@ -59,11 +59,15 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, struct ieee80211_conf *conf)
  */
 #ifdef CONFIG_RT2X00_LIB_FIRMWARE
 int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev);
+void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev);
 #else
 static inline int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
 {
 	return 0;
 }
+static inline void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
+{
+}
 #endif /* CONFIG_RT2X00_LIB_FIRMWARE */
 
 /*
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 13/30] rt2x00: rt2x00_ring_free returns invalid length
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (11 preceding siblings ...)
  2007-08-19 18:25 ` [PATCH 12/30] rt2x00: Store firmware in memory Ivo van Doorn
@ 2007-08-19 18:26 ` Ivo van Doorn
  2007-08-19 18:26 ` [PATCH 14/30] Fix off-by-one error in debugfs helpers Ivo van Doorn
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:26 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 038b4a505c82c91a84caaf7832967ffac2faf93b Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:03:32 +0200
Subject: [PATCH 13/30] rt2x00: rt2x00_ring_free returns invalid length

rt2x00_ring_free returned the incorrect number of available
entries because it accidently used ring->stats.len minus
the number of used entries. This always results in 0 available entries,
obviously this in turn would lead to problems regarding the
TX handling.

We can fix and optimize the code quite simply by
doing the limit - length

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00ring.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rt2x00ring.h b/drivers/net/wireless/rt2x00ring.h
index 2adc8e5..9c94d06 100644
--- a/drivers/net/wireless/rt2x00ring.h
+++ b/drivers/net/wireless/rt2x00ring.h
@@ -219,9 +219,7 @@ static inline int rt2x00_ring_full(struct data_ring *ring)
 
 static inline int rt2x00_ring_free(struct data_ring *ring)
 {
-	if (ring->index_done >= ring->index)
-		return ring->index_done - ring->index;
-	return ring->stats.len - (ring->index - ring->index_done);
+	return ring->stats.limit - ring->stats.len;
 }
 
 /*
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 14/30] Fix off-by-one error in debugfs helpers
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (12 preceding siblings ...)
  2007-08-19 18:26 ` [PATCH 13/30] rt2x00: rt2x00_ring_free returns invalid length Ivo van Doorn
@ 2007-08-19 18:26 ` Ivo van Doorn
  2007-08-19 18:26 ` [PATCH 15/30] rt2x00: Use caching for USB transfers Ivo van Doorn
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:26 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 089bfb50f6f9426f1dfd48bfb07455224484b847 Mon Sep 17 00:00:00 2001
From: Luca Tettamanti <kronos.it@gmail.com>
Date: Thu, 9 Aug 2007 21:19:49 +0200
Subject: [PATCH 14/30] Fix off-by-one error in debugfs helpers

Fix an off-by-on error in debugfs code which may lead to read/write past
the end of the data.

Signed-Off-By: Luca Tettamanti <kronos.it@gmail.com>

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00debug.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00debug.c b/drivers/net/wireless/rt2x00debug.c
index d6c4cfe..c7b331c 100644
--- a/drivers/net/wireless/rt2x00debug.c
+++ b/drivers/net/wireless/rt2x00debug.c
@@ -127,7 +127,7 @@ static ssize_t rt2x00debug_read_##__name(struct file *file,	\
 	if (*offset)						\
 		return 0;					\
 								\
-	if (intf->offset_##__name > debug->__name.word_count)	\
+	if (intf->offset_##__name >= debug->__name.word_count)	\
 		return -EINVAL;					\
 								\
 	debug->__name.read(intf->rt2x00dev,			\
@@ -160,7 +160,7 @@ static ssize_t rt2x00debug_write_##__name(struct file *file,	\
 	if (!capable(CAP_NET_ADMIN))				\
 		return -EPERM;					\
 								\
-	if (intf->offset_##__name > debug->__name.word_count)	\
+	if (intf->offset_##__name >= debug->__name.word_count)	\
 		return -EINVAL;					\
 								\
 	if (copy_from_user(line, buf, length))			\
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 15/30] rt2x00: Use caching for USB transfers
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (13 preceding siblings ...)
  2007-08-19 18:26 ` [PATCH 14/30] Fix off-by-one error in debugfs helpers Ivo van Doorn
@ 2007-08-19 18:26 ` Ivo van Doorn
  2007-08-19 18:27 ` [PATCH 16/30] rt2x00: Cleanup set_state for rt61 and rt73 Ivo van Doorn
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:26 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From b75e79133fbff5d1b4cde7fc2ec362ad433c019f Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:07:27 +0200
Subject: [PATCH 15/30] rt2x00: Use caching for USB transfers

The kernel USB layer demands that the buffer argument
to usb_control_msg must point to something allocated using kmalloc.
Failure to do so will lead to unexpected results depending
on the running architecture.
This will add a cache to rt2x00_dev to be used by rt2x00usb
for all data transfers to the host. This will also require some
new wrapper functions for easier handling this.
For the rt73usb firmware loader this also means it is better
to allocate the memory instead of using a 64byte array,
besides that this was a direct attack on the stack size it is
also safer.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2500usb.c |   38 +++++++--------
 drivers/net/wireless/rt2x00.h    |    5 ++-
 drivers/net/wireless/rt2x00usb.c |   92 +++++++++++++++++++++++++++++++-------
 drivers/net/wireless/rt2x00usb.h |   60 ++++++++++++++++++++++---
 drivers/net/wireless/rt73usb.c   |   92 +++++++++++++++++++++-----------------
 5 files changed, 202 insertions(+), 85 deletions(-)

diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index 25d0aec..5e3cdf5 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -58,9 +58,9 @@ static inline void rt2500usb_register_read(const struct rt2x00_dev *rt2x00dev,
 					   u16 *value)
 {
 	__le16 reg;
-	rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_READ,
-				 USB_VENDOR_REQUEST_IN, offset, 0x00,
-				 &reg, sizeof(u16), REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ,
+				      USB_VENDOR_REQUEST_IN, offset,
+				      &reg, sizeof(u16), REGISTER_TIMEOUT);
 	*value = le16_to_cpu(reg);
 }
 
@@ -69,10 +69,10 @@ static inline void rt2500usb_register_multiread(const struct rt2x00_dev
 						const unsigned int offset,
 						void *value, const u16 length)
 {
-	rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_READ,
-				 USB_VENDOR_REQUEST_IN, offset, 0x00,
-				 value, length,
-				 REGISTER_TIMEOUT * (length / sizeof(u16)));
+	int timeout = REGISTER_TIMEOUT * (length / sizeof(u16));
+	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ,
+				      USB_VENDOR_REQUEST_IN, offset,
+				      value, length, timeout);
 }
 
 static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev,
@@ -80,9 +80,9 @@ static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev,
 					    u16 value)
 {
 	__le16 reg = cpu_to_le16(value);
-	rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE,
-				 USB_VENDOR_REQUEST_OUT, offset, 0x00,
-				 &reg, sizeof(u16), REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_WRITE,
+				      USB_VENDOR_REQUEST_OUT, offset,
+				      &reg, sizeof(u16), REGISTER_TIMEOUT);
 }
 
 static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev
@@ -90,10 +90,10 @@ static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev
 						 const unsigned int offset,
 						 void *value, const u16 length)
 {
-	rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE,
-				 USB_VENDOR_REQUEST_OUT, offset, 0x00,
-				 value, length,
-				 REGISTER_TIMEOUT * (length / sizeof(u16)));
+	int timeout = REGISTER_TIMEOUT * (length / sizeof(u16));
+	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_WRITE,
+				      USB_VENDOR_REQUEST_OUT, offset,
+				      value, length, timeout);
 }
 
 static u16 rt2500usb_bbp_check(const struct rt2x00_dev *rt2x00dev)
@@ -774,12 +774,10 @@ static int rt2500usb_init_registers(struct rt2x00_dev *rt2x00dev)
 {
 	u16 reg;
 
-	rt2x00usb_vendor_request(rt2x00dev, USB_DEVICE_MODE,
-				 USB_VENDOR_REQUEST_OUT, 0x0001,
-				 USB_MODE_TEST, NULL, 0, REGISTER_TIMEOUT);
-	rt2x00usb_vendor_request(rt2x00dev, USB_SINGLE_WRITE,
-				 USB_VENDOR_REQUEST_OUT, 0x0308,
-				 0xf0, NULL, 0, REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0x0001,
+				    USB_MODE_TEST, REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_sw(rt2x00dev, USB_SINGLE_WRITE, 0x0308,
+				    0x00f0, REGISTER_TIMEOUT);
 
 	rt2500usb_register_read(rt2x00dev, TXRX_CSR2, &reg);
 	rt2x00_set_field16(&reg, TXRX_CSR2_DISABLE_RX, 1);
diff --git a/drivers/net/wireless/rt2x00.h b/drivers/net/wireless/rt2x00.h
index de1365f..24ad264 100644
--- a/drivers/net/wireless/rt2x00.h
+++ b/drivers/net/wireless/rt2x00.h
@@ -524,9 +524,12 @@ struct rt2x00_dev {
 	struct hw_mode_spec spec;
 
 	/*
-	 * Base address of device registers (PCI devices only).
+	 * Register pointers
+	 * csr_addr: Base register address. (PCI)
+	 * csr_cache: CSR cache for usb_control_msg. (USB)
 	 */
 	void __iomem *csr_addr;
+	void *csr_cache;
 
 	/*
 	 * Interface configuration.
diff --git a/drivers/net/wireless/rt2x00usb.c b/drivers/net/wireless/rt2x00usb.c
index 6dd0801..d832d5f 100644
--- a/drivers/net/wireless/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00usb.c
@@ -39,24 +39,23 @@
  * Interfacing with the HW.
  */
 int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
-			     const u8 request, const u8 type, const u16 offset,
-			     u32 value, void *buffer, const u16 buffer_length,
-			     const u16 timeout)
+			     const u8 request, const u8 requesttype,
+			     const u16 offset, const u16 value,
+			     void *buffer, const u16 buffer_length,
+			     u16 timeout)
 {
 	struct usb_device *usb_dev =
 	    interface_to_usbdev(rt2x00dev_usb(rt2x00dev));
 	int status;
 	unsigned int i;
-	unsigned int time = timeout;
+	unsigned int pipe =
+	    (requesttype == USB_VENDOR_REQUEST_IN) ?
+	     usb_rcvctrlpipe(usb_dev, 0) : usb_sndctrlpipe(usb_dev, 0);
 
 	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
-		status = usb_control_msg(usb_dev,
-					 ((type == USB_VENDOR_REQUEST_IN) ?
-					  usb_rcvctrlpipe(usb_dev, 0) :
-					  usb_sndctrlpipe(usb_dev, 0)),
-					 request, type, value, offset,
-					 buffer, buffer_length, time);
-
+		status = usb_control_msg(usb_dev, pipe, request, requesttype,
+					 value, offset, buffer, buffer_length,
+					 timeout);
 		if (status >= 0)
 			return 0;
 
@@ -66,7 +65,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
 		 * -ENODEV: Device has disappeared, no point continuing.
 		 */
 		if (status == -ETIMEDOUT)
-			time *= 2;
+			timeout *= 2;
 		else if (status == -ENODEV)
 			break;
 	}
@@ -79,6 +78,35 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
 }
 EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request);
 
+int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev,
+				  const u8 request, const u8 requesttype,
+				  const u16 offset, void *buffer,
+				  const u16 buffer_length, u16 timeout)
+{
+	int status;
+
+	/*
+	 * Check for Cache availability.
+	 */
+	if (unlikely(!rt2x00dev->csr_cache || buffer_length > CSR_CACHE_SIZE)) {
+		ERROR(rt2x00dev, "CSR cache not available.\n");
+		return -ENOMEM;
+	}
+
+	if (requesttype == USB_VENDOR_REQUEST_OUT)
+		memcpy(rt2x00dev->csr_cache, buffer, buffer_length);
+
+	status = rt2x00usb_vendor_request(rt2x00dev, request, requesttype,
+					  offset, 0, rt2x00dev->csr_cache,
+					  buffer_length, timeout);
+
+	if (!status && requesttype == USB_VENDOR_REQUEST_IN)
+		memcpy(buffer, rt2x00dev->csr_cache, buffer_length);
+
+	return status;
+}
+EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_buff);
+
 /*
  * Beacon handlers.
  */
@@ -386,9 +414,8 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
 	struct data_ring *ring;
 	unsigned int i;
 
-	rt2x00usb_vendor_request(rt2x00dev, USB_RX_CONTROL,
-				 USB_VENDOR_REQUEST_OUT, 0x00, 0x00,
-				 NULL, 0, REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 0x0000, 0x0000,
+				    REGISTER_TIMEOUT);
 
 	/*
 	 * Cancel all rings.
@@ -489,6 +516,21 @@ EXPORT_SYMBOL_GPL(rt2x00usb_uninitialize);
 /*
  * USB driver handlers.
  */
+static int rt2x00usb_alloc_csr(struct rt2x00_dev *rt2x00dev)
+{
+	rt2x00dev->csr_cache = kzalloc(CSR_CACHE_SIZE, GFP_KERNEL);
+	if (!rt2x00dev->csr_cache)
+		return -ENOMEM;
+
+	return 0;
+}
+
+static void rt2x00usb_free_csr(struct rt2x00_dev *rt2x00dev)
+{
+	kfree(rt2x00dev->csr_cache);
+	rt2x00dev->csr_cache = NULL;
+}
+
 static int rt2x00usb_alloc_eeprom(struct rt2x00_dev *rt2x00dev)
 {
 	rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL);
@@ -544,10 +586,14 @@ int rt2x00usb_probe(struct usb_interface *usb_intf,
 	rt2x00dev->ops = ops;
 	rt2x00dev->hw = hw;
 
-	retval = rt2x00usb_alloc_eeprom(rt2x00dev);
+	retval = rt2x00usb_alloc_csr(rt2x00dev);
 	if (retval)
 		goto exit_free_device;
 
+	retval = rt2x00usb_alloc_eeprom(rt2x00dev);
+	if (retval)
+		goto exit_free_cr;
+
 	retval = rt2x00usb_alloc_rf(rt2x00dev);
 	if (retval)
 		goto exit_free_eeprom;
@@ -564,6 +610,9 @@ exit_free_rf:
 exit_free_eeprom:
 	rt2x00usb_free_eeprom(rt2x00dev);
 
+exit_free_cr:
+	rt2x00usb_free_csr(rt2x00dev);
+
 exit_free_device:
 	ieee80211_free_hw(hw);
 
@@ -587,6 +636,7 @@ void rt2x00usb_disconnect(struct usb_interface *usb_intf)
 	rt2x00lib_remove_dev(rt2x00dev);
 	rt2x00usb_free_rf(rt2x00dev);
 	rt2x00usb_free_eeprom(rt2x00dev);
+	rt2x00usb_free_csr(rt2x00dev);
 	ieee80211_free_hw(hw);
 
 	/*
@@ -610,6 +660,7 @@ int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state)
 
 	rt2x00usb_free_rf(rt2x00dev);
 	rt2x00usb_free_eeprom(rt2x00dev);
+	rt2x00usb_free_csr(rt2x00dev);
 
 	/*
 	 * Decrease usbdev refcount.
@@ -628,10 +679,14 @@ int rt2x00usb_resume(struct usb_interface *usb_intf)
 
 	usb_get_dev(interface_to_usbdev(usb_intf));
 
-	retval = rt2x00usb_alloc_eeprom(rt2x00dev);
+	retval = rt2x00usb_alloc_csr(rt2x00dev);
 	if (retval)
 		return retval;
 
+	retval = rt2x00usb_alloc_eeprom(rt2x00dev);
+	if (retval)
+		goto exit_free_csr;
+
 	retval = rt2x00usb_alloc_rf(rt2x00dev);
 	if (retval)
 		goto exit_free_eeprom;
@@ -648,6 +703,9 @@ exit_free_rf:
 exit_free_eeprom:
 	rt2x00usb_free_eeprom(rt2x00dev);
 
+exit_free_csr:
+	rt2x00usb_free_csr(rt2x00dev);
+
 	return retval;
 }
 EXPORT_SYMBOL_GPL(rt2x00usb_resume);
diff --git a/drivers/net/wireless/rt2x00usb.h b/drivers/net/wireless/rt2x00usb.h
index 56044f6..eb410d2 100644
--- a/drivers/net/wireless/rt2x00usb.h
+++ b/drivers/net/wireless/rt2x00usb.h
@@ -48,6 +48,12 @@
 #define REGISTER_TIMEOUT_FIRMWARE	1000
 
 /*
+ * Cache size
+ */
+#define CSR_CACHE_SIZE			8
+#define CSR_CACHE_SIZE_FIRMWARE		64
+
+/*
  * USB request types.
  */
 #define USB_VENDOR_REQUEST	( USB_TYPE_VENDOR | USB_RECIP_DEVICE )
@@ -79,21 +85,63 @@
 #define USB_MODE_WAKEUP		0x09	/* RT73USB */
 
 /*
- * Register access.
+ * Used to read/write from/to the device.
+ * This is the main function to communicate with the device,
+ * the buffer argument _must_ either be NULL or point to
+ * a buffer allocated by kmalloc. Failure to do so can lead
+ * to unexpected behavior depending on the architecture.
  */
 int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
-			     const u8 request, const u8 type, const u16 offset,
-			     u32 value, void *buffer, const u16 buffer_length,
-			     const u16 timeout);
+			     const u8 request, const u8 requesttype,
+			     const u16 offset, const u16 value,
+			     void *buffer, const u16 buffer_length,
+			     u16 timeout);
 
+/*
+ * Used to read/write from/to the device.
+ * This function will use a previously with kmalloc allocated cache
+ * to communicate with the device. The contents of the buffer pointer
+ * will be copied to this cache when writing, or read from the cache
+ * when reading.
+ * Buffers send to rt2x00usb_vendor_request _must_ be allocated with
+ * kmalloc. Hence the reason for using a previously allocated cache
+ * which has been allocated properly.
+ */
+int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev,
+				  const u8 request, const u8 requesttype,
+				  const u16 offset, void *buffer,
+				  const u16 buffer_length, u16 timeout);
+
+/*
+ * Simple wrapper around rt2x00usb_vendor_request to write a single
+ * command to the device. Since we don't use the buffer argument we
+ * don't have to worry about kmalloc here.
+ */
+static inline int rt2x00usb_vendor_request_sw(const struct rt2x00_dev
+					      *rt2x00dev,
+					      const u8 request,
+					      const u16 offset,
+					      const u16 value,
+					      int timeout)
+{
+	return rt2x00usb_vendor_request(rt2x00dev, request,
+					USB_VENDOR_REQUEST_OUT, offset,
+					value, NULL, 0, timeout);
+}
+
+/*
+ * Simple wrapper around rt2x00usb_vendor_request to read the eeprom
+ * from the device. Note that the eeprom argument _must_ be allocated using
+ * kmalloc for correct handling inside the kernel USB layer.
+ */
 static inline int rt2x00usb_eeprom_read(const struct rt2x00_dev *rt2x00dev,
 					 __le16 *eeprom, const u16 lenght)
 {
 	int timeout = REGISTER_TIMEOUT * (lenght / sizeof(u16));
 
 	return rt2x00usb_vendor_request(rt2x00dev, USB_EEPROM_READ,
-					USB_VENDOR_REQUEST_IN, 0x00, 0x00,
-					eeprom, lenght, timeout);
+					USB_VENDOR_REQUEST_IN, 0x0000,
+					0x0000, eeprom, lenght, timeout);
 }
 
 /*
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 413725c..0d9c1b9 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -57,9 +57,9 @@ static inline void rt73usb_register_read(const struct rt2x00_dev *rt2x00dev,
 					 const unsigned int offset, u32 *value)
 {
 	__le32 reg;
-	rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_READ,
-				 USB_VENDOR_REQUEST_IN, offset, 0x00,
-				 &reg, sizeof(u32), REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ,
+				      USB_VENDOR_REQUEST_IN, offset,
+				      &reg, sizeof(u32), REGISTER_TIMEOUT);
 	*value = le32_to_cpu(reg);
 }
 
@@ -68,19 +68,19 @@ static inline void rt73usb_register_multiread(const struct rt2x00_dev
 					      const unsigned int offset,
 					      void *value, const u32 length)
 {
-	rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_READ,
-				 USB_VENDOR_REQUEST_IN, offset, 0x00,
-				 value, length,
-				 REGISTER_TIMEOUT * (length / sizeof(u32)));
+	int timeout = REGISTER_TIMEOUT * (length / sizeof(u32));
+	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ,
+				      USB_VENDOR_REQUEST_IN, offset,
+				      value, length, timeout);
 }
 
 static inline void rt73usb_register_write(const struct rt2x00_dev *rt2x00dev,
 					  const unsigned int offset, u32 value)
 {
 	__le32 reg = cpu_to_le32(value);
-	rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE,
-				 USB_VENDOR_REQUEST_OUT, offset, 0x00,
-				 &reg, sizeof(u32), REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_WRITE,
+				      USB_VENDOR_REQUEST_OUT, offset,
+				      &reg, sizeof(u32), REGISTER_TIMEOUT);
 }
 
 static inline void rt73usb_register_multiwrite(const struct rt2x00_dev
@@ -88,10 +88,10 @@ static inline void rt73usb_register_multiwrite(const struct rt2x00_dev
 					       const unsigned int offset,
 					       void *value, const u32 length)
 {
-	rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE,
-				 USB_VENDOR_REQUEST_OUT, offset, 0x00,
-				 value, length,
-				 REGISTER_TIMEOUT * (length / sizeof(u32)));
+	int timeout = REGISTER_TIMEOUT * (length / sizeof(u32));
+	rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_WRITE,
+				      USB_VENDOR_REQUEST_OUT, offset,
+				      value, length, timeout);
 }
 
 static u32 rt73usb_bbp_check(const struct rt2x00_dev *rt2x00dev)
@@ -684,9 +684,8 @@ static void rt73usb_enable_led(struct rt2x00_dev *rt2x00dev)
 		rt2x00_set_field16(&rt2x00dev->led_reg,
 				   MCU_LEDCS_LINK_BG_STATUS, 1);
 
-	rt2x00usb_vendor_request(rt2x00dev, USB_LED_CONTROL,
-				 USB_VENDOR_REQUEST_OUT, 0x00,
-				 rt2x00dev->led_reg, NULL, 0, REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_sw(rt2x00dev, USB_LED_CONTROL, 0x0000,
+				    rt2x00dev->led_reg, REGISTER_TIMEOUT);
 }
 
 static void rt73usb_disable_led(struct rt2x00_dev *rt2x00dev)
@@ -695,9 +694,8 @@ static void rt73usb_disable_led(struct rt2x00_dev *rt2x00dev)
 	rt2x00_set_field16(&rt2x00dev->led_reg, MCU_LEDCS_LINK_BG_STATUS, 0);
 	rt2x00_set_field16(&rt2x00dev->led_reg, MCU_LEDCS_LINK_A_STATUS, 0);
 
-	rt2x00usb_vendor_request(rt2x00dev, USB_LED_CONTROL,
-				 USB_VENDOR_REQUEST_OUT, 0x00,
-				 rt2x00dev->led_reg, NULL, 0, REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_sw(rt2x00dev, USB_LED_CONTROL, 0x0000,
+				    rt2x00dev->led_reg, REGISTER_TIMEOUT);
 }
 
 static void rt73usb_activity_led(struct rt2x00_dev *rt2x00dev, int rssi)
@@ -726,9 +724,8 @@ static void rt73usb_activity_led(struct rt2x00_dev *rt2x00dev, int rssi)
 	else
 		led = 5;
 
-	rt2x00usb_vendor_request(rt2x00dev, USB_LED_CONTROL,
-				 USB_VENDOR_REQUEST_OUT, led,
-				 rt2x00dev->led_reg, NULL, 0, REGISTER_TIMEOUT);
+	rt2x00usb_vendor_request_sw(rt2x00dev, USB_LED_CONTROL, led,
+				    rt2x00dev->led_reg, REGISTER_TIMEOUT);
 }
 
 /*
@@ -886,9 +883,10 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, void *data,
 	unsigned int i;
 	int status;
 	u32 reg;
-	char buf[64];
 	char *ptr = data;
+	char *cache;
 	int buflen;
+	int timeout;
 
 	/*
 	 * Wait for stable hardware.
@@ -907,23 +905,39 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, void *data,
 
 	/*
 	 * Write firmware to device.
+	 * We setup a seperate cache for this action,
+	 * since we are going to write larger chunks of data
+	 * then normally used cache size.
 	 */
-	for (i = 0; i < len; i += sizeof(buf)) {
-		buflen = min(len - i, sizeof(buf));
-		memcpy(buf, ptr, buflen);
-		rt73usb_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE + i,
-					    buf, buflen);
+	cache = kmalloc(CSR_CACHE_SIZE_FIRMWARE, GFP_KERNEL);
+	if (!cache) {
+		ERROR(rt2x00dev, "Failed to allocate firmware cache.\n");
+		return -ENOMEM;
+	}
+
+	for (i = 0; i < len; i += CSR_CACHE_SIZE_FIRMWARE) {
+		buflen = min_t(int, len - i, CSR_CACHE_SIZE_FIRMWARE);
+		timeout = REGISTER_TIMEOUT * (buflen / sizeof(u32));
+
+		memcpy(cache, ptr ,buflen);
+
+		rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE,
+					 USB_VENDOR_REQUEST_OUT,
+					 FIRMWARE_IMAGE_BASE + i, 0x0000,
+					 cache, buflen, timeout);
+
 		ptr += buflen;
 	}
 
+	kfree(cache);
+
 	/*
 	 * Send firmware request to device to load firmware,
 	 * we need to specify a long timeout time.
 	 */
-	status = rt2x00usb_vendor_request(rt2x00dev, USB_DEVICE_MODE,
-					  USB_VENDOR_REQUEST_OUT, 0x00,
-					  USB_MODE_FIRMWARE, NULL, 0,
-					  REGISTER_TIMEOUT_FIRMWARE);
+	status = rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE,
+					     0x0000, USB_MODE_FIRMWARE,
+					     REGISTER_TIMEOUT_FIRMWARE);
 	if (status < 0) {
 		ERROR(rt2x00dev, "Failed to write Firmware to device.\n");
 		return status;
@@ -1143,10 +1157,8 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
 	put_to_sleep = (state != STATE_AWAKE);
 
 	if (!put_to_sleep)
-		rt2x00usb_vendor_request(rt2x00dev, USB_DEVICE_MODE,
-					 USB_VENDOR_REQUEST_OUT, 0x00,
-					 USB_MODE_WAKEUP, NULL, 0,
-					 REGISTER_TIMEOUT);
+		rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0x0000,
+					    USB_MODE_WAKEUP, REGISTER_TIMEOUT);
 
 	rt73usb_register_read(rt2x00dev, MAC_CSR12, &reg);
 	rt2x00_set_field32(&reg, MAC_CSR12_FORCE_WAKEUP, !put_to_sleep);
@@ -1154,10 +1166,8 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
 	rt73usb_register_write(rt2x00dev, MAC_CSR12, reg);
 
 	if (put_to_sleep)
-		rt2x00usb_vendor_request(rt2x00dev, USB_DEVICE_MODE,
-					 USB_VENDOR_REQUEST_OUT, 0x00,
-					 USB_MODE_SLEEP, NULL, 0,
-					 REGISTER_TIMEOUT);
+		rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0x0000,
+					    USB_MODE_SLEEP, REGISTER_TIMEOUT);
 
 	/*
 	 * Device is not guaranteed to be in the requested state yet.
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 16/30] rt2x00: Cleanup set_state for rt61 and rt73
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (14 preceding siblings ...)
  2007-08-19 18:26 ` [PATCH 15/30] rt2x00: Use caching for USB transfers Ivo van Doorn
@ 2007-08-19 18:27 ` Ivo van Doorn
  2007-08-19 18:27 ` [PATCH 17/30] rt2x00: Fix register initialization ordering Ivo van Doorn
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:27 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 252c0576e50c72fed7a52777b5a4abf962b8ae43 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:08:09 +0200
Subject: [PATCH 16/30] rt2x00: Cleanup set_state for rt61 and rt73

The set_state was doing too much work for rt61 and rt73,
the additional registers that were set should be used
for Power Saving management and _not_ suspend/resume.
Since at the moment we don't support power management
we should remove the additional calls.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt61pci.c |   12 ------------
 drivers/net/wireless/rt73usb.c |    8 --------
 2 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index d0c2323..1a4957b 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -1423,18 +1423,6 @@ static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
 	rt2x00_set_field32(&reg, MAC_CSR12_PUT_TO_SLEEP, put_to_sleep);
 	rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg);
 
-	if (put_to_sleep) {
-		rt2x00pci_register_write(rt2x00dev, SOFT_RESET_CSR, 0x00000005);
-		rt2x00pci_register_write(rt2x00dev, IO_CNTL_CSR, 0x0000001c);
-		rt2x00pci_register_write(rt2x00dev, PCI_USEC_CSR, 0x00000060);
-		rt61pci_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0x00, 0x00);
-	} else {
-		rt2x00pci_register_write(rt2x00dev, SOFT_RESET_CSR, 0x00000007);
-		rt2x00pci_register_write(rt2x00dev, IO_CNTL_CSR, 0x00000018);
-		rt2x00pci_register_write(rt2x00dev, PCI_USEC_CSR, 0x00000020);
-		rt61pci_mcu_request(rt2x00dev, MCU_WAKEUP, 0xff, 0x00, 0x00);
-	}
-
 	/*
 	 * Device is not guaranteed to be in the requested state yet.
 	 * We must wait until the register indicates that the
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 0d9c1b9..85dfc58 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -1156,19 +1156,11 @@ static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state)
 
 	put_to_sleep = (state != STATE_AWAKE);
 
-	if (!put_to_sleep)
-		rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0x0000,
-					    USB_MODE_WAKEUP, REGISTER_TIMEOUT);
-
 	rt73usb_register_read(rt2x00dev, MAC_CSR12, &reg);
 	rt2x00_set_field32(&reg, MAC_CSR12_FORCE_WAKEUP, !put_to_sleep);
 	rt2x00_set_field32(&reg, MAC_CSR12_PUT_TO_SLEEP, put_to_sleep);
 	rt73usb_register_write(rt2x00dev, MAC_CSR12, reg);
 
-	if (put_to_sleep)
-		rt2x00usb_vendor_request_sw(rt2x00dev, USB_DEVICE_MODE, 0x0000,
-					    USB_MODE_SLEEP, REGISTER_TIMEOUT);
-
 	/*
 	 * Device is not guaranteed to be in the requested state yet.
 	 * We must wait until the register indicates that the
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 17/30] rt2x00: Fix register initialization ordering
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (15 preceding siblings ...)
  2007-08-19 18:27 ` [PATCH 16/30] rt2x00: Cleanup set_state for rt61 and rt73 Ivo van Doorn
@ 2007-08-19 18:27 ` Ivo van Doorn
  2007-08-19 18:27 ` [PATCH 18/30] rt2x00: memset descriptor before use Ivo van Doorn
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:27 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 34548ad3e92237fb9ce91be9d09a5877f782c321 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:08:29 +0200
Subject: [PATCH 17/30] rt2x00: Fix register initialization ordering

Change the order in which the registers are being initialized
to reflect the same order in which the legacy drivers
initialize the registers. This should prevent problems
caused by incorrect register initialization. Especially
the SLEEP/AWAKE state registers are very sensitive to this.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |   44 +++++++++----------
 drivers/net/wireless/rt2500pci.c |   89 ++++++++++++++++++--------------------
 drivers/net/wireless/rt2500usb.c |   17 ++++---
 drivers/net/wireless/rt61pci.c   |   42 ++++++++---------
 drivers/net/wireless/rt73usb.c   |   18 ++++----
 5 files changed, 101 insertions(+), 109 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index 7bd975d..b673d61 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -796,11 +796,6 @@ static int rt2400pci_init_registers(struct rt2x00_dev *rt2x00dev)
 {
 	u32 reg;
 
-	if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE))
-		return -EBUSY;
-
-	rt2x00pci_register_write(rt2x00dev, PWRCSR0, 0x3f3b3100);
-
 	rt2x00pci_register_write(rt2x00dev, PSCSR0, 0x00020002);
 	rt2x00pci_register_write(rt2x00dev, PSCSR1, 0x00000002);
 	rt2x00pci_register_write(rt2x00dev, PSCSR2, 0x00023f20);
@@ -819,31 +814,34 @@ static int rt2400pci_init_registers(struct rt2x00_dev *rt2x00dev)
 
 	rt2x00pci_register_write(rt2x00dev, CNT3, 0x3f080000);
 
-	rt2x00pci_register_write(rt2x00dev, MACCSR0, 0x00217223);
-	rt2x00pci_register_write(rt2x00dev, MACCSR1, 0x00235518);
-
-	rt2x00pci_register_read(rt2x00dev, MACCSR2, &reg);
-	rt2x00_set_field32(&reg, MACCSR2_DELAY, 64);
-	rt2x00pci_register_write(rt2x00dev, MACCSR2, reg);
+	rt2x00pci_register_read(rt2x00dev, ARCSR0, &reg);
+	rt2x00_set_field32(&reg, ARCSR0_AR_BBP_DATA0, 133);
+	rt2x00_set_field32(&reg, ARCSR0_AR_BBP_ID0, 134);
+	rt2x00_set_field32(&reg, ARCSR0_AR_BBP_DATA1, 136);
+	rt2x00_set_field32(&reg, ARCSR0_AR_BBP_ID1, 135);
+	rt2x00pci_register_write(rt2x00dev, ARCSR0, reg);
 
 	rt2x00pci_register_read(rt2x00dev, RXCSR3, &reg);
-	/*
-	 * Tx power.
-	 */
-	rt2x00_set_field32(&reg, RXCSR3_BBP_ID0, 3);
+	rt2x00_set_field32(&reg, RXCSR3_BBP_ID0, 3); /* Tx power.*/
 	rt2x00_set_field32(&reg, RXCSR3_BBP_ID0_VALID, 1);
-	/*
-	 * Signal.
-	 */
-	rt2x00_set_field32(&reg, RXCSR3_BBP_ID1, 32);
+	rt2x00_set_field32(&reg, RXCSR3_BBP_ID1, 32); /* Signal */
 	rt2x00_set_field32(&reg, RXCSR3_BBP_ID1_VALID, 1);
-	/*
-	 * Rssi.
-	 */
-	rt2x00_set_field32(&reg, RXCSR3_BBP_ID2, 36);
+	rt2x00_set_field32(&reg, RXCSR3_BBP_ID2, 36); /* Rssi */
 	rt2x00_set_field32(&reg, RXCSR3_BBP_ID2_VALID, 1);
 	rt2x00pci_register_write(rt2x00dev, RXCSR3, reg);
 
+	rt2x00pci_register_write(rt2x00dev, PWRCSR0, 0x3f3b3100);
+
+	if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE))
+		return -EBUSY;
+
+	rt2x00pci_register_write(rt2x00dev, MACCSR0, 0x00217223);
+	rt2x00pci_register_write(rt2x00dev, MACCSR1, 0x00235518);
+
+	rt2x00pci_register_read(rt2x00dev, MACCSR2, &reg);
+	rt2x00_set_field32(&reg, MACCSR2_DELAY, 64);
+	rt2x00pci_register_write(rt2x00dev, MACCSR2, reg);
+
 	rt2x00pci_register_read(rt2x00dev, RALINKCSR, &reg);
 	rt2x00_set_field32(&reg, RALINKCSR_AR_BBP_DATA0, 17);
 	rt2x00_set_field32(&reg, RALINKCSR_AR_BBP_ID0, 154);
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index d6b88f6..bfd6426 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -894,21 +894,6 @@ static int rt2500pci_init_registers(struct rt2x00_dev *rt2x00dev)
 {
 	u32 reg;
 
-	if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE))
-		return -EBUSY;
-
-	rt2x00pci_register_write(rt2x00dev, PWRCSR0, 0x3f3b3100);
-
-	rt2x00pci_register_read(rt2x00dev, PCICSR, &reg);
-	rt2x00_set_field32(&reg, PCICSR_BIG_ENDIAN, 0);
-	rt2x00_set_field32(&reg, PCICSR_RX_TRESHOLD, 0);
-	rt2x00_set_field32(&reg, PCICSR_TX_TRESHOLD, 3);
-	rt2x00_set_field32(&reg, PCICSR_BURST_LENTH, 1);
-	rt2x00_set_field32(&reg, PCICSR_ENABLE_CLK, 1);
-	rt2x00_set_field32(&reg, PCICSR_READ_MULTIPLE, 1);
-	rt2x00_set_field32(&reg, PCICSR_WRITE_INVALID, 1);
-	rt2x00pci_register_write(rt2x00dev, PCICSR, reg);
-
 	rt2x00pci_register_write(rt2x00dev, PSCSR0, 0x00020002);
 	rt2x00pci_register_write(rt2x00dev, PSCSR1, 0x00000002);
 	rt2x00pci_register_write(rt2x00dev, PSCSR2, 0x00020002);
@@ -925,18 +910,6 @@ static int rt2500pci_init_registers(struct rt2x00_dev *rt2x00dev)
 			   rt2x00dev->rx->data_size / 128);
 	rt2x00pci_register_write(rt2x00dev, CSR9, reg);
 
-	rt2x00pci_register_write(rt2x00dev, CNT3, 0);
-
-	rt2x00pci_register_write(rt2x00dev, GPIOCSR, 0x0000ff00);
-	rt2x00pci_register_write(rt2x00dev, TESTCSR, 0x000000f0);
-
-	rt2x00pci_register_write(rt2x00dev, MACCSR0, 0x00213223);
-	rt2x00pci_register_write(rt2x00dev, MACCSR1, 0x00235518);
-
-	rt2x00pci_register_read(rt2x00dev, MACCSR2, &reg);
-	rt2x00_set_field32(&reg, MACCSR2_DELAY, 64);
-	rt2x00pci_register_write(rt2x00dev, MACCSR2, reg);
-
 	/*
 	 * Always use CWmin and CWmax set in descriptor.
 	 */
@@ -944,29 +917,55 @@ static int rt2500pci_init_registers(struct rt2x00_dev *rt2x00dev)
 	rt2x00_set_field32(&reg, CSR11_CW_SELECT, 0);
 	rt2x00pci_register_write(rt2x00dev, CSR11, reg);
 
+	rt2x00pci_register_write(rt2x00dev, CNT3, 0);
+
+	rt2x00pci_register_read(rt2x00dev, TXCSR8, &reg);
+	rt2x00_set_field32(&reg, TXCSR8_CCK_SIGNAL, 0x8a);
+	rt2x00_set_field32(&reg, TXCSR8_CCK_SERVICE, 0x8b);
+	rt2x00_set_field32(&reg, TXCSR8_CCK_LENGTH_LOW, 0x8d);
+	rt2x00_set_field32(&reg, TXCSR8_CCK_LENGTH_HIGH, 0x8c);
+	rt2x00pci_register_write(rt2x00dev, TXCSR8, reg);
+
+	rt2x00pci_register_write(rt2x00dev, ARTCSR0, 0x7038140a);
+	rt2x00pci_register_write(rt2x00dev, ARTCSR1, 0x1d21252d);
+	rt2x00pci_register_write(rt2x00dev, ARTCSR2, 0x1919191d);
+
 	rt2x00pci_register_read(rt2x00dev, RXCSR3, &reg);
-	/*
-	 * Signal.
-	 */
-	rt2x00_set_field32(&reg, RXCSR3_BBP_ID0, 47);
+	rt2x00_set_field32(&reg, RXCSR3_BBP_ID0, 47); /* Signal */
 	rt2x00_set_field32(&reg, RXCSR3_BBP_ID0_VALID, 1);
-	/*
-	 * Rssi.
-	 */
-	rt2x00_set_field32(&reg, RXCSR3_BBP_ID1, 51);
+	rt2x00_set_field32(&reg, RXCSR3_BBP_ID1, 51); /* Rssi */
 	rt2x00_set_field32(&reg, RXCSR3_BBP_ID1_VALID, 1);
-	/*
-	 * OFDM Rate.
-	 */
-	rt2x00_set_field32(&reg, RXCSR3_BBP_ID2, 42);
+	rt2x00_set_field32(&reg, RXCSR3_BBP_ID2, 42); /* OFDM Rate */
 	rt2x00_set_field32(&reg, RXCSR3_BBP_ID2_VALID, 1);
-	/*
-	 * OFDM.
-	 */
-	rt2x00_set_field32(&reg, RXCSR3_BBP_ID3, 51);
+	rt2x00_set_field32(&reg, RXCSR3_BBP_ID3, 51); /* OFDM */
 	rt2x00_set_field32(&reg, RXCSR3_BBP_ID3_VALID, 1);
 	rt2x00pci_register_write(rt2x00dev, RXCSR3, reg);
 
+	rt2x00pci_register_read(rt2x00dev, PCICSR, &reg);
+	rt2x00_set_field32(&reg, PCICSR_BIG_ENDIAN, 0);
+	rt2x00_set_field32(&reg, PCICSR_RX_TRESHOLD, 0);
+	rt2x00_set_field32(&reg, PCICSR_TX_TRESHOLD, 3);
+	rt2x00_set_field32(&reg, PCICSR_BURST_LENTH, 1);
+	rt2x00_set_field32(&reg, PCICSR_ENABLE_CLK, 1);
+	rt2x00_set_field32(&reg, PCICSR_READ_MULTIPLE, 1);
+	rt2x00_set_field32(&reg, PCICSR_WRITE_INVALID, 1);
+	rt2x00pci_register_write(rt2x00dev, PCICSR, reg);
+
+	rt2x00pci_register_write(rt2x00dev, PWRCSR0, 0x3f3b3100);
+
+	rt2x00pci_register_write(rt2x00dev, GPIOCSR, 0x0000ff00);
+	rt2x00pci_register_write(rt2x00dev, TESTCSR, 0x000000f0);
+
+	if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE))
+		return -EBUSY;
+
+	rt2x00pci_register_write(rt2x00dev, MACCSR0, 0x00213223);
+	rt2x00pci_register_write(rt2x00dev, MACCSR1, 0x00235518);
+
+	rt2x00pci_register_read(rt2x00dev, MACCSR2, &reg);
+	rt2x00_set_field32(&reg, MACCSR2_DELAY, 64);
+	rt2x00pci_register_write(rt2x00dev, MACCSR2, reg);
+
 	rt2x00pci_register_read(rt2x00dev, RALINKCSR, &reg);
 	rt2x00_set_field32(&reg, RALINKCSR_AR_BBP_DATA0, 17);
 	rt2x00_set_field32(&reg, RALINKCSR_AR_BBP_ID0, 26);
@@ -980,10 +979,6 @@ static int rt2500pci_init_registers(struct rt2x00_dev *rt2x00dev)
 
 	rt2x00pci_register_write(rt2x00dev, TXACKCSR0, 0x00000020);
 
-	rt2x00pci_register_write(rt2x00dev, ARTCSR0, 0x7038140a);
-	rt2x00pci_register_write(rt2x00dev, ARTCSR1, 0x1d21252d);
-	rt2x00pci_register_write(rt2x00dev, ARTCSR2, 0x1919191d);
-
 	rt2x00pci_register_read(rt2x00dev, CSR1, &reg);
 	rt2x00_set_field32(&reg, CSR1_SOFT_RESET, 1);
 	rt2x00_set_field32(&reg, CSR1_BBP_RESET, 0);
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index 5e3cdf5..f29dbe9 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -788,6 +788,7 @@ static int rt2500usb_init_registers(struct rt2x00_dev *rt2x00dev)
 
 	rt2500usb_register_write(rt2x00dev, MAC_CSR1, 0x0003);
 	rt2500usb_register_write(rt2x00dev, MAC_CSR1, 0x0000);
+
 	rt2500usb_register_write(rt2x00dev, TXRX_CSR5, 0x8c8d);
 	rt2500usb_register_write(rt2x00dev, TXRX_CSR6, 0x8b8a);
 	rt2500usb_register_write(rt2x00dev, TXRX_CSR7, 0x8687);
@@ -813,27 +814,27 @@ static int rt2500usb_init_registers(struct rt2x00_dev *rt2x00dev)
 	rt2500usb_register_write(rt2x00dev, MAC_CSR15, 0x01ee);
 	rt2500usb_register_write(rt2x00dev, MAC_CSR16, 0x0000);
 
-	rt2500usb_register_read(rt2x00dev, TXRX_CSR0, &reg);
-	rt2x00_set_field16(&reg, TXRX_CSR0_IV_OFFSET, IEEE80211_HEADER);
-	rt2x00_set_field16(&reg, TXRX_CSR0_KEY_ID, 0xff);
-	rt2500usb_register_write(rt2x00dev, TXRX_CSR0, reg);
-
 	rt2500usb_register_read(rt2x00dev, MAC_CSR8, &reg);
 	rt2x00_set_field16(&reg, MAC_CSR8_MAX_FRAME_UNIT,
 			   rt2x00dev->rx->data_size);
 	rt2500usb_register_write(rt2x00dev, MAC_CSR8, reg);
 
+	rt2500usb_register_read(rt2x00dev, TXRX_CSR0, &reg);
+	rt2x00_set_field16(&reg, TXRX_CSR0_IV_OFFSET, IEEE80211_HEADER);
+	rt2x00_set_field16(&reg, TXRX_CSR0_KEY_ID, 0xff);
+	rt2500usb_register_write(rt2x00dev, TXRX_CSR0, reg);
+
 	rt2500usb_register_read(rt2x00dev, MAC_CSR18, &reg);
 	rt2x00_set_field16(&reg, MAC_CSR18_DELAY_AFTER_BEACON, 0x5a);
 	rt2500usb_register_write(rt2x00dev, MAC_CSR18, reg);
 
+	rt2500usb_register_read(rt2x00dev, PHY_CSR4, &reg);
+	rt2500usb_register_write(rt2x00dev, PHY_CSR4, reg | 0x0001);
+
 	rt2500usb_register_read(rt2x00dev, TXRX_CSR1, &reg);
 	rt2x00_set_field16(&reg, TXRX_CSR1_AUTO_SEQUENCE, 1);
 	rt2500usb_register_write(rt2x00dev, TXRX_CSR1, reg);
 
-	rt2500usb_register_read(rt2x00dev, PHY_CSR4, &reg);
-	rt2500usb_register_write(rt2x00dev, PHY_CSR4, reg | 0x0001);
-
 	return 0;
 }
 
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index 1a4957b..47a915d 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -1147,11 +1147,6 @@ static int rt61pci_init_registers(struct rt2x00_dev *rt2x00dev)
 {
 	u32 reg;
 
-	if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE))
-		return -EBUSY;
-
-	rt2x00pci_register_write(rt2x00dev, MAC_CSR10, 0x00000718);
-
 	rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, &reg);
 	rt2x00_set_field32(&reg, TXRX_CSR0_AUTO_TX_SEQ, 1);
 	rt2x00_set_field32(&reg, TXRX_CSR0_DISABLE_RX, 0);
@@ -1161,34 +1156,27 @@ static int rt61pci_init_registers(struct rt2x00_dev *rt2x00dev)
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR1, 0x9eb39eb3);
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR2, 0x8a8b8c8d);
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR3, 0x00858687);
-
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR7, 0x2e31353b);
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR8, 0x2a2a2a2c);
-
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f);
 
 	rt2x00pci_register_write(rt2x00dev, MAC_CSR6, 0x00000fff);
 
+	rt2x00pci_register_read(rt2x00dev, MAC_CSR9, &reg);
+	rt2x00_set_field32(&reg, MAC_CSR9_CW_SELECT, 0);
+	rt2x00pci_register_write(rt2x00dev, MAC_CSR9, reg);
+
+	rt2x00pci_register_write(rt2x00dev, MAC_CSR10, 0x0000071c);
+
+	if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE))
+		return -EBUSY;
+
 	rt2x00pci_register_write(rt2x00dev, MAC_CSR13, 0x0000e000);
 
 	rt2x00pci_register_write(rt2x00dev, SEC_CSR0, 0x00000000);
 	rt2x00pci_register_write(rt2x00dev, SEC_CSR1, 0x00000000);
 	rt2x00pci_register_write(rt2x00dev, SEC_CSR5, 0x00000000);
 
-	rt2x00pci_register_read(rt2x00dev, AC_TXOP_CSR0, &reg);
-	rt2x00_set_field32(&reg, AC_TXOP_CSR0_AC0_TX_OP, 0);
-	rt2x00_set_field32(&reg, AC_TXOP_CSR0_AC1_TX_OP, 0);
-	rt2x00pci_register_write(rt2x00dev, AC_TXOP_CSR0, reg);
-
-	rt2x00pci_register_read(rt2x00dev, AC_TXOP_CSR1, &reg);
-	rt2x00_set_field32(&reg, AC_TXOP_CSR1_AC2_TX_OP, 192);
-	rt2x00_set_field32(&reg, AC_TXOP_CSR1_AC3_TX_OP, 48);
-	rt2x00pci_register_write(rt2x00dev, AC_TXOP_CSR1, reg);
-
-	rt2x00pci_register_read(rt2x00dev, MAC_CSR9, &reg);
-	rt2x00_set_field32(&reg, MAC_CSR9_CW_SELECT, 0);
-	rt2x00pci_register_write(rt2x00dev, MAC_CSR9, reg);
-
 	rt2x00pci_register_write(rt2x00dev, PHY_CSR1, 0x000023b0);
 	rt2x00pci_register_write(rt2x00dev, PHY_CSR5, 0x060a100c);
 	rt2x00pci_register_write(rt2x00dev, PHY_CSR6, 0x00080606);
@@ -1200,6 +1188,16 @@ static int rt61pci_init_registers(struct rt2x00_dev *rt2x00dev)
 
 	rt2x00pci_register_write(rt2x00dev, M2H_CMD_DONE_CSR, 0xffffffff);
 
+	rt2x00pci_register_read(rt2x00dev, AC_TXOP_CSR0, &reg);
+	rt2x00_set_field32(&reg, AC_TXOP_CSR0_AC0_TX_OP, 0);
+	rt2x00_set_field32(&reg, AC_TXOP_CSR0_AC1_TX_OP, 0);
+	rt2x00pci_register_write(rt2x00dev, AC_TXOP_CSR0, reg);
+
+	rt2x00pci_register_read(rt2x00dev, AC_TXOP_CSR1, &reg);
+	rt2x00_set_field32(&reg, AC_TXOP_CSR1_AC2_TX_OP, 192);
+	rt2x00_set_field32(&reg, AC_TXOP_CSR1_AC3_TX_OP, 48);
+	rt2x00pci_register_write(rt2x00dev, AC_TXOP_CSR1, reg);
+
 	/*
 	 * We must clear the error counters.
 	 * These registers are cleared on read,
@@ -1212,7 +1210,7 @@ static int rt61pci_init_registers(struct rt2x00_dev *rt2x00dev)
 	/*
 	 * Reset MAC and BBP registers.
 	 */
-	reg = 0;
+	rt2x00pci_register_read(rt2x00dev, MAC_CSR1, &reg);
 	rt2x00_set_field32(&reg, MAC_CSR1_SOFT_RESET, 1);
 	rt2x00_set_field32(&reg, MAC_CSR1_BBP_RESET, 1);
 	rt2x00pci_register_write(rt2x00dev, MAC_CSR1, reg);
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 85dfc58..7b1d8e1 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -952,11 +952,6 @@ static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev)
 {
 	u32 reg;
 
-	if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE))
-		return -EBUSY;
-
-	rt73usb_register_write(rt2x00dev, MAC_CSR10, 0x00000718);
-
 	rt73usb_register_read(rt2x00dev, TXRX_CSR0, &reg);
 	rt2x00_set_field32(&reg, TXRX_CSR0_AUTO_TX_SEQ, 1);
 	rt2x00_set_field32(&reg, TXRX_CSR0_DISABLE_RX, 0);
@@ -966,13 +961,18 @@ static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev)
 	rt73usb_register_write(rt2x00dev, TXRX_CSR1, 0x9eaa9eaf);
 	rt73usb_register_write(rt2x00dev, TXRX_CSR2, 0x8a8b8c8d);
 	rt73usb_register_write(rt2x00dev, TXRX_CSR3, 0x00858687);
-
 	rt73usb_register_write(rt2x00dev, TXRX_CSR7, 0x2e31353b);
 	rt73usb_register_write(rt2x00dev, TXRX_CSR8, 0x2a2a2a2c);
-
 	rt73usb_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f);
 
-	rt73usb_register_write(rt2x00dev, MAC_CSR6, 0x00000fff);
+	rt73usb_register_read(rt2x00dev, MAC_CSR6, &reg);
+	rt2x00_set_field32(&reg, MAC_CSR6_MAX_FRAME_UNIT, 0xfff);
+	rt73usb_register_write(rt2x00dev, MAC_CSR6, reg);
+
+	rt73usb_register_write(rt2x00dev, MAC_CSR10, 0x00000718);
+
+	if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE))
+		return -EBUSY;
 
 	rt73usb_register_write(rt2x00dev, MAC_CSR13, 0x00007f00);
 
@@ -1016,7 +1016,7 @@ static int rt73usb_init_registers(struct rt2x00_dev *rt2x00dev)
 	/*
 	 * Reset MAC and BBP registers.
 	 */
-	reg = 0;
+	rt73usb_register_read(rt2x00dev, MAC_CSR1, &reg);
 	rt2x00_set_field32(&reg, MAC_CSR1_SOFT_RESET, 1);
 	rt2x00_set_field32(&reg, MAC_CSR1_BBP_RESET, 1);
 	rt73usb_register_write(rt2x00dev, MAC_CSR1, reg);
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 18/30] rt2x00: memset descriptor before use
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (16 preceding siblings ...)
  2007-08-19 18:27 ` [PATCH 17/30] rt2x00: Fix register initialization ordering Ivo van Doorn
@ 2007-08-19 18:27 ` Ivo van Doorn
  2007-08-19 18:28 ` [PATCH 19/30] rt2x00: Remove IEEE80211_HW_WEP_INCLUDE_IV flag Ivo van Doorn
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:27 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 1273bba4e38352cfe5b15c1c7cad742e41f00a96 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:08:49 +0200
Subject: [PATCH 18/30] rt2x00: memset descriptor before use

For rt2x00usb, when skb_push() is called the descriptor is added
in front of the frame. The contents however is random data.
This should be correctly cleared to prevent garbage to be send to
the device...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00usb.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rt2x00usb.c b/drivers/net/wireless/rt2x00usb.c
index d832d5f..c763606 100644
--- a/drivers/net/wireless/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00usb.c
@@ -268,7 +268,6 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
 	    interface_to_usbdev(rt2x00dev_usb(rt2x00dev));
 	struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data;
 	struct data_entry *entry = rt2x00_get_data_entry(ring);
-	struct data_desc *txd;
 	u32 length = skb->len;
 
 	if (rt2x00_ring_full(ring)) {
@@ -285,9 +284,14 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
 		return -EINVAL;
 	}
 
+	/*
+	 * Add the descriptor in front of the skb.
+	 */
 	skb_push(skb, rt2x00dev->hw->extra_tx_headroom);
-	txd = (struct data_desc *)skb->data;
-	rt2x00lib_write_tx_desc(rt2x00dev, entry, txd, ieee80211hdr,
+	memset(skb->data, 0x00, rt2x00dev->hw->extra_tx_headroom);
+
+	rt2x00lib_write_tx_desc(rt2x00dev, entry,
+				(struct data_desc *)skb->data, ieee80211hdr,
 				length, control);
 	memcpy(&entry->tx_status.control, control, sizeof(*control));
 	entry->skb = skb;
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 19/30] rt2x00: Remove IEEE80211_HW_WEP_INCLUDE_IV flag
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (17 preceding siblings ...)
  2007-08-19 18:27 ` [PATCH 18/30] rt2x00: memset descriptor before use Ivo van Doorn
@ 2007-08-19 18:28 ` Ivo van Doorn
  2007-08-19 18:28 ` [PATCH 20/30] rt2x00: Cleanup TXD flags Ivo van Doorn
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:28 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From ca00a3af4a65db963b2ca268d4de11276208f8b1 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:10:26 +0200
Subject: [PATCH 19/30] rt2x00: Remove IEEE80211_HW_WEP_INCLUDE_IV flag

The IEEE80211_HW_WEP_INCLUDE_IV flag implies that the device
has done arc4 and has passed the rest on to mac80211.
Since rt2x00 doesn't perform hardware encryption this flag
should not be set.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |    1 -
 drivers/net/wireless/rt2500pci.c |    1 -
 drivers/net/wireless/rt2500usb.c |    1 -
 drivers/net/wireless/rt61pci.c   |    1 -
 drivers/net/wireless/rt73usb.c   |    1 -
 5 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index b673d61..1e935fd 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -1448,7 +1448,6 @@ static void rt2400pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	rt2x00dev->hw->flags =
 	    IEEE80211_HW_HOST_GEN_BEACON |
 	    IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
-	    IEEE80211_HW_WEP_INCLUDE_IV |
 	    IEEE80211_HW_DATA_NULLFUNC_ACK |
 	    IEEE80211_HW_NO_TKIP_WMM_HWACCEL |
 	    IEEE80211_HW_MONITOR_DURING_OPER |
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index bfd6426..28b2c73 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -1747,7 +1747,6 @@ static void rt2500pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	rt2x00dev->hw->flags =
 	    IEEE80211_HW_HOST_GEN_BEACON |
 	    IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
-	    IEEE80211_HW_WEP_INCLUDE_IV |
 	    IEEE80211_HW_DATA_NULLFUNC_ACK |
 	    IEEE80211_HW_NO_TKIP_WMM_HWACCEL |
 	    IEEE80211_HW_MONITOR_DURING_OPER |
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index f29dbe9..0c0076c 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -1469,7 +1469,6 @@ static void rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	    IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE |
 	    IEEE80211_HW_RX_INCLUDES_FCS |
 	    IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
-	    IEEE80211_HW_WEP_INCLUDE_IV |
 	    IEEE80211_HW_DATA_NULLFUNC_ACK |
 	    IEEE80211_HW_NO_TKIP_WMM_HWACCEL |
 	    IEEE80211_HW_MONITOR_DURING_OPER |
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index 47a915d..a6fcef7 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -2112,7 +2112,6 @@ static void rt61pci_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	rt2x00dev->hw->flags =
 	    IEEE80211_HW_HOST_GEN_BEACON |
 	    IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
-	    IEEE80211_HW_WEP_INCLUDE_IV |
 	    IEEE80211_HW_DATA_NULLFUNC_ACK |
 	    IEEE80211_HW_NO_TKIP_WMM_HWACCEL |
 	    IEEE80211_HW_MONITOR_DURING_OPER |
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 7b1d8e1..98d3acc 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -1703,7 +1703,6 @@ static void rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	rt2x00dev->hw->flags =
 	    IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE |
 	    IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
-	    IEEE80211_HW_WEP_INCLUDE_IV |
 	    IEEE80211_HW_DATA_NULLFUNC_ACK |
 	    IEEE80211_HW_NO_TKIP_WMM_HWACCEL |
 	    IEEE80211_HW_MONITOR_DURING_OPER |
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 20/30] rt2x00: Cleanup TXD flags
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (18 preceding siblings ...)
  2007-08-19 18:28 ` [PATCH 19/30] rt2x00: Remove IEEE80211_HW_WEP_INCLUDE_IV flag Ivo van Doorn
@ 2007-08-19 18:28 ` Ivo van Doorn
  2007-08-19 18:28 ` [PATCH 21/30] rt2x00: Add byte-ordering annotation for MAC and BSSID Ivo van Doorn
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:28 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From c46e24be398993af9bb4ad153f5f98dd42f86cd3 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:19:21 +0200
Subject: [PATCH 20/30] rt2x00: Cleanup TXD flags

Add a new TXD flag to indicate if this frame is part
of the same burst series (CTS/RTS + Fragments).

Also remove the TXD_ACK flag since we can use the control->flags
variable directly. So no point in copying flags.

And lastly fix the check for the NEW_SEQ bit in rt2500usb,
the check for the flag was not converted to a boolean
causing the value always to be set to 0.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c  |    2 +-
 drivers/net/wireless/rt2500pci.c  |    2 +-
 drivers/net/wireless/rt2500usb.c  |    4 ++--
 drivers/net/wireless/rt2x00dev.c  |   11 ++++-------
 drivers/net/wireless/rt2x00ring.h |    2 +-
 drivers/net/wireless/rt61pci.c    |    4 +++-
 drivers/net/wireless/rt73usb.c    |    6 +++++-
 7 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index 1e935fd..e5622d6 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -1147,7 +1147,7 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
 			   test_bit(ENTRY_TXD_MORE_FRAG, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_ACK,
-			   test_bit(ENTRY_TXD_REQ_ACK, &entry->flags));
+			   !(control->flags & IEEE80211_TXCTL_NO_ACK));
 	rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
 			   test_bit(ENTRY_TXD_REQ_TIMESTAMP, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_RTS,
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index 28b2c73..bfcedfd 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -1274,7 +1274,7 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
 			   test_bit(ENTRY_TXD_MORE_FRAG, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_ACK,
-			   test_bit(ENTRY_TXD_REQ_ACK, &entry->flags));
+			   !(control->flags & IEEE80211_TXCTL_NO_ACK));
 	rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
 			   test_bit(ENTRY_TXD_REQ_TIMESTAMP, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_OFDM,
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index 0c0076c..9670330 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -1066,13 +1066,13 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
 			   test_bit(ENTRY_TXD_MORE_FRAG, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_ACK,
-			   test_bit(ENTRY_TXD_REQ_ACK, &entry->flags));
+			   !(control->flags & IEEE80211_TXCTL_NO_ACK));
 	rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
 			   test_bit(ENTRY_TXD_REQ_TIMESTAMP, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_OFDM,
 			   test_bit(ENTRY_TXD_OFDM_RATE, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_NEW_SEQ,
-			   control->flags & IEEE80211_TXCTL_FIRST_FRAGMENT);
+			   !!(control->flags & IEEE80211_TXCTL_FIRST_FRAGMENT));
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
 	rt2x00_set_field32(&word, TXD_W0_CIPHER, CIPHER_NONE);
diff --git a/drivers/net/wireless/rt2x00dev.c b/drivers/net/wireless/rt2x00dev.c
index 50c604c..36b522b 100644
--- a/drivers/net/wireless/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00dev.c
@@ -439,6 +439,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	 * Check if this is a RTS/CTS frame
 	 */
 	if (is_rts_frame(frame_control) || is_cts_frame(frame_control)) {
+		__set_bit(ENTRY_TXD_BURST, &entry->flags);
 		if (is_rts_frame(frame_control))
 			__set_bit(ENTRY_TXD_RTS_FRAME, &entry->flags);
 		if (control->rts_cts_rate)
@@ -454,8 +455,10 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	/*
 	 * Check if more fragments are pending
 	 */
-	if (ieee80211_get_morefrag(ieee80211hdr))
+	if (ieee80211_get_morefrag(ieee80211hdr)) {
+		__set_bit(ENTRY_TXD_BURST, &entry->flags);
 		__set_bit(ENTRY_TXD_MORE_FRAG, &entry->flags);
+	}
 
 	/*
 	 * Beacons and probe responses require the tsf timestamp
@@ -466,12 +469,6 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 		__set_bit(ENTRY_TXD_REQ_TIMESTAMP, &entry->flags);
 
 	/*
-	 * Check if ACK is required
-	 */
-	if (!(control->flags & IEEE80211_TXCTL_NO_ACK))
-		__set_bit(ENTRY_TXD_REQ_ACK, &entry->flags);
-
-	/*
 	 * Determine with what IFS priority this frame should be send.
 	 * Set ifs to IFS_SIFS when the this is not the first fragment,
 	 * or this fragment came after RTS/CTS.
diff --git a/drivers/net/wireless/rt2x00ring.h b/drivers/net/wireless/rt2x00ring.h
index 9c94d06..143ad6d 100644
--- a/drivers/net/wireless/rt2x00ring.h
+++ b/drivers/net/wireless/rt2x00ring.h
@@ -76,7 +76,7 @@ struct data_entry {
 #define ENTRY_TXD_OFDM_RATE	4
 #define ENTRY_TXD_MORE_FRAG	5
 #define ENTRY_TXD_REQ_TIMESTAMP	6
-#define ENTRY_TXD_REQ_ACK	7
+#define ENTRY_TXD_BURST		7
 
 	/*
 	 * Ring we belong to.
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index a6fcef7..e179702 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -1519,7 +1519,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
 			   test_bit(ENTRY_TXD_MORE_FRAG, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_ACK,
-			   test_bit(ENTRY_TXD_REQ_ACK, &entry->flags));
+			   !(control->flags & IEEE80211_TXCTL_NO_ACK));
 	rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
 			   test_bit(ENTRY_TXD_REQ_TIMESTAMP, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_OFDM,
@@ -1528,6 +1528,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 0);
 	rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0);
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
+	rt2x00_set_field32(&word, TXD_W0_BURST,
+			   test_bit(ENTRY_TXD_BURST, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE);
 	rt2x00_desc_write(txd, 0, word);
 }
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 98d3acc..1e8b88e 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -1250,11 +1250,13 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_desc_write(txd, 5, word);
 
 	rt2x00_desc_read(txd, 0, &word);
+	rt2x00_set_field32(&word, TXD_W0_BURST,
+			   test_bit(ENTRY_TXD_BURST, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_VALID, 1);
 	rt2x00_set_field32(&word, TXD_W0_MORE_FRAG,
 			   test_bit(ENTRY_TXD_MORE_FRAG, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_ACK,
-			   test_bit(ENTRY_TXD_REQ_ACK, &entry->flags));
+			   !(control->flags & IEEE80211_TXCTL_NO_ACK));
 	rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
 			   test_bit(ENTRY_TXD_REQ_TIMESTAMP, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_OFDM,
@@ -1263,6 +1265,8 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 0);
 	rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0);
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
+	rt2x00_set_field32(&word, TXD_W0_BURST2,
+			   test_bit(ENTRY_TXD_BURST, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE);
 	rt2x00_desc_write(txd, 0, word);
 }
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 21/30] rt2x00: Add byte-ordering annotation for MAC and BSSID
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (19 preceding siblings ...)
  2007-08-19 18:28 ` [PATCH 20/30] rt2x00: Cleanup TXD flags Ivo van Doorn
@ 2007-08-19 18:28 ` Ivo van Doorn
  2007-08-19 18:29 ` [PATCH 22/30] rt2x00: Correctly set TXD retry flag Ivo van Doorn
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:28 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 3194744aba3738ec948c338ed488b4b4639063b9 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:22:01 +0200
Subject: [PATCH 21/30] rt2x00: Add byte-ordering annotation for MAC and BSSID

By adding byte-ordering annotation for the temporary
register values for MAC and BSSID writing we enhance
typesafety and uncover a bug:
When rt73usb and rt61 touch the MAC/BSSID and treat
it as a register they need to perform byteordering
to prevent the bytes to get mixed up.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |    4 ++--
 drivers/net/wireless/rt2500pci.c |    4 ++--
 drivers/net/wireless/rt2500usb.c |    4 ++--
 drivers/net/wireless/rt61pci.c   |   14 ++++++++++----
 drivers/net/wireless/rt73usb.c   |   14 ++++++++++----
 5 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index e5622d6..ffd41a6 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -251,7 +251,7 @@ static int rt2400pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
  */
 static void rt2400pci_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 {
-	u32 reg[2];
+	__le32 reg[2];
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, addr, ETH_ALEN);
@@ -265,7 +265,7 @@ static void rt2400pci_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 
 static void rt2400pci_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 {
-	u32 reg[2];
+	__le32 reg[2];
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, bssid, ETH_ALEN);
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index bfcedfd..fce91ed 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -251,7 +251,7 @@ static int rt2500pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
  */
 static void rt2500pci_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 {
-	u32 reg[2];
+	__le32 reg[2];
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, addr, ETH_ALEN);
@@ -265,7 +265,7 @@ static void rt2500pci_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 
 static void rt2500pci_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 {
-	u32 reg[2];
+	__le32 reg[2];
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, bssid, ETH_ALEN);
diff --git a/drivers/net/wireless/rt2500usb.c b/drivers/net/wireless/rt2500usb.c
index 9670330..9ece4af 100644
--- a/drivers/net/wireless/rt2500usb.c
+++ b/drivers/net/wireless/rt2500usb.c
@@ -256,7 +256,7 @@ static const struct rt2x00debug rt2500usb_rt2x00debug = {
  */
 static void rt2500usb_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 {
-	u16 reg[3];
+	__le16 reg[3];
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, addr, ETH_ALEN);
@@ -270,7 +270,7 @@ static void rt2500usb_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 
 static void rt2500usb_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 {
-	u16 reg[3];
+	__le16 reg[3];
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, bssid, ETH_ALEN);
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index e179702..0e7a528 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -276,12 +276,15 @@ static int rt61pci_rfkill_poll(struct rt2x00_dev *rt2x00dev)
  */
 static void rt61pci_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 {
-	u32 reg[2];
+	__le32 reg[2];
+	u32 tmp;
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, addr, ETH_ALEN);
 
-	rt2x00_set_field32(&reg[1], MAC_CSR3_UNICAST_TO_ME_MASK, 0xff);
+	tmp = le32_to_cpu(reg[1]);
+	rt2x00_set_field32(&tmp, MAC_CSR3_UNICAST_TO_ME_MASK, 0xff);
+	reg[1] = cpu_to_le32(tmp);
 
 	/*
 	 * The MAC address is passed to us as an array of bytes,
@@ -292,12 +295,15 @@ static void rt61pci_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 
 static void rt61pci_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 {
-	u32 reg[2];
+	__le32 reg[2];
+	u32 tmp;
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, bssid, ETH_ALEN);
 
-	rt2x00_set_field32(&reg[1], MAC_CSR5_BSS_ID_MASK, 3);
+	tmp = le32_to_cpu(reg[1]);
+	rt2x00_set_field32(&tmp, MAC_CSR5_BSS_ID_MASK, 3);
+	reg[1] = cpu_to_le32(tmp);
 
 	/*
 	 * The BSSID is passed to us as an array of bytes,
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 1e8b88e..057e5a0 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -257,12 +257,15 @@ static const struct rt2x00debug rt73usb_rt2x00debug = {
  */
 static void rt73usb_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 {
-	u32 reg[2];
+	__le32 reg[2];
+	u32 tmp;
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, addr, ETH_ALEN);
 
-	rt2x00_set_field32(&reg[1], MAC_CSR3_UNICAST_TO_ME_MASK, 0xff);
+	tmp = le32_to_cpu(reg[1]);
+	rt2x00_set_field32(&tmp, MAC_CSR3_UNICAST_TO_ME_MASK, 0xff);
+	reg[1] = cpu_to_le32(tmp);
 
 	/*
 	 * The MAC address is passed to us as an array of bytes,
@@ -273,12 +276,15 @@ static void rt73usb_config_mac_addr(struct rt2x00_dev *rt2x00dev, u8 *addr)
 
 static void rt73usb_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
 {
-	u32 reg[2];
+	__le32 reg[2];
+	u32 tmp;
 
 	memset(&reg, 0, sizeof(reg));
 	memcpy(&reg, bssid, ETH_ALEN);
 
-	rt2x00_set_field32(&reg[1], MAC_CSR5_BSS_ID_MASK, 3);
+	tmp = le32_to_cpu(reg[1]);
+	rt2x00_set_field32(&tmp, MAC_CSR5_BSS_ID_MASK, 3);
+	reg[1] = cpu_to_le32(tmp);
 
 	/*
 	 * The BSSID is passed to us as an array of bytes,
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 22/30] rt2x00: Correctly set TXD retry flag
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (20 preceding siblings ...)
  2007-08-19 18:28 ` [PATCH 21/30] rt2x00: Add byte-ordering annotation for MAC and BSSID Ivo van Doorn
@ 2007-08-19 18:29 ` Ivo van Doorn
  2007-08-19 18:35 ` [PATCH 23/30] rt2x00: Move rt2x00 files into rt2x00 folder Ivo van Doorn
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:29 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 0bb0e744139fd77b627cca3faf82897914d6dae9 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 13:25:26 +0200
Subject: [PATCH 22/30] rt2x00: Correctly set TXD retry flag

Check for the IEEE80211_TXCTL_LONG_RETRY_LIMIT flag
to determine the correct RETRY mode.
Only rt2500usb is capable of setting the exact number
of maximum retries. All other chipsets can only set the
LONG or SHORT retry mode.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2400pci.c |    3 ++-
 drivers/net/wireless/rt2500pci.c |    3 ++-
 drivers/net/wireless/rt61pci.c   |    3 ++-
 drivers/net/wireless/rt73usb.c   |    3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/rt2400pci.c b/drivers/net/wireless/rt2400pci.c
index ffd41a6..b851571 100644
--- a/drivers/net/wireless/rt2400pci.c
+++ b/drivers/net/wireless/rt2400pci.c
@@ -1153,7 +1153,8 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_RTS,
 			   test_bit(ENTRY_TXD_RTS_FRAME, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
-	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 0);
+	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
+			   !!(control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT));
 	rt2x00_desc_write(txd, 0, word);
 }
 
diff --git a/drivers/net/wireless/rt2500pci.c b/drivers/net/wireless/rt2500pci.c
index fce91ed..1000525 100644
--- a/drivers/net/wireless/rt2500pci.c
+++ b/drivers/net/wireless/rt2500pci.c
@@ -1281,7 +1281,8 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 			   test_bit(ENTRY_TXD_OFDM_RATE, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_OWNER, 1);
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
-	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 0);
+	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
+			   !!(control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT));
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE);
 	rt2x00_desc_write(txd, 0, word);
diff --git a/drivers/net/wireless/rt61pci.c b/drivers/net/wireless/rt61pci.c
index 0e7a528..efa6c25 100644
--- a/drivers/net/wireless/rt61pci.c
+++ b/drivers/net/wireless/rt61pci.c
@@ -1531,7 +1531,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_OFDM,
 			   test_bit(ENTRY_TXD_OFDM_RATE, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
-	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 0);
+	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
+			   !!(control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT));
 	rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0);
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
 	rt2x00_set_field32(&word, TXD_W0_BURST,
diff --git a/drivers/net/wireless/rt73usb.c b/drivers/net/wireless/rt73usb.c
index 057e5a0..9e8c049 100644
--- a/drivers/net/wireless/rt73usb.c
+++ b/drivers/net/wireless/rt73usb.c
@@ -1268,7 +1268,8 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_OFDM,
 			   test_bit(ENTRY_TXD_OFDM_RATE, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
-	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 0);
+	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
+			   !!(control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT));
 	rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0);
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
 	rt2x00_set_field32(&word, TXD_W0_BURST2,
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 23/30] rt2x00: Move rt2x00 files into rt2x00 folder
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (21 preceding siblings ...)
  2007-08-19 18:29 ` [PATCH 22/30] rt2x00: Correctly set TXD retry flag Ivo van Doorn
@ 2007-08-19 18:35 ` Ivo van Doorn
  2007-08-19 18:35 ` [PATCH 24/30] rt2x00: Add file pattern to MAINTAINER entry Ivo van Doorn
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:35 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 0ad22000ea988cd69bccaa49823163e5658dd293 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 14:03:15 +0200
Subject: [PATCH 23/30] rt2x00: Move rt2x00 files into rt2x00 folder

rt2x00 covers quite a lot of files (at the moment 25
but more will be added with new drivers), to properly
group them together and making management of the files
easier they should be put into a new rt2x00 folder.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
Patch trimmed, Only Makefile and Kconfig difference has been added.
All other files have been moved (without changes) using:
mkdir drivers/net/wireless/rt2x00

git mv drivers/net/wireless/rt2400pci.c drivers/net/wireless/rt2x00/rt2400pci.c
git mv drivers/net/wireless/rt2400pci.h drivers/net/wireless/rt2x00/rt2400pci.h
git mv drivers/net/wireless/rt2500pci.c drivers/net/wireless/rt2x00/rt2500pci.c
git mv drivers/net/wireless/rt2500pci.h drivers/net/wireless/rt2x00/rt2500pci.h
git mv drivers/net/wireless/rt2500usb.c drivers/net/wireless/rt2x00/rt2500usb.c
git mv drivers/net/wireless/rt2500usb.h drivers/net/wireless/rt2x00/rt2500usb.h
git mv drivers/net/wireless/rt2x00.h drivers/net/wireless/rt2x00/rt2x00.h
git mv drivers/net/wireless/rt2x00config.c drivers/net/wireless/rt2x00/rt2x00config.c
git mv drivers/net/wireless/rt2x00debug.c drivers/net/wireless/rt2x00/rt2x00debug.c
git mv drivers/net/wireless/rt2x00debug.h drivers/net/wireless/rt2x00/rt2x00debug.h
git mv drivers/net/wireless/rt2x00dev.c drivers/net/wireless/rt2x00/rt2x00dev.c
git mv drivers/net/wireless/rt2x00firmware.c drivers/net/wireless/rt2x00/rt2x00firmware.c
git mv drivers/net/wireless/rt2x00lib.h drivers/net/wireless/rt2x00/rt2x00lib.h
git mv drivers/net/wireless/rt2x00mac.c drivers/net/wireless/rt2x00/rt2x00mac.c
git mv drivers/net/wireless/rt2x00pci.c drivers/net/wireless/rt2x00/rt2x00pci.c
git mv drivers/net/wireless/rt2x00pci.h drivers/net/wireless/rt2x00/rt2x00pci.h
git mv drivers/net/wireless/rt2x00reg.h drivers/net/wireless/rt2x00/rt2x00reg.h
git mv drivers/net/wireless/rt2x00rfkill.c drivers/net/wireless/rt2x00/rt2x00rfkill.c
git mv drivers/net/wireless/rt2x00ring.h drivers/net/wireless/rt2x00/rt2x00ring.h
git mv drivers/net/wireless/rt2x00usb.c drivers/net/wireless/rt2x00/rt2x00usb.c
git mv drivers/net/wireless/rt2x00usb.h drivers/net/wireless/rt2x00/rt2x00usb.h
git mv drivers/net/wireless/rt61pci.c drivers/net/wireless/rt2x00/rt61pci.c
git mv drivers/net/wireless/rt61pci.h drivers/net/wireless/rt2x00/rt61pci.h
git mv drivers/net/wireless/rt73usb.c drivers/net/wireless/rt2x00/rt73usb.c
git mv drivers/net/wireless/rt73usb.h drivers/net/wireless/rt2x00/rt73usb.h

 drivers/net/wireless/Kconfig                 |  131 +--
 drivers/net/wireless/Makefile                |   23 +-
 drivers/net/wireless/rt2400pci.c             | 1683 ------------------
 drivers/net/wireless/rt2400pci.h             |  943 -----------
 drivers/net/wireless/rt2500pci.c             | 1975 ----------------------
 drivers/net/wireless/rt2500pci.h             | 1218 -------------
 drivers/net/wireless/rt2500usb.c             | 1687 ------------------
 drivers/net/wireless/rt2500usb.h             |  767 ---------
 drivers/net/wireless/rt2x00.h                |  788 ---------
 drivers/net/wireless/rt2x00/Kconfig          |  130 ++
 drivers/net/wireless/rt2x00/Makefile         |   22 +
 drivers/net/wireless/rt2x00/rt2400pci.c      | 1683 ++++++++++++++++++
 drivers/net/wireless/rt2x00/rt2400pci.h      |  943 +++++++++++
 drivers/net/wireless/rt2x00/rt2500pci.c      | 1975 ++++++++++++++++++++++
 drivers/net/wireless/rt2x00/rt2500pci.h      | 1218 +++++++++++++
 drivers/net/wireless/rt2x00/rt2500usb.c      | 1687 ++++++++++++++++++
 drivers/net/wireless/rt2x00/rt2500usb.h      |  767 +++++++++
 drivers/net/wireless/rt2x00/rt2x00.h         |  788 +++++++++
 drivers/net/wireless/rt2x00/rt2x00config.c   |  165 ++
 drivers/net/wireless/rt2x00/rt2x00debug.c    |  328 ++++
 drivers/net/wireless/rt2x00/rt2x00debug.h    |   57 +
 drivers/net/wireless/rt2x00/rt2x00dev.c      | 1153 +++++++++++++
 drivers/net/wireless/rt2x00/rt2x00firmware.c |  126 ++
 drivers/net/wireless/rt2x00/rt2x00lib.h      |  124 ++
 drivers/net/wireless/rt2x00/rt2x00mac.c      |  418 +++++
 drivers/net/wireless/rt2x00/rt2x00pci.c      |  512 ++++++
 drivers/net/wireless/rt2x00/rt2x00pci.h      |  124 ++
 drivers/net/wireless/rt2x00/rt2x00reg.h      |  270 +++
 drivers/net/wireless/rt2x00/rt2x00rfkill.c   |  146 ++
 drivers/net/wireless/rt2x00/rt2x00ring.h     |  240 +++
 drivers/net/wireless/rt2x00/rt2x00usb.c      |  724 ++++++++
 drivers/net/wireless/rt2x00/rt2x00usb.h      |  183 ++
 drivers/net/wireless/rt2x00/rt61pci.c        | 2348 ++++++++++++++++++++++++++
 drivers/net/wireless/rt2x00/rt61pci.h        | 1382 +++++++++++++++
 drivers/net/wireless/rt2x00/rt73usb.c        | 2002 ++++++++++++++++++++++
 drivers/net/wireless/rt2x00/rt73usb.h        |  967 +++++++++++
 drivers/net/wireless/rt2x00config.c          |  165 --
 drivers/net/wireless/rt2x00debug.c           |  328 ----
 drivers/net/wireless/rt2x00debug.h           |   57 -
 drivers/net/wireless/rt2x00dev.c             | 1153 -------------
 drivers/net/wireless/rt2x00firmware.c        |  126 --
 drivers/net/wireless/rt2x00lib.h             |  124 --
 drivers/net/wireless/rt2x00mac.c             |  418 -----
 drivers/net/wireless/rt2x00pci.c             |  512 ------
 drivers/net/wireless/rt2x00pci.h             |  124 --
 drivers/net/wireless/rt2x00reg.h             |  270 ---
 drivers/net/wireless/rt2x00rfkill.c          |  146 --
 drivers/net/wireless/rt2x00ring.h            |  240 ---
 drivers/net/wireless/rt2x00usb.c             |  724 --------
 drivers/net/wireless/rt2x00usb.h             |  183 --
 drivers/net/wireless/rt61pci.c               | 2348 --------------------------
 drivers/net/wireless/rt61pci.h               | 1382 ---------------
 drivers/net/wireless/rt73usb.c               | 2002 ----------------------
 drivers/net/wireless/rt73usb.h               |  967 -----------
 54 files changed, 20484 insertions(+), 20482 deletions(-)
 delete mode 100644 drivers/net/wireless/rt2400pci.c
 delete mode 100644 drivers/net/wireless/rt2400pci.h
 delete mode 100644 drivers/net/wireless/rt2500pci.c
 delete mode 100644 drivers/net/wireless/rt2500pci.h
 delete mode 100644 drivers/net/wireless/rt2500usb.c
 delete mode 100644 drivers/net/wireless/rt2500usb.h
 delete mode 100644 drivers/net/wireless/rt2x00.h
 create mode 100644 drivers/net/wireless/rt2x00/Kconfig
 create mode 100644 drivers/net/wireless/rt2x00/Makefile
 create mode 100644 drivers/net/wireless/rt2x00/rt2400pci.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2400pci.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2500pci.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2500pci.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2500usb.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2500usb.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00config.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00debug.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00debug.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00dev.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00firmware.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00lib.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00mac.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00pci.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00pci.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00reg.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00rfkill.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00ring.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00usb.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00usb.h
 create mode 100644 drivers/net/wireless/rt2x00/rt61pci.c
 create mode 100644 drivers/net/wireless/rt2x00/rt61pci.h
 create mode 100644 drivers/net/wireless/rt2x00/rt73usb.c
 create mode 100644 drivers/net/wireless/rt2x00/rt73usb.h
 delete mode 100644 drivers/net/wireless/rt2x00config.c
 delete mode 100644 drivers/net/wireless/rt2x00debug.c
 delete mode 100644 drivers/net/wireless/rt2x00debug.h
 delete mode 100644 drivers/net/wireless/rt2x00dev.c
 delete mode 100644 drivers/net/wireless/rt2x00firmware.c
 delete mode 100644 drivers/net/wireless/rt2x00lib.h
 delete mode 100644 drivers/net/wireless/rt2x00mac.c
 delete mode 100644 drivers/net/wireless/rt2x00pci.c
 delete mode 100644 drivers/net/wireless/rt2x00pci.h
 delete mode 100644 drivers/net/wireless/rt2x00reg.h
 delete mode 100644 drivers/net/wireless/rt2x00rfkill.c
 delete mode 100644 drivers/net/wireless/rt2x00ring.h
 delete mode 100644 drivers/net/wireless/rt2x00usb.c
 delete mode 100644 drivers/net/wireless/rt2x00usb.h
 delete mode 100644 drivers/net/wireless/rt61pci.c
 delete mode 100644 drivers/net/wireless/rt61pci.h
 delete mode 100644 drivers/net/wireless/rt73usb.c
 delete mode 100644 drivers/net/wireless/rt73usb.h

diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 366263e..dee7a4f 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -589,136 +589,6 @@ config P54_PCI
 	tristate "Prism54 PCI support"
 	depends on P54_COMMON && PCI
 
-config RT2X00
-	tristate "Ralink driver support"
-	depends on MAC80211 && WLAN_80211 && EXPERIMENTAL
-	---help---
-	  This will enable the experimental support for the Ralink drivers,
-	  developed in the rt2x00 project <http://rt2x00.serialmonkey.com>.
-
-	  These drivers will make use of the Devicescape ieee80211 stack.
-
-	  When building one of the individual drivers, the rt2x00 library
-	  will also be created. That library (when the driver is built as
-	  a module) will be called "rt2x00lib.ko".
-
-config RT2X00_LIB
-	tristate
-	depends on RT2X00
-
-config RT2X00_LIB_PCI
-	tristate
-	depends on RT2X00
-	select RT2X00_LIB
-
-config RT2X00_LIB_USB
-	tristate
-	depends on RT2X00
-	select RT2X00_LIB
-
-config RT2X00_LIB_FIRMWARE
-	boolean
-	depends on RT2X00_LIB
-	select CRC_ITU_T
-	select FW_LOADER
-
-config RT2X00_LIB_RFKILL
-	boolean
-	depends on RT2X00_LIB
-	select RFKILL
-	select INPUT_POLLDEV
-
-config RT2400PCI
-	tristate "Ralink rt2400 pci/pcmcia support"
-	depends on RT2X00 && PCI
-	select RT2X00_LIB_PCI
-	select EEPROM_93CX6
-	---help---
-	  This is an experimental driver for the Ralink rt2400 wireless chip.
-
-	  When compiled as a module, this driver will be called "rt2400pci.ko".
-
-config RT2400PCI_RFKILL
-	bool "RT2400 rfkill support"
-	depends on RT2400PCI
-	select RT2X00_LIB_RFKILL
-	---help---
-	  This adds support for integrated rt2400 devices that feature a
-	  hardware button to control the radio state.
-	  This feature depends on the RF switch subsystem rfkill.
-
-config RT2500PCI
-	tristate "Ralink rt2500 pci/pcmcia support"
-	depends on RT2X00 && PCI
-	select RT2X00_LIB_PCI
-	select EEPROM_93CX6
-	---help---
-	  This is an experimental driver for the Ralink rt2500 wireless chip.
-
-	  When compiled as a module, this driver will be called "rt2500pci.ko".
-
-config RT2500PCI_RFKILL
-	bool "RT2500 rfkill support"
-	depends on RT2500PCI
-	select RT2X00_LIB_RFKILL
-	---help---
-	  This adds support for integrated rt2500 devices that feature a
-	  hardware button to control the radio state.
-	  This feature depends on the RF switch subsystem rfkill.
-
-config RT61PCI
-	tristate "Ralink rt61 pci/pcmcia support"
-	depends on RT2X00 && PCI
-	select RT2X00_LIB_PCI
-	select RT2X00_LIB_FIRMWARE
-	select EEPROM_93CX6
-	---help---
-	  This is an experimental driver for the Ralink rt61 wireless chip.
-
-	  When compiled as a module, this driver will be called "rt61pci.ko".
-
-config RT61PCI_RFKILL
-	bool "RT61 rfkill support"
-	depends on RT61PCI
-	select RT2X00_LIB_RFKILL
-	---help---
-	  This adds support for integrated rt61 devices that feature a
-	  hardware button to control the radio state.
-	  This feature depends on the RF switch subsystem rfkill.
-
-config RT2500USB
-	tristate "Ralink rt2500 usb support"
-	depends on RT2X00 && USB
-	select RT2X00_LIB_USB
-	---help---
-	  This is an experimental driver for the Ralink rt2500 wireless chip.
-
-	  When compiled as a module, this driver will be called "rt2500usb.ko".
-
-config RT73USB
-	tristate "Ralink rt73 usb support"
-	depends on RT2X00 && USB
-	select RT2X00_LIB_USB
-	select RT2X00_LIB_FIRMWARE
-	---help---
-	  This is an experimental driver for the Ralink rt73 wireless chip.
-
-	  When compiled as a module, this driver will be called "rt73usb.ko".
-
-config RT2X00_LIB_DEBUGFS
-	bool "Ralink debugfs support"
-	depends on RT2X00_LIB && MAC80211_DEBUGFS
-	---help---
-	  Enable creation of debugfs files for the rt2x00 drivers.
-	  These debugfs files support both reading and writing of the
-	  most important register types of the rt2x00 devices.
-
-config RT2X00_DEBUG
-	bool "Ralink debug output"
-	depends on RT2X00_LIB
-	---help---
-	  Enable debugging output for all rt2x00 modules
-
 config IWLWIFI
 	bool "Intel Wireless WiFi Link Drivers"
 	depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
@@ -853,5 +723,6 @@ source "drivers/net/wireless/bcm43xx/Kconfig"
 source "drivers/net/wireless/b43/Kconfig"
 source "drivers/net/wireless/zd1211rw/Kconfig"
 source "drivers/net/wireless/zd1211rw-mac80211/Kconfig"
+source "drivers/net/wireless/rt2x00/Kconfig"
 
 endmenu
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index b3427bb..e28b067 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -56,28 +56,7 @@ obj-$(CONFIG_P54_COMMON)	+= p54common.o
 obj-$(CONFIG_P54_USB)		+= p54usb.o
 obj-$(CONFIG_P54_PCI)		+= p54pci.o
 
-rt2x00lib-objs := rt2x00dev.o rt2x00mac.o rt2x00config.o
-
-ifeq ($(CONFIG_RT2X00_LIB_DEBUGFS),y)
-	rt2x00lib-objs += rt2x00debug.o
-endif
-
-ifeq ($(CONFIG_RT2X00_LIB_RFKILL),y)
-	rt2x00lib-objs += rt2x00rfkill.o
-endif
-
-ifeq ($(CONFIG_RT2X00_LIB_FIRMWARE),y)
-	rt2x00lib-objs += rt2x00firmware.o
-endif
-
-obj-$(CONFIG_RT2X00_LIB)	+= rt2x00lib.o
-obj-$(CONFIG_RT2X00_LIB_PCI)	+= rt2x00pci.o
-obj-$(CONFIG_RT2X00_LIB_USB)	+= rt2x00usb.o
-obj-$(CONFIG_RT2400PCI)		+= rt2400pci.o
-obj-$(CONFIG_RT2500PCI)		+= rt2500pci.o
-obj-$(CONFIG_RT61PCI)		+= rt61pci.o
-obj-$(CONFIG_RT2500USB)		+= rt2500usb.o
-obj-$(CONFIG_RT73USB)		+= rt73usb.o
+obj-$(CONFIG_RT2X00)		+= rt2x00/
 
 # NOTE:  We use common code from iwl-base.c to build driver
 # specific binaries based on the #define IWL -- the target
diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
new file mode 100644
index 0000000..da05b1f
--- /dev/null
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -0,0 +1,130 @@
+config RT2X00
+	tristate "Ralink driver support"
+	depends on MAC80211 && WLAN_80211 && EXPERIMENTAL
+	---help---
+	  This will enable the experimental support for the Ralink drivers,
+	  developed in the rt2x00 project <http://rt2x00.serialmonkey.com>.
+
+	  These drivers will make use of the Devicescape ieee80211 stack.
+
+	  When building one of the individual drivers, the rt2x00 library
+	  will also be created. That library (when the driver is built as
+	  a module) will be called "rt2x00lib.ko".
+
+config RT2X00_LIB
+	tristate
+	depends on RT2X00
+
+config RT2X00_LIB_PCI
+	tristate
+	depends on RT2X00
+	select RT2X00_LIB
+
+config RT2X00_LIB_USB
+	tristate
+	depends on RT2X00
+	select RT2X00_LIB
+
+config RT2X00_LIB_FIRMWARE
+	boolean
+	depends on RT2X00_LIB
+	select CRC_ITU_T
+	select FW_LOADER
+
+config RT2X00_LIB_RFKILL
+	boolean
+	depends on RT2X00_LIB
+	select RFKILL
+	select INPUT_POLLDEV
+
+config RT2400PCI
+	tristate "Ralink rt2400 pci/pcmcia support"
+	depends on RT2X00 && PCI
+	select RT2X00_LIB_PCI
+	select EEPROM_93CX6
+	---help---
+	  This is an experimental driver for the Ralink rt2400 wireless chip.
+
+	  When compiled as a module, this driver will be called "rt2400pci.ko".
+
+config RT2400PCI_RFKILL
+	bool "RT2400 rfkill support"
+	depends on RT2400PCI
+	select RT2X00_LIB_RFKILL
+	---help---
+	  This adds support for integrated rt2400 devices that feature a
+	  hardware button to control the radio state.
+	  This feature depends on the RF switch subsystem rfkill.
+
+config RT2500PCI
+	tristate "Ralink rt2500 pci/pcmcia support"
+	depends on RT2X00 && PCI
+	select RT2X00_LIB_PCI
+	select EEPROM_93CX6
+	---help---
+	  This is an experimental driver for the Ralink rt2500 wireless chip.
+
+	  When compiled as a module, this driver will be called "rt2500pci.ko".
+
+config RT2500PCI_RFKILL
+	bool "RT2500 rfkill support"
+	depends on RT2500PCI
+	select RT2X00_LIB_RFKILL
+	---help---
+	  This adds support for integrated rt2500 devices that feature a
+	  hardware button to control the radio state.
+	  This feature depends on the RF switch subsystem rfkill.
+
+config RT61PCI
+	tristate "Ralink rt61 pci/pcmcia support"
+	depends on RT2X00 && PCI
+	select RT2X00_LIB_PCI
+	select RT2X00_LIB_FIRMWARE
+	select EEPROM_93CX6
+	---help---
+	  This is an experimental driver for the Ralink rt61 wireless chip.
+
+	  When compiled as a module, this driver will be called "rt61pci.ko".
+
+config RT61PCI_RFKILL
+	bool "RT61 rfkill support"
+	depends on RT61PCI
+	select RT2X00_LIB_RFKILL
+	---help---
+	  This adds support for integrated rt61 devices that feature a
+	  hardware button to control the radio state.
+	  This feature depends on the RF switch subsystem rfkill.
+
+config RT2500USB
+	tristate "Ralink rt2500 usb support"
+	depends on RT2X00 && USB
+	select RT2X00_LIB_USB
+	---help---
+	  This is an experimental driver for the Ralink rt2500 wireless chip.
+
+	  When compiled as a module, this driver will be called "rt2500usb.ko".
+
+config RT73USB
+	tristate "Ralink rt73 usb support"
+	depends on RT2X00 && USB
+	select RT2X00_LIB_USB
+	select RT2X00_LIB_FIRMWARE
+	---help---
+	  This is an experimental driver for the Ralink rt73 wireless chip.
+
+	  When compiled as a module, this driver will be called "rt73usb.ko".
+
+config RT2X00_LIB_DEBUGFS
+	bool "Ralink debugfs support"
+	depends on RT2X00_LIB && MAC80211_DEBUGFS
+	---help---
+	  Enable creation of debugfs files for the rt2x00 drivers.
+	  These debugfs files support both reading and writing of the
+	  most important register types of the rt2x00 devices.
+
+config RT2X00_DEBUG
+	bool "Ralink debug output"
+	depends on RT2X00_LIB
+	---help---
+	  Enable debugging output for all rt2x00 modules
+
diff --git a/drivers/net/wireless/rt2x00/Makefile b/drivers/net/wireless/rt2x00/Makefile
new file mode 100644
index 0000000..30d654a
--- /dev/null
+++ b/drivers/net/wireless/rt2x00/Makefile
@@ -0,0 +1,22 @@
+rt2x00lib-objs := rt2x00dev.o rt2x00mac.o rt2x00config.o
+
+ifeq ($(CONFIG_RT2X00_LIB_DEBUGFS),y)
+	rt2x00lib-objs += rt2x00debug.o
+endif
+
+ifeq ($(CONFIG_RT2X00_LIB_RFKILL),y)
+	rt2x00lib-objs += rt2x00rfkill.o
+endif
+
+ifeq ($(CONFIG_RT2X00_LIB_FIRMWARE),y)
+	rt2x00lib-objs += rt2x00firmware.o
+endif
+
+obj-$(CONFIG_RT2X00_LIB)	+= rt2x00lib.o
+obj-$(CONFIG_RT2X00_LIB_PCI)	+= rt2x00pci.o
+obj-$(CONFIG_RT2X00_LIB_USB)	+= rt2x00usb.o
+obj-$(CONFIG_RT2400PCI)		+= rt2400pci.o
+obj-$(CONFIG_RT2500PCI)		+= rt2500pci.o
+obj-$(CONFIG_RT61PCI)		+= rt61pci.o
+obj-$(CONFIG_RT2500USB)		+= rt2500usb.o
+obj-$(CONFIG_RT73USB)		+= rt73usb.o

^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 24/30] rt2x00: Add file pattern to MAINTAINER entry
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (22 preceding siblings ...)
  2007-08-19 18:35 ` [PATCH 23/30] rt2x00: Move rt2x00 files into rt2x00 folder Ivo van Doorn
@ 2007-08-19 18:35 ` Ivo van Doorn
  2007-08-19 18:35 ` [PATCH 25/30] rt2x00: Fix PLCP setup Ivo van Doorn
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:35 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 316723f1a0e726defbc2403647a9f81e383c45bb Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 14:04:26 +0200
Subject: [PATCH 24/30] rt2x00: Add file pattern to MAINTAINER entry

Add file pattern to MAINTAINER entry

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 MAINTAINERS |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index d22d562..f7a67a5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3135,6 +3135,7 @@ L:	linux-wireless@vger.kernel.org
 L:	rt2400-devel@lists.sourceforge.net
 W:	http://rt2x00.serialmonkey.com/
 S:	Maintained
+F:	drivers/net/wireless/rt2x00/
 
 RANDOM NUMBER DRIVER
 P:	Matt Mackall
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 25/30] rt2x00: Fix PLCP setup
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (23 preceding siblings ...)
  2007-08-19 18:35 ` [PATCH 24/30] rt2x00: Add file pattern to MAINTAINER entry Ivo van Doorn
@ 2007-08-19 18:35 ` Ivo van Doorn
  2007-08-19 18:36 ` [PATCH 26/30] rt2x00: Clean up RATEMASK handling Ivo van Doorn
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:35 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From b545a9a3b8ff04a2c6f62923cf01043aeb9ec599 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 16:09:25 +0200
Subject: [PATCH 25/30] rt2x00: Fix PLCP setup

The Length extension bit should only be set when using
the 11Mbs rate and when the residual is <= 3. (value comes
from zd1211rw, ralink legacy driver was unclear)

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c |   36 +++++++++++++++++-------------
 1 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 36b522b..a0fcd05 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -480,14 +480,15 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 		desc.ifs = IFS_BACKOFF;
 
 	/*
-	 * How the length should be processed depends
-	 * on if we are working with OFDM rates or not.
+	 * PLCP setup
+	 * Length calculation depends on OFDM/CCK rate.
 	 */
+	desc.signal = DEVICE_GET_RATE_FIELD(tx_rate, PLCP);
+	desc.service = 0x04;
+
 	if (test_bit(ENTRY_TXD_OFDM_RATE, &entry->flags)) {
-		residual = 0;
 		desc.length_high = ((length + FCS_LEN) >> 6) & 0x3f;
 		desc.length_low = ((length + FCS_LEN) & 0x3f);
-
 	} else {
 		bitrate = DEVICE_GET_RATE_FIELD(tx_rate, RATE);
 
@@ -497,23 +498,26 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 		residual = get_duration_res(length + FCS_LEN, bitrate);
 		duration = get_duration(length + FCS_LEN, bitrate);
 
-		if (residual != 0)
+		if (residual != 0) {
 			duration++;
 
+			/*
+			 * Check if we need to set the Length Extension
+			 */
+			if (bitrate == 110 && residual <= 3)
+				desc.service |= 0x80;
+		}
+
 		desc.length_high = (duration >> 8) & 0xff;
 		desc.length_low = duration & 0xff;
-	}
 
-	/*
-	 * Create the signal and service values.
-	 */
-	desc.signal = DEVICE_GET_RATE_FIELD(tx_rate, PLCP);
-	if (DEVICE_GET_RATE_FIELD(tx_rate, PREAMBLE))
-		desc.signal |= 0x08;
-
-	desc.service = 0x04;
-	if (residual <= (8 % 11))
-		desc.service |= 0x80;
+		/*
+		 * When preamble is enabled we should set the
+		 * preamble bit for the signal.
+		 */
+		if (DEVICE_GET_RATE_FIELD(tx_rate, PREAMBLE))
+			desc.signal |= 0x08;
+	}
 
 	rt2x00dev->ops->lib->write_tx_desc(rt2x00dev, entry, txd, &desc,
 					   ieee80211hdr, length, control);
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 26/30] rt2x00: Clean up RATEMASK handling
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (24 preceding siblings ...)
  2007-08-19 18:35 ` [PATCH 25/30] rt2x00: Fix PLCP setup Ivo van Doorn
@ 2007-08-19 18:36 ` Ivo van Doorn
  2007-08-19 18:36 ` [PATCH 27/30] rt2x00: Add rt2x00lib_reset_link_tuner() Ivo van Doorn
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:36 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 295b7e7bc2a2081714a071c3946f1c0262b6e503 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 16:31:38 +0200
Subject: [PATCH 26/30] rt2x00: Clean up RATEMASK handling

Rate handling needs some cleaning up to
clear up the meaning of the variables.

- Rename DEV_RATE_* to DEV_RATEBIT_*
- Add DEV_RATEMASK_* to remove "magical values" passed to
  rt2x00lib_rate
- CCK_RATEMASK is alias for DEV_RATEMASK_11MB
- OFDM_RATEMASK is alias for DEV_RATE_MASK_54MB - CCK_RATEMASK

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2400pci.c |    2 +-
 drivers/net/wireless/rt2x00/rt2500pci.c |    2 +-
 drivers/net/wireless/rt2x00/rt2500usb.c |    2 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c |   44 ++++++++++++++----------
 drivers/net/wireless/rt2x00/rt2x00reg.h |   56 +++++++++++++++++++------------
 drivers/net/wireless/rt2x00/rt61pci.c   |    2 +-
 drivers/net/wireless/rt2x00/rt73usb.c   |    2 +-
 7 files changed, 64 insertions(+), 46 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index b851571..524f529 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -366,7 +366,7 @@ static void rt2400pci_config_rate(struct rt2x00_dev *rt2x00dev, const int rate)
 	else
 		preamble = PREAMBLE;
 
-	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATE;
+	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATEMASK;
 	rt2x00pci_register_write(rt2x00dev, ARCSR1, reg);
 
 	rt2x00pci_register_read(rt2x00dev, TXCSR1, &reg);
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 1000525..cc90597 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -374,7 +374,7 @@ static void rt2500pci_config_rate(struct rt2x00_dev *rt2x00dev, const int rate)
 	else
 		preamble = PREAMBLE;
 
-	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATE;
+	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATEMASK;
 	rt2x00pci_register_write(rt2x00dev, ARCSR1, reg);
 
 	rt2x00pci_register_read(rt2x00dev, TXCSR1, &reg);
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 9ece4af..ba6c099 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -383,7 +383,7 @@ static void rt2500usb_config_rate(struct rt2x00_dev *rt2x00dev, const int rate)
 	else
 		preamble = PREAMBLE;
 
-	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATE;
+	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATEMASK;
 
 	rt2500usb_register_write(rt2x00dev, TXRX_CSR11, reg);
 
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a0fcd05..8e7fc2a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -449,7 +449,7 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	/*
 	 * Check for OFDM
 	 */
-	if (DEVICE_GET_RATE_FIELD(tx_rate, RATEMASK) & DEV_OFDM_RATE)
+	if (DEVICE_GET_RATE_FIELD(tx_rate, RATEMASK) & DEV_OFDM_RATEMASK)
 		__set_bit(ENTRY_TXD_OFDM_RATE, &entry->flags);
 
 	/*
@@ -587,26 +587,32 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev,
 	/*
 	 * Initialize Rate list.
 	 */
-	rt2x00lib_rate(&rates[0], 10, 0x001, 0x00, IEEE80211_RATE_CCK);
-	rt2x00lib_rate(&rates[1], 20, 0x003, 0x01, IEEE80211_RATE_CCK_2);
-	rt2x00lib_rate(&rates[2], 55, 0x007, 0x02, IEEE80211_RATE_CCK_2);
-	rt2x00lib_rate(&rates[3], 110, 0x00f, 0x03, IEEE80211_RATE_CCK_2);
+	rt2x00lib_rate(&rates[0], 10, DEV_RATEMASK_1MB,
+		       0x00, IEEE80211_RATE_CCK);
+	rt2x00lib_rate(&rates[1], 20, DEV_RATEMASK_2MB,
+		       0x01, IEEE80211_RATE_CCK_2);
+	rt2x00lib_rate(&rates[2], 55, DEV_RATEMASK_5_5MB,
+		       0x02, IEEE80211_RATE_CCK_2);
+	rt2x00lib_rate(&rates[3], 110, DEV_RATEMASK_11MB,
+		       0x03, IEEE80211_RATE_CCK_2);
 
 	if (spec->num_rates > 4) {
-		rt2x00lib_rate(&rates[4], 60, 0x01f, 0x0b, IEEE80211_RATE_OFDM);
-		rt2x00lib_rate(&rates[5], 90, 0x03f, 0x0f, IEEE80211_RATE_OFDM);
-		rt2x00lib_rate(&rates[6], 120, 0x07f, 0x0a,
-			       IEEE80211_RATE_OFDM);
-		rt2x00lib_rate(&rates[7], 180, 0x0ff, 0x0e,
-			       IEEE80211_RATE_OFDM);
-		rt2x00lib_rate(&rates[8], 240, 0x1ff, 0x09,
-			       IEEE80211_RATE_OFDM);
-		rt2x00lib_rate(&rates[9], 360, 0x3ff, 0x0d,
-			       IEEE80211_RATE_OFDM);
-		rt2x00lib_rate(&rates[10], 480, 0x7ff, 0x08,
-			       IEEE80211_RATE_OFDM);
-		rt2x00lib_rate(&rates[11], 540, 0xfff, 0x0c,
-			       IEEE80211_RATE_OFDM);
+		rt2x00lib_rate(&rates[4], 60, DEV_RATEMASK_6MB,
+			       0x0b, IEEE80211_RATE_OFDM);
+		rt2x00lib_rate(&rates[5], 90, DEV_RATEMASK_9MB,
+			       0x0f, IEEE80211_RATE_OFDM);
+		rt2x00lib_rate(&rates[6], 120, DEV_RATEMASK_12MB,
+			       0x0a, IEEE80211_RATE_OFDM);
+		rt2x00lib_rate(&rates[7], 180, DEV_RATEMASK_18MB,
+			       0x0e, IEEE80211_RATE_OFDM);
+		rt2x00lib_rate(&rates[8], 240, DEV_RATEMASK_24MB,
+			       0x09, IEEE80211_RATE_OFDM);
+		rt2x00lib_rate(&rates[9], 360, DEV_RATEMASK_36MB,
+			       0x0d, IEEE80211_RATE_OFDM);
+		rt2x00lib_rate(&rates[10], 480, DEV_RATEMASK_48MB,
+			       0x08, IEEE80211_RATE_OFDM);
+		rt2x00lib_rate(&rates[11], 540, DEV_RATEMASK_54MB,
+			       0x0c, IEEE80211_RATE_OFDM);
 	}
 
 	/*
diff --git a/drivers/net/wireless/rt2x00/rt2x00reg.h b/drivers/net/wireless/rt2x00/rt2x00reg.h
index 10a4a42..690356f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00reg.h
+++ b/drivers/net/wireless/rt2x00/rt2x00reg.h
@@ -228,34 +228,46 @@ static inline u8 rt2x00_get_field8(const u8 reg,
 #define DEV_PLCP	FIELD32(0xff000000)
 
 /*
- * Bitmask for MASK_RATE
+ * Bitfields
  */
-#define DEV_RATE_1MB	( 1 << 1 )
-#define DEV_RATE_2MB	( 1 << 2 )
-#define DEV_RATE_5_5MB	( 1 << 3 )
-#define DEV_RATE_11MB	( 1 << 4 )
-#define DEV_RATE_6MB	( 1 << 5 )
-#define DEV_RATE_9MB	( 1 << 6 )
-#define DEV_RATE_12MB	( 1 << 7 )
-#define DEV_RATE_18MB	( 1 << 8 )
-#define DEV_RATE_24MB	( 1 << 9 )
-#define DEV_RATE_36MB	( 1 << 10 )
-#define DEV_RATE_48MB	( 1 << 11 )
-#define DEV_RATE_54MB	( 1 << 12 )
+#define DEV_RATEBIT_1MB		( 1 << 1 )
+#define DEV_RATEBIT_2MB		( 1 << 2 )
+#define DEV_RATEBIT_5_5MB	( 1 << 3 )
+#define DEV_RATEBIT_11MB	( 1 << 4 )
+#define DEV_RATEBIT_6MB		( 1 << 5 )
+#define DEV_RATEBIT_9MB		( 1 << 6 )
+#define DEV_RATEBIT_12MB	( 1 << 7 )
+#define DEV_RATEBIT_18MB	( 1 << 8 )
+#define DEV_RATEBIT_24MB	( 1 << 9 )
+#define DEV_RATEBIT_36MB	( 1 << 10 )
+#define DEV_RATEBIT_48MB	( 1 << 11 )
+#define DEV_RATEBIT_54MB	( 1 << 12 )
 
 /*
- * Bitmask groups of bitrates
+ * Bitmasks for DEV_RATEMASK
  */
-#define DEV_BASIC_RATE \
-	( DEV_RATE_1MB | DEV_RATE_2MB | DEV_RATE_5_5MB | DEV_RATE_11MB | \
-	  DEV_RATE_6MB | DEV_RATE_12MB | DEV_RATE_24MB )
+#define DEV_RATEMASK_1MB	( (DEV_RATEBIT_1MB << 1) -1 )
+#define DEV_RATEMASK_2MB	( (DEV_RATEBIT_2MB << 1) -1 )
+#define DEV_RATEMASK_5_5MB	( (DEV_RATEBIT_5_5MB << 1) -1 )
+#define DEV_RATEMASK_11MB	( (DEV_RATEBIT_11MB << 1) -1 )
+#define DEV_RATEMASK_6MB	( (DEV_RATEBIT_6MB << 1) -1 )
+#define DEV_RATEMASK_9MB	( (DEV_RATEBIT_9MB << 1) -1 )
+#define DEV_RATEMASK_12MB	( (DEV_RATEBIT_12MB << 1) -1 )
+#define DEV_RATEMASK_18MB	( (DEV_RATEBIT_18MB << 1) -1 )
+#define DEV_RATEMASK_24MB	( (DEV_RATEBIT_24MB << 1) -1 )
+#define DEV_RATEMASK_36MB	( (DEV_RATEBIT_36MB << 1) -1 )
+#define DEV_RATEMASK_48MB	( (DEV_RATEBIT_48MB << 1) -1 )
+#define DEV_RATEMASK_54MB	( (DEV_RATEBIT_54MB << 1) -1 )
 
-#define DEV_CCK_RATE \
-	( DEV_RATE_1MB | DEV_RATE_2MB | DEV_RATE_5_5MB | DEV_RATE_11MB )
+/*
+ * Bitmask groups of bitrates
+ */
+#define DEV_BASIC_RATEMASK \
+	( DEV_RATEMASK_11MB | \
+	  DEV_RATEBIT_6MB | DEV_RATEBIT_12MB | DEV_RATEBIT_24MB )
 
-#define DEV_OFDM_RATE \
-	( DEV_RATE_6MB | DEV_RATE_9MB | DEV_RATE_12MB | DEV_RATE_18MB | \
-	  DEV_RATE_24MB | DEV_RATE_36MB | DEV_RATE_48MB | DEV_RATE_54MB )
+#define DEV_CCK_RATEMASK	( DEV_RATEMASK_11MB )
+#define DEV_OFDM_RATEMASK	( DEV_RATEMASK_54MB & ~DEV_CCK_RATEMASK )
 
 /*
  * Macro's to set and get specific fields from the device specific val and val2
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index efa6c25..0dacd59 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -404,7 +404,7 @@ static void rt61pci_config_rate(struct rt2x00_dev *rt2x00dev, const int rate)
 	 * We need to set TXRX_CSR5 to the basic rate mask so we need to mask
 	 * off the non-basic rates.
 	 */
-	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATE;
+	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATEMASK;
 
 	rt2x00pci_register_write(rt2x00dev, TXRX_CSR5, reg);
 
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 9e8c049..7eb1f02 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -380,7 +380,7 @@ static void rt73usb_config_rate(struct rt2x00_dev *rt2x00dev, const int rate)
 	else
 		preamble = PREAMBLE;
 
-	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATE;
+	reg = DEVICE_GET_RATE_FIELD(rate, RATEMASK) & DEV_BASIC_RATEMASK;
 
 	rt73usb_register_write(rt2x00dev, TXRX_CSR5, reg);
 
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 27/30] rt2x00: Add rt2x00lib_reset_link_tuner()
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (25 preceding siblings ...)
  2007-08-19 18:36 ` [PATCH 26/30] rt2x00: Clean up RATEMASK handling Ivo van Doorn
@ 2007-08-19 18:36 ` Ivo van Doorn
  2007-08-19 18:36 ` [PATCH 28/30] rt2x00: Always check if mac80211 requested TX status update Ivo van Doorn
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:36 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From d6188297893be7023e0cec4b0132e64ec96de884 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 16:41:58 +0200
Subject: [PATCH 27/30] rt2x00: Add rt2x00lib_reset_link_tuner()

When rt2x00config needs the link tuner to be reset,
this means that also all statistics need to be reset
_and_ that the link tuner timer is being reset.
In short: when resetting the link tuner, the link
tuner should be stopped and restarted.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2x00config.c |    2 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |   14 ++++++++++----
 drivers/net/wireless/rt2x00/rt2x00lib.h    |    1 +
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index 4fec0af..b5075b5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -155,7 +155,7 @@ config:
 	 * which means we need to reset the link tuner.
 	 */
 	if (flags & (CONFIG_UPDATE_CHANNEL | CONFIG_UPDATE_ANTENNA))
-		rt2x00dev->ops->lib->reset_tuner(rt2x00dev);
+		rt2x00lib_reset_link_tuner(rt2x00dev);
 
 	rt2x00dev->rx_status.phymode = conf->phymode;
 	rt2x00dev->rx_status.freq = conf->freq;
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 8e7fc2a..14968ef 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -67,7 +67,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_get_ring);
 /*
  * Link tuning handlers
  */
-static void rt2x00_start_link_tune(struct rt2x00_dev *rt2x00dev)
+static void rt2x00lib_start_link_tuner(struct rt2x00_dev *rt2x00dev)
 {
 	rt2x00dev->link.count = 0;
 	rt2x00dev->link.avg_rssi = 0;
@@ -87,12 +87,18 @@ static void rt2x00_start_link_tune(struct rt2x00_dev *rt2x00dev)
 			   &rt2x00dev->link.work, LINK_TUNE_INTERVAL);
 }
 
-static void rt2x00_stop_link_tune(struct rt2x00_dev *rt2x00dev)
+static void rt2x00lib_stop_link_tuner(struct rt2x00_dev *rt2x00dev)
 {
 	if (delayed_work_pending(&rt2x00dev->link.work))
 		cancel_rearming_delayed_work(&rt2x00dev->link.work);
 }
 
+void rt2x00lib_reset_link_tuner(struct rt2x00_dev *rt2x00dev)
+{
+	rt2x00lib_stop_link_tuner(rt2x00dev);
+	rt2x00lib_start_link_tuner(rt2x00dev);
+}
+
 /*
  * Radio control handlers.
  */
@@ -167,7 +173,7 @@ void rt2x00lib_toggle_rx(struct rt2x00_dev *rt2x00dev, int enable)
 	 * When we are disabling the RX, we should also stop the link tuner.
 	 */
 	if (!enable)
-		rt2x00_stop_link_tune(rt2x00dev);
+		rt2x00lib_stop_link_tuner(rt2x00dev);
 
 	rt2x00dev->ops->lib->set_device_state(rt2x00dev, state);
 
@@ -175,7 +181,7 @@ void rt2x00lib_toggle_rx(struct rt2x00_dev *rt2x00dev, int enable)
 	 * When we are enabling the RX, we should also start the link tuner.
 	 */
 	if (enable && is_interface_present(&rt2x00dev->interface))
-		rt2x00_start_link_tune(rt2x00dev);
+		rt2x00lib_start_link_tuner(rt2x00dev);
 }
 
 static int rt2x00lib_calculate_link_signal(struct rt2x00_dev *rt2x00dev)
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index 1560f73..454e022 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -38,6 +38,7 @@
 int rt2x00lib_enable_radio(struct rt2x00_dev *rt2x00dev);
 void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev);
 void rt2x00lib_toggle_rx(struct rt2x00_dev *rt2x00dev, int enable);
+void rt2x00lib_reset_link_tuner(struct rt2x00_dev *rt2x00dev);
 
 /*
  * Initialization handlers.
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 28/30] rt2x00: Always check if mac80211 requested TX status update
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (26 preceding siblings ...)
  2007-08-19 18:36 ` [PATCH 27/30] rt2x00: Add rt2x00lib_reset_link_tuner() Ivo van Doorn
@ 2007-08-19 18:36 ` Ivo van Doorn
  2007-08-20 17:21   ` Johannes Berg
  2007-08-19 18:36 ` [PATCH 29/30] rt2x00: Lindent Ivo van Doorn
                   ` (2 subsequent siblings)
  30 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:36 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From cbf01c4f3f1810f0ba98238aa7900a523a044e66 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 17:43:23 +0200
Subject: [PATCH 28/30] rt2x00: Always check if mac80211 requested TX status update

During txdone always check for the IEEE80211_TXCTL_REQ_TX_STATUS flag
to determine if ieee80211_tx_status_irqsafe should be called or not.
When the flag is not set, just cleanup the skb and don't bother
mac80211 with it.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2x00dev.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 14968ef..75888ea 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -333,10 +333,14 @@ void rt2x00lib_txdone(struct data_entry *entry,
 	}
 
 	/*
-	 * Send the tx_status to mac80211,
-	 * that method also cleans up the skb structure.
+	 * Check if mac80211 wants to be updated or not,
+	 * if it wants the update it will cleanup the skb structure,
+	 * else then we should cleanup the skb structure.
 	 */
-	ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb, tx_status);
+	if (tx_status->control.flags & IEEE80211_TXCTL_REQ_TX_STATUS)
+		ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb, tx_status);
+	else
+		dev_kfree_skb_any(entry->skb);
 
 	entry->skb = NULL;
 }
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 29/30] rt2x00: Lindent
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (27 preceding siblings ...)
  2007-08-19 18:36 ` [PATCH 28/30] rt2x00: Always check if mac80211 requested TX status update Ivo van Doorn
@ 2007-08-19 18:36 ` Ivo van Doorn
  2007-08-19 18:37 ` [PATCH 30/30] rt2x00: rt2x00 2.0.7 Ivo van Doorn
  2007-08-23 20:55 ` [Rt2400-devel] Please pull 'upstream' branch of rt2x00 John W. Linville
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:36 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From f88ee9f3e67bd509f14e07f0dfcfe32649694e10 Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sat, 18 Aug 2007 18:24:23 +0200
Subject: [PATCH 29/30] rt2x00: Lindent

Lindent still caught a few lines exceeding the 80 character limit,
a few reduntant spaces, and some other minor things.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2400pci.c   |    7 ++++---
 drivers/net/wireless/rt2x00/rt2500pci.c   |   10 +++++-----
 drivers/net/wireless/rt2x00/rt2500usb.c   |    7 +++----
 drivers/net/wireless/rt2x00/rt2x00.h      |   12 ++++++------
 drivers/net/wireless/rt2x00/rt2x00debug.c |   19 +++++++++++--------
 drivers/net/wireless/rt2x00/rt2x00dev.c   |   14 +++++++-------
 drivers/net/wireless/rt2x00/rt2x00mac.c   |    3 ++-
 drivers/net/wireless/rt2x00/rt2x00usb.c   |    2 +-
 drivers/net/wireless/rt2x00/rt61pci.c     |    6 +++---
 drivers/net/wireless/rt2x00/rt73usb.c     |    8 ++++----
 10 files changed, 46 insertions(+), 42 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 524f529..d3ac1c1 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1154,7 +1154,8 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 			   test_bit(ENTRY_TXD_RTS_FRAME, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
 	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
-			   !!(control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT));
+			   !!(control->flags &
+			      IEEE80211_TXCTL_LONG_RETRY_LIMIT));
 	rt2x00_desc_write(txd, 0, word);
 }
 
@@ -1398,8 +1399,8 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
 	/*
 	 * Store led mode, for correct led behaviour.
 	 */
-	rt2x00dev->led_mode = rt2x00_get_field16(eeprom,
-						 EEPROM_ANTENNA_LED_MODE);
+	rt2x00dev->led_mode =
+	    rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE);
 
 	/*
 	 * Detect if this device has an hardware controlled radio.
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index cc90597..b6f9266 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -625,8 +625,7 @@ static void rt2500pci_config(struct rt2x00_dev *rt2x00dev,
 	if (flags & CONFIG_UPDATE_CHANNEL)
 		rt2500pci_config_channel(rt2x00dev, conf->channel_val,
 					 conf->channel, conf->power_level);
-	if (!(flags & CONFIG_UPDATE_CHANNEL) &&
-	    flags & CONFIG_UPDATE_TXPOWER)
+	if ((flags & CONFIG_UPDATE_TXPOWER) && !(flags & CONFIG_UPDATE_CHANNEL))
 		rt2500pci_config_txpower(rt2x00dev, conf->power_level);
 	if (flags & CONFIG_UPDATE_ANTENNA)
 		rt2500pci_config_antenna(rt2x00dev, conf->antenna_sel_tx,
@@ -1282,7 +1281,8 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_OWNER, 1);
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
 	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
-			   !!(control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT));
+			   !!(control->flags &
+			      IEEE80211_TXCTL_LONG_RETRY_LIMIT));
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE);
 	rt2x00_desc_write(txd, 0, word);
@@ -1554,8 +1554,8 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev)
 	/*
 	 * Store led mode, for correct led behaviour.
 	 */
-	rt2x00dev->led_mode = rt2x00_get_field16(eeprom,
-						 EEPROM_ANTENNA_LED_MODE);
+	rt2x00dev->led_mode =
+	    rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE);
 
 	/*
 	 * Detect if this device has an hardware controlled radio.
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index ba6c099..3c78a97 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -568,8 +568,7 @@ static void rt2500usb_config(struct rt2x00_dev *rt2x00dev,
 	if (flags & CONFIG_UPDATE_CHANNEL)
 		rt2500usb_config_channel(rt2x00dev, conf->channel_val,
 					 conf->channel, conf->power_level);
-	if (!(flags & CONFIG_UPDATE_CHANNEL) &&
-	    flags & CONFIG_UPDATE_TXPOWER)
+	if ((flags & CONFIG_UPDATE_TXPOWER) && !(flags & CONFIG_UPDATE_CHANNEL))
 		rt2500usb_config_txpower(rt2x00dev, conf->power_level);
 	if (flags & CONFIG_UPDATE_ANTENNA)
 		rt2500usb_config_antenna(rt2x00dev, conf->antenna_sel_tx,
@@ -1281,8 +1280,8 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
 	/*
 	 * Store led mode, for correct led behaviour.
 	 */
-	rt2x00dev->led_mode = rt2x00_get_field16(eeprom,
-						 EEPROM_ANTENNA_LED_MODE);
+	rt2x00dev->led_mode =
+	    rt2x00_get_field16(eeprom, EEPROM_ANTENNA_LED_MODE);
 
 	/*
 	 * Check if the BBP tuning should be disabled.
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 24ad264..06738e4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -133,20 +133,20 @@
  */
 static inline int is_rts_frame(u16 fc)
 {
-	return !!(((fc &  IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
-		  ((fc &  IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_RTS));
+	return !!(((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
+		  ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_RTS));
 }
 
 static inline int is_cts_frame(u16 fc)
 {
-	return !!(((fc &  IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
-		  ((fc &  IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_CTS));
+	return !!(((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
+		  ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_CTS));
 }
 
 static inline int is_probe_resp(u16 fc)
 {
-	return !!(((fc &  IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
-		  ((fc &  IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP));
+	return !!(((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
+		  ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP));
 }
 
 /*
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c
index c7b331c..eaa4c54 100644
--- a/drivers/net/wireless/rt2x00/rt2x00debug.c
+++ b/drivers/net/wireless/rt2x00/rt2x00debug.c
@@ -193,10 +193,11 @@ RT2X00DEBUGFS_OPS(eeprom, "0x%.4x\n", u16);
 RT2X00DEBUGFS_OPS(bbp, "0x%.2x\n", u8);
 RT2X00DEBUGFS_OPS(rf, "0x%.8x\n", u32);
 
-static struct dentry *
-rt2x00debug_create_file_driver(const char *name,
-			       struct rt2x00debug_intf *intf,
-			       struct debugfs_blob_wrapper *blob)
+static struct dentry *rt2x00debug_create_file_driver(const char *name,
+						     struct rt2x00debug_intf
+						     *intf,
+						     struct debugfs_blob_wrapper
+						     *blob)
 {
 	char *data;
 
@@ -213,10 +214,12 @@ rt2x00debug_create_file_driver(const char *name,
 	return debugfs_create_blob(name, S_IRUGO, intf->driver_folder, blob);
 }
 
-static struct dentry *
-rt2x00debug_create_file_chipset(const char *name,
-				struct rt2x00debug_intf *intf,
-				struct debugfs_blob_wrapper *blob)
+static struct dentry *rt2x00debug_create_file_chipset(const char *name,
+						      struct rt2x00debug_intf
+						      *intf,
+						      struct
+						      debugfs_blob_wrapper
+						      *blob)
 {
 	const struct rt2x00debug *debug = intf->debug;
 	char *data;
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 75888ea..8c24797 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -222,7 +222,7 @@ static int rt2x00lib_calculate_link_signal(struct rt2x00_dev *rt2x00dev)
 		  (WEIGHT_TX * tx_percentage) +
 		  (WEIGHT_RX * rx_percentage)) / 100;
 
-	return (signal > 100) ? 100 :  signal;
+	return (signal > 100) ? 100 : signal;
 }
 
 static void rt2x00lib_link_tuner(struct work_struct *work)
@@ -338,7 +338,8 @@ void rt2x00lib_txdone(struct data_entry *entry,
 	 * else then we should cleanup the skb structure.
 	 */
 	if (tx_status->control.flags & IEEE80211_TXCTL_REQ_TX_STATUS)
-		ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb, tx_status);
+		ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb,
+					    tx_status);
 	else
 		dev_kfree_skb_any(entry->skb);
 
@@ -561,9 +562,9 @@ static void rt2x00lib_rate(struct ieee80211_rate *entry,
 {
 	entry->rate = rate;
 	entry->val =
-		DEVICE_SET_RATE_FIELD(rate, RATE) |
-		DEVICE_SET_RATE_FIELD(mask, RATEMASK) |
-		DEVICE_SET_RATE_FIELD(plcp, PLCP);
+	    DEVICE_SET_RATE_FIELD(rate, RATE) |
+	    DEVICE_SET_RATE_FIELD(mask, RATEMASK) |
+	    DEVICE_SET_RATE_FIELD(plcp, PLCP);
 	entry->flags = flags;
 	entry->val2 = entry->val;
 	if (entry->flags & IEEE80211_RATE_PREAMBLE2)
@@ -637,8 +638,7 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev,
 			tx_power = spec->tx_power_default;
 
 		rt2x00lib_channel(&channels[i],
-				  spec->channels[i].channel,
-				  tx_power, i);
+				  spec->channels[i].channel, tx_power, i);
 	}
 
 	/*
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 2b1b910..3ceb79d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -35,7 +35,8 @@
 #include "rt2x00lib.h"
 
 static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
-				struct data_ring *ring, struct sk_buff *frag_skb,
+				struct data_ring *ring,
+				struct sk_buff *frag_skb,
 				struct ieee80211_tx_control *control)
 {
 	struct sk_buff *skb;
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index c763606..03815b6 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -50,7 +50,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
 	unsigned int i;
 	unsigned int pipe =
 	    (requesttype == USB_VENDOR_REQUEST_IN) ?
-	     usb_rcvctrlpipe(usb_dev, 0) : usb_sndctrlpipe(usb_dev, 0);
+	    usb_rcvctrlpipe(usb_dev, 0) : usb_sndctrlpipe(usb_dev, 0);
 
 	for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
 		status = usb_control_msg(usb_dev, pipe, request, requesttype,
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 0dacd59..0b4e757 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -688,8 +688,7 @@ static void rt61pci_config(struct rt2x00_dev *rt2x00dev,
 	if (flags & CONFIG_UPDATE_CHANNEL)
 		rt61pci_config_channel(rt2x00dev, conf->channel_val,
 				       conf->channel, conf->power_level);
-	if (!(flags & CONFIG_UPDATE_CHANNEL) &&
-	    flags & CONFIG_UPDATE_TXPOWER)
+	if ((flags & CONFIG_UPDATE_TXPOWER) && !(flags & CONFIG_UPDATE_CHANNEL))
 		rt61pci_config_txpower(rt2x00dev, conf->power_level);
 	if (flags & CONFIG_UPDATE_ANTENNA)
 		rt61pci_config_antenna(rt2x00dev, conf->antenna_sel_tx,
@@ -1532,7 +1531,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 			   test_bit(ENTRY_TXD_OFDM_RATE, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
 	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
-			   !!(control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT));
+			   !!(control->flags &
+			      IEEE80211_TXCTL_LONG_RETRY_LIMIT));
 	rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0);
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
 	rt2x00_set_field32(&word, TXD_W0_BURST,
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 7eb1f02..ed05e4b 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -659,8 +659,7 @@ static void rt73usb_config(struct rt2x00_dev *rt2x00dev,
 	if (flags & CONFIG_UPDATE_CHANNEL)
 		rt73usb_config_channel(rt2x00dev, conf->channel_val,
 				       conf->channel, conf->power_level);
-	if (!(flags & CONFIG_UPDATE_CHANNEL) &&
-	    flags & CONFIG_UPDATE_TXPOWER)
+	if ((flags & CONFIG_UPDATE_TXPOWER) && !(flags & CONFIG_UPDATE_CHANNEL))
 		rt73usb_config_txpower(rt2x00dev, conf->power_level);
 	if (flags & CONFIG_UPDATE_ANTENNA)
 		rt73usb_config_antenna(rt2x00dev, conf->antenna_sel_tx,
@@ -925,7 +924,7 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, void *data,
 		buflen = min_t(int, len - i, CSR_CACHE_SIZE_FIRMWARE);
 		timeout = REGISTER_TIMEOUT * (buflen / sizeof(u32));
 
-		memcpy(cache, ptr ,buflen);
+		memcpy(cache, ptr, buflen);
 
 		rt2x00usb_vendor_request(rt2x00dev, USB_MULTI_WRITE,
 					 USB_VENDOR_REQUEST_OUT,
@@ -1269,7 +1268,8 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 			   test_bit(ENTRY_TXD_OFDM_RATE, &entry->flags));
 	rt2x00_set_field32(&word, TXD_W0_IFS, desc->ifs);
 	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
-			   !!(control->flags & IEEE80211_TXCTL_LONG_RETRY_LIMIT));
+			   !!(control->flags &
+			      IEEE80211_TXCTL_LONG_RETRY_LIMIT));
 	rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0);
 	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, length);
 	rt2x00_set_field32(&word, TXD_W0_BURST2,
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* [PATCH 30/30] rt2x00: rt2x00 2.0.7
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (28 preceding siblings ...)
  2007-08-19 18:36 ` [PATCH 29/30] rt2x00: Lindent Ivo van Doorn
@ 2007-08-19 18:37 ` Ivo van Doorn
  2007-08-23 20:55 ` [Rt2400-devel] Please pull 'upstream' branch of rt2x00 John W. Linville
  30 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 18:37 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

>From 7b429527e4460c4bc550ca71a47696d677b92e5f Mon Sep 17 00:00:00 2001
From: Ivo van Doorn <IvDoorn@gmail.com>
Date: Sun, 19 Aug 2007 20:13:11 +0200
Subject: [PATCH 30/30] rt2x00: rt2x00 2.0.7

Release rt2x00 2.0.7

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2x00.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 06738e4..2105f44 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -42,7 +42,7 @@
  * Module information.
  * DRV_NAME should be set within the individual module source files.
  */
-#define DRV_VERSION	"2.0.6"
+#define DRV_VERSION	"2.0.7"
 #define DRV_PROJECT	"http://rt2x00.serialmonkey.com"
 
 /*
-- 
1.5.3.rc5


^ permalink raw reply related	[flat|nested] 89+ messages in thread

* Re: [PATCH 12/30] rt2x00: Store firmware in memory
  2007-08-19 18:25 ` [PATCH 12/30] rt2x00: Store firmware in memory Ivo van Doorn
@ 2007-08-19 18:54   ` Michael Buesch
  2007-08-19 20:44     ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Michael Buesch @ 2007-08-19 18:54 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: John W. Linville, linux-wireless, rt2400-devel

On Sunday 19 August 2007 20:25:39 Ivo van Doorn wrote:
> +void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
> +{
> +	if (rt2x00dev->fw) {

No !=NULL check is needed.

> +		release_firmware(rt2x00dev->fw);
> +		rt2x00dev->fw = NULL;
> +	}
> +}

-- 
Greetings Michael.

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: [PATCH 12/30] rt2x00: Store firmware in memory
  2007-08-19 18:54   ` Michael Buesch
@ 2007-08-19 20:44     ` Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-19 20:44 UTC (permalink / raw)
  To: Michael Buesch; +Cc: John W. Linville, linux-wireless, rt2400-devel

On Sunday 19 August 2007, Michael Buesch wrote:
> On Sunday 19 August 2007 20:25:39 Ivo van Doorn wrote:
> > +void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
> > +{
> > +	if (rt2x00dev->fw) {
> 
> No !=NULL check is needed.

I'll fix this.

Thanks :)

Ivo

> > +		release_firmware(rt2x00dev->fw);
> > +		rt2x00dev->fw = NULL;
> > +	}
> > +}
> 



^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: [PATCH 28/30] rt2x00: Always check if mac80211 requested TX  status update
  2007-08-19 18:36 ` [PATCH 28/30] rt2x00: Always check if mac80211 requested TX status update Ivo van Doorn
@ 2007-08-20 17:21   ` Johannes Berg
  2007-08-21 10:21     ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Johannes Berg @ 2007-08-20 17:21 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: John W. Linville, linux-wireless, rt2400-devel

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

On Sun, 2007-08-19 at 20:36 +0200, Ivo van Doorn wrote:

> During txdone always check for the IEEE80211_TXCTL_REQ_TX_STATUS flag
> to determine if ieee80211_tx_status_irqsafe should be called or not.
> When the flag is not set, just cleanup the skb and don't bother
> mac80211 with it.

Never mind that I'd love to remove the REQ_TX_STATUS flag, this is not
really the best thing to do since rate control will basically ignore
this frame if you don't hand it back to mac80211.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: [PATCH 28/30] rt2x00: Always check if mac80211 requested TX status update
  2007-08-20 17:21   ` Johannes Berg
@ 2007-08-21 10:21     ` Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-08-21 10:21 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John W. Linville, linux-wireless, rt2400-devel

On Monday 20 August 2007, Johannes Berg wrote:
> On Sun, 2007-08-19 at 20:36 +0200, Ivo van Doorn wrote:
> 
> > During txdone always check for the IEEE80211_TXCTL_REQ_TX_STATUS flag
> > to determine if ieee80211_tx_status_irqsafe should be called or not.
> > When the flag is not set, just cleanup the skb and don't bother
> > mac80211 with it.
> 
> Never mind that I'd love to remove the REQ_TX_STATUS flag, this is not
> really the best thing to do since rate control will basically ignore
> this frame if you don't hand it back to mac80211.

Ok, I'll revert that check for rt2x00 2.0.8

Thanks,

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: [Rt2400-devel] Please pull 'upstream' branch of rt2x00
  2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
                   ` (29 preceding siblings ...)
  2007-08-19 18:37 ` [PATCH 30/30] rt2x00: rt2x00 2.0.7 Ivo van Doorn
@ 2007-08-23 20:55 ` John W. Linville
  30 siblings, 0 replies; 89+ messages in thread
From: John W. Linville @ 2007-08-23 20:55 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linux-wireless, rt2400-devel

On Sun, Aug 19, 2007 at 08:18:30PM +0200, Ivo van Doorn wrote:

> Well finally rt2x00 2.0.7 is released, unfortunately it will
> not be the last release in the 2.0.* series as promised earlier.

Merged to wireless-dev...

-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-09-16 12:17 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-09-16 12:17 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

It has taken some time to finally release this,
but it contains quite a lot of bugfixes of variating impact.

Overall the stability has been greatly improved,
although there are still some nasty bugs in there.

Note that even after this update rt2x00 in wireless-dev will still not work
for encrypted networks. This is because rt2x00 depends on the encryption
patches by Johannes which are pending for wireless-dev inclusion
(Most notably the patch that fixes the IEEE80211_HW_WEP_INCLUDE_IV
behavior is required to make it work again).

Ivo

---

The following changes since commit e6d77b902151278df6a670b460a32e7cc6b75e9e:
  Luis R. Rodriguez (1):
        Merge branch 'ath5k' into everything

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (24):
      rt2x00: Remove firmware not-NULL check
      rt2x00: Don't check for IEEE80211_TXCTL_REQ_TX_STATUS
      rt2x00: Cleanup rxdone
      rt2x00: Don't allow configuration calls when uninitialized
      rt2x00: Fix rt61pci and rt73usb beacon handling
      rt2x00: Recalculate link quality
      rt2x00: Cleanup entry->flags
      rt2x00: Reduce LNA flags
      rt2x00: Rework RT61 and RT73 Antenna handling
      rt2x00: Rename DEVICE_SUPPORT_ATIM to REQUIRE_BEACON_RING
      rt2x00: Remove rt2x00mac_reset()
      rt2x00: Fix system freeze on device removal
      rt2x00: Reduce magic value writing to device
      rt2x00: New USB ID's for rt73usb and rt2500usb
      rt2x00: Beacon ring entries should have QID_MGMT
      rt2x00: Fix DEV_RATEBIT_ definitions
      rt2x00: Fix rfkill handling
      rt2x00: Merge allocation/free register components
      rt2x00: macro's shouldn't use hidden arguments
      rt2x00: Fix channel initialization
      rt2x00: Add better CONFIG_PM checks
      rt2x00: Add start/stop handlers
      rt2x00: Add additional bit to MAX_FRAME_UNIT
      rt2x00: Release rt2x00 2.0.8

 drivers/net/wireless/rt2x00/rt2400pci.c      |   37 +-
 drivers/net/wireless/rt2x00/rt2500pci.c      |   83 +++--
 drivers/net/wireless/rt2x00/rt2500pci.h      |   40 ++-
 drivers/net/wireless/rt2x00/rt2500usb.c      |  208 ++++++++--
 drivers/net/wireless/rt2x00/rt2500usb.h      |   39 ++-
 drivers/net/wireless/rt2x00/rt2x00.h         |   47 ++-
 drivers/net/wireless/rt2x00/rt2x00config.c   |   12 +-
 drivers/net/wireless/rt2x00/rt2x00debug.c    |   26 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c      |  308 ++++++--------
 drivers/net/wireless/rt2x00/rt2x00firmware.c |    6 +-
 drivers/net/wireless/rt2x00/rt2x00lib.h      |    4 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c      |  111 ++++--
 drivers/net/wireless/rt2x00/rt2x00pci.c      |  127 ++----
 drivers/net/wireless/rt2x00/rt2x00pci.h      |    3 +
 drivers/net/wireless/rt2x00/rt2x00reg.h      |   27 +-
 drivers/net/wireless/rt2x00/rt2x00rfkill.c   |    6 +-
 drivers/net/wireless/rt2x00/rt2x00ring.h     |   29 +-
 drivers/net/wireless/rt2x00/rt2x00usb.c      |  235 +++--------
 drivers/net/wireless/rt2x00/rt2x00usb.h      |    9 +-
 drivers/net/wireless/rt2x00/rt61pci.c        |  617 ++++++++++++++++++--------
 drivers/net/wireless/rt2x00/rt61pci.h        |   87 ++++-
 drivers/net/wireless/rt2x00/rt73usb.c        |  471 +++++++++++++-------
 drivers/net/wireless/rt2x00/rt73usb.h        |   65 +++-
 23 files changed, 1615 insertions(+), 982 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-09-25 18:52 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-09-25 18:52 UTC (permalink / raw)
  To: John W. Linville, linux-wireless, rt2400-devel

Hi John,

(Finally) the rt2x00 2.0.9 release containing the patches
for the API changes from the mac80211-misc git tree.

NOTE: currently rt2x00.git is branched off from the mac80211-misc
tree to make the porting easier and to allow early testing.
So you might want to pull that tree before pulling rt2x00.

This release contains several bug fixes especially some kernel
panics during rmmod have been fixed by Modestas Vainius.

---

The following changes since commit 4cceb887147261d7fd9fe7ce3b6d6f236c8300bc:
  Michael Wu (1):
        adm8211: Adapt to filter configuration API

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (11):
      rt2x00: Correct error in calculating rssi for link tuner
      rt2x00: Make *_beacon_update static
      rt2x00: Increase rt2x00usb_vendor_request timeout.
      rt2x00: Correctly identify rt2561turbo
      rt2x00: adapt to filter configuration API
      rt2x00: Reorganize rt2x00dev->flags
      rt2x00: Add rt2x00dev->flags to debugfs
      rt2x00: Stop link tuning when radio is down
      rt2x00: Fix obvious typo in comment
      rt2x00: Fix panic on rmmod with rfkill enabled
      rt2x00: Release rt2x00 2.0.9

Modestas Vainius (1):
      rt2x00: make rt2x00lib_stop_link_tuner() reentrant with link_tuner work

 drivers/net/wireless/rt2x00/rt2400pci.c    |  159 +++++++++++++-----------
 drivers/net/wireless/rt2x00/rt2500pci.c    |  171 ++++++++++++++------------
 drivers/net/wireless/rt2x00/rt2500usb.c    |  181 ++++++++++++++++------------
 drivers/net/wireless/rt2x00/rt2x00.h       |   70 ++++-------
 drivers/net/wireless/rt2x00/rt2x00config.c |   75 +-----------
 drivers/net/wireless/rt2x00/rt2x00debug.c  |   37 ++++++
 drivers/net/wireless/rt2x00/rt2x00dev.c    |  109 +++++++++++++-----
 drivers/net/wireless/rt2x00/rt2x00lib.h    |    4 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c    |  155 ++++++++----------------
 drivers/net/wireless/rt2x00/rt2x00pci.c    |   31 ++---
 drivers/net/wireless/rt2x00/rt2x00rfkill.c |   14 +--
 drivers/net/wireless/rt2x00/rt2x00ring.h   |   17 +++-
 drivers/net/wireless/rt2x00/rt2x00usb.c    |   26 ++---
 drivers/net/wireless/rt2x00/rt2x00usb.h    |    8 +-
 drivers/net/wireless/rt2x00/rt61pci.c      |  172 ++++++++++++++------------
 drivers/net/wireless/rt2x00/rt73usb.c      |  179 ++++++++++++++++------------
 drivers/net/wireless/rt2x00/rt73usb.h      |    2 +-
 17 files changed, 728 insertions(+), 682 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-10-06 12:19 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-10-06 12:19 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the rt2x00 2.0.10 update.
Some obvious bugs have been fixed, some not so obvious bugs,
and the code has been cleaned up a bit by moving more
into rt2x00lib.

Note that as of now rt2x00.git will be branched from the wireless-2.6
git tree. I see wireless-dev has already been removed/renamed so
I won't be using that anymore. ;)

All indivual patches can also be found here:
http://kernel.org//pub/linux/kernel/people/ivd/rt2x00-2.0.10/

Ivo

---

The following changes since commit f88cf9b6d7c8dad6eb64a972a753584b8006c545:
  John W. Linville (1):
        zd1211rw-mac80211: undo print_mac API stuff

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (16):
      rt2x00: Remove duplicate code in MAC & BSSID handling
      rt2x00: Remove radio check from rt2x00lib_toggle_rx
      rt2x00: Store "STARTED" state during suspend
      rt2x00: Move rt2x00dev flags into enumeration
      rt2x00: Don't use changed_flags inside configure_packet_filter
      rt2x00: Fix rfkill handling
      rt2x00: Move TSF sync values into rt2x00config
      rt2x00: get_duration expects values in 100kbs
      rt2x00: Cut lines down to 80 characters
      rt2x00: Add get_tx_data_len callback function
      rt2x00: Pass dev_state to rt2x00lib_toggle_rx
      rt2x00: Small optimizations
      rt2x00: Reorganize configuration handler
      rt2x00: Clean disabling of rt73usb_get_tsf
      rt2x00: Allways memset memory obtained from skb_push()
      rt2x00: Release 2.0.10

 drivers/net/wireless/rt2x00/rt2400pci.c    |  186 ++++++++++----------------
 drivers/net/wireless/rt2x00/rt2500pci.c    |  201 +++++++++++-----------------
 drivers/net/wireless/rt2x00/rt2500usb.c    |  200 ++++++++++++----------------
 drivers/net/wireless/rt2x00/rt2x00.h       |   93 ++++++++++---
 drivers/net/wireless/rt2x00/rt2x00config.c |  113 +++++++++++++++-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |   52 +++++---
 drivers/net/wireless/rt2x00/rt2x00lib.h    |   14 +--
 drivers/net/wireless/rt2x00/rt2x00mac.c    |   38 +++++-
 drivers/net/wireless/rt2x00/rt2x00reg.h    |    9 ++
 drivers/net/wireless/rt2x00/rt2x00rfkill.c |    4 +-
 drivers/net/wireless/rt2x00/rt2x00usb.c    |   29 +++--
 drivers/net/wireless/rt2x00/rt61pci.c      |  166 +++++++----------------
 drivers/net/wireless/rt2x00/rt73usb.c      |  195 +++++++++++----------------
 13 files changed, 642 insertions(+), 658 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-10-13 14:27 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-10-13 14:27 UTC (permalink / raw)
  To: John W. Linville; +Cc: rt2400-devel, linux-wireless

Hi John,

Here is the rt2x00 2.0.11 update.
Highlights for this release are the fix for the TX problems,
and the implementation of the Software Diversity Antenna.

All indivual patches can also be found here:
http://kernel.org//pub/linux/kernel/people/ivd/rt2x00-2.0.11/

Ivo

---

The following changes since commit 2d46d1e00056de79e54c622a60f7e6f8818f6cb4:
  Mattias Nissler (1):
        mac80211: Defer setting of RX_FLAG_DECRYPTED.

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (9):
      rt2x00: Move quality statistics into seperate structure
      rt2x00: Use enum defines
      rt2x00: Correctly translate mac80211 antenna setup to rt2x00
      rt2x00: SW diversity should default to antenna B
      rt2x00: Remove rt2x00_clear_link
      rt2x00: Implement SW diversity
      rt2x00: Cleanup if-statements
      rt2x00: Add new rt73usb USB ID
      rt2x00: Release rt2x00 2.0.11

Mattias Nissler (2):
      rt2x00: Fix residual check in PLCP calculations.
      rt2x00: Fix antenna selection.

 drivers/net/wireless/rt2x00/rt2400pci.c    |   80 +++++++-----
 drivers/net/wireless/rt2x00/rt2500pci.c    |   88 ++++++------
 drivers/net/wireless/rt2x00/rt2500usb.c    |   84 +++++++-----
 drivers/net/wireless/rt2x00/rt2500usb.h    |   13 ++-
 drivers/net/wireless/rt2x00/rt2x00.h       |  165 +++++++++++++++++------
 drivers/net/wireless/rt2x00/rt2x00config.c |   85 +++++++++++-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |  201 ++++++++++++++++++++++++----
 drivers/net/wireless/rt2x00/rt2x00lib.h    |    2 +
 drivers/net/wireless/rt2x00/rt61pci.c      |  116 +++++++++--------
 drivers/net/wireless/rt2x00/rt73usb.c      |   87 +++++++------
 10 files changed, 645 insertions(+), 276 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-10-27 11:34 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-10-27 11:34 UTC (permalink / raw)
  To: John W. Linville; +Cc: rt2400-devel, linux-wireless

Hi John,

Here is the 2.0.12 release of rt2x00.
I noticed you only pulled 2 patches from the 2.0.11 release,
and I don't know why you dropped the remaining patches.
This means that this pull requests also contains the remaining
2.0.11 patches...

Lots of bugfixes this time, finally rfkill is working, link speeds issues
have been resolved and some packet loss issues are gone.

All indivual patches can also be found here:
http://kernel.org//pub/linux/kernel/people/ivd/rt2x00-2.0.12/

Ivo

---

The following changes since commit 0119130478b1706232d79c768cb587c5e0c615de:
  John W. Linville (1):
        Merge branch 'fixes-jgarzik' into everything

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Adam Baker (2):
      rt2x00: Unconstify rt2x00dev
      rt2x00: Place mutex around USB register access

Ivo van Doorn (15):
      rt2x00: Move quality statistics into seperate structure
      rt2x00: Use enum defines
      rt2x00: Correctly translate mac80211 antenna setup to rt2x00
      rt2x00: SW diversity should default to antenna B
      rt2x00: Remove rt2x00_clear_link
      rt2x00: Implement SW diversity
      rt2x00: Cleanup if-statements
      rt2x00: Release rt2x00 2.0.11
      rt2x00: Disable RX when switching antenna
      rt2x00: Split rt61/rt73 antenna selection into RX and TX antenna
      rt2x00: Input-polldev requires input device
      rt2x00: Detect initial rfkill state on register
      rt2x00: Remove unused variables
      rt2x00: Remove data_desc structure
      rt2x00: Release rt2x00 2.0.12

Mattias Nissler (4):
      rt2x00: Fix antenna selection.
      rt2x00: Rework rt61 antenna selection.
      rt2x00: Rework rt73 antenna selection
      rt2x00: Correctly set ACK bit in tx descriptors

 drivers/net/wireless/rt2x00/rt2400pci.c    |  104 +++++----
 drivers/net/wireless/rt2x00/rt2400pci.h    |    4 +-
 drivers/net/wireless/rt2x00/rt2500pci.c    |  112 +++++-----
 drivers/net/wireless/rt2x00/rt2500pci.h    |    4 +-
 drivers/net/wireless/rt2x00/rt2500usb.c    |  169 +++++++++-----
 drivers/net/wireless/rt2x00/rt2500usb.h    |   17 ++-
 drivers/net/wireless/rt2x00/rt2x00.h       |  192 ++++++++++++----
 drivers/net/wireless/rt2x00/rt2x00config.c |   95 ++++++++-
 drivers/net/wireless/rt2x00/rt2x00debug.h  |    4 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |  212 +++++++++++++++---
 drivers/net/wireless/rt2x00/rt2x00lib.h    |    2 +
 drivers/net/wireless/rt2x00/rt2x00pci.c    |    4 +-
 drivers/net/wireless/rt2x00/rt2x00pci.h    |    8 +-
 drivers/net/wireless/rt2x00/rt2x00rfkill.c |   44 ++++-
 drivers/net/wireless/rt2x00/rt2x00ring.h   |   23 +--
 drivers/net/wireless/rt2x00/rt2x00usb.c    |   38 +++-
 drivers/net/wireless/rt2x00/rt2x00usb.h    |   19 +-
 drivers/net/wireless/rt2x00/rt61pci.c      |  332 ++++++++++++++--------------
 drivers/net/wireless/rt2x00/rt61pci.h      |   14 +-
 drivers/net/wireless/rt2x00/rt73usb.c      |  198 ++++++++++-------
 drivers/net/wireless/rt2x00/rt73usb.h      |   14 +-
 21 files changed, 1071 insertions(+), 538 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2007-11-27 20:46 Ivo van Doorn
  2007-11-27 20:54 ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2007-11-27 20:46 UTC (permalink / raw)
  To: John W. Linville, linux-wireless, rt2400-devel

Hi John,

Here is the latest version of rt2x00.

Please merge the patches for 2.6.24
09 - Only update rssi average approximation on receiving beacon frames.
10 - Remove redundant code in rfkill setup
11 - Cleanup rfkill

All other patches can wait for 2.6.25, since they are code cleanups and the
new TX/RX frame dumping facility through debugfs.

Ivo

---

The following changes since commit 301df40749bdf144c72637795ba93d82e4b84682:
  Johannes Berg (1):
        mac80211: remove more forgotten code

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (9):
      rt2x00: Replace DRV_NAME with KBUILD_MODNAME
      rt2x00: Extend PLCP descriptor definition for rt2400pci
      rt2x00: Move register value/offset files into new folder
      rt2x00: Add chipset version to chipset debugfs entry
      rt2x00: Add skb descriptor
      rt2x00: Add TX/RX frame dumping facility
      rt2x00: Use IEEE80211_IF_TYPE_INVALID directly
      rt2x00: Cleanup rfkill
      rt2x00: Release rt2x00 2.0.13

Larry Finger (1):
      rt2x00: Remove redundant code in rfkill setup

Mattias Nissler (1):
      rt2x00: Only update rssi average approximation on receiving beacon frames.

 drivers/net/wireless/rt2x00/rt2400pci.c      |   49 ++----
 drivers/net/wireless/rt2x00/rt2400pci.h      |   20 ++-
 drivers/net/wireless/rt2x00/rt2500pci.c      |    9 +-
 drivers/net/wireless/rt2x00/rt2500usb.c      |   39 +++--
 drivers/net/wireless/rt2x00/rt2x00.h         |   26 ++-
 drivers/net/wireless/rt2x00/rt2x00config.c   |    5 -
 drivers/net/wireless/rt2x00/rt2x00debug.c    |  240 +++++++++++++++++++++++---
 drivers/net/wireless/rt2x00/rt2x00dev.c      |   93 ++++++----
 drivers/net/wireless/rt2x00/rt2x00firmware.c |    5 -
 drivers/net/wireless/rt2x00/rt2x00lib.h      |    6 +
 drivers/net/wireless/rt2x00/rt2x00mac.c      |    7 +-
 drivers/net/wireless/rt2x00/rt2x00pci.c      |   59 +++++--
 drivers/net/wireless/rt2x00/rt2x00rfkill.c   |   15 --
 drivers/net/wireless/rt2x00/rt2x00ring.h     |   22 +++
 drivers/net/wireless/rt2x00/rt2x00usb.c      |   41 +++--
 drivers/net/wireless/rt2x00/rt61pci.c        |   36 +++--
 drivers/net/wireless/rt2x00/rt73usb.c        |   36 +++--
 17 files changed, 484 insertions(+), 224 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2007-11-27 20:46 Ivo van Doorn
@ 2007-11-27 20:54 ` Ivo van Doorn
  2007-11-29 22:26   ` John W. Linville
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2007-11-27 20:54 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi,

> Please merge the patches for 2.6.24
> 09 - Only update rssi average approximation on receiving beacon frames.
> 10 - Remove redundant code in rfkill setup
> 11 - Cleanup rfkill

Sorry that should be:
08 - Only update rssi average approximation on receiving beacon frames.
09 - Remove redundant code in rfkill setup
10 - Cleanup rfkill

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2007-11-27 20:54 ` Ivo van Doorn
@ 2007-11-29 22:26   ` John W. Linville
  2007-11-30  9:51     ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: John W. Linville @ 2007-11-29 22:26 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linux-wireless, rt2400-devel

On Tue, Nov 27, 2007 at 09:54:29PM +0100, Ivo van Doorn wrote:

> > Please merge the patches for 2.6.24

> Sorry that should be:
> 08 - Only update rssi average approximation on receiving beacon frames.
> 09 - Remove redundant code in rfkill setup
> 10 - Cleanup rfkill

Actually it looks to me like 9 and 10 apply to code that isn't in
2.6.24.  8 looks like it is close, but it doesn't quite apply either.
I'll try to massage it in -- hopefully Jeff won't mind the extra
trouble when rebasing...

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2007-11-29 22:26   ` John W. Linville
@ 2007-11-30  9:51     ` Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2007-11-30  9:51 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

On Thursday 29 November 2007, John W. Linville wrote:
> On Tue, Nov 27, 2007 at 09:54:29PM +0100, Ivo van Doorn wrote:
> 
> > > Please merge the patches for 2.6.24
> 
> > Sorry that should be:
> > 08 - Only update rssi average approximation on receiving beacon frames.
> > 09 - Remove redundant code in rfkill setup
> > 10 - Cleanup rfkill
> 
> Actually it looks to me like 9 and 10 apply to code that isn't in
> 2.6.24.  8 looks like it is close, but it doesn't quite apply either.
> I'll try to massage it in -- hopefully Jeff won't mind the extra
> trouble when rebasing...

9 and 10 should apply cleanly since the rfkill code hasn't changed for quite
some time now. In fact I believe it hasn't changed since the initial merge
to 2.6.24-rc.
Anyway, I'll try to create a patch for the upstream-jgarzik branch this weekend,
that would safe you and jeff some work. :)

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-01-06 22:37 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-01-06 22:37 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the 2.0.14 release of rt2x00. Again lots of bugfixes,
and unfortunately we are still not there yet. I am afraid
rt2500usb and rt61pci are lost causes for the 2.6.24 release,
they are both broken, and I haven't figured out what is causing
this.

Next release will contain more interesting stuff, most of those
patches are already done, but due to testing and fine tuning I
have kept those patches back for this release. They primarily
cover basic support for virtual interfaces, led triggers, and some
first patches to make rt2x00lib support rt2800 (Yes, work on those
drivers has begun).

All indivual patches can also be found here:
http://kernel.org//pub/linux/kernel/people/ivd/rt2x00-2.0.14/

Ivo

---
The following changes since commit 2d0811f5ed506397d85792abfd8ef0983f4e8b7c:
  John W. Linville (1):
        fixup 'everything' after 'upstream-davem' rebase and patch modification

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (12):
      rt2x00: Fix chipset debugfs file
      rt2x00: Always call ieee80211_stop_queue() when return NETDEV_TX_BUSY
      rt2x00: Only set the TBCN flag when the interface is configured to send beacons.
      rt2x00: Store queue idx and entry idx in data_ring and data_entry
      rt2x00: Move start() and stop() handlers into rt2x00lib.c
      rt2x00: Put 802.11 data on 4 byte boundary
      rt2x00: Move packet filter flags
      rt2x00: Cleanup write_tx_desc() arguments
      rt2x00: Determine MY_BSS from descriptor
      rt2x00: Move init_txring and init_rxring into rt2x00lib
      rt2x00: Correctly initialize data and desc pointer
      rt2x00: Release rt2x00 2.0.14

 drivers/net/wireless/rt2x00/rt2400pci.c   |  102 +++++++--------------
 drivers/net/wireless/rt2x00/rt2500pci.c   |   88 ++++++------------
 drivers/net/wireless/rt2x00/rt2500usb.c   |   36 +++++---
 drivers/net/wireless/rt2x00/rt2x00.h      |   32 ++++---
 drivers/net/wireless/rt2x00/rt2x00debug.c |   13 +--
 drivers/net/wireless/rt2x00/rt2x00dev.c   |  142 ++++++++++++++++++++++++-----
 drivers/net/wireless/rt2x00/rt2x00lib.h   |    4 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c   |   59 +++---------
 drivers/net/wireless/rt2x00/rt2x00pci.c   |   28 ++++--
 drivers/net/wireless/rt2x00/rt2x00ring.h  |   13 +++
 drivers/net/wireless/rt2x00/rt2x00usb.c   |   87 ++++++++----------
 drivers/net/wireless/rt2x00/rt2x00usb.h   |    5 +-
 drivers/net/wireless/rt2x00/rt61pci.c     |  114 +++++++++---------------
 drivers/net/wireless/rt2x00/rt73usb.c     |   35 ++++---
 14 files changed, 378 insertions(+), 380 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-02-03 14:41 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-02-03 14:41 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the 2.1.0 release of rt2x00.
The most important changes in this release:
 - Queue handling overhaul
 - Multiple virtual AP interfaces support for rt61 and rt73
 - LED class support
 - Adhoc & master mode enabled

Note that this patch series is _not_ intended for 2.6.25,
a lot might still be broken because the code has changed so much.
Adhoc and master mode is only enabled for testing purposes, in no way
it means that it is working for all drivers...

With these changes adding support for rt2800pci and rt2800usb will
be easier as well. Hopefully I can soon provide an initial version for
those 2 drivers as well.

All indivual patches can also be found here:
http://kernel.org//pub/linux/kernel/people/ivd/rt2x00-2.1.0/

Ivo

---

The following changes since commit e0e6138382c56aa99a1aabe5dddddbb332b5a4f8:
  Stefano Brivio (1):
        rc80211-pid: fix rate adjustment

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Adam Baker (1):
      rt2x00: don't write past the end when writing short descriptors on rt61

Ivo van Doorn (18):
      rt2x00: Update copyright notice
      rt2x00: Queue handling overhaul
      rt2x00: Add new USB ID to rt2500usb
      rt2x00: Fix tx parameter initialization
      rt2x00: Enable master and adhoc mode again
      rt2x00: Driver requiring firmware should select crc algo
      rt2x00: Add per-interface structure
      rt2x00: Rate structure overhaul
      rt2x00: Remove HWMODE_{A,B,G}
      rt2x00: Remove TX_MGMT queue usage
      rt2x00: Initialize QID from queue->qid
      rt2x00: Use ieee80211_channel_to_frequency()
      rt2x00: Make use of MAC80211_LED_TRIGGERS
      rt2x00: Enable LED class support for rt2500usb/rt73usb
      rt2x00: Fix rate initialization
      rt2x00: Move beacon and atim queue defines into rt2x00
      rt2x00: Fix queue index handling
      rt2x00: Release rt2x00 2.1.0

 drivers/net/wireless/rt2x00/Kconfig          |   43 ++
 drivers/net/wireless/rt2x00/Makefile         |    6 +-
 drivers/net/wireless/rt2x00/rt2400pci.c      |  431 +++++++++------
 drivers/net/wireless/rt2x00/rt2400pci.h      |    2 +-
 drivers/net/wireless/rt2x00/rt2500pci.c      |  436 +++++++++------
 drivers/net/wireless/rt2x00/rt2500pci.h      |    2 +-
 drivers/net/wireless/rt2x00/rt2500usb.c      |  497 ++++++++++--------
 drivers/net/wireless/rt2x00/rt2500usb.h      |    5 +-
 drivers/net/wireless/rt2x00/rt2x00.h         |  288 ++++++-----
 drivers/net/wireless/rt2x00/rt2x00config.c   |  140 +++---
 drivers/net/wireless/rt2x00/rt2x00debug.c    |   34 +-
 drivers/net/wireless/rt2x00/rt2x00debug.h    |    2 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c      |  756 +++++++++++---------------
 drivers/net/wireless/rt2x00/rt2x00dump.h     |    8 +-
 drivers/net/wireless/rt2x00/rt2x00firmware.c |   43 ++-
 drivers/net/wireless/rt2x00/rt2x00leds.c     |  217 ++++++++
 drivers/net/wireless/rt2x00/rt2x00leds.h     |   63 +++
 drivers/net/wireless/rt2x00/rt2x00lib.h      |  100 ++++-
 drivers/net/wireless/rt2x00/rt2x00mac.c      |  221 +++++---
 drivers/net/wireless/rt2x00/rt2x00pci.c      |  238 ++++-----
 drivers/net/wireless/rt2x00/rt2x00pci.h      |   57 ++-
 drivers/net/wireless/rt2x00/rt2x00queue.c    |  295 ++++++++++
 drivers/net/wireless/rt2x00/rt2x00queue.h    |  447 +++++++++++++++
 drivers/net/wireless/rt2x00/rt2x00reg.h      |   75 +---
 drivers/net/wireless/rt2x00/rt2x00rfkill.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2x00ring.h     |  290 ----------
 drivers/net/wireless/rt2x00/rt2x00usb.c      |  345 ++++++++-----
 drivers/net/wireless/rt2x00/rt2x00usb.h      |  179 +++++--
 drivers/net/wireless/rt2x00/rt61pci.c        |  601 +++++++++++----------
 drivers/net/wireless/rt2x00/rt61pci.h        |   21 +-
 drivers/net/wireless/rt2x00/rt73usb.c        |  468 +++++++++-------
 drivers/net/wireless/rt2x00/rt73usb.h        |   20 +-
 32 files changed, 3831 insertions(+), 2501 deletions(-)
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00leds.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00leds.h
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00queue.c
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00queue.h
 delete mode 100644 drivers/net/wireless/rt2x00/rt2x00ring.h

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-02-10 21:46 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-02-10 21:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is a quick followup release labeled 2.1.1. The previous release
contained many bugs as it was mostly untested. Result was there
were critical issues with it, of which some have now been fixed.

The most critical issues are random panics due to corrupt memory access,
at the moment none of the drivers are displaying any activity yet where
rt73usb is still crashing at random times.

Ivo

---

The following changes since commit d86916b7d36c4f0db8634fcc17fe2d747b317f17:
  John W. Linville (1):
        Merge branch 'at76' into everything

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Adam Baker (1):
      rt2x00: correct address calc for queue private data

Ivo van Doorn (13):
      rt2x00: Fix invalid DMA free
      rt2x00: Make rt2x00 less verbose
      rt2x00: Remove MGMT ring initialization
      rt2x00: Select CONFIG_NEW_LEDS
      rt2x00: make csr_cache and csr_addr an union
      rt2x00: Fix scheduling while atomic errors in usb drivers
      rt2x00: Add queue statistics to debugfs
      rt2x00: Fix typo in debug statement
      rt2x00: Fix skbdesc->data_len initialization
      rt2x00: Fix queue->qid initialization
      rt2x00: Cleanup Makefile
      rt2x00: Kill guardian urb during disable_radio
      rt2x00: Release rt2x00 2.1.1

 drivers/net/wireless/rt2x00/Kconfig       |    1 +
 drivers/net/wireless/rt2x00/Makefile      |   41 +++++-------
 drivers/net/wireless/rt2x00/rt2400pci.c   |    4 -
 drivers/net/wireless/rt2x00/rt2500pci.c   |    4 -
 drivers/net/wireless/rt2x00/rt2500usb.c   |    6 +--
 drivers/net/wireless/rt2x00/rt2x00.h      |   12 ++--
 drivers/net/wireless/rt2x00/rt2x00debug.c |   90 ++++++++++++++++++++++----
 drivers/net/wireless/rt2x00/rt2x00mac.c   |    9 +++-
 drivers/net/wireless/rt2x00/rt2x00pci.c   |   99 +++++++++++++++++++---------
 drivers/net/wireless/rt2x00/rt2x00pci.h   |    8 +-
 drivers/net/wireless/rt2x00/rt2x00queue.c |   36 ++++++-----
 drivers/net/wireless/rt2x00/rt2x00usb.c   |   37 ++++++++---
 drivers/net/wireless/rt2x00/rt61pci.c     |    8 +--
 drivers/net/wireless/rt2x00/rt61pci.h     |    2 +-
 drivers/net/wireless/rt2x00/rt73usb.c     |    8 +--
 15 files changed, 231 insertions(+), 134 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-02-17 16:30 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-02-17 16:30 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the 2.1.2 release of rt2x00. Several important bugfixes like a
partial return of TX/RX activity in the PCI drivers.

Note that _none_ of the drivers (PCI or USB) are in a good shape since the
2.1.0 release. With partial RX/TX activity we are at least now on a similar
behavior as the 2.0.14 version inside kernel 2.6.25.

Speaking of the 2.6.25 kernel, it seems that rt2x00 is not in an all too good
shape in there. If more reports about broken TX/RX come in I will consider
reverting a lot of patches to make rt2x00 look a lot like the version in 2.6.24.
That version wasn't good either, but at least people can't complain about
regressions. ;)

Also note that the git pull request below also contains the patches from
previous pull request. But I noticed that you hadn't pulled in the 2.1.1 release yet.
I won't resent those patches to the list, since there aren't any changes in them
since last week. ;)

Ivo

---
The following changes since commit 2b78397a79d3daa2ba6c633526a7e3b455f9fc73:
  Stefano Brivio (1):
        b43legacy: Add driver load messages

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Adam Baker (1):
      rt2x00: correct address calc for queue private data

Gertjan van Wingerde (1):
      Fix hw mode registration with mac80211.

Ivo van Doorn (23):
      rt2x00: Fix invalid DMA free
      rt2x00: Make rt2x00 less verbose
      rt2x00: Remove MGMT ring initialization
      rt2x00: Select CONFIG_NEW_LEDS
      rt2x00: make csr_cache and csr_addr an union
      rt2x00: Fix scheduling while atomic errors in usb drivers
      rt2x00: Add queue statistics to debugfs
      rt2x00: Fix typo in debug statement
      rt2x00: Fix skbdesc->data_len initialization
      rt2x00: Fix queue->qid initialization
      rt2x00: Cleanup Makefile
      rt2x00: Kill guardian urb during disable_radio
      rt2x00: Release rt2x00 2.1.1
      rt2x00: Send frames out with configured TX power
      rt2x00: Don't report driver generated frames to tx_status()
      rt2x00: Fix Descriptor DMA initialization
      rt2x00: Filter ACK_CTS based on FIF_CONTROL
      rt2x00: Remove reset_tsf()
      rt2x00: Rename dscape -> mac80211
      rt2x00: Cleanup mode registration
      rt2x00: Remove async vendor request calls from rt2x00usb
      rt2x00: Fix MAC address defines in rt61pci
      rt2x00: Release rt2x00 2.1.2

 drivers/net/wireless/rt2x00/Kconfig       |    3 +-
 drivers/net/wireless/rt2x00/Makefile      |   41 ++++-------
 drivers/net/wireless/rt2x00/rt2400pci.c   |   39 ++++------
 drivers/net/wireless/rt2x00/rt2400pci.h   |    6 +-
 drivers/net/wireless/rt2x00/rt2500pci.c   |   38 ++++------
 drivers/net/wireless/rt2x00/rt2500pci.h   |    4 +-
 drivers/net/wireless/rt2x00/rt2500usb.c   |   23 ++++---
 drivers/net/wireless/rt2x00/rt2500usb.h   |    4 +-
 drivers/net/wireless/rt2x00/rt2x00.h      |   50 ++++++++-----
 drivers/net/wireless/rt2x00/rt2x00debug.c |   90 ++++++++++++++++++++----
 drivers/net/wireless/rt2x00/rt2x00dev.c   |  100 +++++++++++++++------------
 drivers/net/wireless/rt2x00/rt2x00lib.h   |    5 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c   |   24 ++++++-
 drivers/net/wireless/rt2x00/rt2x00pci.c   |  108 +++++++++++++++++++---------
 drivers/net/wireless/rt2x00/rt2x00pci.h   |   14 ++--
 drivers/net/wireless/rt2x00/rt2x00queue.c |   36 +++++----
 drivers/net/wireless/rt2x00/rt2x00queue.h |   12 +++-
 drivers/net/wireless/rt2x00/rt2x00usb.c   |   90 +++++++-----------------
 drivers/net/wireless/rt2x00/rt2x00usb.h   |   18 -----
 drivers/net/wireless/rt2x00/rt61pci.c     |   54 ++++++--------
 drivers/net/wireless/rt2x00/rt61pci.h     |   12 ++--
 drivers/net/wireless/rt2x00/rt73usb.c     |   56 +++++++--------
 drivers/net/wireless/rt2x00/rt73usb.h     |    4 +-
 23 files changed, 453 insertions(+), 378 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-02-25 22:20 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-02-25 22:20 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the 2.1.3 release of rt2x00.
Most bugfixes concentrate on the link tuner issues reported for
the rt2x00 2.0.14 version inside kernel 2.6.25.
One additional fix for rt61pci is present where the recent
"mode->band" changes in mac80211 contained a bug for rt61pci.

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-03-09 21:37 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-03-09 21:37 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

This is the latest version of rt2x00: 2.1.4

All drivers are now showing excellent progress, rt2400pci, rt2500pci, rt61pci and rt73usb
seem to be working as expected now. And only rt2500usb is spoiling things by having
only a working RX but no TX.

After this patch series, it is highly likely you can close a lot of rt2x00 related bugs
in the Fedora bugzilla. :)
Ivo

---
The following changes since commit 4f739cf30891f277a6353d61275489528fab64e3:
  Pavel Roskin (1):
        at76_usb: make the driver depend on MAC80211

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Adam Baker (2):
      rt2x00: never disable multicast because it disables broadcast too
      rt2x00:correct rx packet length for USB devices

Ivo van Doorn (18):
      rt2x00: Align RX descriptor to 4 bytes
      rt2x00: Don't use uninitialized desc_len
      rt2x00: Use skbdesc fields for descriptor initialization
      rt2x00: Add new D-Link USB ID
      rt2x00: Only disable beaconing just before beacon update
      rt2x00: Upgrade queue->lock to use irqsave
      rt2x00: Move firmware checksumming to driver
      rt2x00: Start bugging when rt2x00lib doesn't filter SW diversity
      rt2x00: Check IEEE80211_TXCTL_SEND_AFTER_DTIM flag
      rt2x00: Rename config_preamble() to config_erp()
      rt2x00: Add suspend/resume handlers to rt2x00rfkill
      rt2x00: Make rt2x00leds_register return void
      rt2x00: Always enable TSF ticking
      rt2x00: Fix basic rate initialization
      rt2x00: Fix compile error when rfkill is disabled
      rt2x00: Fix RX DMA ring initialization
      rt2x00: Fix rt2400pci signal
      rt2x00: Release rt2x00 2.1.4

Luis Correia (1):
      rt2x00: Fix trivial log message

Mattias Nissler (3):
      rt2x00: Initialize TX control field in data entries
      rt2x00: Use the correct size when copying the control info in txdone
      rt2x00: Don't use unitialized rxdesc->size

 drivers/net/wireless/rt2x00/Kconfig          |    4 +-
 drivers/net/wireless/rt2x00/rt2400pci.c      |   67 +++++++------
 drivers/net/wireless/rt2x00/rt2400pci.h      |    6 +-
 drivers/net/wireless/rt2x00/rt2500pci.c      |   71 ++++++++------
 drivers/net/wireless/rt2x00/rt2500usb.c      |   97 ++++++++++---------
 drivers/net/wireless/rt2x00/rt2x00.h         |   31 ++++--
 drivers/net/wireless/rt2x00/rt2x00config.c   |   62 +++++++-----
 drivers/net/wireless/rt2x00/rt2x00debug.c    |    5 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c      |  108 +++++++++------------
 drivers/net/wireless/rt2x00/rt2x00firmware.c |   34 +-------
 drivers/net/wireless/rt2x00/rt2x00leds.c     |    7 +-
 drivers/net/wireless/rt2x00/rt2x00lib.h      |   45 ++++-----
 drivers/net/wireless/rt2x00/rt2x00mac.c      |   22 +++--
 drivers/net/wireless/rt2x00/rt2x00pci.c      |    1 +
 drivers/net/wireless/rt2x00/rt2x00queue.c    |   17 ++-
 drivers/net/wireless/rt2x00/rt2x00queue.h    |    3 +
 drivers/net/wireless/rt2x00/rt2x00rfkill.c   |  116 +++++++++++++++--------
 drivers/net/wireless/rt2x00/rt2x00usb.c      |   19 ++++-
 drivers/net/wireless/rt2x00/rt61pci.c        |  104 ++++++++++++--------
 drivers/net/wireless/rt2x00/rt73usb.c        |  131 +++++++++++++++-----------
 20 files changed, 524 insertions(+), 426 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-04-21 17:06 Ivo van Doorn
  2008-05-01  8:29 ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2008-04-21 17:06 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Finally a new official rt2x00 release,
off course I have send a lot of patches over the past few weeks
with several bugfixes, but now I am bumping the versions to 2.1.5.

Please consider this patch series for the 2.6.26 kernel,
they are all either bugfixes or minor cleanups.
with the exception of "[PATCH 4/9] rt2x00: Use rt2x00 queue numbering"
which besides a cleanup will also help with the pending mac80211
queue reorganization to QDisc.

Ivo

PS. Don't be alarmed over the "The following changes since commit"
line below which indicates "mac80211: Add IEEE80211_KEY_FLAG_PAIRWISE"
is used as basis. That patch is _not_ present in the rt2x00.git upstream branch
and none of the following patches depend on that patch.

---
The following changes since commit c8b29c460a389a8561189ad2a77fcb697ef35df9:
  Ivo van Doorn (1):
        mac80211: Add IEEE80211_KEY_FLAG_PAIRWISE

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (9):
      rt2x00: Support hardware RTS and CTS-to-self frames
      rt2x00: Remove DRIVER_SUPPORT_MIXED_INTERFACES
      rt2x00: Don't enable short preamble for 1MBs
      rt2x00: Use rt2x00 queue numbering
      rt2x00: Fix quality/activity led handling
      rt2x00: Clarify supported chipsets in Kconfig
      rt2x00: Add helper macros
      rt2x00: Fix kernel-doc
      rt2x00: Release rt2x00 2.1.5

 drivers/net/wireless/rt2x00/Kconfig       |   55 +++++++++++++++++------------
 drivers/net/wireless/rt2x00/rt2400pci.c   |   36 +++++++------------
 drivers/net/wireless/rt2x00/rt2500pci.c   |   39 +++++++-------------
 drivers/net/wireless/rt2x00/rt2500usb.c   |   22 ++++-------
 drivers/net/wireless/rt2x00/rt2x00.h      |   18 ++++-----
 drivers/net/wireless/rt2x00/rt2x00dev.c   |    5 ++-
 drivers/net/wireless/rt2x00/rt2x00leds.c  |   15 ++++++++
 drivers/net/wireless/rt2x00/rt2x00lib.h   |    6 +++
 drivers/net/wireless/rt2x00/rt2x00mac.c   |   31 +++++++++-------
 drivers/net/wireless/rt2x00/rt2x00pci.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2x00pci.h   |    6 ++-
 drivers/net/wireless/rt2x00/rt2x00queue.c |    6 ++--
 drivers/net/wireless/rt2x00/rt2x00queue.h |   40 +++++++++++++-------
 drivers/net/wireless/rt2x00/rt2x00usb.c   |    4 +-
 drivers/net/wireless/rt2x00/rt2x00usb.h   |   21 +++++++++--
 drivers/net/wireless/rt2x00/rt61pci.c     |   29 +++++----------
 drivers/net/wireless/rt2x00/rt73usb.c     |   35 +++++++-----------
 17 files changed, 191 insertions(+), 179 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-04-21 17:06 Ivo van Doorn
@ 2008-05-01  8:29 ` Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-05-01  8:29 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, rt2400-devel

Hi John,

> Finally a new official rt2x00 release,
> off course I have send a lot of patches over the past few weeks
> with several bugfixes, but now I am bumping the versions to 2.1.5.
> 
> Please consider this patch series for the 2.6.26 kernel,

Was this patch series in time for the 2.6.26 merge window?

If not, please consider merging at least the following patches since
they are real bugfixes:

>       rt2x00: Don't enable short preamble for 1MBs
>       rt2x00: Fix quality/activity led handling
>       rt2x00: Clarify supported chipsets in Kconfig

The others are code cleanups which are "nice to have", but could otherwise
wait for 2.6.27.

>       rt2x00: Support hardware RTS and CTS-to-self frames
>       rt2x00: Remove DRIVER_SUPPORT_MIXED_INTERFACES
>       rt2x00: Use rt2x00 queue numbering
>       rt2x00: Add helper macros
>       rt2x00: Fix kernel-doc
>       rt2x00: Release rt2x00 2.1.5

Thanks,

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
@ 2008-05-02 21:04 Scott White
  2008-05-02 21:25 ` Ivo van Doorn
  2008-05-05 17:31 ` John W. Linville
  0 siblings, 2 replies; 89+ messages in thread
From: Scott White @ 2008-05-02 21:04 UTC (permalink / raw)
  To: linux-wireless


>Was this patch series in time for the 2.6.26 merge window?
>
>If not, please consider merging at least the following patches since
>they are real bugfixes:
>
>>       rt2x00: Don't enable short preamble for 1MBs
>>       rt2x00: Fix quality/activity led handling
>>       rt2x00: Clarify supported chipsets in Kconfig
>
>The others are code cleanups which are "nice to have", but could otherwise
>wait for 2.6.27.

The merge window is still open at this time.  I haven't seen a rc1 yet.  Anyway I saw that only the 3 bugfixes are currently in the queue.  As the owner of several (10 by the university and 2 personal) rt73 usb wireless cards, I would really like it if the latest version 2.1.5 made into 2.6.26.  As someone who has used 2.6.24 and finished compiling 2.6.25 two days ago I find that the driver in both kernels is not good.  Not good means I get a wireless signal and I get data transfers, but the speed fluctuates and have other issues.  However with each release, the problems I have are slowing decreasing.  I have been waiting patiently for 2.6.25-rc1 to have 2.1.5 since 2.1.5 was announced.  I really think all of 2.1.5 should get in 2.6.25-rc1.

Thanks,
_________________________________________________________________
Windows Live SkyDrive lets you share files with faraway friends.
http://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_skydrive_052008

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-02 21:04 Scott White
@ 2008-05-02 21:25 ` Ivo van Doorn
  2008-05-03  6:19   ` Mattias Nissler
  2008-05-03 19:29   ` Scott White
  2008-05-05 17:31 ` John W. Linville
  1 sibling, 2 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-05-02 21:25 UTC (permalink / raw)
  To: Scott White; +Cc: linux-wireless

On Friday 02 May 2008, Scott White wrote:
> 
> >Was this patch series in time for the 2.6.26 merge window?
> >
> >If not, please consider merging at least the following patches since
> >they are real bugfixes:
> >
> >>       rt2x00: Don't enable short preamble for 1MBs
> >>       rt2x00: Fix quality/activity led handling
> >>       rt2x00: Clarify supported chipsets in Kconfig
> >
> >The others are code cleanups which are "nice to have", but could otherwise
> >wait for 2.6.27.
> 
> The merge window is still open at this time.  I haven't seen a rc1 yet.  Anyway I saw that only the 3 bugfixes are currently in the queue.  As the owner of several (10 by the university and 2 personal) rt73 usb wireless cards, I would really like it if the latest version 2.1.5 made into 2.6.26.  As someone who has used 2.6.24 and finished compiling 2.6.25 two days ago I find that the driver in both kernels is not good.  Not good means I get a wireless signal and I get data transfers, but the speed fluctuates and have other issues.  However with each release, the problems I have are slowing decreasing.  I have been waiting patiently for 2.6.25-rc1 to have 2.1.5 since 2.1.5 was announced.  I really think all of 2.1.5 should get in 2.6.25-rc1.

Have you tried forcing the rate to 54Mbit instead of letting the rate selection algorithm doing its work?
It seems to have helped with several other users.

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-02 21:25 ` Ivo van Doorn
@ 2008-05-03  6:19   ` Mattias Nissler
  2008-05-03  9:58     ` Ivo van Doorn
  2008-05-03 19:29   ` Scott White
  1 sibling, 1 reply; 89+ messages in thread
From: Mattias Nissler @ 2008-05-03  6:19 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: Scott White, linux-wireless

On Fri, 2008-05-02 at 23:25 +0200, Ivo van Doorn wrote:
> On Friday 02 May 2008, Scott White wrote:
> > 
> > >Was this patch series in time for the 2.6.26 merge window?
> > >
> > >If not, please consider merging at least the following patches since
> > >they are real bugfixes:
> > >
> > >>       rt2x00: Don't enable short preamble for 1MBs
> > >>       rt2x00: Fix quality/activity led handling
> > >>       rt2x00: Clarify supported chipsets in Kconfig
> > >
> > >The others are code cleanups which are "nice to have", but could otherwise
> > >wait for 2.6.27.
> > 
> > The merge window is still open at this time.  I haven't seen a rc1 yet.  Anyway I saw that only the 3 bugfixes are currently in the queue.  As the owner of several (10 by the university and 2 personal) rt73 usb wireless cards, I would really like it if the latest version 2.1.5 made into 2.6.26.  As someone who has used 2.6.24 and finished compiling 2.6.25 two days ago I find that the driver in both kernels is not good.  Not good means I get a wireless signal and I get data transfers, but the speed fluctuates and have other issues.  However with each release, the problems I have are slowing decreasing.  I have been waiting patiently for 2.6.25-rc1 to have 2.1.5 since 2.1.5 was announced.  I really think all of 2.1.5 should get in 2.6.25-rc1.
> 
> Have you tried forcing the rate to 54Mbit instead of letting the rate selection algorithm doing its work?
> It seems to have helped with several other users.

For rt73? IIRC the rate selection algo does not work at all for that
device, because we cannot report failed frames. Or have you done
anything about that I might have missed, Ivo? If not, the rate is
probably fixed at 54Mbit anyway.

Mattias


^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-03  6:19   ` Mattias Nissler
@ 2008-05-03  9:58     ` Ivo van Doorn
  2008-05-03 10:18       ` Mattias Nissler
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2008-05-03  9:58 UTC (permalink / raw)
  To: Mattias Nissler; +Cc: Scott White, linux-wireless

On Saturday 03 May 2008, Mattias Nissler wrote:
> On Fri, 2008-05-02 at 23:25 +0200, Ivo van Doorn wrote:
> > On Friday 02 May 2008, Scott White wrote:
> > > 
> > > >Was this patch series in time for the 2.6.26 merge window?
> > > >
> > > >If not, please consider merging at least the following patches since
> > > >they are real bugfixes:
> > > >
> > > >>       rt2x00: Don't enable short preamble for 1MBs
> > > >>       rt2x00: Fix quality/activity led handling
> > > >>       rt2x00: Clarify supported chipsets in Kconfig
> > > >
> > > >The others are code cleanups which are "nice to have", but could otherwise
> > > >wait for 2.6.27.
> > > 
> > > The merge window is still open at this time.  I haven't seen a rc1 yet.  Anyway I saw that only the 3 bugfixes are currently in the queue.  As the owner of several (10 by the university and 2 personal) rt73 usb wireless cards, I would really like it if the latest version 2.1.5 made into 2.6.26.  As someone who has used 2.6.24 and finished compiling 2.6.25 two days ago I find that the driver in both kernels is not good.  Not good means I get a wireless signal and I get data transfers, but the speed fluctuates and have other issues.  However with each release, the problems I have are slowing decreasing.  I have been waiting patiently for 2.6.25-rc1 to have 2.1.5 since 2.1.5 was announced.  I really think all of 2.1.5 should get in 2.6.25-rc1.
> > 
> > Have you tried forcing the rate to 54Mbit instead of letting the rate selection algorithm doing its work?
> > It seems to have helped with several other users.
> 
> For rt73? IIRC the rate selection algo does not work at all for that
> device, because we cannot report failed frames. Or have you done
> anything about that I might have missed, Ivo? If not, the rate is
> probably fixed at 54Mbit anyway.

Well I didn't do anything new, but this line will report rt2x00lib that the
frame was succesfully send or failed to send:
	txdesc.status = !urb->status ? TX_SUCCESS : TX_FAIL_RETRY;
What is missing is the retry count, since that is something that
the USB drivers cannot report. (Unless I grab the max retry count
as configured by mac80211 as the number of retries on failure)

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-03  9:58     ` Ivo van Doorn
@ 2008-05-03 10:18       ` Mattias Nissler
  2008-05-03 15:02         ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Mattias Nissler @ 2008-05-03 10:18 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: Scott White, linux-wireless

On Sat, 2008-05-03 at 11:58 +0200, Ivo van Doorn wrote:
> On Saturday 03 May 2008, Mattias Nissler wrote:
> > On Fri, 2008-05-02 at 23:25 +0200, Ivo van Doorn wrote:
> > > On Friday 02 May 2008, Scott White wrote:
> > > > 
> > > > >Was this patch series in time for the 2.6.26 merge window?
> > > > >
> > > > >If not, please consider merging at least the following patches since
> > > > >they are real bugfixes:
> > > > >
> > > > >>       rt2x00: Don't enable short preamble for 1MBs
> > > > >>       rt2x00: Fix quality/activity led handling
> > > > >>       rt2x00: Clarify supported chipsets in Kconfig
> > > > >
> > > > >The others are code cleanups which are "nice to have", but could otherwise
> > > > >wait for 2.6.27.
> > > > 
> > > > The merge window is still open at this time.  I haven't seen a rc1 yet.  Anyway I saw that only the 3 bugfixes are currently in the queue.  As the owner of several (10 by the university and 2 personal) rt73 usb wireless cards, I would really like it if the latest version 2.1.5 made into 2.6.26.  As someone who has used 2.6.24 and finished compiling 2.6.25 two days ago I find that the driver in both kernels is not good.  Not good means I get a wireless signal and I get data transfers, but the speed fluctuates and have other issues.  However with each release, the problems I have are slowing decreasing.  I have been waiting patiently for 2.6.25-rc1 to have 2.1.5 since 2.1.5 was announced.  I really think all of 2.1.5 should get in 2.6.25-rc1.
> > > 
> > > Have you tried forcing the rate to 54Mbit instead of letting the rate selection algorithm doing its work?
> > > It seems to have helped with several other users.
> > 
> > For rt73? IIRC the rate selection algo does not work at all for that
> > device, because we cannot report failed frames. Or have you done
> > anything about that I might have missed, Ivo? If not, the rate is
> > probably fixed at 54Mbit anyway.
> 
> Well I didn't do anything new, but this line will report rt2x00lib that the
> frame was succesfully send or failed to send:
> 	txdesc.status = !urb->status ? TX_SUCCESS : TX_FAIL_RETRY;
> What is missing is the retry count, since that is something that
> the USB drivers cannot report. (Unless I grab the max retry count
> as configured by mac80211 as the number of retries on failure)

Well, I have just put my rt73 into a metal box. Many frames do fail,
only very few get through pinging my AP. The rate control still keeps
the rate at 54Mbit/s :-) So it seems neither excessive_retries nor the
retry_count in the tx_status struct is set at all.

Mattias


^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-03 10:18       ` Mattias Nissler
@ 2008-05-03 15:02         ` Ivo van Doorn
  2008-05-03 15:27           ` Johannes Berg
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2008-05-03 15:02 UTC (permalink / raw)
  To: Mattias Nissler; +Cc: Scott White, linux-wireless

> > > For rt73? IIRC the rate selection algo does not work at all for that
> > > device, because we cannot report failed frames. Or have you done
> > > anything about that I might have missed, Ivo? If not, the rate is
> > > probably fixed at 54Mbit anyway.
> > 
> > Well I didn't do anything new, but this line will report rt2x00lib that the
> > frame was succesfully send or failed to send:
> > 	txdesc.status = !urb->status ? TX_SUCCESS : TX_FAIL_RETRY;
> > What is missing is the retry count, since that is something that
> > the USB drivers cannot report. (Unless I grab the max retry count
> > as configured by mac80211 as the number of retries on failure)
> 
> Well, I have just put my rt73 into a metal box. Many frames do fail,
> only very few get through pinging my AP. The rate control still keeps
> the rate at 54Mbit/s :-) So it seems neither excessive_retries nor the
> retry_count in the tx_status struct is set at all.

Hmm, perhaps we need some way the driver can inform the rate selection
module about statistics. I mean the hardware does measure the number
of failed TX frames, and the number of retries, but it doesn't set them
in the descriptor but in the hardware.

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-03 15:02         ` Ivo van Doorn
@ 2008-05-03 15:27           ` Johannes Berg
  2008-05-03 15:38             ` Mattias Nissler
  0 siblings, 1 reply; 89+ messages in thread
From: Johannes Berg @ 2008-05-03 15:27 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: Mattias Nissler, Scott White, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]


> Hmm, perhaps we need some way the driver can inform the rate selection
> module about statistics. I mean the hardware does measure the number
> of failed TX frames, and the number of retries, but it doesn't set them
> in the descriptor but in the hardware.

Yes we should have this.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-03 15:27           ` Johannes Berg
@ 2008-05-03 15:38             ` Mattias Nissler
  2008-05-03 16:56               ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Mattias Nissler @ 2008-05-03 15:38 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Ivo van Doorn, Scott White, linux-wireless

On Sat, 2008-05-03 at 17:27 +0200, Johannes Berg wrote:
> > Hmm, perhaps we need some way the driver can inform the rate selection
> > module about statistics. I mean the hardware does measure the number
> > of failed TX frames, and the number of retries, but it doesn't set them
> > in the descriptor but in the hardware.
> 
> Yes we should have this.

New rate control algorithm probably. Or even better: Split what is
currently the rate control algorithm into an link quality estimation
part (failed frames percentage and such) and the actual rate control
that interprets that value and acts accordingly.

Mattias


^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-03 15:38             ` Mattias Nissler
@ 2008-05-03 16:56               ` Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-05-03 16:56 UTC (permalink / raw)
  To: Mattias Nissler; +Cc: Johannes Berg, Scott White, linux-wireless

On Saturday 03 May 2008, Mattias Nissler wrote:
> On Sat, 2008-05-03 at 17:27 +0200, Johannes Berg wrote:
> > > Hmm, perhaps we need some way the driver can inform the rate selection
> > > module about statistics. I mean the hardware does measure the number
> > > of failed TX frames, and the number of retries, but it doesn't set them
> > > in the descriptor but in the hardware.
> > 
> > Yes we should have this.
> 
> New rate control algorithm probably. Or even better: Split what is
> currently the rate control algorithm into an link quality estimation
> part (failed frames percentage and such) and the actual rate control
> that interprets that value and acts accordingly.

Hmm, splitting that up would be nice, especially when the driver
will have access to those failed frame percentages directly.
rt2x00 currently keeps track of these statistics to perform link tuning,
I wouldn't be surprised if other drivers also keep similar statistics for
the same reason.

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* RE: Please pull 'upstream' branch of rt2x00
  2008-05-02 21:25 ` Ivo van Doorn
  2008-05-03  6:19   ` Mattias Nissler
@ 2008-05-03 19:29   ` Scott White
  1 sibling, 0 replies; 89+ messages in thread
From: Scott White @ 2008-05-03 19:29 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linux-wireless


> To: nwi_sub@hotmail.com
> Subject: Re: Please pull 'upstream' branch of rt2x00
> Date: Fri, 2 May 2008 23:25:38 +0200
> CC: linux-wireless@vger.kernel.org
> From: ivdoorn@gmail.com
>
> On Friday 02 May 2008, Scott White wrote:
>>
>>>Was this patch series in time for the 2.6.26 merge window?
>>>
>>>If not, please consider merging at least the following patches since
>>>they are real bugfixes:
>>>
>>>> rt2x00: Don't enable short preamble for 1MBs
>>>> rt2x00: Fix quality/activity led handling
>>>> rt2x00: Clarify supported chipsets in Kconfig
>>>
>>>The others are code cleanups which are "nice to have", but could otherwise
>>>wait for 2.6.27.
>>
>> The merge window is still open at this time. I haven't seen a rc1 yet. Anyway I saw that only the 3 bugfixes are currently in the queue. As the owner of several (10 by the university and 2 personal) rt73 usb wireless cards, I would really like it if the latest version 2.1.5 made into 2.6.26. As someone who has used 2.6.24 and finished compiling 2.6.25 two days ago I find that the driver in both kernels is not good. Not good means I get a wireless signal and I get data transfers, but the speed fluctuates and have other issues. However with each release, the problems I have are slowing decreasing. I have been waiting patiently for 2.6.25-rc1 to have 2.1.5 since 2.1.5 was announced. I really think all of 2.1.5 should get in 2.6.25-rc1.
>
> Have you tried forcing the rate to 54Mbit instead of letting the rate selection algorithm doing its work?
> It seems to have helped with several other users.
>
> Ivo

No I haven't tried that.  However I have 54Mbit (g) at home, but only 11Mbit (b only) at work.  I guess I would have to change the rate when I change locations.

Thanks,

_________________________________________________________________
Make Windows Vista more reliable and secure with Windows Vista Service Pack 1.
http://www.windowsvista.com/SP1?WT.mc_id=hotmailvistasp1banner

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-05-05 15:23 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-05-05 15:23 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here are 3 patches for rt2x00, they are all intended for 2.6.26 since
they fix serious bugs. Patch 1 should prevent problems as reported by
Johannes Berg regarding skb->truesize by removing the only pskb_expand_head()
call in rt2x00 (and use a already existing buffer instead).

Patches 2 and 3 fix problems when DMA allocation fails, that usually doesn't happen,
hence the reason these problems have gone unnoticed for so long. :S

Ivo

---
The following changes since commit 0bacadffc86bcba2fdf2b989afc286a8184664a0:
  Ivo van Doorn (1):
        rt2x00: Fix quality/activity led handling

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Gertjan van Wingerde (1):
      rt2x00: Clean up error handling of PCI queue DMA allocation.

Ivo van Doorn (2):
      rt2x00: Don't use pskb_expand_head()
      rt2x00: Fix broken recover-on-error path

 drivers/net/wireless/rt2x00/rt2x00dev.c |   11 ++++-------
 drivers/net/wireless/rt2x00/rt2x00pci.c |    5 +++--
 drivers/net/wireless/rt2x00/rt61pci.c   |   31 +++++++++++--------------------
 3 files changed, 18 insertions(+), 29 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-02 21:04 Scott White
  2008-05-02 21:25 ` Ivo van Doorn
@ 2008-05-05 17:31 ` John W. Linville
  1 sibling, 0 replies; 89+ messages in thread
From: John W. Linville @ 2008-05-05 17:31 UTC (permalink / raw)
  To: Scott White; +Cc: linux-wireless

On Fri, May 02, 2008 at 04:04:52PM -0500, Scott White wrote:
> 
> >Was this patch series in time for the 2.6.26 merge window?
> >
> >If not, please consider merging at least the following patches since
> >they are real bugfixes:
> >
> >>       rt2x00: Don't enable short preamble for 1MBs
> >>       rt2x00: Fix quality/activity led handling
> >>       rt2x00: Clarify supported chipsets in Kconfig
> >
> >The others are code cleanups which are "nice to have", but could otherwise
> >wait for 2.6.27.
> 
> The merge window is still open at this time.  I haven't seen
> a rc1 yet.  Anyway I saw that only the 3 bugfixes are currently
> in the queue.  As the owner of several (10 by the university and
> 2 personal) rt73 usb wireless cards, I would really like it if the
> latest version 2.1.5 made into 2.6.26.  As someone who has used 2.6.24
> and finished compiling 2.6.25 two days ago I find that the driver in
> both kernels is not good.  Not good means I get a wireless signal and
> I get data transfers, but the speed fluctuates and have other issues.
> However with each release, the problems I have are slowing decreasing.
> I have been waiting patiently for 2.6.25-rc1 to have 2.1.5 since 2.1.5
> was announced.  I really think all of 2.1.5 should get in 2.6.25-rc1.

I'm sorry, but this isn't how the merge window is used.  The merge
window is for merging code that is _already_ pending when the
window opens.  No one should wait for the merge window to open before
sending code to the upstream maintainers.  (I'm not suggesting that
Ivo delayed on purpose, I'm just stating the policy.)

Anything that fixes an actual bug can still go to 2.6.26 over the
next several weeks.  But code that is simply new development will
have to wait for 2.6.27's merge window before it gets to Linus.

Thanks,

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-05-10 11:37 Ivo van Doorn
  2008-05-10 12:48 ` drago01
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2008-05-10 11:37 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, rt2400-devel, Johannes Berg

Hi John,

Here is a new rt2x00 release.
Please note that some patches have been send individually to linux-wireless before,
(including the 2 mac80211 patches) but for completeness I have added them to
this pull request.

This will bump rt2x00 to version 2.1.6, most patches are only intended to make
room for future patches like the mac80211 patch series from Johannes, HW crypto
and pci drivers without a preallocated big chunk of DMA.

Ivo

---
The following changes since commit d30d1674356e223c9f2c164ac9d0be35af8ee4e0:
  Johannes Berg (1):
        mac80211: fix wme code

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Gertjan van Wingerde (3):
      rt2x00: Clean up error handling of PCI queue DMA allocation.
      rt2x00: Fix queue related oops in case of deselected mac80211 multi-queue feature.
      rt2x00: Only initialize the minimum needed fields of PCI TX descriptors.

Ivo van Doorn (13):
      rt2x00: Don't use pskb_expand_head()
      rt2x00: Fix broken recover-on-error path
      mac80211: Don't encrypt beacons
      mac80211: Add RTNL version of ieee80211_iterate_active_interfaces
      rt2x00: trim skb_frame_desc to 32 bytes
      rt2x00: Fix TX status reporting
      rt2x00: Remove ieee80211_tx_control argument from write_tx_desc()
      rt2x00: Preserve descriptor information after memmove()
      rt2x00: Split rt2x00lib_write_tx_desc()
      rt2x00: Remove redundant flags/dev_flags initializations
      rt2x00: Merge RX and TX entry private data
      rt2x00: Remove extra +
      rt2x00: Release rt2x00 2.1.6

 drivers/net/wireless/rt2x00/rt2400pci.c   |  126 +++++++++-------
 drivers/net/wireless/rt2x00/rt2400pci.h   |    5 +
 drivers/net/wireless/rt2x00/rt2500pci.c   |  114 ++++++++------
 drivers/net/wireless/rt2x00/rt2500pci.h   |    5 +
 drivers/net/wireless/rt2x00/rt2500usb.c   |   78 +++++-----
 drivers/net/wireless/rt2x00/rt2500usb.h   |    5 +
 drivers/net/wireless/rt2x00/rt2x00.h      |   48 +++++--
 drivers/net/wireless/rt2x00/rt2x00debug.c |    4 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c   |  190 +++---------------------
 drivers/net/wireless/rt2x00/rt2x00lib.h   |    6 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2x00pci.c   |  105 +++++--------
 drivers/net/wireless/rt2x00/rt2x00pci.h   |   22 +---
 drivers/net/wireless/rt2x00/rt2x00queue.c |  165 ++++++++++++++++++++-
 drivers/net/wireless/rt2x00/rt2x00queue.h |   45 ++++--
 drivers/net/wireless/rt2x00/rt2x00reg.h   |   11 --
 drivers/net/wireless/rt2x00/rt2x00usb.c   |  228 +++++++++++++++-------------
 drivers/net/wireless/rt2x00/rt2x00usb.h   |   17 +--
 drivers/net/wireless/rt2x00/rt61pci.c     |  146 ++++++++++---------
 drivers/net/wireless/rt2x00/rt61pci.h     |    5 +
 drivers/net/wireless/rt2x00/rt73usb.c     |   53 ++++----
 drivers/net/wireless/rt2x00/rt73usb.h     |    5 +
 include/net/mac80211.h                    |   25 +++-
 net/mac80211/tx.c                         |    1 +
 net/mac80211/util.c                       |   37 +++++-
 25 files changed, 794 insertions(+), 654 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-10 11:37 Ivo van Doorn
@ 2008-05-10 12:48 ` drago01
  2008-05-10 13:06   ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: drago01 @ 2008-05-10 12:48 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linville, linux-wireless, rt2400-devel, Johannes Berg

On Sat, May 10, 2008 at 1:37 PM, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> Hi John,
>
> Here is a new rt2x00 release.
> Please note that some patches have been send individually to linux-wireless before,
> (including the 2 mac80211 patches) but for completeness I have added them to
> this pull request.
>
> This will bump rt2x00 to version 2.1.6, most patches are only intended to make
> room for future patches like the mac80211 patch series from Johannes, HW crypto
> and pci drivers without a preallocated big chunk of DMA.
>
> Ivo

whats the current status of rt2860 support?

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-10 12:48 ` drago01
@ 2008-05-10 13:06   ` Ivo van Doorn
  2008-05-10 13:15     ` drago01
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2008-05-10 13:06 UTC (permalink / raw)
  To: drago01; +Cc: linville, linux-wireless, rt2400-devel, Johannes Berg

On Saturday 10 May 2008, drago01 wrote:
> On Sat, May 10, 2008 at 1:37 PM, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> > Hi John,
> >
> > Here is a new rt2x00 release.
> > Please note that some patches have been send individually to linux-wireless before,
> > (including the 2 mac80211 patches) but for completeness I have added them to
> > this pull request.
> >
> > This will bump rt2x00 to version 2.1.6, most patches are only intended to make
> > room for future patches like the mac80211 patch series from Johannes, HW crypto
> > and pci drivers without a preallocated big chunk of DMA.
> >
> > Ivo
> 
> whats the current status of rt2860 support?

Under development.

Ivo

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-05-10 13:06   ` Ivo van Doorn
@ 2008-05-10 13:15     ` drago01
  0 siblings, 0 replies; 89+ messages in thread
From: drago01 @ 2008-05-10 13:15 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linville, linux-wireless, rt2400-devel, Johannes Berg

On Sat, May 10, 2008 at 3:06 PM, Ivo van Doorn <ivdoorn@gmail.com> wrote:
> On Saturday 10 May 2008, drago01 wrote:
>> On Sat, May 10, 2008 at 1:37 PM, Ivo van Doorn <ivdoorn@gmail.com> wrote:
>> > Hi John,
>> >
>> > Here is a new rt2x00 release.
>> > Please note that some patches have been send individually to linux-wireless before,
>> > (including the 2 mac80211 patches) but for completeness I have added them to
>> > this pull request.
>> >
>> > This will bump rt2x00 to version 2.1.6, most patches are only intended to make
>> > room for future patches like the mac80211 patch series from Johannes, HW crypto
>> > and pci drivers without a preallocated big chunk of DMA.
>> >
>> > Ivo
>>
>> whats the current status of rt2860 support?
>
> Under development.

well ok ;)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-06-08 21:41 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-06-08 21:41 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the official pull request for the latest rt2x00.git.
This contains all patches which I had send last tuesday
plus some additional patches intended for 2.6.27.

This series is mostly intended to get the fragmentation
done right. Up until now the drivers never behaved that
nicely with fragmentation or RTS/CTS-to-sellf which was
mostly due because each individual frame forced the
queue to be kicked immediately without waiting for the
other fragments.

It also contains some front work by Gertjan for reducing
DMA requirements in rt2x00 by making use of pci_map_single
on skbuffers instead of preallocating a chunk of DMA.

Ivo

P.S. I won't resend the patches I had send last tuesday
since nothing has changed with them. So only the 10
new patches will be send seperately. I am not sure
if that feature will be ready/stable for 2.6.27 but this
preperational work is harmless for normal operations
to it is better if that is already in.

---
The following changes since commit ef28eab0c928fe8277d7c3dca234c29f734d7f2e:
  Dan Williams (1):
        ipw2200: queue direct scans

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Gertjan van Wingerde (5):
      rt2x00: Restrict DMA to 32-bit addresses.
      rt2x00: Cleanup struct skb_frame_desc.
      rt2x00: Centralize RX packet alignment handling in rt2x00lib.
      rt2x00: Fix double usage of skb->cb in USB RX path.
      rt2x00: Rework alignment check.

Ivo van Doorn (15):
      rt2x00: Calculate register offset during compile time
      rt2x00: Cleanup/optimize set_state() function callback function
      rt2x00: Move led initialization into function
      rt2x00: Remove CTS/RTS check in tx()
      rt2x00: Removed unused descriptor read in txdone
      rt2x00: Don't kill guardian_urb when it wasn't created
      rt2x00: Make rt2x00_set/get_field macros
      rt2x00: Release rt2x00 2.1.7
      rt2x00: Fix queue initialization
      rt2x00: Implement rt2x00usb_kick_tx_queue()
      rt2x00: Move generic TX frame writing code into rt2x00queue
      rt2x00: Don't kick TX queue after each frame
      rt2x00: Use __builtin_choose_expr() instead of ?:
      rt2x00: Clear IEEE80211_TX_CTL_USE_RTS_CTS flag for RTS frame
      rt2x00: Remove unused defines

 drivers/net/wireless/rt2x00/rt2400pci.c   |   95 ++++++++---------
 drivers/net/wireless/rt2x00/rt2400pci.h   |    2 -
 drivers/net/wireless/rt2x00/rt2500pci.c   |   91 +++++++--------
 drivers/net/wireless/rt2x00/rt2500pci.h   |    2 -
 drivers/net/wireless/rt2x00/rt2500usb.c   |   98 ++++++++--------
 drivers/net/wireless/rt2x00/rt2500usb.h   |    2 -
 drivers/net/wireless/rt2x00/rt2x00.h      |   13 ++-
 drivers/net/wireless/rt2x00/rt2x00debug.c |    6 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c   |   21 ++++
 drivers/net/wireless/rt2x00/rt2x00lib.h   |    1 +
 drivers/net/wireless/rt2x00/rt2x00mac.c   |   30 ++----
 drivers/net/wireless/rt2x00/rt2x00pci.c   |   75 ++++---------
 drivers/net/wireless/rt2x00/rt2x00pci.h   |   11 +-
 drivers/net/wireless/rt2x00/rt2x00queue.c |  111 ++++++++++++++++---
 drivers/net/wireless/rt2x00/rt2x00queue.h |   27 +++--
 drivers/net/wireless/rt2x00/rt2x00reg.h   |  134 +++++++++++++---------
 drivers/net/wireless/rt2x00/rt2x00usb.c   |  170 +++++++++++------------------
 drivers/net/wireless/rt2x00/rt2x00usb.h   |   22 +++-
 drivers/net/wireless/rt2x00/rt61pci.c     |  111 ++++++++-----------
 drivers/net/wireless/rt2x00/rt61pci.h     |    2 -
 drivers/net/wireless/rt2x00/rt73usb.c     |  112 +++++++++----------
 drivers/net/wireless/rt2x00/rt73usb.h     |    2 -
 22 files changed, 581 insertions(+), 557 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-06-16 17:58 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-06-16 17:58 UTC (permalink / raw)
  To: John W. Linville; +Cc: rt2400-devel, linux-wireless

Hi John,

Here is the latest version bump of rt2x00: 2.1.8

Most important patches are from Gertjan, which reduce
the amount of pre-allocated DMA for all TX queues.
All PCI drivers now TX/RX all frame data directly
from/to the skb buffer saving kilobytes of allocated DMA
and several memcpy() statements.

This also allows a lot of code to be moved out of rt2x00pci/rt2x00usb
and into rt2x00lib which in turn makes management of everything
much easier.

Ivo

---
The following changes since commit 7b57047e2d34c243c4cf2d778df0b34bfdd82c8e:
  John W. Linville (1):
        iwlwifi: fix build breakage

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Gertjan van Wingerde (4):
      rt2x00: Properly clean up beacon skbs.
      rt2x00: Convert rt2x00 to use generic DMA-mapping API
      rt2x00: Centralize allocation of RX skbs.
      rt2x00: Replace statically allocated DMA buffers with mapped skb's.

Ivo van Doorn (5):
      rt2x00: Use ieee80211 fc handlers
      rt2x00: Cleanup symbol exports
      rt2x00: Fix sparse warning on nested container_of()
      rt2x00: Increase queue size
      rt2x00: Release rt2x00 2.1.8

 drivers/net/wireless/rt2x00/rt2400pci.c   |   17 ++--
 drivers/net/wireless/rt2x00/rt2500pci.c   |   14 ++-
 drivers/net/wireless/rt2x00/rt2500usb.c   |    4 +-
 drivers/net/wireless/rt2x00/rt2x00.h      |   59 ++---------
 drivers/net/wireless/rt2x00/rt2x00dev.c   |  100 +++++++++++++++----
 drivers/net/wireless/rt2x00/rt2x00lib.h   |   51 +++++++++-
 drivers/net/wireless/rt2x00/rt2x00pci.c   |  126 ++++--------------------
 drivers/net/wireless/rt2x00/rt2x00pci.h   |   12 --
 drivers/net/wireless/rt2x00/rt2x00queue.c |  157 +++++++++++++++++++++++------
 drivers/net/wireless/rt2x00/rt2x00queue.h |   35 ++++---
 drivers/net/wireless/rt2x00/rt2x00usb.c   |   94 +++---------------
 drivers/net/wireless/rt2x00/rt2x00usb.h   |    6 +
 drivers/net/wireless/rt2x00/rt61pci.c     |   23 +++--
 drivers/net/wireless/rt2x00/rt73usb.c     |    8 ++-
 14 files changed, 368 insertions(+), 338 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-07-18 18:43 Ivo van Doorn
  2008-07-19 13:55 ` Ivo van Doorn
  0 siblings, 1 reply; 89+ messages in thread
From: Ivo van Doorn @ 2008-07-18 18:43 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the latest update for rt2x00

I think all patches qualify for 2.6.27, 
with the exception for first 2 patches:
      rt2x00: Remove duplicate declaration
      rt2x00: Fix EIFS timing value
but those are one-liners and have little impact.

The 3 patches from Iwo are the most important ones,
since that fixes a major bug in the beacon handling for the
USB drivers. The 3 patches are a bit big, but without them
beaconing simply won't work.

Ivo

---
The following changes since commit a520bdbe7d344296482f9355e29b0018ea58760f:
  John W. Linville (1):
        iwl-scan.c: fixup merge damage in wireless-testing#master

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ ..BRANCH.NOT.VERIFIED..

Ivo van Doorn (3):
      rt2x00: Remove duplicate declaration
      rt2x00: Fix EIFS timing value
      rt2x00: Fix GCC warning because aifs is now unsigned

Iwo Mergler (3):
      rt2x00: Support for large vendor requests
      rt2x00: Large vendor requests for rt73usb firmware upload and beacons
      rt2x00: Fix the beacon length bug

 drivers/net/wireless/rt2x00/rt2500usb.c |   12 +++++++
 drivers/net/wireless/rt2x00/rt2x00.h    |    2 +-
 drivers/net/wireless/rt2x00/rt2x00lib.h |    7 ----
 drivers/net/wireless/rt2x00/rt2x00mac.c |    5 +--
 drivers/net/wireless/rt2x00/rt2x00usb.c |   33 ++++++++++++++++++++
 drivers/net/wireless/rt2x00/rt2x00usb.h |   22 ++++++++++++-
 drivers/net/wireless/rt2x00/rt73usb.c   |   50 ++++++++++++------------------
 7 files changed, 87 insertions(+), 44 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Re: Please pull 'upstream' branch of rt2x00
  2008-07-18 18:43 Ivo van Doorn
@ 2008-07-19 13:55 ` Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-07-19 13:55 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Please wait with pulling from rt2x00.git,
updated patches are coming in a few moments,
I just noticed some cleanups which should be made
in several patches, and I'll incorporate the suggestion
from Johannes regarding the EIFS.

Sorry for the noise. ;)

Ivo

> Here is the latest update for rt2x00
> 
> I think all patches qualify for 2.6.27, 
> with the exception for first 2 patches:
>       rt2x00: Remove duplicate declaration
>       rt2x00: Fix EIFS timing value
> but those are one-liners and have little impact.
> 
> The 3 patches from Iwo are the most important ones,
> since that fixes a major bug in the beacon handling for the
> USB drivers. The 3 patches are a bit big, but without them
> beaconing simply won't work.
> 
> Ivo
> 
> ---
> The following changes since commit a520bdbe7d344296482f9355e29b0018ea58760f:
>   John W. Linville (1):
>         iwl-scan.c: fixup merge damage in wireless-testing#master
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ ..BRANCH.NOT.VERIFIED..
> 
> Ivo van Doorn (3):
>       rt2x00: Remove duplicate declaration
>       rt2x00: Fix EIFS timing value
>       rt2x00: Fix GCC warning because aifs is now unsigned
> 
> Iwo Mergler (3):
>       rt2x00: Support for large vendor requests
>       rt2x00: Large vendor requests for rt73usb firmware upload and beacons
>       rt2x00: Fix the beacon length bug
> 
>  drivers/net/wireless/rt2x00/rt2500usb.c |   12 +++++++
>  drivers/net/wireless/rt2x00/rt2x00.h    |    2 +-
>  drivers/net/wireless/rt2x00/rt2x00lib.h |    7 ----
>  drivers/net/wireless/rt2x00/rt2x00mac.c |    5 +--
>  drivers/net/wireless/rt2x00/rt2x00usb.c |   33 ++++++++++++++++++++
>  drivers/net/wireless/rt2x00/rt2x00usb.h |   22 ++++++++++++-
>  drivers/net/wireless/rt2x00/rt73usb.c   |   50 ++++++++++++------------------
>  7 files changed, 87 insertions(+), 44 deletions(-)
> 



^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-07-19 14:15 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-07-19 14:15 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the updated patch series,
I have dropped the compile warning patch because Johannes has
already send it before, the EIFS patch has been updated to use the
correct definition instead of hardcoding the value, and some
coding style fixes went into Iwo's patches.

Patches are still intended for 2.6.27

Ivo

---
The following changes since commit a520bdbe7d344296482f9355e29b0018ea58760f:
  John W. Linville (1):
        iwl-scan.c: fixup merge damage in wireless-testing#master

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (2):
      rt2x00: Remove duplicate declaration
      rt2x00: Fix EIFS timing value

Iwo Mergler (3):
      rt2x00: Support for large vendor requests
      rt2x00: Large vendor requests for rt73usb firmware upload and beacons
      rt2x00: Fix the beacon length bug

 drivers/net/wireless/rt2x00/rt2500usb.c    |   12 ++++++
 drivers/net/wireless/rt2x00/rt2x00.h       |    5 ++-
 drivers/net/wireless/rt2x00/rt2x00config.c |    2 +-
 drivers/net/wireless/rt2x00/rt2x00lib.h    |    7 ----
 drivers/net/wireless/rt2x00/rt2x00usb.c    |   32 +++++++++++++++++
 drivers/net/wireless/rt2x00/rt2x00usb.h    |   22 +++++++++++-
 drivers/net/wireless/rt2x00/rt73usb.c      |   52 +++++++++++----------------
 7 files changed, 90 insertions(+), 42 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-08-04 14:36 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-08-04 14:36 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Only 5 patches, but they do bump rt2x00 to a new version: 2.2.0
This series will add HW crypto support to rt2x00, by default it
has been enabled for rt61pci and rt73usb.

rt2500usb has also been created, but currently does not work
since it requires different handling then rt61pci and rt73usb. Because
I am focussing on different areas in rt2x00 now, it will take some
time before I get back to rt2500usb HW crypto (if there are any volunteers
to take a shot at rt2500usb HW crypto, they are welcome).

rt2500pci supports HW crypto as well, but I won't implement it due
to the way it has to be enabled. It comes down to the fact that during
TX the key has to be provided, and after the encryption an interupt will
be raised after which the frame can be kicked to the air. In the RX path
the same happens, including that after RX the key has to be provided
as well. This will cause the number of IRQ events to double during HW
crypto, and several changes are required in mac80211 to make it possible.
Because of that I see no point in doing anything with it.

Ivo

----
The following changes since commit 2471b779e2f93d76bd4c041e4a8f5a27c859d7ce:
  John W. Linville (1):
        Revert "mac80211: add direct probe before association"

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (5):
      rt2x00: Implement HW encryption
      rt2x00: Implement HW encryption (rt61pci)
      rt2x00: Implement HW encryption (rt73usb)
      rt2x00: Gather channel information in structure
      rt2x00: Release rt2x00 2.2.0

 drivers/net/wireless/rt2x00/Kconfig        |    6 +
 drivers/net/wireless/rt2x00/Makefile       |    1 +
 drivers/net/wireless/rt2x00/rt2400pci.c    |   40 ++--
 drivers/net/wireless/rt2x00/rt2400pci.h    |   22 +--
 drivers/net/wireless/rt2x00/rt2500pci.c    |   39 +++--
 drivers/net/wireless/rt2x00/rt2500pci.h    |   17 +-
 drivers/net/wireless/rt2x00/rt2500usb.c    |   39 +++--
 drivers/net/wireless/rt2x00/rt2500usb.h    |   17 +-
 drivers/net/wireless/rt2x00/rt2x00.h       |   64 +++++-
 drivers/net/wireless/rt2x00/rt2x00config.c |    4 +
 drivers/net/wireless/rt2x00/rt2x00crypto.c |  215 +++++++++++++++++++
 drivers/net/wireless/rt2x00/rt2x00debug.c  |   97 +++++++++
 drivers/net/wireless/rt2x00/rt2x00dev.c    |   48 +++--
 drivers/net/wireless/rt2x00/rt2x00lib.h    |   47 ++++
 drivers/net/wireless/rt2x00/rt2x00mac.c    |  110 +++++++++-
 drivers/net/wireless/rt2x00/rt2x00queue.c  |   81 +++++++-
 drivers/net/wireless/rt2x00/rt2x00queue.h  |   73 ++++++-
 drivers/net/wireless/rt2x00/rt2x00reg.h    |   19 ++-
 drivers/net/wireless/rt2x00/rt61pci.c      |  298 ++++++++++++++++++++++++--
 drivers/net/wireless/rt2x00/rt61pci.h      |   38 ++--
 drivers/net/wireless/rt2x00/rt73usb.c      |  314 +++++++++++++++++++++++++---
 drivers/net/wireless/rt2x00/rt73usb.h      |   38 ++--
 22 files changed, 1418 insertions(+), 209 deletions(-)
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00crypto.c

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-08-29 19:03 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-08-29 19:03 UTC (permalink / raw)
  To: John Linville; +Cc: rt2400-devel, linux-wireless

Hi John,

Here is another rt2x00 update for the 2.6.28 kernel,
I believe some patches have been send earlier, but
I lost my overview on my patches, so this bunch will
get rt2x00 completely up to date.

A few patches are needed for rt2800, but they are small,
and clean enough to be merged early.

Ivo

---
The following changes since commit b51f3c6077d59b41e3f9d2af33e2e2f94ecbbc39:
  John W. Linville (1):
        at76_usb: fix for removal of IEEE80211_TX_CTL_DO_NOT_ENCRYPT

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (5):
      rt2x00: Fix race conditions in flag handling
      rt2x00: Map extra_tx_headroom to DMA
      rt2x00: Initialize txop during conf_tx() callback
      rt2x00: Add Signal type flag
      rt2x00: Release rt2x00 2.2.1

Mattias Nissler (2):
      rt2x00: Only configure hardware when radio is enabled
      rt2x00: skb->data pointer should not include TX descriptor

 drivers/net/wireless/rt2x00/rt2400pci.c    |    2 +-
 drivers/net/wireless/rt2x00/rt2500pci.c    |    4 +-
 drivers/net/wireless/rt2x00/rt2500usb.c    |    7 ++-
 drivers/net/wireless/rt2x00/rt2x00.h       |   17 +++---
 drivers/net/wireless/rt2x00/rt2x00config.c |    4 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |   68 +++++++++++--------------
 drivers/net/wireless/rt2x00/rt2x00mac.c    |   75 ++++++++++++++--------------
 drivers/net/wireless/rt2x00/rt2x00queue.c  |   31 +++++++++--
 drivers/net/wireless/rt2x00/rt2x00queue.h  |    9 ++-
 drivers/net/wireless/rt2x00/rt2x00rfkill.c |    6 +-
 drivers/net/wireless/rt2x00/rt2x00usb.c    |   21 ++++----
 drivers/net/wireless/rt2x00/rt61pci.c      |   73 ++++++++++++++++++++++-----
 drivers/net/wireless/rt2x00/rt73usb.c      |   74 ++++++++++++++++++++++-----
 13 files changed, 253 insertions(+), 138 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-10-29 16:16 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-10-29 16:16 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Well over a month since my last rt2x00 patches, but finally a real rt2x00 update.
The first 2 patches are updates based on recent mac80211 changes,
especially the configuration patch is important.

I also noticed that the recent Kconfig fixes introduced a possibility of a build error,
not sure if it was reported by somebody yet, but in any case it was possible to
build mac80211 as module and rt2x00 compiled into the kernel, causing obvious
problems.

Ivo

---
The following changes since commit 43288a0fdd6b970dec3017ceaffb70cf6347e5f0:
  John W. Linville (1):
        ath5k: fixup warnings created by "ath5k: Reset key cache..."

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (5):
      rt2x00: Optimize configuration handling
      rt2x00: Remove ieee80211_bss_conf from rt2x00_intf
      rt2x00: Improve interface_modes initialization
      rt2x00: Fix build error when mac80211=M rt2x00=Y
      rt2x00: Release rt2x00 2.2.2

 drivers/net/wireless/rt2x00/Kconfig        |    2 +-
 drivers/net/wireless/rt2x00/rt2400pci.c    |  167 ++++++++++-----------
 drivers/net/wireless/rt2x00/rt2500pci.c    |  206 ++++++++++++-------------
 drivers/net/wireless/rt2x00/rt2500usb.c    |  110 ++++++-------
 drivers/net/wireless/rt2x00/rt2x00.h       |   44 ++----
 drivers/net/wireless/rt2x00/rt2x00config.c |  164 +++-----------------
 drivers/net/wireless/rt2x00/rt2x00dev.c    |   16 ++-
 drivers/net/wireless/rt2x00/rt2x00lib.h    |    3 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c    |   12 +--
 drivers/net/wireless/rt2x00/rt61pci.c      |  231 ++++++++++++++--------------
 drivers/net/wireless/rt2x00/rt73usb.c      |  216 +++++++++++++-------------
 11 files changed, 501 insertions(+), 670 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-12-02 17:19 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-12-02 17:19 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is a new batch of updates for rt2x00.

The first patch (rt2x00: Optimize IV/EIV handling) was send individually
a few days ago, but it is probably easier if you pull it along with the rest
of the patches during this merge.

Small warning which might be important:
The patch "Implement HW encryption (rt2500usb)" adds support for HW crypto
but it does _not_ activate it. The module parameter "nohwcrypt" is set to 1
by default for now. This code has been sleeping in the rt2x00 experimental branch
for quite some time now, and doesn't work completely. I hope to debug this
further when I have time, but I am hoping that with the code in wireless-testing
other people will take a look at it to see what might be going wrong.

Ivo

---
The following changes since commit ca072018d6425a55b3f0e6d8bd3e6217ee509065:
  Winkler, Tomas (1):
        iwlwifi: TX update chicken bits

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Ivo van Doorn (5):
      rt2x00: Optimize IV/EIV handling
      rt2x00: Store retry limit values
      rt2x00: Remove duplicate code
      rt2x00: Implement HW encryption (rt2500usb)
      rt2x00: Release rt2x00 2.2.3

 drivers/net/wireless/rt2x00/Kconfig        |    1 +
 drivers/net/wireless/rt2x00/rt2500usb.c    |  132 ++++++++++++++++++++++++++-
 drivers/net/wireless/rt2x00/rt2500usb.h    |    3 +
 drivers/net/wireless/rt2x00/rt2x00.h       |    9 ++-
 drivers/net/wireless/rt2x00/rt2x00config.c |   39 +++++----
 drivers/net/wireless/rt2x00/rt2x00crypto.c |   56 ++++++------
 drivers/net/wireless/rt2x00/rt2x00lib.h    |    6 ++
 drivers/net/wireless/rt2x00/rt2x00mac.c    |    2 -
 drivers/net/wireless/rt2x00/rt2x00queue.c  |   17 ++--
 drivers/net/wireless/rt2x00/rt2x00queue.h  |   12 +--
 drivers/net/wireless/rt2x00/rt61pci.c      |    8 +-
 drivers/net/wireless/rt2x00/rt73usb.c      |    8 +-
 12 files changed, 211 insertions(+), 82 deletions(-)

^ permalink raw reply	[flat|nested] 89+ messages in thread

* Please pull 'upstream' branch of rt2x00
@ 2008-12-20  9:52 Ivo van Doorn
  0 siblings, 0 replies; 89+ messages in thread
From: Ivo van Doorn @ 2008-12-20  9:52 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, rt2400-devel

Hi John,

Here is the latest rt2x00 update.
Lots of new features, optimizations and cleanups.

Ivo

---
The following changes since commit 30b5741a6880688c4540c8f80f90371f42b05a63:
  Winkler, Tomas (1):
        iwl3945: use iwl_rb_status

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ivd/rt2x00.git/ upstream

Andrey Yurovsky (1):
      rt2x00: Add mesh support

Ivo van Doorn (14):
      rt2x00: Implement Powersaving
      rt2x00: Move link tuning into seperate file
      rt2x00: Reduce calls to bbp_read()
      rt2x00: Restrict interface between rt2x00link and drivers
      rt2x00: Add RFKILL support to rt2500usb and rt73usb
      rt2x00: Rename CONFIG_CRYPTO_COPY_IV
      rt2x00: Implement WDS support
      rt2x00: Split EEPROM_NIC_TX_RX_FIXED
      rt2x00: Move code into seperate functions
      rt2x00: Remove ENTRY_TXD_OFDM_RATE
      rt2x00: Allow drivers to pass the noise value during rxdone
      rt2x00: Introduce RXDONE_SIGNAL_MASK mask
      rt2x00: Fix segementation fault
      rt2x00: Release rt2x00 2.3.0

 drivers/net/wireless/rt2x00/Makefile       |    1 +
 drivers/net/wireless/rt2x00/rt2400pci.c    |   60 +++-
 drivers/net/wireless/rt2x00/rt2500pci.c    |   88 ++++--
 drivers/net/wireless/rt2x00/rt2500usb.c    |   58 ++++-
 drivers/net/wireless/rt2x00/rt2500usb.h    |    8 +
 drivers/net/wireless/rt2x00/rt2x00.h       |  131 +++------
 drivers/net/wireless/rt2x00/rt2x00config.c |    7 +-
 drivers/net/wireless/rt2x00/rt2x00crypto.c |   13 +-
 drivers/net/wireless/rt2x00/rt2x00debug.c  |    4 +-
 drivers/net/wireless/rt2x00/rt2x00dev.c    |  322 ++------------------
 drivers/net/wireless/rt2x00/rt2x00lib.h    |   87 +++++-
 drivers/net/wireless/rt2x00/rt2x00link.c   |  461 ++++++++++++++++++++++++++++
 drivers/net/wireless/rt2x00/rt2x00mac.c    |   42 ++-
 drivers/net/wireless/rt2x00/rt2x00queue.c  |  193 ++++++------
 drivers/net/wireless/rt2x00/rt2x00queue.h  |   15 +-
 drivers/net/wireless/rt2x00/rt2x00reg.h    |   10 +
 drivers/net/wireless/rt2x00/rt2x00usb.c    |    6 +-
 drivers/net/wireless/rt2x00/rt61pci.c      |  144 +++++----
 drivers/net/wireless/rt2x00/rt61pci.h      |    7 +-
 drivers/net/wireless/rt2x00/rt73usb.c      |  134 ++++++---
 drivers/net/wireless/rt2x00/rt73usb.h      |   13 +
 21 files changed, 1138 insertions(+), 666 deletions(-)
 create mode 100644 drivers/net/wireless/rt2x00/rt2x00link.c

^ permalink raw reply	[flat|nested] 89+ messages in thread

end of thread, other threads:[~2008-12-20 10:01 UTC | newest]

Thread overview: 89+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-19 18:18 Please pull 'upstream' branch of rt2x00 Ivo van Doorn
2007-08-19 18:21 ` [PATCH 01/30] rt2x00: Correctly configure packet filter in monitor mode Ivo van Doorn
2007-08-19 18:21 ` [PATCH 02/30] rt2x00: Clear MAC and BSSID when non-monitor interface goes down Ivo van Doorn
2007-08-19 18:21 ` [PATCH 03/30] rt2x00: Check return value of usb_control_msg() Ivo van Doorn
2007-08-19 18:22 ` [PATCH 04/30] rt2x00: Clear all fields on start_link_tune() Ivo van Doorn
2007-08-19 18:22 ` [PATCH 05/30] rt2x00: Don't increase rx_failed for individual frames Ivo van Doorn
2007-08-19 18:23 ` [PATCH 06/30] rt2x00: Set vgc_level during reset_tuner Ivo van Doorn
2007-08-19 18:23 ` [PATCH 07/30] rt2x00: Schedule beacon update Ivo van Doorn
2007-08-19 18:24 ` [PATCH 08/30] rt2x00: Fix width of filter field Ivo van Doorn
2007-08-19 18:24 ` [PATCH 09/30] rt2x00: Be consistent with unsigned Ivo van Doorn
2007-08-19 18:24 ` [PATCH 10/30] rt2x00: Correctly reset TX/RX success/failed counters Ivo van Doorn
2007-08-19 18:25 ` [PATCH 11/30] rt2x00: Rework RF register handling Ivo van Doorn
2007-08-19 18:25 ` [PATCH 12/30] rt2x00: Store firmware in memory Ivo van Doorn
2007-08-19 18:54   ` Michael Buesch
2007-08-19 20:44     ` Ivo van Doorn
2007-08-19 18:26 ` [PATCH 13/30] rt2x00: rt2x00_ring_free returns invalid length Ivo van Doorn
2007-08-19 18:26 ` [PATCH 14/30] Fix off-by-one error in debugfs helpers Ivo van Doorn
2007-08-19 18:26 ` [PATCH 15/30] rt2x00: Use caching for USB transfers Ivo van Doorn
2007-08-19 18:27 ` [PATCH 16/30] rt2x00: Cleanup set_state for rt61 and rt73 Ivo van Doorn
2007-08-19 18:27 ` [PATCH 17/30] rt2x00: Fix register initialization ordering Ivo van Doorn
2007-08-19 18:27 ` [PATCH 18/30] rt2x00: memset descriptor before use Ivo van Doorn
2007-08-19 18:28 ` [PATCH 19/30] rt2x00: Remove IEEE80211_HW_WEP_INCLUDE_IV flag Ivo van Doorn
2007-08-19 18:28 ` [PATCH 20/30] rt2x00: Cleanup TXD flags Ivo van Doorn
2007-08-19 18:28 ` [PATCH 21/30] rt2x00: Add byte-ordering annotation for MAC and BSSID Ivo van Doorn
2007-08-19 18:29 ` [PATCH 22/30] rt2x00: Correctly set TXD retry flag Ivo van Doorn
2007-08-19 18:35 ` [PATCH 23/30] rt2x00: Move rt2x00 files into rt2x00 folder Ivo van Doorn
2007-08-19 18:35 ` [PATCH 24/30] rt2x00: Add file pattern to MAINTAINER entry Ivo van Doorn
2007-08-19 18:35 ` [PATCH 25/30] rt2x00: Fix PLCP setup Ivo van Doorn
2007-08-19 18:36 ` [PATCH 26/30] rt2x00: Clean up RATEMASK handling Ivo van Doorn
2007-08-19 18:36 ` [PATCH 27/30] rt2x00: Add rt2x00lib_reset_link_tuner() Ivo van Doorn
2007-08-19 18:36 ` [PATCH 28/30] rt2x00: Always check if mac80211 requested TX status update Ivo van Doorn
2007-08-20 17:21   ` Johannes Berg
2007-08-21 10:21     ` Ivo van Doorn
2007-08-19 18:36 ` [PATCH 29/30] rt2x00: Lindent Ivo van Doorn
2007-08-19 18:37 ` [PATCH 30/30] rt2x00: rt2x00 2.0.7 Ivo van Doorn
2007-08-23 20:55 ` [Rt2400-devel] Please pull 'upstream' branch of rt2x00 John W. Linville
  -- strict thread matches above, loose matches on Subject: below --
2008-12-20  9:52 Ivo van Doorn
2008-12-02 17:19 Ivo van Doorn
2008-10-29 16:16 Ivo van Doorn
2008-08-29 19:03 Ivo van Doorn
2008-08-04 14:36 Ivo van Doorn
2008-07-19 14:15 Ivo van Doorn
2008-07-18 18:43 Ivo van Doorn
2008-07-19 13:55 ` Ivo van Doorn
2008-06-16 17:58 Ivo van Doorn
2008-06-08 21:41 Ivo van Doorn
2008-05-10 11:37 Ivo van Doorn
2008-05-10 12:48 ` drago01
2008-05-10 13:06   ` Ivo van Doorn
2008-05-10 13:15     ` drago01
2008-05-05 15:23 Ivo van Doorn
2008-05-02 21:04 Scott White
2008-05-02 21:25 ` Ivo van Doorn
2008-05-03  6:19   ` Mattias Nissler
2008-05-03  9:58     ` Ivo van Doorn
2008-05-03 10:18       ` Mattias Nissler
2008-05-03 15:02         ` Ivo van Doorn
2008-05-03 15:27           ` Johannes Berg
2008-05-03 15:38             ` Mattias Nissler
2008-05-03 16:56               ` Ivo van Doorn
2008-05-03 19:29   ` Scott White
2008-05-05 17:31 ` John W. Linville
2008-04-21 17:06 Ivo van Doorn
2008-05-01  8:29 ` Ivo van Doorn
2008-03-09 21:37 Ivo van Doorn
2008-02-25 22:20 Ivo van Doorn
2008-02-17 16:30 Ivo van Doorn
2008-02-10 21:46 Ivo van Doorn
2008-02-03 14:41 Ivo van Doorn
2008-01-06 22:37 Ivo van Doorn
2007-11-27 20:46 Ivo van Doorn
2007-11-27 20:54 ` Ivo van Doorn
2007-11-29 22:26   ` John W. Linville
2007-11-30  9:51     ` Ivo van Doorn
2007-10-27 11:34 Ivo van Doorn
2007-10-13 14:27 Ivo van Doorn
2007-10-06 12:19 Ivo van Doorn
2007-09-25 18:52 Ivo van Doorn
2007-09-16 12:17 Ivo van Doorn
2007-08-02 15:45 Ivo van Doorn
2007-07-31 18:36 Ivo van Doorn
2007-08-01 17:05 ` Ivo van Doorn
2007-07-25 20:49 Ivo van Doorn
2007-07-20  8:11 Ivo van Doorn
2007-07-20  8:13 ` Ivo van Doorn
2007-06-19 18:18 Ivo van Doorn
2007-06-03 12:25 Ivo van Doorn
2007-05-07 14:44 Ivo van Doorn
2007-04-28 20:45 Ivo van Doorn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).