History log of /drivers/net/wireless/rt2x00/rt2x00lib.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2e9c43dd45ced5bd77c94d4216f96b4a49448d73 16-Feb-2012 John Li <chen-yang.li@mediatek.com> rt2x00:Add VCO recalibration

Signed-off-by: John Li <chen-yang.li@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
449f94eadc91d69fa044fa92ef45c02e86559e13 02-Aug-2011 Helmut Schaa <helmut.schaa@googlemail.com> rt2x00: Fix compilation without CONFIG_RT2X00_LIB_CRYPTO

This was introduced by commit
77b5621bac4a56b83b9081f48d4e7d1accdde400 (rt2x00: Don't use queue entry
as parameter when creating TX descriptor.)

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
77b5621bac4a56b83b9081f48d4e7d1accdde400 06-Jul-2011 Gertjan van Wingerde <gwingerde@gmail.com> rt2x00: Don't use queue entry as parameter when creating TX descriptor.

The functions that create the tx descriptor structure do not operate on
a queue entry at all. Signal this fact in the code by not providing a
queue entry as a parameter, but the rt2x00 device structure and the skb
directly.

This patch is a preparation for reducing the time a queue is locked for
a tx operation.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
46a01ec00d05581c5bd0c37e680d5b37af4953b4 18-Apr-2011 Gertjan van Wingerde <gwingerde@gmail.com> rt2x00: Merge rt2x00ht.c contents in other files.

The two functions that are in rt2x00ht.c can be much better placed
closer to the places where the call-sites of these functions are (one
in rt2x00config.c and one in rt2x00queue.c) allowing us to make these
functions static.
Also, conditional compilations doesn't seem to be necessary anymore as
802.11n support is quite common nowadays.

This makes the code a bit easier readable and searchable.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
75256f0348d38f414b7ac50ac78d4a4532bb6762 18-Apr-2011 Johannes Stezenbach <js@sig21.net> rt2x00: fix queue timeout checks

Add a timestamp to each queue entry which is updated whenever
the status of the entry changes, and remove the per-queue
timestamps. The previous check was incorrect and caused both
false positives and false negatives.

With the corrected check it comes apparent that the TX status
usually times out on rt2800usb unless there is sufficient traffic
(i.e. the next TX will complete the previous TX status).

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
7dab73b37f5e8885cb73efd25e73861f9b4f0246 18-Apr-2011 Ivo van Doorn <IvDoorn@gmail.com> rt2x00: Split rt2x00dev->flags

The number of flags defined for the rt2x00dev->flags field,
has been growing over the years. Currently we are approaching
the maximum number of bits which are available in the field.

A secondary problem, is that one part of the field are initialized only
during boot, because the driver requirements are initialized or device
requirements are loaded from the EEPROM. In both cases, the flags are
fixed and will not change during device operation. The other flags are
the device state, and will change frequently. So far this resulted in the fact
that for some flags, the atomic bit accessors are used, while for the others
the non-atomic variants are used.

By splitting the flags up into a "flags" and "cap_flags" we can put all flags
which are fixed inside "cap_flags". This field can then be read non-atomically.
In the "flags" field we keep the device state, which is going to be read atomically.

This adds more room for more flags in the future, and sanitizes the field access methods.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
9e33a3553821418b2c4f53d09311476c55176b13 28-Mar-2011 Helmut Schaa <helmut.schaa@googlemail.com> rt2x00: Implement tx power temperature compensation

rt2800 devices should adjust their tx power in accordance with the
eeproms temperature calibration values. Add a new driver callback
gain_calibration that is called every 4 seconds.

The rt2800 gain calibration routine simply runs the tx power
configuration that takes care of calculating the temperature
compensation delta.

We don't need to synchronize the calls to rt2800_config_txpower
as they should all happen from mac80211's single threaded workqueue.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
2f2bb7e8bdc977c94cdaaf84328526555eba89b1 28-Mar-2011 Helmut Schaa <helmut.schaa@googlemail.com> rt2x00: Remove obsolete rt2x00queue_align_payload

Since commit d1c3a37ceeb1a5ea02991a0476355f1a1d3b3e83 ("mac80211:
clarify alignment docs, fix up alignment") removed the requirement
for a 4-byte aligned payload rt2x00queue_align_payload is obsolete
as mac80211 will align the payload when it passes the frame to the
net stack.

As a result we can remove the call to rt2x00queue_align_payload in the
rx path and since that's the last user we can remove
rt2x00queue_align_payload altogether.

One advantage is that we save some alignment operations for frames
that don't need to be aligned (for example beause they are not passed
to the net stack).

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
8414ff07ac8802e282683812514ef5b0ea133cb8 30-Jan-2011 Helmut Schaa <helmut.schaa@googlemail.com> rt2x00: Introduce beacon_update_locked that requires caller locking

