<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/mac80211, branch v3.4.85</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/mac80211?h=v3.4.85</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/mac80211?h=v3.4.85'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-03-24T04:37:04Z</updated>
<entry>
<title>mac80211: fix AP powersave TX vs. wakeup race</title>
<updated>2014-03-24T04:37:04Z</updated>
<author>
<name>Emmanuel Grumbach</name>
<email>emmanuel.grumbach@intel.com</email>
</author>
<published>2014-02-20T07:22:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=46a5a5493360f995b834eb3b828eb59da4604509'/>
<id>urn:sha1:46a5a5493360f995b834eb3b828eb59da4604509</id>
<content type='text'>
commit 1d147bfa64293b2723c4fec50922168658e613ba upstream.

There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is being transmitted.

This can lead to a situation where the buffered frames list
is emptied on the one side, while a frame is being added on
the other side, as the station is still seen as sleeping in
the TX path.

As a result, the newly added frame will not be send anytime
soon. It might be sent much later (and out of order) when the
station goes to sleep and wakes up the next time.

Additionally, it can lead to the crash below.

Fix all this by synchronising both paths with a new lock.
Both path are not fastpath since they handle PS situations.

In a later patch we'll remove the extra skb queue locks to
reduce locking overhead.

BUG: unable to handle kernel
NULL pointer dereference at 000000b0
IP: [&lt;ff6f1791&gt;] ieee80211_report_used_skb+0x11/0x3e0 [mac80211]
*pde = 00000000
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
EIP: 0060:[&lt;ff6f1791&gt;] EFLAGS: 00210282 CPU: 1
EIP is at ieee80211_report_used_skb+0x11/0x3e0 [mac80211]
EAX: e5900da0 EBX: 00000000 ECX: 00000001 EDX: 00000000
ESI: e41d00c0 EDI: e5900da0 EBP: ebe458e4 ESP: ebe458b0
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
CR0: 8005003b CR2: 000000b0 CR3: 25a78000 CR4: 000407d0
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400
Process iperf (pid: 3934, ti=ebe44000 task=e757c0b0 task.ti=ebe44000)
iwlwifi 0000:02:00.0: I iwl_pcie_enqueue_hcmd Sending command LQ_CMD (#4e), seq: 0x0903, 92 bytes at 3[3]:9
Stack:
 e403b32c ebe458c4 00200002 00200286 e403b338 ebe458cc c10960bb e5900da0
 ff76a6ec ebe458d8 00000000 e41d00c0 e5900da0 ebe458f0 ff6f1b75 e403b210
 ebe4598c ff723dc1 00000000 ff76a6ec e597c978 e403b758 00000002 00000002
Call Trace:
 [&lt;ff6f1b75&gt;] ieee80211_free_txskb+0x15/0x20 [mac80211]
 [&lt;ff723dc1&gt;] invoke_tx_handlers+0x1661/0x1780 [mac80211]
 [&lt;ff7248a5&gt;] ieee80211_tx+0x75/0x100 [mac80211]
 [&lt;ff7249bf&gt;] ieee80211_xmit+0x8f/0xc0 [mac80211]
 [&lt;ff72550e&gt;] ieee80211_subif_start_xmit+0x4fe/0xe20 [mac80211]
 [&lt;c149ef70&gt;] dev_hard_start_xmit+0x450/0x950
 [&lt;c14b9aa9&gt;] sch_direct_xmit+0xa9/0x250
 [&lt;c14b9c9b&gt;] __qdisc_run+0x4b/0x150
 [&lt;c149f732&gt;] dev_queue_xmit+0x2c2/0xca0

Reported-by: Yaara Rozenblum &lt;yaara.rozenblum@intel.com&gt;
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Reviewed-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
[reword commit log, use a separate lock]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: fix fragmentation code, particularly for encryption</title>
<updated>2014-02-22T18:32:45Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-01-31T23:16:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fb11ab59b2999e2afee7c7fcd3687bf07b2fc988'/>
<id>urn:sha1:fb11ab59b2999e2afee7c7fcd3687bf07b2fc988</id>
<content type='text'>
commit 338f977f4eb441e69bb9a46eaa0ac715c931a67f upstream.

The "new" fragmentation code (since my rewrite almost 5 years ago)
erroneously sets skb-&gt;len rather than using skb_trim() to adjust
the length of the first fragment after copying out all the others.
This leaves the skb tail pointer pointing to after where the data
originally ended, and thus causes the encryption MIC to be written
at that point, rather than where it belongs: immediately after the
data.

The impact of this is that if software encryption is done, then
 a) encryption doesn't work for the first fragment, the connection
    becomes unusable as the first fragment will never be properly
    verified at the receiver, the MIC is practically guaranteed to
    be wrong
 b) we leak up to 8 bytes of plaintext (!) of the packet out into
    the air

