<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/wireless/util.c, branch v3.4.12</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>cfg80211: fix interface combinations check for ADHOC(IBSS)</title>
<updated>2012-08-15T15:10:33+00:00</updated>
<author>
<name>Liang Li</name>
<email>liang.li@windriver.com</email>
</author>
<published>2012-08-02T22:55:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=510f1d143b72225df068a31b2b105edaef5f2420'/>
<id>510f1d143b72225df068a31b2b105edaef5f2420</id>
<content type='text'>
partial of commit 8e8b41f9d8c8e63fc92f899ace8da91a490ac573 upstream.

As part of commit 463454b5dbd8 ("cfg80211: fix interface
combinations check"), this extra check was introduced:

       if ((all_iftypes &amp; used_iftypes) != used_iftypes)
               goto cont;

However, most wireless NIC drivers did not advertise ADHOC in
wiphy.iface_combinations[i].limits[] and hence we'll get -EBUSY
when we bring up a ADHOC wlan with commands similar to:

 # iwconfig wlan0 mode ad-hoc &amp;&amp; ifconfig wlan0 up

In commit 8e8b41f9d8c8e ("cfg80211: enforce lack of interface
combinations"), the change below fixes the issue:

       if (total == 1)
               return 0;

But it also introduces other dependencies for stable. For example,
a full cherry pick of 8e8b41f9d8c8e would introduce additional
regressions unless we also start cherry picking driver specific
fixes like the following:

  9b4760e  ath5k: add possible wiphy interface combinations
  1ae2fc2  mac80211_hwsim: advertise interface combinations
  20c8e8d  ath9k: add possible wiphy interface combinations

And the purpose of the 'if (total == 1)' is to cover the specific
use case (IBSS, adhoc) that was mentioned above. So we just pick
the specific part out from 8e8b41f9d8c8e here.

Doing so gives stable kernels a way to fix the change introduced
by 463454b5dbd8, without having to make cherry picks specific to
various NIC drivers.

Signed-off-by: Liang Li &lt;liang.li@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.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>
partial of commit 8e8b41f9d8c8e63fc92f899ace8da91a490ac573 upstream.

As part of commit 463454b5dbd8 ("cfg80211: fix interface
combinations check"), this extra check was introduced:

       if ((all_iftypes &amp; used_iftypes) != used_iftypes)
               goto cont;

However, most wireless NIC drivers did not advertise ADHOC in
wiphy.iface_combinations[i].limits[] and hence we'll get -EBUSY
when we bring up a ADHOC wlan with commands similar to:

 # iwconfig wlan0 mode ad-hoc &amp;&amp; ifconfig wlan0 up

In commit 8e8b41f9d8c8e ("cfg80211: enforce lack of interface
combinations"), the change below fixes the issue:

       if (total == 1)
               return 0;

But it also introduces other dependencies for stable. For example,
a full cherry pick of 8e8b41f9d8c8e would introduce additional
regressions unless we also start cherry picking driver specific
fixes like the following:

  9b4760e  ath5k: add possible wiphy interface combinations
  1ae2fc2  mac80211_hwsim: advertise interface combinations
  20c8e8d  ath9k: add possible wiphy interface combinations

And the purpose of the 'if (total == 1)' is to cover the specific
use case (IBSS, adhoc) that was mentioned above. So we just pick
the specific part out from 8e8b41f9d8c8e here.

Doing so gives stable kernels a way to fix the change introduced
by 463454b5dbd8, without having to make cherry picks specific to
various NIC drivers.

Signed-off-by: Liang Li &lt;liang.li@windriver.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: process pending events when unregistering net device</title>
<updated>2012-08-15T15:10:32+00:00</updated>
<author>
<name>Daniel Drake</name>
<email>dsd@laptop.org</email>
</author>
<published>2012-08-02T17:41:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25320e75fe0296dab5ae37c6b59f18899cd1c310'/>
<id>25320e75fe0296dab5ae37c6b59f18899cd1c310</id>
<content type='text'>
commit 1f6fc43e621167492ed4b7f3b4269c584c3d6ccc upstream.

libertas currently calls cfg80211_disconnected() when it is being
brought down. This causes an event to be allocated, but since the
wdev is already removed from the rdev by the time that the event
processing work executes, the event is never processed or freed.
http://article.gmane.org/gmane.linux.kernel.wireless.general/95666

Fix this leak, and other possible situations, by processing the event
queue when a device is being unregistered. Thanks to Johannes Berg for
the suggestion.

Signed-off-by: Daniel Drake &lt;dsd@laptop.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.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 1f6fc43e621167492ed4b7f3b4269c584c3d6ccc upstream.

libertas currently calls cfg80211_disconnected() when it is being
brought down. This causes an event to be allocated, but since the
wdev is already removed from the rdev by the time that the event
processing work executes, the event is never processed or freed.
http://article.gmane.org/gmane.linux.kernel.wireless.general/95666

Fix this leak, and other possible situations, by processing the event
queue when a device is being unregistered. Thanks to Johannes Berg for
the suggestion.

Signed-off-by: Daniel Drake &lt;dsd@laptop.org&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: check iface combinations only when iface is running</title>
<updated>2012-07-19T15:58:59+00:00</updated>
<author>
<name>Michal Kazior</name>
<email>michal.kazior@tieto.com</email>
</author>
<published>2012-06-08T08:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=738c88c1b8ebe16c3ecd1694871474b470275d82'/>
<id>738c88c1b8ebe16c3ecd1694871474b470275d82</id>
<content type='text'>
commit f8cdddb8d61d16a156229f0910f7ecfc7a82c003 upstream.

Don't validate interface combinations on a stopped
interface. Otherwise we might end up being able to
create a new interface with a certain type, but
won't be able to change an existing interface
into that type.

This also skips some other functions when
interface is stopped and changing interface type.

Signed-off-by: Michal Kazior &lt;michal.kazior@tieto.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
[Fixes regression introduced by cherry pick of 463454b5dbd8]
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;

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

Don't validate interface combinations on a stopped
interface. Otherwise we might end up being able to
create a new interface with a certain type, but
won't be able to change an existing interface
into that type.

This also skips some other functions when
interface is stopped and changing interface type.

Signed-off-by: Michal Kazior &lt;michal.kazior@tieto.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
[Fixes regression introduced by cherry pick of 463454b5dbd8]
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: fix interface combinations check</title>
<updated>2012-06-17T18:21:26+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2012-06-05T10:16:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6fa9c3400dd4cbf30c597dbde5d6abbc12b9764d'/>
<id>6fa9c3400dd4cbf30c597dbde5d6abbc12b9764d</id>
<content type='text'>
commit 463454b5dbd8dbab6e2fc6c557329e5b811b9c32 upstream.

If a given interface combination doesn't contain
a required interface type then we missed checking
that and erroneously allowed it even though iface
type wasn't there at all. Add a check that makes
sure that all interface types are accounted for.

Reported-by: Mohammed Shafi Shajakhan &lt;mohammed@qca.qualcomm.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.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 463454b5dbd8dbab6e2fc6c557329e5b811b9c32 upstream.

If a given interface combination doesn't contain
a required interface type then we missed checking
that and erroneously allowed it even though iface
type wasn't there at all. Add a check that makes
sure that all interface types are accounted for.

Reported-by: Mohammed Shafi Shajakhan &lt;mohammed@qca.qualcomm.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: fix interface combinations check.</title>
<updated>2012-04-13T18:05:35+00:00</updated>
<author>
<name>Lukasz Kucharczyk</name>
<email>lukasz.kucharczyk@tieto.com</email>
</author>
<published>2012-04-11T12:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e55a4046dab28c440c96890bdddcf02dc8981f2d'/>
<id>e55a4046dab28c440c96890bdddcf02dc8981f2d</id>
<content type='text'>
Signed-off-by: Lukasz Kucharczyk &lt;lukasz.kucharczyk@tieto.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Lukasz Kucharczyk &lt;lukasz.kucharczyk@tieto.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: expose cfg80211_calculate_bitrate()</title>
<updated>2012-03-06T20:16:17+00:00</updated>
<author>
<name>Thomas Pedersen</name>
<email>thomas@cozybit.com</email>
</author>
<published>2012-03-05T23:31:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8097e1494459a4f9cdbaba7440334d9bd11a39f0'/>
<id>8097e1494459a4f9cdbaba7440334d9bd11a39f0</id>
<content type='text'>
Signed-off-by: Thomas Pedersen &lt;thomas@cozybit.com&gt;
Reviewed-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>
Signed-off-by: Thomas Pedersen &lt;thomas@cozybit.com&gt;
Reviewed-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>wireless: Treat IPv6 diffserv the same as IPv4 for 802.11e</title>
<updated>2012-01-04T19:30:43+00:00</updated>
<author>
<name>Dave Täht</name>
<email>dave.taht@bufferbloat.net</email>
</author>
<published>2011-12-22T20:55:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b156579b1404871d97d2713c1f93c9526618e3ba'/>
<id>b156579b1404871d97d2713c1f93c9526618e3ba</id>
<content type='text'>
Wireless will select a different hardware queue based on the
top 3 bits of the diffserv field, for ipv4. Extend that queue
selection mechanism to ipv6, and make the calls orthogonal.

Signed-off-by: Dave TÃ¤ht &lt;dave.taht@bufferbloat.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>
Wireless will select a different hardware queue based on the
top 3 bits of the diffserv field, for ipv4. Extend that queue
selection mechanism to ipv6, and make the calls orthogonal.

Signed-off-by: Dave TÃ¤ht &lt;dave.taht@bufferbloat.net&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: Fix race in bss timeout</title>
<updated>2011-12-13T20:30:28+00:00</updated>
<author>
<name>Vasanthakumar Thiagarajan</name>
<email>vthiagar@qca.qualcomm.com</email>
</author>
<published>2011-12-08T08:58:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=adbde344dc12514d68620afae8d34035e72544b1'/>
<id>adbde344dc12514d68620afae8d34035e72544b1</id>
<content type='text'>
It is quite possible to run into a race in bss timeout where
the drivers see the bss entry just before notifying cfg80211
of a roaming event but it got timed out by the time rdev-&gt;event_work
got scehduled from cfg80211_wq. This would result in the following
WARN-ON() along with the failure to notify the user space of
the roaming. The other situation which is happening with ath6kl
that runs into issue is when the driver reports roam to same AP
event where the AP bss entry already got expired. To fix this,
move cfg80211_get_bss() from __cfg80211_roamed() to cfg80211_roamed().

[158645.538384] WARNING: at net/wireless/sme.c:586
__cfg80211_roamed+0xc2/0x1b1()
[158645.538810] Call Trace:
[158645.538838]  [&lt;c1033527&gt;] warn_slowpath_common+0x65/0x7a
[158645.538917]  [&lt;c14cfacf&gt;] ? __cfg80211_roamed+0xc2/0x1b1
[158645.538946]  [&lt;c103354b&gt;] warn_slowpath_null+0xf/0x13
[158645.539055]  [&lt;c14cfacf&gt;] __cfg80211_roamed+0xc2/0x1b1
[158645.539086]  [&lt;c14beb5b&gt;] cfg80211_process_rdev_events+0x153/0x1cc
[158645.539166]  [&lt;c14bd57b&gt;] cfg80211_event_work+0x26/0x36
[158645.539195]  [&lt;c10482ae&gt;] process_one_work+0x219/0x38b
[158645.539273]  [&lt;c14bd555&gt;] ? wiphy_new+0x419/0x419
[158645.539301]  [&lt;c10486cb&gt;] worker_thread+0xf6/0x1bf
[158645.539379]  [&lt;c10485d5&gt;] ? rescuer_thread+0x1b5/0x1b5
[158645.539407]  [&lt;c104b3e2&gt;] kthread+0x62/0x67
[158645.539484]  [&lt;c104b380&gt;] ? __init_kthread_worker+0x42/0x42
[158645.539514]  [&lt;c151309a&gt;] kernel_thread_helper+0x6/0xd

Reported-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Signed-off-by: Vasanthakumar Thiagarajan &lt;vthiagar@qca.qualcomm.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>
It is quite possible to run into a race in bss timeout where
the drivers see the bss entry just before notifying cfg80211
of a roaming event but it got timed out by the time rdev-&gt;event_work
got scehduled from cfg80211_wq. This would result in the following
WARN-ON() along with the failure to notify the user space of
the roaming. The other situation which is happening with ath6kl
that runs into issue is when the driver reports roam to same AP
event where the AP bss entry already got expired. To fix this,
move cfg80211_get_bss() from __cfg80211_roamed() to cfg80211_roamed().

[158645.538384] WARNING: at net/wireless/sme.c:586
__cfg80211_roamed+0xc2/0x1b1()
[158645.538810] Call Trace:
[158645.538838]  [&lt;c1033527&gt;] warn_slowpath_common+0x65/0x7a
[158645.538917]  [&lt;c14cfacf&gt;] ? __cfg80211_roamed+0xc2/0x1b1
[158645.538946]  [&lt;c103354b&gt;] warn_slowpath_null+0xf/0x13
[158645.539055]  [&lt;c14cfacf&gt;] __cfg80211_roamed+0xc2/0x1b1
[158645.539086]  [&lt;c14beb5b&gt;] cfg80211_process_rdev_events+0x153/0x1cc
[158645.539166]  [&lt;c14bd57b&gt;] cfg80211_event_work+0x26/0x36
[158645.539195]  [&lt;c10482ae&gt;] process_one_work+0x219/0x38b
[158645.539273]  [&lt;c14bd555&gt;] ? wiphy_new+0x419/0x419
[158645.539301]  [&lt;c10486cb&gt;] worker_thread+0xf6/0x1bf
[158645.539379]  [&lt;c10485d5&gt;] ? rescuer_thread+0x1b5/0x1b5
[158645.539407]  [&lt;c104b3e2&gt;] kthread+0x62/0x67
[158645.539484]  [&lt;c104b380&gt;] ? __init_kthread_worker+0x42/0x42
[158645.539514]  [&lt;c151309a&gt;] kernel_thread_helper+0x6/0xd

Reported-by: Kalle Valo &lt;kvalo@qca.qualcomm.com&gt;
Signed-off-by: Vasanthakumar Thiagarajan &lt;vthiagar@qca.qualcomm.com&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/torvalds/linux</title>
<updated>2011-11-22T19:05:46+00:00</updated>
<author>
<name>John W. Linville</name>
<email>linville@tuxdriver.com</email>
</author>
<published>2011-11-22T19:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=515db09338704a6ad7d27b5f1e33820d3052edd2'/>
<id>515db09338704a6ad7d27b5f1e33820d3052edd2</id>
<content type='text'>
Conflicts:
	drivers/net/wireless/iwlegacy/iwl-debugfs.c
	drivers/net/wireless/iwlegacy/iwl-rx.c
	drivers/net/wireless/iwlegacy/iwl-scan.c
	drivers/net/wireless/iwlegacy/iwl-tx.c
	include/net/bluetooth/bluetooth.h
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/wireless/iwlegacy/iwl-debugfs.c
	drivers/net/wireless/iwlegacy/iwl-rx.c
	drivers/net/wireless/iwlegacy/iwl-scan.c
	drivers/net/wireless/iwlegacy/iwl-tx.c
	include/net/bluetooth/bluetooth.h
</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: work around a sparse issue</title>
<updated>2011-11-21T21:22:10+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2011-11-21T10:09:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=11a2a357a9d8e058db032883ffd535bf4ad6a899'/>
<id>11a2a357a9d8e058db032883ffd535bf4ad6a899</id>
<content type='text'>
sparse reports:
net/wireless/util.c:499:30: error: cannot size expression
net/wireless/util.c:503:30: error: cannot size expression

This is evidently due to the EXPORT_SYMBOL() of the
bridge_tunnel_header and rfc1042 header variables.
Move them to the end of the file to work around the
sparse issue. The error itself from sparse can be
ignored safely, but since sparse stops parsing at
errors, other issues after this would go undetected.

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>
sparse reports:
net/wireless/util.c:499:30: error: cannot size expression
net/wireless/util.c:503:30: error: cannot size expression

This is evidently due to the EXPORT_SYMBOL() of the
bridge_tunnel_header and rfc1042 header variables.
Move them to the end of the file to work around the
sparse issue. The error itself from sparse can be
ignored safely, but since sparse stops parsing at
errors, other issues after this would go undetected.

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>
</feed>
