<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/wireless/rt2x00/rt2x00dev.c, branch v3.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>rt2x00: Fix sleep-while-atomic bug in powersaving code.</title>
<updated>2011-11-15T15:02:56+00:00</updated>
<author>
<name>Gertjan van Wingerde</name>
<email>gwingerde@gmail.com</email>
</author>
<published>2011-11-12T18:10:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ed66ba472a742cd8df37d7072804b2111cdb1014'/>
<id>ed66ba472a742cd8df37d7072804b2111cdb1014</id>
<content type='text'>
The generic powersaving code that determines after reception of a frame
whether the device should go back to sleep or whether is could stay
awake was calling rt2x00lib_config directly from RX tasklet context.
On a number of the devices this call can actually sleep, due to having
to confirm that the sleeping commands have been executed successfully.

Fix this by moving the call to rt2x00lib_config to a workqueue call.

This fixes bug https://bugzilla.redhat.com/show_bug.cgi?id=731672

Tested-by: Tomas Trnka &lt;tomastrnka@gmx.com&gt;
Signed-off-by: Gertjan van Wingerde &lt;gwingerde@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The generic powersaving code that determines after reception of a frame
whether the device should go back to sleep or whether is could stay
awake was calling rt2x00lib_config directly from RX tasklet context.
On a number of the devices this call can actually sleep, due to having
to confirm that the sleeping commands have been executed successfully.

Fix this by moving the call to rt2x00lib_config to a workqueue call.

This fixes bug https://bugzilla.redhat.com/show_bug.cgi?id=731672

Tested-by: Tomas Trnka &lt;tomastrnka@gmx.com&gt;
Signed-off-by: Gertjan van Wingerde &lt;gwingerde@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2x00: Introduce sta_add/remove callbacks</title>
<updated>2011-09-14T17:56:54+00:00</updated>
<author>
<name>Helmut Schaa</name>
<email>helmut.schaa@googlemail.com</email>
</author>
<published>2011-09-08T12:36:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b4943d8113500ee783072ba2ba7506ad76df3726'/>
<id>b4943d8113500ee783072ba2ba7506ad76df3726</id>
<content type='text'>
This implements a basic sta_add and sta_remove callback. Introduce a new
structure rt2x00_sta and ask mac80211 to allocate it as private part of
its ieee80211_sta. rt2x00_sta only contains the WCID for now.

The sta_add callback allows the driver to assign a WCID to a station
that is currently being added. The same wcid is also passed to the
sta_remove callback one mac80211 removes this STA.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements a basic sta_add and sta_remove callback. Introduce a new
structure rt2x00_sta and ask mac80211 to allocate it as private part of
its ieee80211_sta. rt2x00_sta only contains the WCID for now.

The sta_add callback allows the driver to assign a WCID to a station
that is currently being added. The same wcid is also passed to the
sta_remove callback one mac80211 removes this STA.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2x00: Move bssidx calculation into its own function</title>
<updated>2011-09-14T17:56:53+00:00</updated>
<author>
<name>Helmut Schaa</name>
<email>helmut.schaa@googlemail.com</email>
</author>
<published>2011-09-08T12:34:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=183255235aadefd5a987021346e7aee2cbe721eb'/>
<id>183255235aadefd5a987021346e7aee2cbe721eb</id>
<content type='text'>
This will be used by a later patch. No functional changes.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be used by a later patch. No functional changes.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2x00: Fix PCI interrupt processing race on SMP systems</title>
<updated>2011-08-09T19:52:08+00:00</updated>
<author>
<name>Helmut Schaa</name>
<email>helmut.schaa@googlemail.com</email>
</author>
<published>2011-08-06T11:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=abc11994112bf7441519e35f51c29ff5de5b0d4d'/>
<id>abc11994112bf7441519e35f51c29ff5de5b0d4d</id>
<content type='text'>
When toggle_irq is called for PCI devices to disable device interrupts
it used tasklet_disable to wait for a possibly running tasklet to finish.
However, on SMP systems the tasklet might still be scheduled on another CPU.
Instead, use tasklet_kill to ensure that all scheduled tasklets are finished
before returning from toggle_irq.

Furthermore, it was possible that a tasklet reenabled its interrupt even
though interrupts have been disabled already. Fix this by checking the
DEVICE_STATE_ENABLED_RADIO flag before reenabling single interrupts
during tasklet processing.

While at it also enable/kill the TBTT and PRETBTT tasklets in the
toggle_irq callback and only use tasklet_kill in stop_queue to wait
for a currently scheduled beacon update before returning.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When toggle_irq is called for PCI devices to disable device interrupts
it used tasklet_disable to wait for a possibly running tasklet to finish.
However, on SMP systems the tasklet might still be scheduled on another CPU.
Instead, use tasklet_kill to ensure that all scheduled tasklets are finished
before returning from toggle_irq.

Furthermore, it was possible that a tasklet reenabled its interrupt even
though interrupts have been disabled already. Fix this by checking the
DEVICE_STATE_ENABLED_RADIO flag before reenabling single interrupts
during tasklet processing.

While at it also enable/kill the TBTT and PRETBTT tasklets in the
toggle_irq callback and only use tasklet_kill in stop_queue to wait
for a currently scheduled beacon update before returning.

Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2x00: fix possible memory corruption in case of invalid rxdesc.size</title>
<updated>2011-06-22T20:09:44+00:00</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>stf_xl@wp.pl</email>
</author>
<published>2011-06-19T17:46:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7f503fc49f144bb509dbd33daf3426df3f176e6b'/>
<id>7f503fc49f144bb509dbd33daf3426df3f176e6b</id>
<content type='text'>
Sometimes rxdesc descriptor provided by hardware contains invalid
(random) data. For example rxdesc.size can be bigger than actual
size of the buffer. When this happen rt2x00crypto_rx_insert_iv()
corrupt memory doing memmove outside of buffer boundaries.