Introduce a beacon_update_locked function that does not acquire the
according beacon mutex to allow beacon updates from atomic context. The
caller has to take care of synchronization.

No functional changes. Just preparation for beacon updates from tasklet
context.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
69cf36a4523be026bc16743c5c989c5e82edb7d9 30-Jan-2011 Helmut Schaa <helmut.schaa@googlemail.com> rt2x00: Refactor beacon code to make use of start- and stop_queue

This patch allows to dynamically remove beaconing interfaces without
shutting beaconing down on all interfaces.

The only place to start and stop beaconing are now the start- and
stop_queue callbacks. Hence, we can remove some register writes during
interface bring up (config_intf) and only write the correct sync mode
to the register there.

When multiple beaconing interfaces are present we should enable
beaconing as soon as mac80211 enables beaconing on at least one of
them. The beacon queue gets stopped when the last beaconing
interface was stopped by mac80211. Therefore, introduce another
interface counter to keep track ot the number of enabled beaconing
interfaces and start or stop the beacon queue accordingly.

To allow single interfaces to stop beaconing, add a new driver
callback clear_beacon to clear a single interface's beacon without
affecting the other interfaces. Don't overload the clear_entry callback
for clearing beacons as that would introduce additional overhead
(check for each TX queue) into the clear_entry callback which is used
on the drivers TX/RX hotpaths.

Furthermore, the write beacon callback doesn't need to enable beaconing
anymore but since beaconing should be disabled while a new beacon is
written or cleared we still disable beacon generation and enable it
afterwards again in the driver specific callbacks. However, beacon
related interrupts should not be disabled/enabled here, that's solely
done from the start- and stop queue callbacks. It would be nice to stop
the beacon queue just before the beacon update and enable it afterwards
in rt2x00queue itself instead of the current implementation that relies
on the driver doing the right thing. However, since start- and
stop_queue are mutex protected we cannot use them for atomic beacon
updates.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
0b7fde54f94979edc67bbf86b5adba702ebfefe8 13-Dec-2010 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Protect queue control with mutex

Add wrapper functions in rt2x00queue.c to
start & stop queues. This control must be protected
using a mutex.

Queues can also be paused which will halt the flow
of packets between the driver and mac80211. This doesn't
require a mutex protection.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
ea175ee26268370ca07aff91cf6ba1e0f1a3bd36 06-Nov-2010 Ivo van Doorn <IvDoorn@gmail.com> rt2x00: Remove rt2x00lib_toggle_rx

As part of the queue refactoring, the rt2x00lib_toggle_rx
can be removed and replaced with the call directly to
the set_device_state callback function.

We can remove the STATE_RADIO_RX_ON_LINK and
STATE_RADIO_RX_OFF_LINK, as it was only used for
special behavior inside rt2x00lib rather then the
drivers.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
5f181dc16bbd13b68b54ed5c43c4d2c5ad00297b 06-Nov-2010 Mark Einon <mark.einon@gmail.com> rt2x00: checkpatch.pl error fixes for rt2x00lib.h

rt2x00lib.h:60: ERROR: space prohibited after that open parenthesis '('
rt2x00lib.h:60: ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
fa69560f317d961c56e29dea788b346d2b34fb87 11-Oct-2010 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Simplify Queue function arguments

A lot of functions accept a struct rt2x00_dev combined with
either a struct queue_entry or struct data_queue argument.
This can be simplified by only passing on the queue/entry
argument.

In cases where rt2x00_dev and a sk_buff are send together,
we can send the queue_entry instead.

rt2x00usb_alloc_urb and rt2x00usb_free_urb have a bit
of vague naming. Instead they allocate all the data which
belongs to a rt2x00 data queue entry.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
0204464329c17ba6d293e1899f71223599a0e582 08-Sep-2010 Helmut Schaa <helmut.schaa@googlemail.com> rt2x00: Check for specific changed flags when updating the erp config

Previously rt2x00 was always updating all erp related config variables
even though mac80211 might only have changed one. Hence, pass the
changed flags to the config_erp driver callback so that the driver
can limit the changes to the correct values.

This fixes an issue in AP mode where the beacon interval is not
initialized (and thus zero) but still sent to the hardware causing an
interrupt storm on rt2800pci hanging the system.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
c965c74bbc650e5466d2f3e32bd28112ebcdd00c 11-Jul-2010 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Implement watchdog monitoring

