wlan: Protect standard hostapd ioctls from SSR

Protect standard hostapd ioctl functions from accessing uninitialized
or de-allocated data structures while SSR is in progress.

Change-Id: I26788c2855f783c097a62b7fb77c35cc31bf04cf
CRs-Fixed: 709101
wlan: Protect private hostapd ioctls from SSR

Protect private hostapd ioctl functions from accessing uninitialized
or de-allocated data structures while SSR is in progress.

Change-Id: I278cfddf6cc85b8ad9b04adf1d653598724e0f34
CRs-Fixed: 709101
wlan: Handle WLAN_HAL_DEL_BA_IND in host.

Currently  WLAN_HAL_DEL_BA_IND is not being handled in host.
Handle WLAN_HAL_DEL_BA_IND in host and send the DEL BA to peer.

Change-Id: Id771338a783ba800952de35bd11b3c0e7cc45f9c
CRs-Fixed: 709516
prima: NoA should be requested for only MAX PASSIVE DWELL TIME

During Passive Scan the NoA should be requested for only MAX
PASSIVE DWELL TIME. In current  implementation the NoA is
being requested for MIN PASSIVE DWELL TIME plus MAX PASSIVE DWELL
TIME.

Change-Id: I9a39b5702329e841ece9017088d234a82ff39dac
CRs-Fixed: 712236
wlan: Disable TX Async logic.

Currently  when WDA 10 sec timeout happens in
WDA_Txpacket we try to resync the DXE registers
by passing  debug flag WPAL_DEBUG_TX_DESC_RESYNC
in ChannelDebug. Removing this flag so that
TX async logic doesn't execute.
This is being done as recently row resource issues
are seen due to this logic.

Change-Id: I5320f6056e32172cd07054256b34cdb90c217fbe
CRs-Fixed: 698269
wlan: Fix to initialize the third character of country code

The country  code received as part of reg_notifier is of two character and
does not  specify the third character which signifies operating environment.
Hence , initialize the third character to an ASCII space charater ,
with the assumption that the station encompasses all environments for the
current frequency band in the country

Change-Id: Iffc3f585e68f01c3948c5110f898387eb0ff6225
CRs-Fixed: 710990
wlan: update unsafe channel list with valid channels.

In hdd_hostapd_ch_avoid_cb(), update  unsafe channel list if
channel  falls under valid channel list.
In hdd_hostapd_update_unsafe_channel_list() make sure
unsafeChannelCount maximum value is NUM_20MHZ_RF_CHANNELS.

Change-Id: I52dd6f5a9f6e20de0192ad25d0cdb8dcd35d3796
CRs-Fixed: 713606
Wlan: Release 3.2.3.403

Release 3.2.3.403

Change-Id: I9748901ff92361d0a2d89fd53f675cd1471c792f
CRs-Fixed: 688141
wlan: fix of scan empty issue caused by HT IE change

Fix of scan list empty issue caused by channel information
getting changed in beacon HT IE while LIM is already waiting
for FT PREAUTH response from WMA.

Change-Id: I6f6b76969a23c28fad8199ae7d705faa8add26d4
CRs-Fixed: 713440
wlan: do not process HT IE change if RoC is in progress

Ignore HT IE change if RoC is in progress because as
part of HT IE change we will try to change the channel
parameters which use the same callback as RoC. So if
we try to change the channel parameters if RoC is in
progress we will overwrite the callback causing problems
in the upper layers which are expecting a notification.

Change-Id: Ica47d74868ab7ccb8083e3cf8f2c88e01bbb20b5
CRs-Fixed: 710027
wlan: configure correct STAID to enable TL caching

Correct STAID was not being copied into Session
context in PE which resulted in caching to be
enabled for wrong STA in TL. Fix this problem in
PE and also enable caching in case of roaming.

Change-Id: If3589784da38980fce7d951718bf9c7989537005
CRs-Fixed: 714216
Wlan: Release 3.2.3.404

Release 3.2.3.404

Change-Id: I61d8c7a844e0b2889f2a399b6de8483ad9acc163
CRs-Fixed: 688141
wlan: Initial forced roaming to 5GHz

If gEnableFirstScan2GOnly in .ini is set to 1 then
driver will scan only 2.4 based bss in first scan.
If a saved profile is present, then driver established
connection with 2.4 ghz based bss. So host need to check
if there is any roam-able candidate is present into the
5Ghz band so host can initiate a roaming to 5Ghz based bss
if 5Ghz ap is having better rssi by difference from
currently AP gNeighborInitialForcedRoamTo5GhRssiDiff.
To enable this feature gNeighborInitialForcedRoamTo5GhEnable
ini item need to set to 1

Change-Id: I71c1554fd8b09c5511de8337e720b7341d49c56c
CRs-Fixed: 701756
wlan: Fail to load driver if INI file is corrupted

Avoid over parsing of the INI buffer which leads to
memory corruption and fail the driver load if INI
buffer seems to be corrupt.

Change-Id: I3252d033ec6faea5f5979e8b631dc766a5c5dd1c
CRs-Fixed: 707317
wlan: Kernel Panic due to null pointer dereference.

Currently in csrIsSessionClientAndConnected function,
device mode is acessed from roamprofile without checking
if roamprofile exist or not.
As a part of fix added check to ensure that device mode
is obtained only when a valid roamprofile is available.

Change-Id: Iff2c05dfc88669f9689280342af422576ea78da0
CRs-Fixed: 714231
Wlan: Revision 3.2.3.405

Revision 3.2.3.405

Change-Id: I7c25049ff311d9731a403db1d29f909673e6f897
CRs-Fixed: 688141
wlan: Disabling logging service before nl service exit

Disabling logging service before nl service exit. Thus
avoiding the usage of closed nl sockets.

Change-Id: Ice098c2d5deeb3b6202095011af2d1395913c41c
CRs-Fixed: 715252
Set gChannelBondingMode24GHz to 1 by default

Currently, channel bonding for 2.4Ghz is disabled by default.
So STA will not connect in HT40 when AP is operating in HT40 mode.
Changes done to enable channel bonding for 2.4Ghz by default.

Change-Id: I9b3a9e171605ce60eb7d412fdcf56368c34ed8ca
CRs-Fixed: 715296
wlan: SME: Add NULL check for pSession value after CSR_GET_SESSION

In csrRoamProcessSetKeyCommand and csrRoamProcessRemoveKeyCommand
functions, CSR_GET_SESSION() returns NULL if sessionId is more than
or equal to CSR_ROAM_SESSION_MAX. This may lead to dereferencing
pSession initialised to NULL.

Adding NULL check for pSession value after CSR_GET_SESSION().

Change-Id: I27b7e2b9806e59ca1b2e46e408e2834b0561a144
CRs-Fixed: 703677
wlan: SME: Free memory allocated to pMsg in case of failure

In csrSendJoinReqMsg(), memory allocated to pMsg gets freed
only in palSendMBMessage() but does not get freed in case of
abrupt break from while loop.

Initialising pMsg to NULL after palSendMBMessage() function
and freeing pMsg memory outside while loop after NULL check.

Change-Id: Ibdcee39b3337d737b5418b40a6d1b71cda1f90ef
CRs-Fixed: 703677