qcacld-3.0: Reset the global reg params during wiphy unregisteration

qcacld-2.0 to qcacld-3.0 propagation

After boot when driver is loaded for the first time, driver call
the regulatory_hint with default country.

From kernel 3.18 onward regulatory_hint removes the
REGULATORY_CUSTOM_REG flag from wiphy flags. But once reg notifier
is called for the country the wiphy flags are restored from the
original flags stored in driver.

Now if driver is unloaded and loaded again, kernel calls the reg
notifier for the last country set by driver before unload.

In static drivers the global static flag init_by_driver will remain
true even after unload and load and thus init_by_reg_core is not set
to true when kernel calls the reg notifier. Thus driver ends up
sending reg hint to kernel with same country, this reg hint removes
the REGULATORY_CUSTOM_REG flag from wiphy flags and is dropped in
the kernel as country has not changed. As reg notifier is not
called for the reg hint and wiphy flags are not restored.

To avoid changing of wiphy flags, reset the global static reg params
during wiphy unregisteration.

Change-Id: I01b29a2314ab4192e6bc9076978d54762a85c9e8
CRs-Fixed: 1003390
3 files changed
tree: 1ddc607cc9565069d481f1c07a8d25d9eadd96c3
  1. config/
  2. core/
  3. target/
  4. uapi/
  5. Android.mk
  6. Kbuild
  7. Kconfig
  8. Makefile
  9. README.txt