]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: mvm: fix regulatory domain update when the firmware starts
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 3 Oct 2018 08:16:54 +0000 (11:16 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 15 Nov 2018 21:50:58 +0000 (23:50 +0200)
commited07388696277e943b628781f77c86512b6e0929
treeee68a9c388060bfe18a38b2b2bf1b1f160af1bc7
parent096a0dc7c74f45a0eee3aaa6532db2bdf13446a9
iwlwifi: mvm: fix regulatory domain update when the firmware starts

When the firmware starts, it doesn't have any regulatory
information, hence it uses the world wide limitations. The
driver can feed the firmware with previous knowledge that
was kept in the driver, but the firmware may still not
update its internal tables.

This happens when we start a BSS interface, and then the
firmware can change the regulatory tables based on our
location and it'll use more lenient, location specific
rules. Then, if the firmware is shut down (when the
interface is brought down), and then an AP interface is
created, the firmware will forget the country specific
rules.

The host will think that we are in a certain country that
may allow channels and will try to teach the firmware about
our location, but the firmware may still not allow to drop
the world wide limitations and apply country specific rules
because it was just re-started.

In this case, the firmware will reply with MCC_RESP_ILLEGAL
to the MCC_UPDATE_CMD. In that case, iwlwifi needs to let
the upper layers (cfg80211 / hostapd) know that the channel
list they know about has been updated.

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

Cc: stable@vger.kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/nvm.c