<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/net/wireless/reg.c, branch linux-3.16.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.16.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-3.16.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2019-11-22T15:57:18+00:00</updated>
<entry>
<title>Revert "cfg80211: fix processing world regdomain when non modular"</title>
<updated>2019-11-22T15:57:18+00:00</updated>
<author>
<name>Hodaszi, Robert</name>
<email>Robert.Hodaszi@digi.com</email>
</author>
<published>2019-06-14T13:16:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=21214eebcd99e8f22ad406695fb8d0c835b0fbed'/>
<id>urn:sha1:21214eebcd99e8f22ad406695fb8d0c835b0fbed</id>
<content type='text'>
commit 0d31d4dbf38412f5b8b11b4511d07b840eebe8cb upstream.

This reverts commit 96cce12ff6e0 ("cfg80211: fix processing world
regdomain when non modular").

Re-triggering a reg_process_hint with the last request on all events,
can make the regulatory domain fail in case of multiple WiFi modules. On
slower boards (espacially with mdev), enumeration of the WiFi modules
can end up in an intersected regulatory domain, and user cannot set it
with 'iw reg set' anymore.

This is happening, because:
- 1st module enumerates, queues up a regulatory request
- request gets processed by __reg_process_hint_driver():
  - checks if previous was set by CORE -&gt; yes
    - checks if regulator domain changed -&gt; yes, from '00' to e.g. 'US'
      -&gt; sends request to the 'crda'
- 2nd module enumerates, queues up a regulator request (which triggers
  the reg_todo() work)
- reg_todo() -&gt; reg_process_pending_hints() sees, that the last request
  is not processed yet, so it tries to process it again.
  __reg_process_hint driver() will run again, and:
  - checks if the last request's initiator was the core -&gt; no, it was
    the driver (1st WiFi module)
  - checks, if the previous initiator was the driver -&gt; yes
    - checks if the regulator domain changed -&gt; yes, it was '00' (set by
      core, and crda call did not return yet), and should be changed to 'US'

------&gt; __reg_process_hint_driver calls an intersect

Besides, the reg_process_hint call with the last request is meaningless
since the crda call has a timeout work. If that timeout expires, the
first module's request will lost.

Fixes: 96cce12ff6e0 ("cfg80211: fix processing world regdomain when non modular")
Signed-off-by: Robert Hodaszi &lt;robert.hodaszi@digi.com&gt;
Link: https://lore.kernel.org/r/20190614131600.GA13897@a1-hr
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>cfg80211: reg: Init wiphy_idx in regulatory_hint_core()</title>
<updated>2018-12-16T22:09:04+00:00</updated>
<author>
<name>Andrei Otcheretianski</name>
<email>andrei.otcheretianski@intel.com</email>
</author>
<published>2018-09-05T05:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cd95f113f0f8ef793308ac14aab4c37002ca25c9'/>
<id>urn:sha1:cd95f113f0f8ef793308ac14aab4c37002ca25c9</id>
<content type='text'>
commit 24f33e64fcd0d50a4b1a8e5b41bd0257aa66b0e8 upstream.

Core regulatory hints didn't set wiphy_idx to WIPHY_IDX_INVALID. Since
the regulatory request is zeroed, wiphy_idx was always implicitly set to
0. This resulted in updating only phy #0.
Fix that.

Fixes: 806a9e39670b ("cfg80211: make regulatory_request use wiphy_idx instead of wiphy")
Signed-off-by: Andrei Otcheretianski &lt;andrei.otcheretianski@intel.com&gt;
Signed-off-by: Luca Coelho &lt;luciano.coelho@intel.com&gt;
[add fixes tag]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>cfg80211: don't WARN about two consecutive Country IE hint</title>
<updated>2015-01-15T10:44:04+00:00</updated>
<author>
<name>Emmanuel Grumbach</name>
<email>emmanuel.grumbach@intel.com</email>
</author>
<published>2014-12-02T07:53:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=06f863df73d6e0b7a2f1082fecf81a364ce7d830'/>
<id>urn:sha1:06f863df73d6e0b7a2f1082fecf81a364ce7d830</id>
<content type='text'>
commit 70dcec5a488a7b81779190ac8089475fe4b8b962 upstream.

This can happen and there is no point in added more
detection code lower in the stack. Catching these in one
single point (cfg80211) is enough. Stop WARNING about this
case.

This fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=89001

Fixes: 2f1c6c572d7b ("cfg80211: process non country IE conflicting first")
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: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: avoid mem leak on driver hint set</title>
<updated>2015-01-15T10:44:02+00:00</updated>
<author>
<name>Arik Nemtsov</name>
<email>arik@wizery.com</email>
</author>
<published>2014-12-04T10:22:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8509cd39be23744fd62b4e4e23302342736c935a'/>
<id>urn:sha1:8509cd39be23744fd62b4e4e23302342736c935a</id>
<content type='text'>
commit 34f05f543f02350e920bddb7660ffdd4697aaf60 upstream.

In the already-set and intersect case of a driver-hint, the previous
wiphy regdomain was not freed before being reset with a copy of the
cfg80211 regdomain.

Signed-off-by: Arik Nemtsov &lt;arikx.nemtsov@intel.com&gt;
Acked-by: Luis R. Rodriguez &lt;mcgrof@suse.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
</content>
</entry>
<entry>
<title>Revert "cfg80211: Use 5MHz bandwidth by default when checking usable channels"</title>
<updated>2014-06-23T09:06:28+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-06-23T09:06:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e33e2241e272eddc38339692500bd1c7d8753a77'/>
<id>urn:sha1:e33e2241e272eddc38339692500bd1c7d8753a77</id>
<content type='text'>
This reverts commit 8eca1fb692cc9557f386eddce75c300a3855d11a.

Felix notes that this broke regulatory, leaving channel 12 open for AP
operation in the US regulatory domain where it isn't permitted.

Link: http://mid.gmane.org/53A6C0FF.9090104@openwrt.org
Reported-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: don't set reg timeout for user-handled hint</title>
<updated>2014-05-21T07:15:18+00:00</updated>
<author>
<name>Arik Nemtsov</name>
<email>arik@wizery.com</email>
</author>
<published>2014-05-11T08:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4d3df547e836f9a75b8de2b788449823c8db1d6a'/>
<id>urn:sha1:4d3df547e836f9a75b8de2b788449823c8db1d6a</id>
<content type='text'>
Otherwise every "indoor" setting by usermode will cause a regdomain reset.

Acked-by: Luis R. Rodriguez &lt;mcgrof@suse.com&gt;
Signed-off-by: Arik Nemtsov &lt;arikx.nemtsov@intel.com&gt;
Signed-off-by: Emmanuel Grumbach &lt;emmanuel.grumbach@intel.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: Use 5MHz bandwidth by default when checking usable channels</title>
<updated>2014-04-25T15:39:32+00:00</updated>
<author>
<name>Rostislav Lisovy</name>
<email>lisovy@gmail.com</email>
</author>
<published>2014-04-15T12:37:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8eca1fb692cc9557f386eddce75c300a3855d11a'/>
<id>urn:sha1:8eca1fb692cc9557f386eddce75c300a3855d11a</id>
<content type='text'>
Current code checks if the 20MHz bandwidth is allowed for
particular channel -- if it is not, the channel is disabled.
Since we need to use 5/10 MHz channels, this code is modified in
the way that the default bandwidth to check is 5MHz. If the
maximum bandwidth allowed by the channel is smaller than 5MHz,
the channel is disabled. Otherwise the channel is used and the
flags are set according to the bandwidth allowed by the channel.

Signed-off-by: Rostislav Lisovy &lt;rostislav.lisovy@fel.cvut.cz&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: fix processing world regdomain when non modular</title>
<updated>2014-04-22T15:17:56+00:00</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>mcgrof@suse.com</email>
</author>
<published>2014-04-22T03:39:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=96cce12ff6e0bc9d9fcb2235e08b7fc150f96fd2'/>
<id>urn:sha1:96cce12ff6e0bc9d9fcb2235e08b7fc150f96fd2</id>
<content type='text'>
This allows processing of the last regulatory request when
we determine its still pending. Without this if a regulatory
request failed to get processed by userspace we wouldn't
be able to re-process it later. An example situation that can
lead to an unprocessed last_request is enabling cfg80211 to
be built-in to the kernel, not enabling CFG80211_INTERNAL_REGDB
and the CRDA binary not being available at the time the udev
rule that kicks of CRDA triggers.

In such a situation we want to let some cfg80211 triggers
eventually kick CRDA for us again. Without this if the first
cycle attempt to kick off CRDA failed we'd be stuck without
the ability to change process any further regulatory domains.

cfg80211 will trigger re-processing of the regulatory queue
whenever schedule_work(&amp;reg_work) is called, currently this
happens when:

  * suspend / resume
  * disconnect
  * a beacon hint gets triggered (non DFS 5 GHz AP found)
  * a regulatory request gets added to the queue

We don't have any specific opportunistic late boot triggers
to address a late mount of where CRDA resides though, adding
that should be done separately through another patch.
Without an opportunistic fix then this fix relies at least
one of the triggeres above to happen.

Reported-by: Sander Eikelenboom &lt;linux@eikelenboom.it&gt;
Signed-off-by: Luis R. Rodriguez &lt;mcgrof@suse.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: avoid freeing last_request while in flight</title>
<updated>2014-04-22T15:12:55+00:00</updated>
<author>
<name>Arik Nemtsov</name>
<email>arik@wizery.com</email>
</author>
<published>2014-04-22T03:39:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c888393b74968aa8795c94b8923a5061b5ce6dcc'/>
<id>urn:sha1:c888393b74968aa8795c94b8923a5061b5ce6dcc</id>
<content type='text'>
Avoid freeing the last request while it is being processed. This can
happen in some cases if reg_work is kicked for some reason while the
currently pending request is in flight.

Cc: Sander Eikelenboom &lt;linux@eikelenboom.it&gt;
Tested-by: Eliad Peller &lt;eliad@wizery.com&gt;
Tested-by: Colleen Twitty &lt;colleen@cozybit.com&gt;
Signed-off-by: Arik Nemtsov &lt;arik@wizery.com&gt;
Signed-off-by: Luis R. Rodriguez &lt;mcgrof@suse.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>cfg80211: reg: set DFS CAC time in case of custom regd</title>
<updated>2014-04-11T08:00:10+00:00</updated>
<author>
<name>Janusz Dziedzic</name>
<email>janusz.dziedzic@tieto.com</email>
</author>
<published>2014-04-09T11:47:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4f267c1198cf57fc9fc444c78649bca018cc63af'/>
<id>urn:sha1:4f267c1198cf57fc9fc444c78649bca018cc63af</id>
<content type='text'>
Set DFS CAC time also in case of using custom
and strict regulatory from drivers. In other case
we could have unset DFS CAC time directly after
driver loaded and before issue regulatory set from
user mode.

Signed-off-by: Janusz Dziedzic &lt;janusz.dziedzic@tieto.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
</feed>