Implement watchdog monitoring for USB devices (PCI support can
be added later). This will determine if URBs being uploaded to
the hardware are actually returning. Both rt2500usb and rt2800usb
have shown that URBs being uploaded can remain hanging without
being released by the hardware.
By using this watchdog, a queue can be reset when this occurs.
For rt2800usb it has been tested that the connection is preserved
even though this interruption.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
06443e46c65915d74b03fe1de10c00748e4706ee 03-Jun-2010 Gertjan van Wingerde <gwingerde@gmail.com> rt2x00: Fix HT40 operation in rt2800.

Closer inspection of the legacy Ralink driver reveals that in case of HT40+
or HT40- we must adjust the frequency settings that we program to the device.
Implement the same adjustment in the rt2x00 code.

With this HT40 seems to work for all devices supported by rt2800pci and
rt2800usb.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
0b8004aa12d13ec750d102ba4082a95f0107c649 03-Jun-2010 Gertjan van Wingerde <gwingerde@gmail.com> rt2x00: Properly reserve room for descriptors in skbs.

Instead of fiddling with the skb->data pointer and thereby risking
out of bounds accesses, properly reserve the space needed in an
skb for descriptors.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
b4df47081b67bce9dcb7b84b551588c7402a330a 13-May-2010 Gertjan van Wingerde <gwingerde@gmail.com> rt2x00: Move rt2x00debug_dump_frame declaration to rt2x00.h.

This allows rt2x00debug_dump_frame to be used from everywhere.

This is preparation for beacon writing clean ups.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
7351c6bd482712e5e3ec9dffc547de0e0863efb0 19-Nov-2009 Johannes Berg <johannes@sipsolutions.net> mac80211: request TX status where needed

Right now all frames mac80211 hands to the driver
have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set to
request TX status. This isn't really necessary, only
the injected frames need TX status (the latter for
hostapd) so move setting this flag.

The rate control algorithms also need TX status, but
they don't require it.

Also, rt2x00 uses that bit for its own purposes and
seems to require it being set for all frames, but
that can be fixed in rt2x00.

This doesn't really change anything for any drivers
but in the future drivers using hw-rate control may
opt to not report TX status for frames that don't
have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com> [rt2x00 bits]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
9c9a0d145fee73b5e821bb460732ac2a66c680b3 08-Nov-2009 Gertjan van Wingerde <gwingerde@gmail.com> rt2x00: Update copyright statements.

As mentioned on the linux-wireless mailing list, the current copyright
statements in the rt2x00 are meaningless, as the rt2x00 project is
not even a formal legal entity. Therefore it is better to replace
the existing copyright statements with copyright statements for the
people that actually wrote the code.

Note: Updated to the best of my knowledge with respect to who
contributed considerable amounts of code.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
CC: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
863cc978a73bc07f1de0e9a9bd9889bed6e618da 08-Nov-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Remove deprecated ieee80211_rx_status->qual usage

ieee80211_rx_status->qual has been marked deprecated.
This allows us to remove several functions and fields which
were used to calculate a reasonable value for it.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
fe2475633676b0a976400dfc53f8d7006f56543e 17-Sep-2009 Andrew Price <andy@andrewprice.me.uk> rt2x00: fix the definition of rt2x00crypto_rx_insert_iv

Remove the redundant l2pad parameter from the definition of
rt2x00crypto_rx_insert_iv which is used when only CONFIG_RT2500PCI but
none of the other rt2x00 family drivers is configured.

Signed-off-by: Andrew Price <andy@andrewprice.me.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
daee6c092aa49ea090612738253ef0d11d120344 29-Aug-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Reorganize padding & L2 padding

The old function rt2x00queue_payload_align() handled
both adding and removing L2 padding and some basic
frame alignment. The entire function was being abused
because it had multiple functions and the header length
argument was somtimes used to align the header instead
of the payload.

Additionally there was a bug when inserting L2 padding
that only the payload was aligned but not the header. This
happens when the header wasn't aligned properly by mac80211,
but rt2x00lib only moves the payload.

A secondary problem was that when removing L2 padding during
TXdone or RX the skb wasn't resized to the proper size.

Split the function into seperate functions each handling
its task as it should.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
eb87eaac52e916e28bcf3bd5974f3b581f6c0ae9 18-Jul-2009 Lars Ericsson <Lars_Ericsson@telia.com> rt2x00: Don't alter rt2x00dev->default_ant

rt2x00dev->default_ant should be initialized once by the driver,
and should not be changed afterwards. Because rt2x00lib_config_antenna()
was using a reference to the struct antenna_setup it actually had the oppurtunity
to change the default antenna setting and it actually did that during the validation.