Signed-off-by: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes rxdesc descriptor provided by hardware contains invalid
(random) data. For example rxdesc.size can be bigger than actual
size of the buffer. When this happen rt2x00crypto_rx_insert_iv()
corrupt memory doing memmove outside of buffer boundaries.

Signed-off-by: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2x00: fix rmmod crash</title>
<updated>2011-06-06T19:24:18+00:00</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>stf_xl@wp.pl</email>
</author>
<published>2011-06-04T14:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3bb42a64960253353278876ca8da6b0a7d3bea87'/>
<id>3bb42a64960253353278876ca8da6b0a7d3bea87</id>
<content type='text'>
Avoid queue and run autowakeup_work when device is not present anymore.
That prevent rmmod and device remove crash introduced by:

commit 1c0bcf89d85cc97a0d9ce4cd909351a81fa4fdde
Author: Ivo van Doorn &lt;ivdoorn@gmail.com&gt;
Date:   Sat Apr 30 17:18:18 2011 +0200

    rt2x00: Add autowake support for USB hardware

Signed-off-by: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid queue and run autowakeup_work when device is not present anymore.
That prevent rmmod and device remove crash introduced by:

commit 1c0bcf89d85cc97a0d9ce4cd909351a81fa4fdde
Author: Ivo van Doorn &lt;ivdoorn@gmail.com&gt;
Date:   Sat Apr 30 17:18:18 2011 +0200

    rt2x00: Add autowake support for USB hardware

Signed-off-by: Stanislaw Gruszka &lt;stf_xl@wp.pl&gt;
Acked-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2x00: Fix rmmod hang of rt2800pci</title>
<updated>2011-05-10T19:54:48+00:00</updated>
<author>
<name>Gertjan van Wingerde</name>
<email>gwingerde@gmail.com</email>
</author>
<published>2011-05-07T15:27:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9a24af1136e6d08c73010205caa282f46223aed5'/>
<id>9a24af1136e6d08c73010205caa282f46223aed5</id>
<content type='text'>
txstatus_timer should only be deleted for USB devices, as it is only
initialized for USB devices.

Reported-by: Andreas Hartmann &lt;andihartmann@01019freenet.de&gt;
Signed-off-by: Gertjan van Wingerde &lt;gwingerde@gmail.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
txstatus_timer should only be deleted for USB devices, as it is only
initialized for USB devices.

Reported-by: Andreas Hartmann &lt;andihartmann@01019freenet.de&gt;
Signed-off-by: Gertjan van Wingerde &lt;gwingerde@gmail.com&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2x00: Add autowake support for USB hardware</title>
<updated>2011-05-02T18:49:19+00:00</updated>
<author>
<name>Ivo van Doorn</name>
<email>ivdoorn@gmail.com</email>
</author>
<published>2011-04-30T15:18:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1c0bcf89d85cc97a0d9ce4cd909351a81fa4fdde'/>
<id>1c0bcf89d85cc97a0d9ce4cd909351a81fa4fdde</id>
<content type='text'>
The USB drivers don't support automatically waking up when in powersaving mode,
add a work object which will wakeup the device in time to receive the next beacon.
Based on that beacon, we either go back into powersaving mode, or we remain awake
to receive the buffered frames for our station.

Some part of the code, especially rt2x00lib_find_ie and rt2x00lib_rxdone_check_ps
are inspired on the code from carl9170.

Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The USB drivers don't support automatically waking up when in powersaving mode,
add a work object which will wakeup the device in time to receive the next beacon.
Based on that beacon, we either go back into powersaving mode, or we remain awake
to receive the buffered frames for our station.

Some part of the code, especially rt2x00lib_find_ie and rt2x00lib_rxdone_check_ps
are inspired on the code from carl9170.

Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2800usb: add timer to handle TX_STA_FIFO</title>
<updated>2011-04-19T19:39:35+00:00</updated>
<author>
<name>Johannes Stezenbach</name>
<email>js@sig21.net</email>
</author>
<published>2011-04-18T13:30:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f0187a1987ed6524518ff2a533eaf8394ac1a500'/>
<id>f0187a1987ed6524518ff2a533eaf8394ac1a500</id>
<content type='text'>
TX status is reported by the hardware when a packet has been
sent (or after TX failed after possible retries), which is some
time after the DMA completion.  Since the rt2800usb hardware can
not signal interrupts we have to use a timer, otherwise the
TX status would only be read by the next packet's TX DMA
completion, or by the watchdog thread.

Signed-off-by: Johannes Stezenbach &lt;js@sig21.net&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TX status is reported by the hardware when a packet has been
sent (or after TX failed after possible retries), which is some
time after the DMA completion.  Since the rt2800usb hardware can
not signal interrupts we have to use a timer, otherwise the
TX status would only be read by the next packet's TX DMA
completion, or by the watchdog thread.

Signed-off-by: Johannes Stezenbach &lt;js@sig21.net&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rt2x00: fix queue timeout checks</title>
<updated>2011-04-19T19:39:30+00:00</updated>
<author>
<name>Johannes Stezenbach</name>
<email>js@sig21.net</email>
</author>
<published>2011-04-18T13:29:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=75256f0348d38f414b7ac50ac78d4a4532bb6762'/>
<id>75256f0348d38f414b7ac50ac78d4a4532bb6762</id>
<content type='text'>
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 &lt;js@sig21.net&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;js@sig21.net&gt;
Signed-off-by: Ivo van Doorn &lt;IvDoorn@gmail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
