<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/wireless/ath/ath5k, branch v4.4.115</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ath5k: drop bogus warning on drv_set_key with unsupported cipher</title>
<updated>2017-03-12T05:37:28+00:00</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@nbd.name</email>
</author>
<published>2017-01-11T14:32:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dc7bbf895e438014c15d21222d0ba7544e98999d'/>
<id>dc7bbf895e438014c15d21222d0ba7544e98999d</id>
<content type='text'>
commit a70e1d6fd6b5e1a81fa6171600942bee34f5128f upstream.

Simply return -EOPNOTSUPP instead.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a70e1d6fd6b5e1a81fa6171600942bee34f5128f upstream.

Simply return -EOPNOTSUPP instead.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>ath5k: Change led pin configuration for compaq c700 laptop</title>
<updated>2016-06-08T01:14:33+00:00</updated>
<author>
<name>Joseph Salisbury</name>
<email>joseph.salisbury@canonical.com</email>
</author>
<published>2016-03-14T18:51:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ab1619f4f94b908bfa33ef7eb505c50955741eb4'/>
<id>ab1619f4f94b908bfa33ef7eb505c50955741eb4</id>
<content type='text'>
commit 7b9bc799a445aea95f64f15e0083cb19b5789abe upstream.

BugLink: http://bugs.launchpad.net/bugs/972604

Commit 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin
configuration for compaq c700 laptop") added a pin configuration for the Compaq
c700 laptop.  However, the polarity of the led pin is reversed.  It should be
red for wifi off and blue for wifi on, but it is the opposite.  This bug was
reported in the following bug report:
http://pad.lv/972604

Fixes: 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin configuration for compaq c700 laptop")
Signed-off-by: Joseph Salisbury &lt;joseph.salisbury@canonical.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 7b9bc799a445aea95f64f15e0083cb19b5789abe upstream.

BugLink: http://bugs.launchpad.net/bugs/972604

Commit 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin
configuration for compaq c700 laptop") added a pin configuration for the Compaq
c700 laptop.  However, the polarity of the led pin is reversed.  It should be
red for wifi off and blue for wifi on, but it is the opposite.  This bug was
reported in the following bug report:
http://pad.lv/972604

Fixes: 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin configuration for compaq c700 laptop")
Signed-off-by: Joseph Salisbury &lt;joseph.salisbury@canonical.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>debugfs: Pass bool pointer to debugfs_create_bool()</title>
<updated>2015-10-04T10:36:07+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2015-09-26T22:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=621a5f7ad9cd1ce7933f1d302067cbd58354173c'/>
<id>621a5f7ad9cd1ce7933f1d302067cbd58354173c</id>
<content type='text'>
Its a bit odd that debugfs_create_bool() takes 'u32 *' as an argument,
when all it needs is a boolean pointer.

It would be better to update this API to make it accept 'bool *'
instead, as that will make it more consistent and often more convenient.
Over that bool takes just a byte.

That required updates to all user sites as well, in the same commit
updating the API. regmap core was also using
debugfs_{read|write}_file_bool(), directly and variable types were
updated for that to be bool as well.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Its a bit odd that debugfs_create_bool() takes 'u32 *' as an argument,
when all it needs is a boolean pointer.

It would be better to update this API to make it accept 'bool *'
instead, as that will make it more consistent and often more convenient.
Over that bool takes just a byte.

That required updates to all user sites as well, in the same commit
updating the API. regmap core was also using
debugfs_{read|write}_file_bool(), directly and variable types were
updated for that to be bool as well.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Acked-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath5k: use DECLARE_EWMA</title>
<updated>2015-08-20T21:10:22+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2015-08-19T07:46:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=46f26ddf562e7495ffa37144be5e447aeb13795e'/>
<id>46f26ddf562e7495ffa37144be5e447aeb13795e</id>
<content type='text'>
This reduces code size slightly (at least on x86/64) while also
removing memory consumption by two unsigned long values for each
ath5k device.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reduces code size slightly (at least on x86/64) while also
removing memory consumption by two unsigned long values for each
ath5k device.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: convert HW flags to unsigned long bitmap</title>
<updated>2015-06-10T14:05:36+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2015-06-02T19:39:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=30686bf7f5b3c30831761e188a6e3cb33580fa48'/>
<id>30686bf7f5b3c30831761e188a6e3cb33580fa48</id>
<content type='text'>
As we're running out of hardware capability flags pretty quickly,
convert them to use the regular test_bit() style unsigned long
bitmaps.

