<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mac80211/tx.c, branch linux-2.6.36.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.36.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.36.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-02-17T22:46:48Z</updated>
<entry>
<title>mac80211: fix initialization of skb-&gt;cb in ieee80211_subif_start_xmit</title>
<updated>2011-02-17T22:46:48Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2010-12-18T18:30:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4466efc5a80c185b64749ee08c572cc6b2383a86'/>
<id>urn:sha1:4466efc5a80c185b64749ee08c572cc6b2383a86</id>
<content type='text'>
commit 489ee9195a7de9e6bc833d639ff6b553ffdad90e upstream.

The change 'mac80211: Fix BUG in pskb_expand_head when transmitting shared skbs'
added a check for copying the skb if it's shared, however the tx info variable
still points at the cb of the old skb

Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Acked-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>mac80211: fix a crash in ieee80211_beacon_get_tim on change_interface</title>
<updated>2011-02-17T22:46:48Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2011-01-24T18:28:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=481335e5059076b32e768545d6a5d9bafa5ba84d'/>
<id>urn:sha1:481335e5059076b32e768545d6a5d9bafa5ba84d</id>
<content type='text'>
commit eb3e554b4b3a56386ef5214dbe0e3935a350178b upstream.

Some drivers (e.g. ath9k) do not always disable beacons when they're
supposed to. When an interface is changed using the change_interface op,
the mode specific sdata part is in an undefined state and trying to
get a beacon at this point can produce weird crashes.

To fix this, add a check for ieee80211_sdata_running before using
anything from the sdata.

Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>mac80211: Fix BUG in pskb_expand_head when transmitting shared skbs</title>
<updated>2011-01-07T21:58:22Z</updated>
<author>
<name>Helmut Schaa</name>
</author>
<published>2010-12-02T17:44:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3b8ff8e182a99ba957268500218a9db63d37844'/>
<id>urn:sha1:a3b8ff8e182a99ba957268500218a9db63d37844</id>
<content type='text'>
commit 7e2447075690860e2cea96b119fc9cadbaa7e83c upstream.

mac80211 doesn't handle shared skbs correctly at the moment. As a result
a possible resize can trigger a BUG in pskb_expand_head.

