<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/wireless/wext-compat.c, branch v3.0.3</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>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2011-03-04T05:27:42+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-03-04T05:27:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a0e9ae1bd788bc19adc4d4ae08c98b233697402'/>
<id>0a0e9ae1bd788bc19adc4d4ae08c98b233697402</id>
<content type='text'>
Conflicts:
	drivers/net/bnx2x/bnx2x.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/bnx2x/bnx2x.h
</pre>
</div>
</content>
</entry>
<entry>
<title>fix cfg80211_wext_siwfreq lock ordering...</title>
<updated>2011-02-21T20:14:25+00:00</updated>
<author>
<name>Daniel J Blueman</name>
<email>daniel.blueman@gmail.com</email>
</author>
<published>2011-02-21T16:11:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4f919a3bc54da01db829c520ce4b1fabfde1c3f7'/>
<id>4f919a3bc54da01db829c520ce4b1fabfde1c3f7</id>
<content type='text'>
I previously managed to reproduce a hang while scanning wireless
channels (reproducible with airodump-ng hopping channels); subsequent
lockdep instrumentation revealed a lock ordering issue.

Without knowing the design intent, it looks like the locks should be
taken in reverse order; please comment.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.38-rc5-341cd #4
-------------------------------------------------------
airodump-ng/15445 is trying to acquire lock:
 (&amp;rdev-&gt;devlist_mtx){+.+.+.}, at: [&lt;ffffffff816b1266&gt;]
cfg80211_wext_siwfreq+0xc6/0x100

