TDLS: Fix for low throughput in 2.4GHz

When AP is 2.4GHz TDLS is picking up only fixed
rate index 67.
Send the correct value of ChannelWidthSet to the firmware
i.e. zero when TDLS link is on 2.4GHz band.

CRs-Fixed: 462399
Change-Id: I894632dc5148c8f6704e5763e9237babc7173feb
wlan: encrypt gtk 2/2 message during wpa authentication

The TL state machine does not move to authenticated state till
GTK is installed. And TL does not allow encrypted data in case
of WPA(2) till it goes to authenticated state.
In case of WPA after the 4 way handshake when AP and STA do the
GTK handshake the STA does not encrypt the GTK 2/2 message and
the AP drops it. Some APs detect MIC failures in such a case.
Make changes to encrypt the GTK 2/2 message even when TL is not
in authenticated state.

CRs-Fixed: 453977
Change-Id: I93ab0304186645996bbfe2e2a895e8fb3c082235
wlan: Fixing memory leaks in roaming

There are memory leaks when an association fails while roaming. Ensure that
memory allocated is freed in case of failure or during clean-up.

Change-Id: Idf9543981b9977e19bf4da58c848a8752ebd6bfd
CRs-Fixed: 456763
Remove redundant new line in SME logs

Remove \n in log msg to make available of more logs when device
gets crashed.

Change-Id: I75dc47c921143229713ee7d55186e5242fdfa5f4
CRs-Fixed: 441138
wlan: Release 3.2.0.83
wlan: Increase TIM_IE_SIZE to accommodate 41 STA

With 41 STA support, TIM_IE_SIZE increased to allow 41 STA in bitmap.
TIM_IE_SIZE=0xA can support max 40 sta. Increase by 1 byte.

CRs-fixed: 461524
Change-Id: I1dc91def5dbaebc255d660435088341ea2a38de6
Revert "wlan: Updating the scanlist based on the 11d info from AP"

For now reverting the 11d scan list changes which are causing
p2p regressions

This reverts commit 9fa38d2a94784a3a670795b21b6c08627bd55c5a.

CRs-Fixed: 461650
Change-Id: I0c158552e34918e60ffb0418c77c588f3f1dc9e5
wlan: If host detects data stall, issue FW BMU dump command

If host side detects any data stall,
Or if user triggers transport dump command,
host issue BMU dump command to FW.
This will help to debug HW BMU status.

Change-Id: Ida4100e209e48f7d7b33b2a437a8e4acff463e32
CRs-fixed: 455364
wlan: remove obsolete HLOS support

The current driver contains obsolete support for a number of High
Level Operating Systems.  Remove support for all except the ones that
are being actively supported by this driver.

CRs-fixed: 452041
Change-Id: I002aaf190da4ee3509e5efd2c2d0813e5afd4832
wlan: remove obsolete threading support

The sources contains support for a threading model that was used in
prior generations of the driver, but which is no longer used.  Remove
this obsolete threading support.

CRs-fixed: 452041
Change-Id: I5f11c208caa6279125e1b3c94a6789260a4e38ab
wlan: Aggregation getting disabled when TM level going from 0 to 4

For Thermal mitigation level 4, Host need not to send the message
to riva for disabling the Aggregation.
Because for level 4, STA gets disconnects from AP

CRs-Fixed: 453441
Change-Id: I8327a9ad1b07872c64488f4ef47e4b89b3b78e40
wlan: mac: remove obsolete Product Type featurization

The current code supports having Station Mode, P2P Mode, and AP Mode
available in one driver.  But this code has evolved over time from a
code base which initially only supported having separate Station Mode
and AP Mode drivers, with conditional compilation used to create the
two versions.  Since this conditional compilation is no longer
necessary, remove it.

CRs-fixed: 452041
wlan: mac: remove obsolete "INTEGRATED_SOC" featurization

The current driver is designed around an "integrated SoC" solution
where the WLAN processor and the Application Processor are integrated.
But the driver is based upon a prior driver that supported a
non-integrated discrete solution.  During the time the driver was
converted from a non-integrate to integrated solution conditional
compilation was introduced so that both architectures could be
supported by the same driver.  But the non-integrated solution is no
longer supported by this driver, so remove all of the conditional
compilation so that the current driver will be easier to support.

CRs-fixed: 452041
wlan: Release 3.2.3.84
TDLS: Added some more logs for debugging

To ease the debugging of mutiple peer connection issues
in TDLS added some logs to print the MAC Address of the
peer.

CRs-Fixed: 463259
Change-Id: I6acbc62c4457d64244fd5ad9ba1b19c7ebe42358
Fix for TDLS multiple peer instability

DUT side one of the TDLS peer stuck into connecting state
forever and due to that other peers are not able to connect
to DUT.
Introduce a new state i.e. DISCOVERED and change the state
of the peer to DISCOVERED instead of CONNECTING when we are
indicating set-up request to supplicant and make peer as
CONNECTING when we actually get the setup request from
supplicant to host.

CRs-Fixed: 460926
Change-Id: If27867dddfc72ea67131d116a227e6a0d37f72de
Change TDLS run-time enable/disable scheme

Introduce new TDLS mode NOT_ENABLED to completely disable TDLS
implicit trigger and not respond to incoming TDLS request.
Add checking the valid range of each parameter at iwpriv
setTdlsConfig.
Do not deallocate hddTdlsCtx as it cause run-time crash.
Set peer TDLS capability when SETUP/DIS response is sent to peer.
Introduce tdls_set_mode API to handle changing tdls_mode in
run-time.

Change-Id: I18a7d0030067222bd24289daa2d0fa23ef8abbc1
CRs-Fixed: 459176,459169,459177
Fix to enable/disable BMPS during peer discovery

Make the device out of BMPS before sending any discovery
request to the TDLS peer.
Introduce discovery rsp timeout timer and discovery_sent_count
to put the device into BMPS if discovery sent count is zero
either when we receive discovery response from peer or the
discover response timeout happens.

CRs-Fixed: 464212
Change-Id: Ib048f4e113f7119faa7a3734327d95ab86765b7a
wlan: Clear preauth failed list in CFG_CHAN_LIST_SCAN state

Currently we are only clearing the preauth failed list upon re-entering
INIT state. This means that AP that have failed pre-auth (perhaps for
temporary reasons) are not being reconsidered in a timely manner.
This change removes APs from the failed preauth list when the scan
channel list is recomputed.  For exampe, after a series of scans have
failed to find a candidate.

Change-Id: Ib048fb7566b876c3e85df2259521f170d60f2484
CRs-fixed: 452519
Fix Null pointer exception from pRoamInfo

Remove debug print causing Null pointer access under rare race
condition. This print was added for TDLS debugging for earlier
development stage, but now it is obsolete.

Change-Id: I778b178e4922ac9277003cf62be47564525c986a
CRs-Fixed: 463634