Instead of passing a pointer to antenna_setup the entire structure should be copied.

Signed-off-by: Lars Ericsson <Lars_Ericsson@telia.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
e47a5cddf893815e7da16e3226b959af785d8aaf 01-Jul-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: use wiphy rfkill interface

Remove the input_polldev from rt2x00 and replace it with
the rfkill interface offered by the wiphy structure. This
simplifies the entire rfkill handling in rt2x00 and allows
us to remove the CONFIG_RT2X00_LIB_RFKILL option and always
enables rfkill capabilities.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb 15-Jun-2009 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6

Conflicts:
Documentation/feature-removal-schedule.txt
drivers/scsi/fcoe/fcoe.c
net/core/drop_monitor.c
net/core/net-traces.c
98a1708de1bfa5fe1c490febba850d6043d3c7fa 22-Apr-2009 Martin Olsson <martin@minimum.se> trivial: fix typos s/paramter/parameter/ and s/excute/execute/ in documentation and source comments.

Signed-off-by: Martin Olsson <martin@minimum.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
/drivers/net/wireless/rt2x00/rt2x00lib.h
206eade5a68f7a06adbe7c65e47fd88843ad0546 29-Apr-2009 Alban Browaeys <prahal@yahoo.com> rt2x00: Style fix for interval defines

Extra parenthesis are not needed in these 2 cases,
all other defines in rt2x00 are done without parenthesis
so just fixup these 2 cases.

Signed-off-by: Alban Browaeys <prahal@yahoo.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
35f00cfcc06bb85e0659f9847400518008d78145 26-Apr-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Implement support for 802.11n

Extend rt2x00lib capabilities to support 802.11n,
it still lacks aggregation support, but that can
be added in the future.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
9f1661718c7fcf82e25c6aed20b729ee372d9d65 26-Apr-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Add support for L2 padding during TX/RX

Some hardware require L2 padding between header and payload
because both must be aligned to a 4-byte boundary. This hardware
also is easier during the RX path since we no longer need to
move the entire payload but rather only the header to remove
the padding (mac80211 only wants the payload to be 4-byte aligned).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
9eb4e21e289beba9cfe34f24920eee83c144e62f 26-Apr-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Move iv_len into tx descriptor data

By placing the iv_len into the tx descriptor data and
by passing this data to the crypto IV handlers we can
save multiple calls to ieee80211_get_hdrlen_from_skb()
and some if-statements when copying/removing the IV data
from the outgoing frame.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
a2c9b652a12a550d3d8509e9bae43bac396c5076 28-Jan-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Add kill_tx_queue callback function

provide rt2x00lib the possibility to kill a particular TX queue.
This can be useful when disabling the radio, but more importantly
will allow beaconing to be disabled when mac80211 requests this
(during scanning for example)

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
5f936f11613c32ca7f8ed5fa333bb38a4501deeb 21-Jan-2009 Johannes Berg <johannes@sipsolutions.net> mac80211: constify ieee80211_if_conf.bssid

Then one place can be a static const.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
4e54c711b42c3cc8da8a3fdcde3407b86d67ebcc 17-Jan-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Update copyright year to 2009

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
cca3e99861e883358ceb39ad17c9eaee082138a5 03-Jan-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Replace RFKILL with INPUT

As discussed on linux-wireless rt2x00 does not offer a true RFKILL key,
for that reason RFKILL support should be entirely removed.

The key which is attached to the hardware should be treated as normal
input device instead. Implement input_poll_dev support to poll the device
frequently. When the key status has changed report it as a SW event.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
7b40982e235d6ff9343d38703eb48a0143afcc26 20-Dec-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Move code into seperate functions

Some functions have grown rapidly in size over the last time,
some of those functions (like the rt2x00queue_create_tx_descriptor)
will further increase in size soon, so it is best to start cutting
it into logical pieces.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
84e3196ff867c623056eea02c11a45e046490d89 20-Dec-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Move link tuning into seperate file

Move link and antenna tuning into a seperate file named rt2x00link.c,
this makes the interface to the link tuner a lot cleaner.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
3ea96463156123cbfd09ac412012a87fef068830 04-Jan-2009 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Fix TX short preamble detection

The short preamble mode was not correctly detected during TX,
rt2x00 used the rate->hw_value_short field but mac80211 is not
using this field that way.
Instead the flag IEEE80211_TX_RC_USE_SHORT_PREAMBLE should be
used to determine if the frame should be send out using
short preamble or not.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
9c3444d33e65ade06af82d19522686c1873b953a 03-Dec-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Move crypto TX descriptor handling to rt2x00crypto.c