but task is already holding lock:
 (&amp;wdev-&gt;mtx){+.+.+.}, at: [&lt;ffffffff816b125c&gt;] cfg80211_wext_siwfreq+0xbc/0x100

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (&amp;wdev-&gt;mtx){+.+.+.}:
       [&lt;ffffffff810a79d6&gt;] lock_acquire+0xc6/0x280
       [&lt;ffffffff816d6bce&gt;] mutex_lock_nested+0x6e/0x4b0
       [&lt;ffffffff81696080&gt;] cfg80211_netdev_notifier_call+0x430/0x5f0
       [&lt;ffffffff8109351b&gt;] notifier_call_chain+0x8b/0x100
       [&lt;ffffffff810935b1&gt;] raw_notifier_call_chain+0x11/0x20
       [&lt;ffffffff81576d92&gt;] call_netdevice_notifiers+0x32/0x60
       [&lt;ffffffff815771a4&gt;] __dev_notify_flags+0x34/0x80
       [&lt;ffffffff81577230&gt;] dev_change_flags+0x40/0x70
       [&lt;ffffffff8158587c&gt;] do_setlink+0x1fc/0x8d0
       [&lt;ffffffff81586042&gt;] rtnl_setlink+0xf2/0x140
       [&lt;ffffffff81586923&gt;] rtnetlink_rcv_msg+0x163/0x270
       [&lt;ffffffff8159d741&gt;] netlink_rcv_skb+0xa1/0xd0
       [&lt;ffffffff815867b0&gt;] rtnetlink_rcv+0x20/0x30
       [&lt;ffffffff8159d39a&gt;] netlink_unicast+0x2ba/0x300
       [&lt;ffffffff8159dd57&gt;] netlink_sendmsg+0x267/0x3e0
       [&lt;ffffffff8155e364&gt;] sock_sendmsg+0xe4/0x110
       [&lt;ffffffff8155f3a3&gt;] sys_sendmsg+0x253/0x3b0
       [&lt;ffffffff81003192&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (&amp;rdev-&gt;devlist_mtx){+.+.+.}:
       [&lt;ffffffff810a7222&gt;] __lock_acquire+0x1622/0x1d10
       [&lt;ffffffff810a79d6&gt;] lock_acquire+0xc6/0x280
       [&lt;ffffffff816d6bce&gt;] mutex_lock_nested+0x6e/0x4b0
       [&lt;ffffffff816b1266&gt;] cfg80211_wext_siwfreq+0xc6/0x100
       [&lt;ffffffff816b2fad&gt;] ioctl_standard_call+0x5d/0xd0
       [&lt;ffffffff816b3223&gt;] T.808+0x163/0x170
       [&lt;ffffffff816b326a&gt;] wext_handle_ioctl+0x3a/0x90
       [&lt;ffffffff815798d2&gt;] dev_ioctl+0x6f2/0x830
       [&lt;ffffffff8155cf3d&gt;] sock_ioctl+0xfd/0x290
       [&lt;ffffffff8117dffd&gt;] do_vfs_ioctl+0x9d/0x590
       [&lt;ffffffff8117e53a&gt;] sys_ioctl+0x4a/0x80
       [&lt;ffffffff81003192&gt;] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

2 locks held by airodump-ng/15445:
 #0:  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff81586782&gt;] rtnl_lock+0x12/0x20
 #1:  (&amp;wdev-&gt;mtx){+.+.+.}, at: [&lt;ffffffff816b125c&gt;]
cfg80211_wext_siwfreq+0xbc/0x100

stack backtrace:
Pid: 15445, comm: airodump-ng Not tainted 2.6.38-rc5-341cd #4
Call Trace:
 [&lt;ffffffff810a3f0a&gt;] ? print_circular_bug+0xfa/0x100
 [&lt;ffffffff810a7222&gt;] ? __lock_acquire+0x1622/0x1d10
 [&lt;ffffffff810a1f99&gt;] ? trace_hardirqs_off_caller+0x29/0xc0
 [&lt;ffffffff810a79d6&gt;] ? lock_acquire+0xc6/0x280
 [&lt;ffffffff816b1266&gt;] ? cfg80211_wext_siwfreq+0xc6/0x100
 [&lt;ffffffff810a31d7&gt;] ? mark_held_locks+0x67/0x90
 [&lt;ffffffff816d6bce&gt;] ? mutex_lock_nested+0x6e/0x4b0
 [&lt;ffffffff816b1266&gt;] ? cfg80211_wext_siwfreq+0xc6/0x100
 [&lt;ffffffff810a31d7&gt;] ? mark_held_locks+0x67/0x90
 [&lt;ffffffff816b1266&gt;] ? cfg80211_wext_siwfreq+0xc6/0x100
 [&lt;ffffffff816b1266&gt;] ? cfg80211_wext_siwfreq+0xc6/0x100
 [&lt;ffffffff816b2fad&gt;] ? ioctl_standard_call+0x5d/0xd0
 [&lt;ffffffff8157818b&gt;] ? __dev_get_by_name+0x9b/0xc0
 [&lt;ffffffff816b2f50&gt;] ? ioctl_standard_call+0x0/0xd0
 [&lt;ffffffff816b3223&gt;] ? T.808+0x163/0x170
 [&lt;ffffffff8112ddf2&gt;] ? might_fault+0x72/0xd0
 [&lt;ffffffff816b326a&gt;] ? wext_handle_ioctl+0x3a/0x90
 [&lt;ffffffff8112de3b&gt;] ? might_fault+0xbb/0xd0
 [&lt;ffffffff815798d2&gt;] ? dev_ioctl+0x6f2/0x830
 [&lt;ffffffff810a1bae&gt;] ? put_lock_stats+0xe/0x40
 [&lt;ffffffff810a1c8c&gt;] ? lock_release_holdtime+0xac/0x150
 [&lt;ffffffff8155cf3d&gt;] ? sock_ioctl+0xfd/0x290
 [&lt;ffffffff8117dffd&gt;] ? do_vfs_ioctl+0x9d/0x590
 [&lt;ffffffff8116c8ff&gt;] ? fget_light+0x1df/0x3c0
 [&lt;ffffffff8117e53a&gt;] ? sys_ioctl+0x4a/0x80
 [&lt;ffffffff81003192&gt;] ? system_call_fastpath+0x16/0x1b

Signed-off-by: Daniel J Blueman &lt;daniel.blueman@gmail.com&gt;
Acked-by: Johannes Berg &lt;johannes@sipsolutions.net&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>
I previously managed to reproduce a hang while scanning wireless
channels (reproducible with airodump-ng hopping channels); subsequent
lockdep instrumentation revealed a lock ordering issue.

Without knowing the design intent, it looks like the locks should be
taken in reverse order; please comment.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.38-rc5-341cd #4
-------------------------------------------------------
airodump-ng/15445 is trying to acquire lock:
 (&amp;rdev-&gt;devlist_mtx){+.+.+.}, at: [&lt;ffffffff816b1266&gt;]
cfg80211_wext_siwfreq+0xc6/0x100

but task is already holding lock:
 (&amp;wdev-&gt;mtx){+.+.+.}, at: [&lt;ffffffff816b125c&gt;] cfg80211_wext_siwfreq+0xbc/0x100

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (&amp;wdev-&gt;mtx){+.+.+.}:
       [&lt;ffffffff810a79d6&gt;] lock_acquire+0xc6/0x280
       [&lt;ffffffff816d6bce&gt;] mutex_lock_nested+0x6e/0x4b0
       [&lt;ffffffff81696080&gt;] cfg80211_netdev_notifier_call+0x430/0x5f0
       [&lt;ffffffff8109351b&gt;] notifier_call_chain+0x8b/0x100
       [&lt;ffffffff810935b1&gt;] raw_notifier_call_chain+0x11/0x20
       [&lt;ffffffff81576d92&gt;] call_netdevice_notifiers+0x32/0x60
       [&lt;ffffffff815771a4&gt;] __dev_notify_flags+0x34/0x80
       [&lt;ffffffff81577230&gt;] dev_change_flags+0x40/0x70
       [&lt;ffffffff8158587c&gt;] do_setlink+0x1fc/0x8d0
       [&lt;ffffffff81586042&gt;] rtnl_setlink+0xf2/0x140
       [&lt;ffffffff81586923&gt;] rtnetlink_rcv_msg+0x163/0x270
       [&lt;ffffffff8159d741&gt;] netlink_rcv_skb+0xa1/0xd0
       [&lt;ffffffff815867b0&gt;] rtnetlink_rcv+0x20/0x30
       [&lt;ffffffff8159d39a&gt;] netlink_unicast+0x2ba/0x300
       [&lt;ffffffff8159dd57&gt;] netlink_sendmsg+0x267/0x3e0
       [&lt;ffffffff8155e364&gt;] sock_sendmsg+0xe4/0x110
       [&lt;ffffffff8155f3a3&gt;] sys_sendmsg+0x253/0x3b0
       [&lt;ffffffff81003192&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (&amp;rdev-&gt;devlist_mtx){+.+.+.}:
       [&lt;ffffffff810a7222&gt;] __lock_acquire+0x1622/0x1d10
       [&lt;ffffffff810a79d6&gt;] lock_acquire+0xc6/0x280
       [&lt;ffffffff816d6bce&gt;] mutex_lock_nested+0x6e/0x4b0
       [&lt;ffffffff816b1266&gt;] cfg80211_wext_siwfreq+0xc6/0x100
       [&lt;ffffffff816b2fad&gt;] ioctl_standard_call+0x5d/0xd0
       [&lt;ffffffff816b3223&gt;] T.808+0x163/0x170
       [&lt;ffffffff816b326a&gt;] wext_handle_ioctl+0x3a/0x90
       [&lt;ffffffff815798d2&gt;] dev_ioctl+0x6f2/0x830
       [&lt;ffffffff8155cf3d&gt;] sock_ioctl+0xfd/0x290
       [&lt;ffffffff8117dffd&gt;] do_vfs_ioctl+0x9d/0x590
       [&lt;ffffffff8117e53a&gt;] sys_ioctl+0x4a/0x80
       [&lt;ffffffff81003192&gt;] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

2 locks held by airodump-ng/15445:
 #0:  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff81586782&gt;] rtnl_lock+0x12/0x20
 #1:  (&amp;wdev-&gt;mtx){+.+.+.}, at: [&lt;ffffffff816b125c&gt;]
cfg80211_wext_siwfreq+0xbc/0x100

stack backtrace:
Pid: 15445, comm: airodump-ng Not tainted 2.6.38-rc5-341cd #4
Call Trace:
 [&lt;ffffffff810a3f0a&gt;] ? print_circular_bug+0xfa/0x100
 [&lt;ffffffff810a7222&gt;] ? __lock_acquire+0x1622/0x1d10
 [&lt;ffffffff810a1f99&gt;] ? trace_hardirqs_off_caller+0x29/0xc0
 [&lt;ffffffff810a79d6&gt;] ? lock_acquire+0xc6/0x280
 [&lt;ffffffff816b1266&gt;] ? cfg80211_wext_siwfreq+0xc6/0x100
 [&lt;ffffffff810a31d7&gt;] ? mark_held_locks+0x67/0x90
 [&lt;ffffffff816d6bce&gt;] ? mutex_lock_nested+0x6e/0x4b0
 [&lt;ffffffff816b1266&gt;] ? cfg80211_wext_siwfreq+0xc6/0x100
 [&lt;ffffffff810a31d7&gt;] ? mark_held_locks+0x67/0x90
 [&lt;ffffffff816b1266&gt;] ? cfg80211_wext_siwfreq+0xc6/0x100
 [&lt;ffffffff816b1266&gt;] ? cfg80211_wext_siwfreq+0xc6/0x100
 [&lt;ffffffff816b2fad&gt;] ? ioctl_standard_call+0x5d/0xd0
 [&lt;ffffffff8157818b&gt;] ? __dev_get_by_name+0x9b/0xc0
 [&lt;ffffffff816b2f50&gt;] ? ioctl_standard_call+0x0/0xd0
 [&lt;ffffffff816b3223&gt;] ? T.808+0x163/0x170
 [&lt;ffffffff8112ddf2&gt;] ? might_fault+0x72/0xd0
 [&lt;ffffffff816b326a&gt;] ? wext_handle_ioctl+0x3a/0x90
 [&lt;ffffffff8112de3b&gt;] ? might_fault+0xbb/0xd0
 [&lt;ffffffff815798d2&gt;] ? dev_ioctl+0x6f2/0x830
 [&lt;ffffffff810a1bae&gt;] ? put_lock_stats+0xe/0x40
 [&lt;ffffffff810a1c8c&gt;] ? lock_release_holdtime+0xac/0x150
 [&lt;ffffffff8155cf3d&gt;] ? sock_ioctl+0xfd/0x290
 [&lt;ffffffff8117dffd&gt;] ? do_vfs_ioctl+0x9d/0x590
 [&lt;ffffffff8116c8ff&gt;] ? fget_light+0x1df/0x3c0
 [&lt;ffffffff8117e53a&gt;] ? sys_ioctl+0x4a/0x80
 [&lt;ffffffff81003192&gt;] ? system_call_fastpath+0x16/0x1b

Signed-off-by: Daniel J Blueman &lt;daniel.blueman@gmail.com&gt;
Acked-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: Extend channel to frequency mapping for 802.11j</title>
<updated>2011-01-21T20:34:17+00:00</updated>
<author>
<name>Bruno Randolf</name>
<email>br1@einfach.org</email>
</author>
<published>2011-01-17T04:37:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=59eb21a6504731fc16db4cf9463065dd61093e08'/>
<id>59eb21a6504731fc16db4cf9463065dd61093e08</id>
<content type='text'>
Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
channel numbers in the 2GHz and 5GHz band we can't map from channel to
frequency without knowing the band. This is no problem as in most contexts we
know the band. In places where we don't know the band (and WEXT compatibility)
we assume the 2GHz band for channels below 14.

This patch does not implement all channel to frequency mappings defined in
802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
channels as well as 802.11y channels have been omitted.

The following drivers have been updated to reflect the API changes:
iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
The drivers have been compile-tested only.

Signed-off-by: Bruno Randolf &lt;br1@einfach.org&gt;
Signed-off-by: Brian Prodoehl &lt;bprodoehl@gmail.com&gt;
Acked-by: Luciano Coelho &lt;coelho@ti.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>
Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
channel numbers in the 2GHz and 5GHz band we can't map from channel to
frequency without knowing the band. This is no problem as in most contexts we
know the band. In places where we don't know the band (and WEXT compatibility)
we assume the 2GHz band for channels below 14.

This patch does not implement all channel to frequency mappings defined in
802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
channels as well as 802.11y channels have been omitted.

The following drivers have been updated to reflect the API changes:
iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
The drivers have been compile-tested only.

Signed-off-by: Bruno Randolf &lt;br1@einfach.org&gt;
Signed-off-by: Brian Prodoehl &lt;bprodoehl@gmail.com&gt;
Acked-by: Luciano Coelho &lt;coelho@ti.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211/nl80211: separate unicast/multicast default TX keys</title>
<updated>2010-12-13T20:23:28+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2010-12-09T18:58:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dbd2fd656f2060abfd3a16257f8b51ec60f6d2ed'/>
<id>dbd2fd656f2060abfd3a16257f8b51ec60f6d2ed</id>
<content type='text'>
Allow userspace to specify that a given key
is default only for unicast and/or multicast
transmissions. Only WEP keys are for both,
WPA/RSN keys set here are GTKs for multicast
only. For more future flexibility, allow to
specify all combiations.

Wireless extensions can only set both so use
nl80211; WEP keys (connect keys) must be set
as default for both (but 802.1X WEP is still
possible).

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.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>
Allow userspace to specify that a given key
is default only for unicast and/or multicast
transmissions. Only WEP keys are for both,
WPA/RSN keys set here are GTKs for multicast
only. For more future flexibility, allow to
specify all combiations.

Wireless extensions can only set both so use
nl80211; WEP keys (connect keys) must be set
as default for both (but 802.1X WEP is still
possible).

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wireless: Set some stats used by /proc/net/wireless (wext)</title>
<updated>2010-10-11T19:04:19+00:00</updated>
<author>
<name>Ben Greear</name>
<email>greearb@candelatech.com</email>
</author>
<published>2010-10-07T23:39:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a5c731aa59cc2c44ca20f45b1a577cd4f5435e2'/>
<id>5a5c731aa59cc2c44ca20f45b1a577cd4f5435e2</id>
<content type='text'>
Some stats for /proc/net/wireless (and wext in general) are not
being set.  This patch addresses a few of those with values easily
obtained from mac80211 core.

Signed-off-by: Ben Greear &lt;greearb@candelatech.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>
Some stats for /proc/net/wireless (and wext in general) are not
being set.  This patch addresses a few of those with values easily
obtained from mac80211 core.

Signed-off-by: Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211/mac80211: allow per-station GTKs</title>
<updated>2010-10-06T20:30:40+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2010-10-05T17:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e31b82136d1adc7a599b6e99d3321e5831841f5a'/>
<id>e31b82136d1adc7a599b6e99d3321e5831841f5a</id>
<content type='text'>
This adds API to allow adding per-station GTKs,
updates mac80211 to support it, and also allows
drivers to remove a key from hwaccel again when
this may be necessary due to multiple GTKs.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.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 adds API to allow adding per-station GTKs,
updates mac80211 to support it, and also allows
drivers to remove a key from hwaccel again when
this may be necessary due to multiple GTKs.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wireless extensions: fix kernel heap content leak</title>
<updated>2010-08-30T20:35:17+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2010-08-30T10:24:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=42da2f948d949efd0111309f5827bf0298bcc9a4'/>
<id>42da2f948d949efd0111309f5827bf0298bcc9a4</id>
<content type='text'>
Wireless extensions have an unfortunate, undocumented
requirement which requires drivers to always fill
iwp-&gt;length when returning a successful status. When
a driver doesn't do this, it leads to a kernel heap
content leak when userspace offers a larger buffer
than would have been necessary.

Arguably, this is a driver bug, as it should, if it
returns 0, fill iwp-&gt;length, even if it separately
indicated that the buffer contents was not valid.

However, we can also at least avoid the memory content
leak if the driver doesn't do this by setting the iwp
length to max_tokens, which then reflects how big the
buffer is that the driver may fill, regardless of how
big the userspace buffer is.

To illustrate the point, this patch also fixes a
corresponding cfg80211 bug (since this requirement
isn't documented nor was ever pointed out by anyone
during code review, I don't trust all drivers nor
all cfg80211 handlers to implement it correctly).

Cc: stable@kernel.org [all the way back]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.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>
Wireless extensions have an unfortunate, undocumented
requirement which requires drivers to always fill
iwp-&gt;length when returning a successful status. When
a driver doesn't do this, it leads to a kernel heap
content leak when userspace offers a larger buffer
than would have been necessary.

Arguably, this is a driver bug, as it should, if it
returns 0, fill iwp-&gt;length, even if it separately
indicated that the buffer contents was not valid.

However, we can also at least avoid the memory content
leak if the driver doesn't do this by setting the iwp
length to max_tokens, which then reflects how big the
buffer is that the driver may fill, regardless of how
big the userspace buffer is.

To illustrate the point, this patch also fixes a
corresponding cfg80211 bug (since this requirement
isn't documented nor was ever pointed out by anyone
during code review, I don't trust all drivers nor
all cfg80211 handlers to implement it correctly).

Cc: stable@kernel.org [all the way back]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wireless: correct sparse warning in wext-compat.c</title>
<updated>2010-07-20T20:49:37+00:00</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2010-07-20T16:22:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c28991a02caec1f3bfe4638ccf4e494c3e9418a3'/>
<id>c28991a02caec1f3bfe4638ccf4e494c3e9418a3</id>
<content type='text'>
  CHECK   net/wireless/wext-compat.c
net/wireless/wext-compat.c:1434:5: warning: symbol 'cfg80211_wext_siwpmksa' was not declared. Should it be static?

Add declaration in cfg80211.h.  Also add an EXPORT_SYMBOL_GPL, since all
the peer functions have it.

Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  CHECK   net/wireless/wext-compat.c
net/wireless/wext-compat.c:1434:5: warning: symbol 'cfg80211_wext_siwpmksa' was not declared. Should it be static?

Add declaration in cfg80211.h.  Also add an EXPORT_SYMBOL_GPL, since all
the peer functions have it.

Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211/mac80211: Update set_tx_power to use mBm instead of dBm units</title>
<updated>2010-06-24T19:42:33+00:00</updated>
<author>
<name>Juuso Oikarinen</name>
<email>juuso.oikarinen@nokia.com</email>
</author>
<published>2010-06-23T09:12:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fa61cf70a6ae1089e459e4b59b2e8d8e90d8535e'/>
<id>fa61cf70a6ae1089e459e4b59b2e8d8e90d8535e</id>
<content type='text'>
In preparation for a TX power setting interface in the nl80211, change the
.set_tx_power function to use mBm units instead of dBm for greater accuracy and
smaller power levels.

Also, already in advance move the tx_power_setting enumeration to nl80211.

This change affects the .tx_set_power function prototype. As a result, the
corresponding changes are needed to modules using it. These are mac80211,
iwmc3200wifi and rndis_wlan.

Cc: Samuel Ortiz &lt;samuel.ortiz@intel.com&gt;
Cc: Jussi Kivilinna &lt;jussi.kivilinna@mbnet.fi&gt;
Signed-off-by: Juuso Oikarinen &lt;juuso.oikarinen@nokia.com&gt;
Acked-by: Samuel Ortiz &lt;samuel.ortiz@intel.com&gt;
Acked-by: Jussi Kivilinna &lt;jussi.kivilinna@mbnet.fi&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>
In preparation for a TX power setting interface in the nl80211, change the
.set_tx_power function to use mBm units instead of dBm for greater accuracy and
smaller power levels.

Also, already in advance move the tx_power_setting enumeration to nl80211.

This change affects the .tx_set_power function prototype. As a result, the
corresponding changes are needed to modules using it. These are mac80211,
iwmc3200wifi and rndis_wlan.

Cc: Samuel Ortiz &lt;samuel.ortiz@intel.com&gt;
Cc: Jussi Kivilinna &lt;jussi.kivilinna@mbnet.fi&gt;
Signed-off-by: Juuso Oikarinen &lt;juuso.oikarinen@nokia.com&gt;
Acked-by: Samuel Ortiz &lt;samuel.ortiz@intel.com&gt;
Acked-by: Jussi Kivilinna &lt;jussi.kivilinna@mbnet.fi&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem</title>
<updated>2010-05-11T18:24:55+00:00</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2010-05-11T18:24:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cc755896a4274f11283bca32d1d658203844057a'/>
<id>cc755896a4274f11283bca32d1d658203844057a</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/ath/ar9170/main.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/wireless/ath/ar9170/main.c
</pre>
</div>
</content>
</entry>
</feed>
