Merge "Merge "wlan: wait for thread execution to stop before exiting the driver""
wlan: Priority to country in .ini over country in hostapd.conf

The country code in .ini was overwritten by country code in hostapd.conf
during start_bss.

Now when the country code is present in .ini during start_bss, we will
ignore the country in hostapd.conf and set the country from .ini .

Change-Id: Ie128b63b3133a00d4ffa35b2b1b236657e073e1c
CRs-fixed: 566810
Merge "wlan: Fix string termination and integer out of bound errors"
Fix for Immediate block-ack bit not set in the capability info

Though driver supports immediate block ack, the corresponding bit
in the capability info of beacons is not set in the current driver
this commit sets the immediate block ack support bit in capability
information of beacons

Change-Id: Ib9b64c8fbdd5abae33266be4bb3a1166e4c8fcee
CRs-fixed: 579391

Conflicts:
	firmware_bin/WCNSS_cfg.dat
Merge "Merge "Merge "wlan: wait for thread execution to stop before exiting the driver"""
Merge "Merge "wlan: wait for thread execution to stop before exiting the driver""
Revert "wlan: Fix race condition for reliable delivery of action frames."

This reverts commit 5ceca36b86344ce120b8fa4b441c4d7081f1fc45.
This fix will notify supplicant about cancel remain on channel,
but in host a new remain on channel will be started.
Supplicant will come out of listen state and can send new remain
on channel event again. It's always better to tell supplicant about
all remain on channel event.

CRs-Fixed: 586753
Change-Id: I08fe57596083dc3e4fc6c2ea69f0475f57c560e9
Merge "Fix for Immediate block-ack bit not set in the capability info"
Merge "Merge "Merge "wlan: wait for thread execution to stop before exiting the driver"""
wlan: Replace snprintf with scnprintf

The function snprintf() do not write more than size bytes (including
the terminating null byte ('\0')). If the output was truncated due
to this limit then the return value is the number of characters
(excluding the terminating null byte) which would have been written
to the final string if enough space had been available. Thus, a
return value of size or more means that the output was truncated.

Change-Id: Iccf9648961e2ac9eeffa0f824a80fd3798be3870
CRs-Fixed: 548711
wlan: Fix DXE stop during SSR

DXE stop may fail during SSR, even if it fails continue to the next
channel, that will guarantee that the interrupt unregistration and
health monitor timer clean up will be performed.

CRs-Fixed: 566564
Change-Id: I50a1b9d2b10d412c9cb61b30d31a27511078b503
Merge "wlan: remove obsolete platform-specific code"
MS01 problematic codes detected by code review tool  [UMAC]

Fix: Suspicious code lines are modified to avoid memory leaks,etc.

Change-Id: Ibb05dc4287e1d862c8926c0a7bbce6bc976df510
CRs-Fixed: 565788
P2P: Sanity check for presence of SSID in p2p scan request.

In Change-Id I7d810255a70e5d7e9ae143e094c878f08b2a829d, we
are increasing the dwell time of p2p scan if the p2p scan
is for specific SSID.
There may be chances that some supplicants doesn't trigger
p2p scan for specific SSID or SSIDList is NULL.
This results in kernel panic when p2p scan is issued to
establish p2p connection.

To resolve this issue, the number of SSIDs in scan request
is checked for the presence of SSID in p2p scan request.

CRs-fixed: 591975
Change-Id: I17cd4c5375e45ccb4b407388a51ee068872dc2f9
wlan: Protect DXE register access during SSR

During SSR, DXE registers should not accessed until WCNSS comes out
of reset. Accessing these registers when WCNSS is in shutdown could
cause unclocked register issues.

Change-Id: I4c578e28a64a7d55e0ab853ba2dc8c7ee4cd0bf9
CRs-Fixed: 564064
wlan: release the nv while unloading but not while doing an SSR

The nv data structures have to be released while unloading the
driver to prevent memory leaks, but while doing a subsystem restart
(SSR) do not release the nv during the shutdown procedures, this
way we dont have to load the nv again and it will save the restart
time.

Change-Id: I99f53144a817ac1e61fe789a839dc56791a51475
CRs-Fixed: 591220
wlan: During SSR ensure that driver threads complete their work

TX, RX and MC Threads should complete exexution before
the exit routine tries to free the dynamic data these threads
are trying to process. The current implementation does an
interruptible wait for completion of the threads; but it has been
observed that if the process which initiated the driver unload
receives SIGKILL while waiting for threads to complete, the process
will continue without waiting for threads to complete and the threads
will try to access invalidated data after the module has been removed
leading to a kernel panic. To fix this make the wait uninterruptible
during SSR and ensure that the driver threads complete execution
before the driver exits.

Change-Id: Ib79e38e2ab1810b2a61c57c155ce099b0468e311
CRs-Fixed: 590623
wlan: 11d Channel list is empty.

In csrResetCountryInformation, after applying channel list to
csrApplyChannelPowerCountryInfo, 11d channel list is empty.
So in csrApplyCountryInformation use base20MHzChannels
instead of 11d channels.

CRs-Fixed: 575005
Change-Id: Ief9e51b3ee12a83c529f483862a497c43267c90e
Merge "wlan: memory corruption fix"
wlan: Processing Deauth in eLIM_MLM_WT_ADD_STA_RSP_STATE

Currently DEAUTH is not getting processed in mlm state with
eLIM_MLM_WT_ADD_STA_RSP_STATE.

CRs-Fixed: 516813
Change-Id: I0ed779f73a5124ba06ebefad7d27046b3f46cf05