Move all code which determines the right TX descriptor
fields specific to crypto support into rt2x00crypto.c.
This makes the code in rt2x00queue more simpler and
better concentrates all crypto code into a single location.

With this we can also remove some ifdefs in rt2x00queue.c
since the code inside the ifdef is either very small, or
only calling empty functions (see empty function definitions
in rt2x00lib.h).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
dddfb478b26e29a2b47f655ec219e743b8111015 02-Dec-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Implement HW encryption (rt2500usb)

rt2500usb supports hardware encryption.
rt2500usb supports up to 4 shared and pairwise keys.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
798b7adb4ed3533ab1282f51d16892034cfd8aae 08-Nov-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Cleanup TX/RX entry handling

Merge the callback functions init_txentry() and
init_rxentry(). This makes life in rt2x00lib a
lot simpler and we can cleanup several functions.

rt2x00pci contained "fake" FIELD definitions for
descriptor words. This is not flexible since it
assumes the driver will always have the same field
to indicate if a driver is available or not.
This should be dependent on the driver, and we
should add a callback function for this.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
6d64360ac56cda95243f15738a06f2a123c663e5 02-Nov-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Fix BUG_ON() with antenna handling

With the new configuration handling, and more specifically
splitting the configuration of the antenna from the normal
configuration steps allowed a BUG_ON() to be triggered
in the driver because the SW_DIVERSITY was send to the
driver. This fixes that by catching the value early in
rt2x00config.c and replacing it with a sensible value.

This also fixes a problem where the antenna is not being
initialized at all when the radio is enabled. Since it
no longer is part of the mac80211 configuration the
only place where rt2x00 configured it was the SW diversity
handler. Obviously this is broken for all non-diversity
hardware and breaks SW diversity due to a broken initialization.

When the radio is enabled the antenna will be configured
once as soon as the config() callback function is called.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
3d8606a680529d41ad8985f36ecf83a7b393ecaf 02-Nov-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Remove RATE_BASIC flag

mac80211 is in charge of determining the basic rates,
so we are not using the RATE_BASIC flag anymore.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
e4ea1c403acece78c271bf9cd6f797d1cb093df9 29-Oct-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Optimize configuration handling

Implement latest changed from mac80211 configuration
handling to optmize configuration handling in rt2x00.

* Remove set_retry_limit callback function, handled
through config()
* Move config_antenna to its own callback function,
it isn't handled by mac80211 anymore
* Use IEEE80211_CONF_CHANGED_* flags and remove manual
checks
* Removed deprecated short slot setting through config()
and put it in config_erp() through which mac80211 now
configures it
* Remove config_phymode() and move contents to config_erp()
since it only managed the basic rates which is now
determined by mac80211 through config_erp().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
05c914fe330fa8e1cc67870dc0d3809dfd96c107 11-Sep-2008 Johannes Berg <johannes@sipsolutions.net> mac80211: use nl80211 interface types

There's really no reason for mac80211 to be using its
own interface type defines. Use the nl80211 types and
simplify the configuration code a bit: there's no need
to translate them any more now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
2bb057d07a0bc17475a7bf897fc41667ab08b73f 04-Aug-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Implement HW encryption

Various rt2x00 devices support hardware encryption.

Most of them require the IV/EIV to be generated by mac80211,
but require it to be provided seperately instead of within
the frame itself. This means that rt2x00lib should extract
the data from the frame and place it in the frame descriptor.
During RX the IV/EIV is provided in the descriptor by the
hardware which means that it should be inserted into the
frame by rt2x00lib.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
ed06387b44f0501f7298b559dc8ddfcd410c8fa0 19-Jul-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Remove duplicate declaration

rt2x00queue_free_skb() was declared twice.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
bd88a7812f1afd50549f3789cacb707b983fef54 09-Jul-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Reorganize beacon handling

With the new beacon handling from mac80211 we can
reorganize the beacon handling in rt2x00 as well.
This patch will move the function to the TX handlers,
and move all duplicate code into rt2x00queue.c.

After this change the descriptor helper functions
from rt2x00queue.c no longer need to be exported
outside of rt2x00lib and can be declared static.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
50db7875d9dcd89f7624b13535738612faf8db0c 04-Jul-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Remove input_polldev requirements for rfkill

With the new rfkill interface there is no longer a need
for the input_polldev. Create a delayed_work structure
which we can put on the mac80211 workqueue and poll the
hardware every 1000ms.

v2: Decrease poll frequency from 100ms to 1000ms

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
d74f5ba473b915e5d4ea1ed391984bb62d9de8b1 16-Jun-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Cleanup symbol exports