This is only mitigated by the fact that many devices are capable
of doing encryption in hardware, in which case this can't happen
as the tail pointer is irrelevant in that case. Additionally,
fragmentation is not used very frequently and would normally have
to be configured manually.

Fix this by using skb_trim() properly.

Fixes: 2de8e0d999b8 ("mac80211: rewrite fragmentation")
Reported-by: Jouni Malinen &lt;j@w1.fi&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: don't attempt to reorder multicast frames</title>
<updated>2013-12-20T15:34:20Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2013-11-20T10:28:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=01c2b7b7c7b16d08a7b3659bb2d98d3a2034b365'/>
<id>urn:sha1:01c2b7b7c7b16d08a7b3659bb2d98d3a2034b365</id>
<content type='text'>
commit 051a41fa4ee14f5c39668f0980973b9a195de560 upstream.

Multicast frames can't be transmitted as part of an aggregation
session (such a session couldn't even be set up) so don't try to
reorder them. Trying to do so would cause the reorder to stop
working correctly since multicast QoS frames (as transmitted by
the Aruba APs this was found with) would cause sequence number
confusion in the buffer.

Reported-by: Blaise Gassend &lt;blaise@suitabletech.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: update sta-&gt;last_rx on acked tx frames</title>
<updated>2013-11-13T03:01:48Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@openwrt.org</email>
</author>
<published>2013-09-29T19:39:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=48cca8f206801410760e7dc5abaa361c3fdba10a'/>
<id>urn:sha1:48cca8f206801410760e7dc5abaa361c3fdba10a</id>
<content type='text'>
commit 0c5b93290b2f3c7a376567c03ae8d385b0e99851 upstream.

When clients are idle for too long, hostapd sends nullfunc frames for
probing. When those are acked by the client, the idle time needs to be
updated.

To make this work (and to avoid unnecessary probing), update sta-&gt;last_rx
whenever an ACK was received for a tx packet. Only do this if the flag
IEEE80211_HW_REPORTS_TX_ACK_STATUS is set.

Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: correctly close cancelled scans</title>
<updated>2013-11-13T03:01:48Z</updated>
<author>
<name>Emmanuel Grumbach</name>
<email>emmanuel.grumbach@intel.com</email>
</author>
<published>2013-09-16T08:12:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b9ef1eea8bc243c4435c85ea5a30c647ea19995a'/>
<id>urn:sha1:b9ef1eea8bc243c4435c85ea5a30c647ea19995a</id>
<content type='text'>
commit a754055a1296fcbe6f32de3a5eaca6efb2fd1865 upstream.

__ieee80211_scan_completed is called from a worker. This
means that the following flow is possible.

 * driver calls ieee80211_scan_completed
 * mac80211 cancels the scan (that is already complete)
 * __ieee80211_scan_completed runs

When scan_work will finally run, it will see that the scan
hasn't been aborted and might even trigger another scan on
another band. This leads to a situation where cfg80211's
scan is not done and no further scan can be issued.

Fix this by setting a new flag when a HW scan is being
cancelled so that no other scan will be triggered.

Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: fix duplicate retransmission detection</title>
<updated>2013-08-11T22:38:42Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2013-07-11T20:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cfc93260cc19e2dbbe1dda395d005140a6addbf9'/>
<id>urn:sha1:cfc93260cc19e2dbbe1dda395d005140a6addbf9</id>
<content type='text'>
commit 6b0f32745dcfba01d7be33acd1b40306c7a914c6 upstream.

The duplicate retransmission detection code in mac80211
erroneously attempts to do the check for every frame,
even frames that don't have a sequence control field or
that don't use it (QoS-Null frames.)

This is problematic because it causes the code to access
data beyond the end of the SKB and depending on the data
there will drop packets erroneously.

Correct the code to not do duplicate detection for such
frames.

I found this error while testing AP powersave, it lead
to retransmitted PS-Poll frames being dropped entirely
as the data beyond the end of the SKB was always zero.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: close AP_VLAN interfaces before unregistering all</title>
<updated>2013-06-07T19:49:49Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2013-05-23T23:06:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a28ab558b0e81326ed23026090a743418cb52a41'/>
<id>urn:sha1:a28ab558b0e81326ed23026090a743418cb52a41</id>
<content type='text'>
commit c8aa22db0112f640ac6631347f850879c621840b upstream.

Since Eric's commit efe117ab8 ("Speedup ieee80211_remove_interfaces")
there's a bug in mac80211 when it unregisters with AP_VLAN interfaces
up. If the AP_VLAN interface was registered after the AP it belongs
to (which is the typical case) and then we get into this code path,
unregister_netdevice_many() will crash because it isn't prepared to
deal with interfaces being closed in the middle of it. Exactly this
happens though, because we iterate the list, find the AP master this
AP_VLAN belongs to and dev_close() the dependent VLANs. After this,
unregister_netdevice_many() won't pick up the fact that the AP_VLAN
is already down and will do it again, causing a crash.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: synchronize scan off/on-channel and PS states</title>
<updated>2013-02-04T00:24:42Z</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>sgruszka@redhat.com</email>
</author>
<published>2012-12-20T13:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a099d740ffdff7b217f23d7d871c4fb0c24a24b'/>
<id>urn:sha1:5a099d740ffdff7b217f23d7d871c4fb0c24a24b</id>
<content type='text'>
commit aacde9ee45225f7e0b90960f479aef83c66bfdc0 upstream.

Since:

commit b23b025fe246f3acc2988eb6d400df34c27cb8ae
Author: Ben Greear &lt;greearb@candelatech.com&gt;
Date:   Fri Feb 4 11:54:17 2011 -0800

    mac80211: Optimize scans on current operating channel.

we do not disable PS while going back to operational channel (on
ieee80211_scan_state_suspend) and deffer that until scan finish.
But since we are allowed to send frames, we can send a frame to AP
without PM bit set, so disable PS on AP side. Then when we switch
to off-channel (in ieee80211_scan_state_resume) we do not enable PS.
Hence we are off-channel with PS disabled, frames are not buffered
by AP.

To fix remove offchannel_ps_disable argument and always enable PS when
going off-channel and disable it when going on-channel, like it was
before.

Cc: stable@vger.kernel.org # 2.6.39+
Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Tested-by: Seth Forshee &lt;seth.forshee@canonical.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mac80211: fix FT roaming</title>
<updated>2013-02-04T00:24:41Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2013-01-11T13:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e4fcbe5297a8c6e512c68a77c660a8cdd7d315e4'/>
<id>urn:sha1:e4fcbe5297a8c6e512c68a77c660a8cdd7d315e4</id>
<content type='text'>
commit 1626e0fa740dec8665a973cf2349405cdfeb46dc upstream.

During FT roaming, wpa_supplicant attempts to set the
key before association. This used to be rejected, but
as a side effect of my commit 66e67e418908442389d3a9e
("mac80211: redesign auth/assoc") the key was accepted
causing hardware crypto to not be used for it as the
station isn't added to the driver yet.

It would be possible to accept the key and then add it
to the driver when the station has been added. However,
this may run into issues with drivers using the state-
based station adding if they accept the key only after
association like it used to be.

For now, revert to the behaviour from before the auth
and assoc change.

Reported-by: Cédric Debarge &lt;cedric.debarge@acksys.fr&gt;
Tested-by: Cédric Debarge &lt;cedric.debarge@acksys.fr&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: use del_timer_sync for final sta cleanup timer deletion</title>
<updated>2013-01-17T16:51:04Z</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-12-13T22:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=848842e67d24fed13a2aece3d03e235267e5a3a6'/>
<id>urn:sha1:848842e67d24fed13a2aece3d03e235267e5a3a6</id>
<content type='text'>
commit a56f992cdabc63f56b4b142885deebebf936ff76 upstream.

This is a very old bug, but there's nothing that prevents the
timer from running while the module is being removed when we
only do del_timer() instead of del_timer_sync().

The timer should normally not be running at this point, but
it's not clearly impossible (or we could just remove this.)

Tested-by: Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