This introduces a number of helper functions/macros to set and to
test the bits, along with new debugfs code.

The occurrences of an explicit __clear_bit() are intentional, the
drivers were never supposed to change their supported bits on the
fly. We should investigate changing this to be a per-frame flag.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As we're running out of hardware capability flags pretty quickly,
convert them to use the regular test_bit() style unsigned long
bitmaps.

This introduces a number of helper functions/macros to set and to
test the bits, along with new debugfs code.

The occurrences of an explicit __clear_bit() are intentional, the
drivers were never supposed to change their supported bits on the
fly. We should investigate changing this to be a per-frame flag.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: extend get_tkip_seq to all keys</title>
<updated>2015-05-06T11:29:59+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2015-04-20T16:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9352c19f639354f093cb5457315c01bcb94aa82a'/>
<id>9352c19f639354f093cb5457315c01bcb94aa82a</id>
<content type='text'>
Extend the function to read the TKIP IV32/IV16 to read the IV/PN for
all ciphers in order to allow drivers with full hardware crypto to
properly support this.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extend the function to read the TKIP IV32/IV16 to read the IV/PN for
all ciphers in order to allow drivers with full hardware crypto to
properly support this.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: make LED trigger names const</title>
<updated>2015-05-05T12:21:55+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2015-04-23T10:09:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f5c4ae07992ca64d8628a11439c184baf5595e4b'/>
<id>f5c4ae07992ca64d8628a11439c184baf5595e4b</id>
<content type='text'>
This is just a code cleanup, make the LED trigger names const
as they're not expected to be modified by drivers.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is just a code cleanup, make the LED trigger names const
as they're not expected to be modified by drivers.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: remove support for IFF_PROMISC</title>
<updated>2015-04-24T09:14:13+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2015-04-22T12:40:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=df1404650ccbfeb76a84f301f22316be0d00a864'/>
<id>df1404650ccbfeb76a84f301f22316be0d00a864</id>
<content type='text'>
This support is essentially useless as typically networks are encrypted,
frames will be filtered by hardware, and rate scaling will be done with
the intended recipient in mind. For real monitoring of the network, the
monitor mode support should be used instead.

Removing it removes a lot of corner cases.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This support is essentially useless as typically networks are encrypted,
frames will be filtered by hardware, and rate scaling will be done with
the intended recipient in mind. For real monitoring of the network, the
monitor mode support should be used instead.

Removing it removes a lot of corner cases.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath5k: fix reset race</title>
<updated>2015-03-13T13:11:53+00:00</updated>
<author>
<name>Sergey Ryazanov</name>
<email>ryazanov.s.a@gmail.com</email>
</author>
<published>2015-03-04T02:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ab5e290a86075c09201deb55c566f875ef4649d7'/>
<id>ab5e290a86075c09201deb55c566f875ef4649d7</id>
<content type='text'>
To prepare for reset ath5k should finish all asynchronous tasks. At
first, it disables the interrupt generation, then it waits for the
interrupt handler and tasklets completion, and then proceeds to the HW
configuration update. But it does not consider that the interrupt
handler or tasklet re-enables the interrupt generation. And we fall in a
situation when ath5k assumes that interrupts are disabled, but it is
not.