With a bit of code moving to rt2x00lib within the
TX and RX paths we can now remove a lot of EXPORT_SYMBOL_GPL()
statements. This cleans up the interface between rt2x00lib
and the drivers and has the additional benefit that rt2x00pci
and rt2x00usb are trimmed down in size as well since they
have less to do.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
6db3786aee36b32e5ed072ed67fad6d5341b0991 06-Jun-2008 Ivo van Doorn <IvDoorn@gmail.com> rt2x00: Move generic TX frame writing code into rt2x00queue

The write_tx_data functions in rt2x00pci and rt2x00usb have
a lot in common. This moves that duplicate code into
rt2x00queue_write_tx_frame().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
5a6e59991b82580c3ca00115603b85762ec76104 10-May-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: trim skb_frame_desc to 32 bytes

Remove frame_type from skb_frame_desc and pass it
as argument to rt2x00debug_dump_frame().

Change data_len and desc_len to unsigned short
to save another 4 bytes in skb_frame_desc. Note that
this was the only location where the data_len and
desc_len was not yet treated as unsigned short.

This trim is required to help mac80211 with adding
the TX control and TX status informtation into the
skb->cb structure. When that happens, drivers will
have approximately 40 bytes left to use freely.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
61c2b682b8391f13b67e2d95990a0aba34697d9c 21-Apr-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Fix quality/activity led handling

There was an obvious typo in LED structure
initialization which caused the radio and quality/activity
leds to be incorrectly initialized which resulted in
the leds not being enabled.

Additionally add the rt2x00led_led_activity() handler
that will enable TX/RX activity leds when the radio
is being enabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
a2e1d52a32eab53f8ab03c4023310f65aaa054a7 31-Mar-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Remove MAC80211_LEDS dependency

Implement triggers inside rt2x00 itself based
on input from mac80211. This replaces the method
of using the mac80211 trigger events which do
not work for USB drivers due to the scheduling
requirement.

After this patch RT2500USB_LEDS and RT73USB_LEDS
no longer need to be tagged as broken since they
now support LED handling again without having to
check for in_atomic().

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
577f99c1d08cf9cbdafd4e858dd13ff04d855090 18-Mar-2008 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:

drivers/net/wireless/rt2x00/rt2x00dev.c
net/8021q/vlan_dev.c
aa776721b472e343a8db7f3c0673b1fa24e6c7f7 09-Mar-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Fix basic rate initialization

The basic rate which is configured in the register
should not match all supported rates, but only the _basic_ rates.

Fix this by adding a new flag to the rt2x00_rate structure
and whenever the mode is changed, loop over all available rates
for that band to get the basic rate mask.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
72fa559bf44aab30ac5fc8317472ef3441f4aa64 09-Mar-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Make rt2x00leds_register return void

rt2x00dev isn't interested in the rt2x00leds_register() value
anyway. So lets make it return void to even prevent people from
assuming there is anybody interested in the returnvalue.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
728103794316f7ff8d98bc2ce044aff7a260ee21 09-Mar-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Rename config_preamble() to config_erp()

Rename config_preamble() to config_erp() and cleanup argument
list by putting it all into a single structure.
This will make the function more meaningful and easier to
expand later. This second option is mostly intended to make
the patch "mac80211: proper short-slot handling" from Johannes Berg
easier to apply for rt2x00.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
1682fe6de206bd1e937529cbb393915e5ea40b2c 13-Mar-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Add suspend/resume handlers to rt2x00rfkill

Add suspend/resume handlers to rt2x00rfkill to have it stop
the input-polldev and prevent it from calling rt2x00 during
suspend period. This could lead to a NULL pointer fault when
rt2x00 suspended, but polldev send a request, because
the csr_addr is NULL.

Also don't let the rfkill allocation/registration block
the initialization of the entire device. Just print a warning
and continue as if nothing happened.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
31562e802a72caf0757f351fff563d558d48d087 17-Feb-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Cleanup mode registration

Don't wildly pass any number for num_rates to rt2x00lib,
instead pass which type of rates are supported (CCK, OFDM).
Same for num_modes but then for the 2GHZ and 5GHZ band.

This makes the interface look much nicer and makes
extending it later easier.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
a9450b70a755abf093600035ef5361c53343fe9a 03-Feb-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Make use of MAC80211_LED_TRIGGERS

Make use of the led triggers provided by mac80211 to control
the led status. This can be enabled through a per-driver
configuration option which will automatically enable the
generic handler in rt2x00lib.

This has been enabled for rt2500usb and rt73usb for the moment
since the led class will call set_brightness in irq context which
will not work correctly with the usb drivers who need to sleep.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
70e2fed4ec14df84ed72554d573794714b15a078 03-Feb-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Rate structure overhaul

