wdi: Get bEnableSSR back into WDI_ControlBlockType

The support for enabling and disabling SSR requires the bEnableSSR
member of the WDI_ControlBlockType, but this was most likely erroneously
removed in 9af07cf.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
wlan: Avoid unsafe channel with softap mode and P2PGO mode

If FW sends unsafe channel detect indication,
Softap mode and P2PGO mode, should avoid to stay unsafe channels.
Make indication path from FW.
Store into module context.
Store into static module storage incase of re-load driver.
Channel selection should avoid unsafe channel

CRs-fixed: 576020
wlan: Handle change in AP capabilities properly

In limDetectChangeInApCapabilities if Beacon capabilities
are not matching with the psessionEntry capabilities,
instead of sending eSIR_SME_AP_CAPS_CHANGED event, send a
probe req to AP.

This logic is already present for mismatch in Qos,
Short preamble, privacy bit and NULL ssid. Extending it
for remaining params.

When we recieve probe response check the session
capabilities against probe response and take the action
based on it.

CRs-Fixed: 589742
Change-Id: I658cfb2974e57aff0339ad0ab4d9b2ad419cf98c
wlan: rrm: Disable rrm in assoc request if AP doesnot support rrm

With the existing implementation, STA Cannot connect to some
APs due to rrm set in th eassociation request when AP does not
support rrm. Changes are made to disable the rrm in association
request if rrm is not set in beacon/probe response from the AP.

Change-Id: Ic5281424bf22392de57e77c3bf99fa5c144e1087
CRs-fixed: 590602
wlan: HDD layer logging enchancement (Phase-1).

Added logs which should get printed when we are
returning indefinitely in HDD connect path.

Change-Id: I8601b1e3ec5e20527c49f7e43cb33f7353b2d558
CRs-Fixed: 589205
wlan: Added supoort to age out probe requests.

In MC thread context,
whenever any probe request is pending for more than
500 ms it is dropped. with this probe request wont be
able to block MC thread.
limAgeOutProbeReq() is added to support this functionality.

Change-Id: I3f1295fcae1478512607f887380fd01fe82bce8d
CRs-Fixed: 587401
wlan: Fix of crash issue with batch scan disabled

Removing feature flag from WDI enumeration definitions because even if
feature is not defined a NULL entry is added in WDI request and response
function pointer tables and because of it wrong handler is being picked
up by WDI while handling request messages from UMAC.

Change-Id: I02e4033a1aef71b6806e36b47e071a6055ef05df
CRs-fixed: 593760
wlan:update transmit power range

Currently transmit power range is configured as 13-19db
which is limiting transmit power so updated it with actual
range i.e 8-22db.

Change-Id: Ib8f9b4bd1c43a85448d82279ecd8f4338a5c16bb
CRs-Fixed: 587584
Revert "wlan: Setting Max Tx Power Limit for specific band"

This reverts commit 8fb8d79c9c3b616b970d676e1ac8e520f3365218

Change-Id: I275fac8fbd72c73785b9fd5a0a80c95f0d128dca
Wlan: Revision 3.2.3.209

Revision 3.2.3.209
wlan: check for device mode in cleanup_adapter().

Batch scan is valid only in case of STA, P2P Client and P2P
device. Added a check for the device mode while cleanup.

Change-Id: I5b336fad9eb15af82e0755c9968ebf41af6aa8e9
CRs-Fixed: 594164
wlan: Fix of WLS_BATCHING VERSION command failure

WLS_BATCHING VERSION command is failing because device mode
is coming as P2P device. Adding P2P device mode check in version
command handler

Change-Id: Iea708cfeedc8a899f929ac5887522676af94f73f
CRs-fixed: 594077
wlan: stop traffic timer during wlan driver shutdown.

While driver shutdown, traffic timer is not stopped, leading to
kernel panic while processing traffic timer handler, because of
hal context in hdd context is set to NULL, if the timer is invoked
before driver is reinitialized. So stop traffic timer in
hdd_wlan_shutdown().

Change-Id: I989f243cc29a0b9b865bde859d086262ef59e71d
CRs-Fixed: 593729
Wlan: Revision 3.2.3.210

Revision 3.2.3.210
wlan: Fix architecture issue with voss messaging and timers

The current usage of vos messaging does not work correctly on all
software architectures due to the overloading of certain message
fields.  Correct this by adding an explicit 'callback' field to the
vos message structure, and modify the vos timer messaging to use this
new field.

Change-Id: I952148e456da48b26d95c829c1b7fb8f35cfe364
CRs-fixed: 567258
Configure ShortGI for VHT20/40/80 in Probe or Assoc req

Advertisiment of ShortGI80MHz in probe/assoc Req is enabled or
disabled with 'gShortGI40Mhz' of ini file.

Change-Id: I3f3f5a948c3e858c00ce77728c461101e4cc84a2
CRs-fixed: 580189
Wlan: Revision 3.2.3.210a

Revision 3.2.3.210a
wlan: Fix 64-bit type conversion issue in vos_crypto_init()

When built for a 64-bit architecture vos_crypto_init() generates a
"pointer-to-int-cast" warning.  The cause is that a 64-bit pointer is
being assigned to a 32-bit crypto handle.

Note that if the crypto handle was actually being used by the crypto
routines, the appropriate fix would be to change the type of the
crypto handle from (v_U32_t) to (void *) so that it could represent an
opaque memory pointer.  But since such a change would require
modification to all of the VOSS crypto APIs as well as changes to all
clients of these APIs, and since in reality the crypto handle is not
actually being used, the less intrusive change is to simply modify
vos_crypto_init() to set the crypto context to 0 instead of NULL.

Change-Id: I13ec61ecd1a5e14b10428c7803eaad0f4c85eec5
CRs-fixed: 567258
wlan: Fix the race condition in RX Low resource recovery mechanism

Set the wpalPacketAvailableCB before we try to get a VOS
packet from the 'free list' and reset it if vos_pkt_get_packet()
returns a valid packet. This order is required to avoid the
following race condition:
1. The call to vos_pkt_get_packet() from wpalPacketAlloc() in
   RX_Thread determines that no more packets are available in
   the 'free list' and sets the low resource callbacks.
2. In parallel vos_pkt_return_packet() is called in MC_Thread for a
   Management frame before wpalPacketAlloc() gets a chance to set
   wpalPacketAvailableCB and since the 'low resource callbacks'
   are set the, callback function - wpalPacketRXLowResourceCB is
   executed.But as wpalPacketAvailableCB is still NULL the low
   resource recovery fails.

Change-Id: Ie1cea3c9411e314a4309efdc207f4f69953f844f
CRs-Fixed: 591906
wlan: Fix null pointer references found in static analysis.

Fixed potential null pointer references and
memory leaks find by static code analysis.

Change-Id: Ib13533257a23fb0801a287a256a9faa5c7ffa4f4
CRs-Fixed: 594219