This can lead to different consequences, such as reception of the frame,
when we do not expect it. Under certain circumstances, this can lead to
the following warning:

  WARNING: at ath5k/base.c:589 ath5k_tasklet_rx+0x318/0x6ec [ath5k]()
  invalid hw_rix: 1a
  [..]
  Call Trace:
  [&lt;802656a8&gt;] show_stack+0x48/0x70
  [&lt;802dd92c&gt;] warn_slowpath_common+0x88/0xbc
  [&lt;802dd98c&gt;] warn_slowpath_fmt+0x2c/0x38
  [&lt;81b51be8&gt;] ath5k_tasklet_rx+0x318/0x6ec [ath5k]
  [&lt;8028ac64&gt;] tasklet_action+0x8c/0xf0
  [&lt;80075804&gt;] __do_softirq+0x180/0x32c
  [&lt;80196ce8&gt;] irq_exit+0x54/0x70
  [&lt;80041848&gt;] ret_from_irq+0x0/0x4
  [&lt;80182fdc&gt;] ioread32+0x4/0xc
  [&lt;81b4c42c&gt;] ath5k_hw_set_sleep_clock+0x2ec/0x474 [ath5k]
  [&lt;81b4cf28&gt;] ath5k_hw_reset+0x50/0xeb8 [ath5k]
  [&lt;81b50900&gt;] ath5k_reset+0xd4/0x310 [ath5k]
  [&lt;81b557e8&gt;] ath5k_config+0x4c/0x104 [ath5k]
  [&lt;80d01770&gt;] ieee80211_hw_config+0x2f4/0x35c [mac80211]
  [&lt;80d09aa8&gt;] ieee80211_scan_work+0x2e4/0x414 [mac80211]
  [&lt;8022c3f4&gt;] process_one_work+0x28c/0x400
  [&lt;802df8f8&gt;] worker_thread+0x258/0x3c0
  [&lt;801b5710&gt;] kthread+0xe0/0xec
  [&lt;800418a8&gt;] ret_from_kernel_thread+0x14/0x1c

Fix this issue by adding a new status flag, which forbids to re-enable
the interrupt generation until the HW configuration is completed.

Note: previous patch, which reorders the Rx disable code helps to avoid
the above warning, but not fixes the root cause of unexpected frame
receiving.

CC: Jiri Slaby &lt;jirislaby@gmail.com&gt;
CC: Nick Kossifidis &lt;mickflemm@gmail.com&gt;
CC: Luis R. Rodriguez &lt;mcgrof@do-not-panic.com&gt;
Reported-by: Christophe Prevotaux &lt;cprevotaux@nltinc.com&gt;
Tested-by: Christophe Prevotaux &lt;cprevotaux@nltinc.com&gt;
Tested-by: Eric Bree &lt;ebree@nltinc.com&gt;
Signed-off-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To prepare for reset ath5k should finish all asynchronous tasks. At
first, it disables the interrupt generation, then it waits for the
interrupt handler and tasklets completion, and then proceeds to the HW
configuration update. But it does not consider that the interrupt
handler or tasklet re-enables the interrupt generation. And we fall in a
situation when ath5k assumes that interrupts are disabled, but it is
not.

This can lead to different consequences, such as reception of the frame,
when we do not expect it. Under certain circumstances, this can lead to
the following warning:

  WARNING: at ath5k/base.c:589 ath5k_tasklet_rx+0x318/0x6ec [ath5k]()
  invalid hw_rix: 1a
  [..]
  Call Trace:
  [&lt;802656a8&gt;] show_stack+0x48/0x70
  [&lt;802dd92c&gt;] warn_slowpath_common+0x88/0xbc
  [&lt;802dd98c&gt;] warn_slowpath_fmt+0x2c/0x38
  [&lt;81b51be8&gt;] ath5k_tasklet_rx+0x318/0x6ec [ath5k]
  [&lt;8028ac64&gt;] tasklet_action+0x8c/0xf0
  [&lt;80075804&gt;] __do_softirq+0x180/0x32c
  [&lt;80196ce8&gt;] irq_exit+0x54/0x70
  [&lt;80041848&gt;] ret_from_irq+0x0/0x4
  [&lt;80182fdc&gt;] ioread32+0x4/0xc
  [&lt;81b4c42c&gt;] ath5k_hw_set_sleep_clock+0x2ec/0x474 [ath5k]
  [&lt;81b4cf28&gt;] ath5k_hw_reset+0x50/0xeb8 [ath5k]
  [&lt;81b50900&gt;] ath5k_reset+0xd4/0x310 [ath5k]
  [&lt;81b557e8&gt;] ath5k_config+0x4c/0x104 [ath5k]
  [&lt;80d01770&gt;] ieee80211_hw_config+0x2f4/0x35c [mac80211]
  [&lt;80d09aa8&gt;] ieee80211_scan_work+0x2e4/0x414 [mac80211]
  [&lt;8022c3f4&gt;] process_one_work+0x28c/0x400
  [&lt;802df8f8&gt;] worker_thread+0x258/0x3c0
  [&lt;801b5710&gt;] kthread+0xe0/0xec
  [&lt;800418a8&gt;] ret_from_kernel_thread+0x14/0x1c