Recent changes to the rate structure registration broke rt2x00,
the hw_value was reduced from 32bits to 16bits while rt2x00 used
the full 32bits. However the way rt2x00 used the value was inflexible
and needed to be changed anyway.

This patch creates a array containing information for each rate,
the hw_value passed to mac80211 is the index value for that array
including a field to indicate if short preamble should be enabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
6bb40dd13b458beb55f5c60dba1cb28e814bd640 03-Feb-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Add per-interface structure

Rework the interface handling. Delete the interface structure
and replace it with a per-interface structure. This changes the
way rt2x00 handles the active interface drastically.

Copy ieee80211_bss_conf to the this rt2x00_intf structure during
the bss_info_changed() callback function. This will allow us to
reference it later, and removes the requirement for the device flag
SHORT_PREAMBLE flag which is interface specific.

Drivers receive the option to give the maximum number of virtual
interfaces the device can handle. Virtual interface support:
rt2400pci: 1 sta or 1 ap, * monitor interfaces
rt2500pci: 1 sta or 1 ap, * monitor interfaces
rt2500usb: 1 sta or 1 ap, * monitor interfaces
rt61pci: 1 sta or 4 ap, * monitor interfaces
rt73usb: 1 sta or 4 ap, * monitor interfaces

At the moment none of the drivers support AP and STA interfaces
simultaneously, this is a hardware limitation so future support
will be very unlikely.

Each interface structure receives its dedicated beacon entry,
with this we can easily work with beaconing while multiple master
mode interfaces are currently active.

The configuration handlers for the MAC, BSSID and type are
often called together since they all belong to the interface
configuration. Merge the 3 configuration calls and cleanup
the API between rt2x00lib and the drivers. While we are cleaning
up the interface configuration anyway, we might as well clean up
the configuration handler as well.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
181d6902b6bad978d157e69479c95cc0ff213a76 05-Feb-2008 Ivo van Doorn <IvDoorn@gmail.com> rt2x00: Queue handling overhaul

This introduces a big queue handling overhaul, this also
renames "ring" to "queues".

Move queue handling into rt2x00queue.c and the matching header,
use Kerneldoc to improve rt2x00 library documentation.

Access to the queues is now protected under a spinlock, this
to prevent race conditions which could corrupt the indexing
system of the queue.

Each queue entry allocates x bytes for driver/device specific data,
this cleans up the queue structure significantly and improves
code readability.

rt2500usb no longer needs 2 entries in the beacon queue to correctly
send out the guardian byte. This is now handled in the entry specific
structure.

rt61 and rt73 now use the correct descriptor size for beacon frames,
since this data is written into the registers not the entire TXD
descriptor was used but instead of a subset of it named TXINFO.

Finally this also fixes numerous other bugs related to incorrect
beacon handling or beacon related code.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
811aa9cad1bd927999888ab56ed9592519d2fef6 03-Feb-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Update copyright notice

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
e37ea2135be080dd25f1a2644c9132c109fa77d1 06-Jan-2008 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Move start() and stop() handlers into rt2x00lib.c

suspend & resume was broken since it called rt2x00mac_start()
and rt2x00mac_stop() which would fail to execute because the
DEVICE_PRESENT flag was not set.

Move the start and stop handlers into rt2x00lib.c which are called
from rt2x00mac_start() and rt2x00mac_stop() after they have checked
the DEVICE_PRESENT flag, while suspend and resume handlers can
directly call those functions.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
2b1ea591f6714729e5a998064ba9bff503137aa8 04-Dec-2007 John W. Linville <linville@tuxdriver.com> rt2x00: correct "skb_buff" typo

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
/drivers/net/wireless/rt2x00/rt2x00lib.h
4d8dd66c1659ba0d1b110ed0488f4f6ffbc90e71 27-Nov-2007 Ivo van Doorn <ivdoorn@gmail.com> rt2x00: Add TX/RX frame dumping facility

This adds TX/RX frame dumping capabilities through debugfs.
The intention is that with this approach debugging of rt2x00 is
simplified since _all_ frames going in and out of the device
are send to debugfs as well along with additional information
like the hardware descriptor.

Based on the patch by Mattias Nissler.
Mattias also has some tools that will make the dumped frames
available to wireshark: http://www-user.rhrk.uni-kl.de/~nissler/rt2x00/

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
69f81a2cac860cf183eb9ef7787525c3552d4612 13-Oct-2007 Ivo van Doorn <ivdoorn@gmail.com> [PATCH] rt2x00: Implement SW diversity

When mac80211 indicates that the default antenna setup
should be used _and_ that this default setup is SW_DIVERSITY.