[  676.030000] Kernel bug detected[#1]:
[  676.030000] Cpu 0
[  676.030000] $ 0   : 00000000 00000000 819662ff 00000002
[  676.030000] $ 4   : 81966200 00000020 00000000 00000020
[  676.030000] $ 8   : 819662e0 800043c0 00000002 00020000
[  676.030000] $12   : 3b9aca00 00000000 00000000 00470000
[  676.030000] $16   : 80ea2000 00000000 00000000 00000000
[  676.030000] $20   : 818aa200 80ea2018 80ea2000 00000008
[  676.030000] $24   : 00000002 800ace5c
[  676.030000] $28   : 8199a000 8199bd20 81938f88 80f180d4
[  676.030000] Hi    : 0000026e
[  676.030000] Lo    : 0000757e
[  676.030000] epc   : 801245e4 pskb_expand_head+0x44/0x1d8
[  676.030000]     Not tainted
[  676.030000] ra    : 80f180d4 ieee80211_skb_resize+0xb0/0x114 [mac80211]
[  676.030000] Status: 1000a403    KERNEL EXL IE
[  676.030000] Cause : 10800024
[  676.030000] PrId  : 0001964c (MIPS 24Kc)
[  676.030000] Modules linked in: mac80211_hwsim rt2800lib rt2x00soc rt2x00pci rt2x00lib mac80211 crc_itu_t crc_ccitt cfg80211 compat arc4 aes_generic deflate ecb cbc [last unloaded: rt2800pci]
[  676.030000] Process kpktgend_0 (pid: 97, threadinfo=8199a000, task=81879f48, tls=00000000)
[  676.030000] Stack : ffffffff 00000000 00000000 00000014 00000004 80ea2000 00000000 00000000
[  676.030000]         818aa200 80f180d4 ffffffff 0000000a 81879f78 81879f48 81879f48 00000018
[  676.030000]         81966246 80ea2000 818432e0 80f1a420 80203050 81814d98 00000001 81879f48
[  676.030000]         81879f48 00000018 81966246 818432e0 0000001a 8199bdd4 0000001c 80f1b72c
[  676.030000]         80203020 8001292c 80ef4aa2 7f10b55d 801ab5b8 81879f48 00000188 80005c90
[  676.030000]         ...
[  676.030000] Call Trace:
[  676.030000] [&lt;801245e4&gt;] pskb_expand_head+0x44/0x1d8
[  676.030000] [&lt;80f180d4&gt;] ieee80211_skb_resize+0xb0/0x114 [mac80211]
[  676.030000] [&lt;80f1a420&gt;] ieee80211_xmit+0x150/0x22c [mac80211]
[  676.030000] [&lt;80f1b72c&gt;] ieee80211_subif_start_xmit+0x6f4/0x73c [mac80211]
[  676.030000] [&lt;8014361c&gt;] pktgen_thread_worker+0xfac/0x16f8
[  676.030000] [&lt;8002ebe8&gt;] kthread+0x7c/0x88
[  676.030000] [&lt;80008e0c&gt;] kernel_thread_helper+0x10/0x18
[  676.030000]
[  676.030000]
[  676.030000] Code: 24020001  10620005  2502001f &lt;0200000d&gt; 0804917a  00000000  2502001f  00441023  00531021

Fix this by making a local copy of shared skbs prior to mangeling them.
To avoid copying the skb unnecessarily move the skb_copy call below the
checks that don't need write access to the skb.

Also, move the assignment of nh_pos and h_pos below the skb_copy to point
to the correct skb.

It would be possible to avoid another resize of the copied skb by using
skb_copy_expand instead of skb_copy but that would make the patch more
complex. Also, shared skbs are a corner case right now, so the resize
shouldn't matter much.

Cc: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: Helmut Schaa &lt;helmut.schaa@googlemail.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>mac80211: Put some code under MESH macro</title>
<updated>2010-07-28T20:24:01Z</updated>
<author>
<name>Yuri Ershov</name>
</author>
<published>2010-06-29T11:08:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4ab7eb0aecbe56ac280486c61cd3f0f6c42870b'/>
<id>urn:sha1:e4ab7eb0aecbe56ac280486c61cd3f0f6c42870b</id>
<content type='text'>
In the function ieee80211_subif_start_xmit the logic related with
meshdrlen is under CONFIG_MAC80211_MESH macro, but in one place it isn't.
This is some update for this

Signed-off-by: Yuri Ershov &lt;ext-yuri.ershov@nokia.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix sta assignment</title>
<updated>2010-07-26T19:32:42Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2010-07-22T15:11:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec25acc46a62db98baaa9b221f33b66af09a1964'/>
<id>urn:sha1:ec25acc46a62db98baaa9b221f33b66af09a1964</id>
<content type='text'>
I just had the following:
WARNING: at drivers/net/wireless/iwlwifi/iwl-agn-tx.c:574 iwlagn_tx_skb+0x1576/0x15f0 [iwlagn]()
Call Trace:
 &lt;IRQ&gt;  [&lt;ffffffff8105c5df&gt;] warn_slowpath_common+0x7f/0xc0
 [&lt;ffffffff8105c63a&gt;] warn_slowpath_null+0x1a/0x20
 [&lt;ffffffffa0290b46&gt;] iwlagn_tx_skb+0x1576/0x15f0 [iwlagn]
 [&lt;ffffffffa027076c&gt;] iwl_mac_tx+0x5c/0x260 [iwlagn]
 [&lt;ffffffffa01bdf5b&gt;] __ieee80211_tx+0x10b/0x1a0 [mac80211]
 [&lt;ffffffffa01bfb86&gt;] ieee80211_tx_pending+0x186/0x2d0 [mac80211]
 [&lt;ffffffff81062ea5&gt;] tasklet_action+0x125/0x130
 [&lt;ffffffff810634a6&gt;] __do_softirq+0x106/0x270
 [&lt;ffffffff8100c09c&gt;] call_softirq+0x1c/0x30
iwlagn 0000:02:00.0: Attempting to modify non-existing station 107

Note that 107 == 0x6b which is slab poison.

The reason is that mac80211 passed a freed station
pointer to mac80211, because as it happened iwlwifi
reset itself while mac80211 was disconnecting from
the network.

It turns out that we do take care to look up the
station pointer in ieee80211_tx_pending_skb, but
then don't use it, which obviously is a bug. Fix
this by removing the ieee80211_tx_h_sta handler
and assigning the station pointer directly.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: make TX aggregation start/stop request async</title>
<updated>2010-06-14T19:39:27Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2010-06-10T08:21:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ab337032a0dfcd5f2527d3306d3deeba5f95b59'/>
<id>urn:sha1:0ab337032a0dfcd5f2527d3306d3deeba5f95b59</id>
<content type='text'>
When the driver or rate control requests starting
or stopping an aggregation session, that currently
causes a direct callback into the driver, which
could potentially cause locking problems. Also,
the functions need to be callable from contexts
that cannot sleep, and thus will interfere with
making the ampdu_action callback sleeping.

To address these issues, add a new work item for
each station that will process any start or stop
requests out of line.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: use RCU for TX aggregation</title>
<updated>2010-06-14T19:39:27Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2010-06-10T08:21:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a622ab72b4dcfdf53e24b16e9530cb876979a00c'/>
<id>urn:sha1:a622ab72b4dcfdf53e24b16e9530cb876979a00c</id>
<content type='text'>
Currently we allocate some memory for each TX
aggregation session and additionally keep a
state bitmap indicating the state it is in.
By using RCU to protect the pointer, moving
the state into the structure and some locking
trickery we can avoid locking when the TX agg
session is fully operational.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: set IEEE80211_TX_CTL_FIRST_FRAGMENT for beacons</title>
<updated>2010-05-07T18:55:55Z</updated>
<author>
<name>John W. Linville</name>
</author>
<published>2010-05-06T18:45:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a472e71b3c71619087d2485282955c3b62ebfde9'/>
<id>urn:sha1:a472e71b3c71619087d2485282955c3b62ebfde9</id>
<content type='text'>
Also simplify the flags assignment into a single statement at the
end of ieee80211_beacon_get_tim.

Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix rts threshold check</title>
<updated>2010-04-27T20:09:23Z</updated>
<author>
<name>Shanyu Zhao</name>
</author>
<published>2010-04-27T18:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a2c40249a36d0b4d76d1caf6bf806e4ae5b06e8a'/>
<id>urn:sha1:a2c40249a36d0b4d76d1caf6bf806e4ae5b06e8a</id>
<content type='text'>
Currently whenever rts thresold is set, every packet will use RTS
protection no matter its size exceeds the threshold or not. This is
due to a bug in the rts threshold check.
	if (len &gt; tx-&gt;local-&gt;hw.wiphy-&gt;rts_threshold) {
		txrc.rts = rts = true;
	}
Basically it is comparing an int (len) and a u32 (rts_threshold),
and the variable len is assigned as:
	len = min_t(int, tx-&gt;skb-&gt;len + FCS_LEN,
			 tx-&gt;local-&gt;hw.wiphy-&gt;frag_threshold);
However, when frag_threshold is "-1", len is always "-1", which is
0xffffffff therefore rts is always set to true.

CC: stable@kernel.org
Signed-off-by: Shanyu Zhao &lt;shanyu.zhao@intel.com&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: Prevent running sta_cleanup timer unnecessarily</title>
<updated>2010-04-19T20:41:42Z</updated>
<author>
<name>Juuso Oikarinen</name>
</author>
<published>2010-04-19T07:12:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3393a608c4979a94d1887efc05b792849d361a65'/>
<id>urn:sha1:3393a608c4979a94d1887efc05b792849d361a65</id>
<content type='text'>
The sta_cleanup timer is used to periodically expire buffered frames from the
tx buf. The timer is executing periodically, regardless of the need for it.
This is wasting resources.

Fix this simply by not restarting the sta_cleanup timer if the tx buffer was
empty. Restart the timer when there is some more tx-traffic.

Cc: Janne Ylälehto &lt;janne.ylalehto@nokia.com&gt;
Signed-off-by: Juuso Oikarinen &lt;juuso.oikarinen@nokia.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
</feed>