Fix this issue by adding a new status flag, which forbids to re-enable
the interrupt generation until the HW configuration is completed.

Note: previous patch, which reorders the Rx disable code helps to avoid
the above warning, but not fixes the root cause of unexpected frame
receiving.

CC: Jiri Slaby &lt;jirislaby@gmail.com&gt;
CC: Nick Kossifidis &lt;mickflemm@gmail.com&gt;
CC: Luis R. Rodriguez &lt;mcgrof@do-not-panic.com&gt;
Reported-by: Christophe Prevotaux &lt;cprevotaux@nltinc.com&gt;
Tested-by: Christophe Prevotaux &lt;cprevotaux@nltinc.com&gt;
Tested-by: Eric Bree &lt;ebree@nltinc.com&gt;
Signed-off-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ath5k: channel change fix</title>
<updated>2015-03-13T13:11:45+00:00</updated>
<author>
<name>Sergey Ryazanov</name>
<email>ryazanov.s.a@gmail.com</email>
</author>
<published>2015-03-04T02:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a2f248f9eafcf64c7649324a294a4dd337efd18'/>
<id>4a2f248f9eafcf64c7649324a294a4dd337efd18</id>
<content type='text'>
ath5k updates the channel pointer and after that it stops the Rx logic
and apply channel to HW. In case of channel switch, such sequence
creates a small window when a frame, which is received on the old
channel is considered as a frame received on the new one.

The most notable consequence of this situation occurs during the switch
from 2 GHz band (CCK+OFDM) to the 5GHz band (OFDM-only). Frame received
with CCK rate, e.g. beacon received at the 1mbps, causes the following
warning:

  WARNING: at ath5k/base.c:589 ath5k_tasklet_rx+0x318/0x6ec [ath5k]()
  invalid hw_rix: 1a
  [..]
  Call Trace:
  [&lt;802656a8&gt;] show_stack+0x48/0x70
  [&lt;802dd92c&gt;] warn_slowpath_common+0x88/0xbc
  [&lt;802dd98c&gt;] warn_slowpath_fmt+0x2c/0x38
  [&lt;81b51be8&gt;] ath5k_tasklet_rx+0x318/0x6ec [ath5k]
  [&lt;8028ac64&gt;] tasklet_action+0x8c/0xf0
  [&lt;80075804&gt;] __do_softirq+0x180/0x32c
  [&lt;80196ce8&gt;] irq_exit+0x54/0x70
  [&lt;80041848&gt;] ret_from_irq+0x0/0x4
  [&lt;80182fdc&gt;] ioread32+0x4/0xc
  [&lt;81b4c42c&gt;] ath5k_hw_set_sleep_clock+0x2ec/0x474 [ath5k]
  [&lt;81b4cf28&gt;] ath5k_hw_reset+0x50/0xeb8 [ath5k]
  [&lt;81b50900&gt;] ath5k_reset+0xd4/0x310 [ath5k]
  [&lt;81b557e8&gt;] ath5k_config+0x4c/0x104 [ath5k]
  [&lt;80d01770&gt;] ieee80211_hw_config+0x2f4/0x35c [mac80211]
  [&lt;80d09aa8&gt;] ieee80211_scan_work+0x2e4/0x414 [mac80211]
  [&lt;8022c3f4&gt;] process_one_work+0x28c/0x400
  [&lt;802df8f8&gt;] worker_thread+0x258/0x3c0
  [&lt;801b5710&gt;] kthread+0xe0/0xec
  [&lt;800418a8&gt;] ret_from_kernel_thread+0x14/0x1c

The easiest way to reproduce this warning is to run scan with dualband
NIC in noisy environments, when the channel 11 runs multiple APs. In my
tests if the APs num &gt;= 12, the warning appears in the first few
seconds of scanning.

In order to fix this, the Rx disable code moved to a higher level and
placed before the channel pointer update. This is also makes the code a
bit more symmetrical, since we disable and enable the Rx in the same
function.