This requires sampling and storing the RSSI per antenna
and check once every 2 seconds to determine if the RSSI
has changed significantly. Once this is the case we should sample
the other antenna for a short period and evaluate if
we need to swap antenna or not.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/rt2x00/rt2x00lib.h
b239bd759869a82bbb8ecf94ff10634b6829313d 15-Oct-2007 Anton Blanchard <anton@samba.org> [PATCH] rt2x00: jiffies_round -> jiffies_round_relative

When rounding a relative timeout we need to use round_jiffies_relative().

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
5cbf830e137d1b6057cb6b553a8ebbb7d1b9343f 06-Oct-2007 Ivo van Doorn <ivdoorn@gmail.com> [PATCH] rt2x00: Pass dev_state to rt2x00lib_toggle_rx

Directly pass a value from the enum dev_state with rt2x00lib_toggle_rx,
this will save us a ? : statement, and it is clearer then passing a 1 0
argument.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
feb24691e3e87a740caec4568be1a202db786f20 06-Oct-2007 Ivo van Doorn <ivdoorn@gmail.com> [PATCH] rt2x00: Move TSF sync values into rt2x00config

All drivers use the same values for TSF sync,
this will move the value determination into rt2x00config.c,
and the definition for the values to rt2x00reg.h

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
81873e9ccd5731ca77027bdb32b34904e7af25d0 06-Oct-2007 Ivo van Doorn <ivdoorn@gmail.com> [PATCH] rt2x00: Fix rfkill handling

As reported by Modestas Vainius, enabling rkfill in 1 driver and
disabling it in a second could cause a NULL pointer exception when
the rfkill-disabled driver still sets the CONFIG_SUPPORT_HW_BUTTON flag.

Furthermore, rfkill expects the timeout as a value in milliseconds
instead of jiffies. Also increase the timeout to a second,
since this 250ms would be overkill.

Also the flag DEVICE_ENABLED_RADIO_HW is causing problems
for devices which do not support the hardware button
while rfkill is enabled in the driver.

To remidy this we should inverse the flag and its meaning,
rename the flag to DEVICE_DISABLED_RADIO_HW this means that
by default the radio is enabled by the hardware button (if present)
and can only be disabled explicitely.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
066cb637b1b562bebd09d237bfaaca6724f247e5 25-Sep-2007 Ivo van Doorn <ivdoorn@gmail.com> [PATCH] rt2x00: Reorganize rt2x00dev->flags

The rt2x00dev->flags has become a chaos over time,
this will reorganize the flags by renaming, deleting, adding
and properly implement the flags.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
4150c57212ad134765dd78c654a4b9906252b66d 17-Sep-2007 Johannes Berg <johannes@sipsolutions.net> [PATCH] mac80211: revamp interface and filter configuration

Drivers are currently supposed to keep track of monitor
interfaces if they allow so-called "hard" monitor, and
they are also supposed to keep track of multicast etc.

This patch changes that, replaces the set_multicast_list()
callback with a new configure_filter() callback that takes
filter flags (FIF_*) instead of interface flags (IFF_*).
For a driver, this means it should open the filter as much
as necessary to get all frames requested by the filter flags.
Accordingly, the filter flags are named "positively", e.g.
FIF_ALLMULTI.

Multicast filtering is a bit special in that drivers that
have no multicast address filters need to allow multicast
frames through when either the FIF_ALLMULTI flag is set or
when the mc_count value is positive.

At the same time, drivers are no longer notified about
monitor interfaces at all, this means they now need to
implement the start() and stop() callbacks and the new
change_filter_flags() callback. Also, the start()/stop()
ordering changed, start() is now called *before* any
add_interface() as it really should be, and stop() after
any remove_interface().

The patch also changes the behaviour of setting the bssid
to multicast for scanning when IEEE80211_HW_NO_PROBE_FILTERING
is set; the IEEE80211_HW_NO_PROBE_FILTERING flag is removed
and the filter flag FIF_BCN_PRBRESP_PROMISC introduced.
This is a lot more efficient for hardware like b43 that
supports it and other hardware can still set the BSSID
to all-ones.

Driver modifications by Johannes Berg (b43 & iwlwifi), Michael Wu
(rtl8187, adm8211, and p54), Larry Finger (b43legacy), and
Ivo van Doorn (rt2x00).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/rt2x00/rt2x00lib.h
95ea36275f3c9a1d3d04c217b4b576c657c4e70e 26-Sep-2007 Ivo van Doorn <IvDoorn@gmail.com> [RT2x00]: add driver for Ralink wireless hardware

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/rt2x00/rt2x00lib.h