In fact, at the pointer update time new frames should not appear,
because interrupt generation at this point should already be disabled.
The next patch should address this issue.

CC: Jiri Slaby &lt;jirislaby@gmail.com&gt;
CC: Nick Kossifidis &lt;mickflemm@gmail.com&gt;
CC: Luis R. Rodriguez &lt;mcgrof@do-not-panic.com&gt;
Reported-by: Christophe Prevotaux &lt;cprevotaux@nltinc.com&gt;
Tested-by: Christophe Prevotaux &lt;cprevotaux@nltinc.com&gt;
Tested-by: Eric Bree &lt;ebree@nltinc.com&gt;
Signed-off-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ath5k updates the channel pointer and after that it stops the Rx logic
and apply channel to HW. In case of channel switch, such sequence
creates a small window when a frame, which is received on the old
channel is considered as a frame received on the new one.

The most notable consequence of this situation occurs during the switch
from 2 GHz band (CCK+OFDM) to the 5GHz band (OFDM-only). Frame received
with CCK rate, e.g. beacon received at the 1mbps, causes the following
warning:

  WARNING: at ath5k/base.c:589 ath5k_tasklet_rx+0x318/0x6ec [ath5k]()
  invalid hw_rix: 1a
  [..]
  Call Trace:
  [&lt;802656a8&gt;] show_stack+0x48/0x70
  [&lt;802dd92c&gt;] warn_slowpath_common+0x88/0xbc
  [&lt;802dd98c&gt;] warn_slowpath_fmt+0x2c/0x38
  [&lt;81b51be8&gt;] ath5k_tasklet_rx+0x318/0x6ec [ath5k]
  [&lt;8028ac64&gt;] tasklet_action+0x8c/0xf0
  [&lt;80075804&gt;] __do_softirq+0x180/0x32c
  [&lt;80196ce8&gt;] irq_exit+0x54/0x70
  [&lt;80041848&gt;] ret_from_irq+0x0/0x4
  [&lt;80182fdc&gt;] ioread32+0x4/0xc
  [&lt;81b4c42c&gt;] ath5k_hw_set_sleep_clock+0x2ec/0x474 [ath5k]
  [&lt;81b4cf28&gt;] ath5k_hw_reset+0x50/0xeb8 [ath5k]
  [&lt;81b50900&gt;] ath5k_reset+0xd4/0x310 [ath5k]
  [&lt;81b557e8&gt;] ath5k_config+0x4c/0x104 [ath5k]
  [&lt;80d01770&gt;] ieee80211_hw_config+0x2f4/0x35c [mac80211]
  [&lt;80d09aa8&gt;] ieee80211_scan_work+0x2e4/0x414 [mac80211]
  [&lt;8022c3f4&gt;] process_one_work+0x28c/0x400
  [&lt;802df8f8&gt;] worker_thread+0x258/0x3c0
  [&lt;801b5710&gt;] kthread+0xe0/0xec
  [&lt;800418a8&gt;] ret_from_kernel_thread+0x14/0x1c

The easiest way to reproduce this warning is to run scan with dualband
NIC in noisy environments, when the channel 11 runs multiple APs. In my
tests if the APs num &gt;= 12, the warning appears in the first few
seconds of scanning.

In order to fix this, the Rx disable code moved to a higher level and
placed before the channel pointer update. This is also makes the code a
bit more symmetrical, since we disable and enable the Rx in the same
function.

In fact, at the pointer update time new frames should not appear,
because interrupt generation at this point should already be disabled.
The next patch should address this issue.

CC: Jiri Slaby &lt;jirislaby@gmail.com&gt;
CC: Nick Kossifidis &lt;mickflemm@gmail.com&gt;
CC: Luis R. Rodriguez &lt;mcgrof@do-not-panic.com&gt;
Reported-by: Christophe Prevotaux &lt;cprevotaux@nltinc.com&gt;
Tested-by: Christophe Prevotaux &lt;cprevotaux@nltinc.com&gt;
Tested-by: Eric Bree &lt;ebree@nltinc.com&gt;
Signed-off-by: Sergey Ryazanov &lt;ryazanov.s.a@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
