wlan: Fix 11d regulatory issue

For all countries whose reg domain is FCC, UNII-1 band  channels
should be blocked for GO operation.Add check to block these channels
for all countries whose REGDOMAIN maps to FCC

Change-Id: I7fdfe4495b584c9197e63fb4fc3c2ec62d2385fa
CRs-Fixed: 598545

Conflicts:
	CORE/VOSS/src/vos_nvitem.c

Conflicts:
	CORE/VOSS/src/vos_nvitem.c
Fix for IMPS Req sent to Firmware in connected state

Due to race condition between reception of Deauth frame from AP
and disconnect from Upper layer, driver sends IMPS Request
to firmware when firmware is in connected state.As a result
Firmware crashes.So when deauth req comes from upper layer
read the status of FW state and accordingly return the error
code so that SME does not issue IMPS request.

Change-Id: Ie2cbdb8021e0920b6778708946a9f3e1a92586b8
CRs-fixed: 604928
STA is disconnected with specific AP IPTIME N904NS

STA gets disconnected with AP IPTIME N904NS when AP is configured
for WPA1 + TKIP on CH 161

Change-Id: I21a9e56d776c625c186c6083d58f711ae30bbcfe
CRs-Fixed: 599931
MAC:Avoid disassociation on connecting more than supported sta's.

Disassociating wrong station on receiving auth frame from
station for which we already have entry in DPH table and
assocId equal to DPH hash table size.

Change-Id: Idabaa9cdd1fdffa4b987ea98211e8dd8385deae0
CRs-Fixed: 610553
Logging enhancements on 11k rrmApi.c file

As part of PE logging enhancements, more feature logging would be needed.
Since there are many instances which have logging with PELOG1,
defining PELOG1 might lead to phone going into download mode
if the logs are also dynamically enabled.
The plan is to define PELOG4 statically and have meaningful & sufficient
feature logging in PE till the instances with PELOG1 gets thin.

Change-Id: I204614ab6bd7cfcbabfbedd310498b54cfc54b7d
CRs-Fixed: 587373
wlan: Rate limit the print indicating Tx queue is 3/4th full.

When Tx queue for Best Effort access category is 3/4th full,
donot print info message for every packet instead print when
the access category of DHCP packet is changed to VOICE since
Best Effort access category Tx queue is 3/4th full.

Change-Id: I7f9aba9fc248442a421da01c0005946861f904b7
CRs-Fixed: 611754
API change for config param for sending CTS2S during BTC SCO

This commit brings the firmware API change, for config param
for sending CTS2S during BTC SCO, to HOST driver.

Change-Id: I01fb94f7353046a429fa9cf9707d08adaa4e07c0
CRs-fixed: 591530
wlan: Fix for DUT not sending 11k beacon report

This is a regression issue caused by CCX Upload change, in
which if the CCX upload is defined DUT alway sends beacon report
to upper layer (wpa_supplicant) even though the beacon request
initiated by 11k RRM. There is no run time check done to differenciate
who triggered beacon request, as CCX, 11k and upload approach uses
RRM scanning as a common code.

The fix for this issue is to difference which module initiated
beacon request based on the message source and forward the beacon report
to that module.

Change-Id: Ie502843c5db8f0f7398d875493c9568a405fac82
CRs-Fixed: 611034
wlan: Fix static analysis issues in HDD files

Fix static analysis issues reported in following HDD files:
 - wlan_hdd_cfg80211.c
 - wlan_hdd_hostapd.c
 - wlan_hdd_softap_tx_rx.c

Change-Id: I40064336c475784242062f55510a21b7921d10a0
CRs-Fixed: 609606
wlan: log host and fw caps from bit 32 to 127

During module load host and fw caps are logged only from 0
to 31.

Add support to log the capabilities from bit 32 to 127
as well.

Change-Id: Ib05b905163cbc3c0b80a65936aced83dc7ff4c3b
CRs-Fixed: 611215
wlan: register wiphy after VOSS is initialized

When wiphy is registered the regulatory core may send
a hint to the driver advertizing the country of operation.
pMac and all the driver threads should be initialized to handle
this hint, so move the wiphy registration after vos_open()

Change-Id: I560164965ef7d4610a768e2dfa8d6654eea73487
CRs-Fixed: 569424
wlan: wda: Log the packet information in kmsg

Printing the packet information for tx/rx mgmt, action, EAPOL
and DHCP for debugging the connection issues.
A new ini variable is "gEnableDebugLog" added to
enable/disable these logs. By default this flag is disabled.
Also added an iwpriv command "setDbgLvl" to achieve the same.

Change-Id: I19c8b1bb77b1ad87bad9e16587895c30f05aa8db
CRs-Fixed: 600142
wlan: Fix for Statis analysis errors in SME module

It will fix all critical errors reported in SME
module by statis analysis tool.

Change-Id: Ie083a3a12a36ec4bacb0eb4abd7e26f923808af9
CRs-Fixed: 609608
wlan: sme: Fix regression in csrRoamCallCallback()

The commit "wlan: Fix for Statis analysis errors in SME module" added
NULL check for pRoamInfo in csrRoamCallCallback() along with assert
to fix Klockwork defect. There are quite few places in CSR module
explicitly passes NULL for pRoamInfo (eCsrForcedDisassoc, etc) and
expects csrRoamCallCallback() to handle it gracefully.

Change-Id: If6ea8a1b57bbf099e169658976f433b0254c2b74
CRs-Fixed: 609623
wlan: UMAC: Log the packet information in kmsg

Printing the packet information for tx/rx mgmt, action, EAPOL
and DHCP for debugging the connection issues.
A new ini variable is "gEnableDebugLog" added to
enable/disable these logs. By default this flag is disabled.
Also added an iwpriv command "setDbgLvl" to achieve the same.

Change-Id: I376fb3ed2a05744760d6563410e5eeb068b6d070
CRs-Fixed: 600142
wlan: Fix for Statis analysis errors in SAP module

It will fix all critical errors reported in SAP
module by statis analysis tool.

Change-Id: I7cce27b4bffbff9262d83170d4cc85be3ff3e754
CRs-Fixed: 609614
Fix the errors identified by Static source code analysis in MAC

This commit fixes the errors identified by the static source code
analysis in MAC module.

Change-Id: Ie77862c77d3a0627f1e8cec3cbdecded9c3d503e
CRs-fixed: 609573
wlan: RSSI when active mode offload enabled

Firmware will calculate RSSI when BMPS is disabled
and active mode offload is enabled.
Adding check for active mode offload along with BMPS.

Change-Id: I181fd6daf3aa072d53cdd422476705d46a37ac91
CRs-Fixed: 538228
Wlan: Check for Roam command in csrIsRoamCommandWaitingForSession.

If connect and disconnect comes in same order, connect command
will put eSmeCommandRoam to roamcmd Pending list.
If disconnect comes at the same time, driver is unable to
call cancel roaming as disconnect handler is not checking
for roamPending list.

csrRoamIssueConnect->csrQueueSmeCommand->
csrRequestFullPower->eHAL_STATUS_PMC_PENDING
as driver requests for FULL POWER. Driver adds Roam
command to pMac->roam.roamCmdPendingList.

Now if  supplicant calls disconnect
wlan_hdd_disconnect->sme_RoamDisconnect->
csrRoamDisconnect->csrRoamDisconnectInternal->
csrIsRoamCommandWaitingForSession

Here in csrIsRoamCommandWaitingForSession API driver is
checking only two lists
1.smeCmdActiveList
2. smeCmdPendingList
Now as Roam command is not in both these lists disconnect
command doesn't get processed.

CRs-Fixed: 606986
Change-Id: I55708f4f8667675ea46e39958b83d274e23293cb
wlan: Roam Scan Channels defined to a constant

The LFR Message structure uses a MACRO
WLAN_HAL_ROAM_SCAN_MAX_CHANNELS which in turn points to
NUM_RF_CHANNELS as of today.NUM_RF_CHANNELS is closely
tied up with nv bin files.To decouple LFR from NUM_RF_CHANNELS
we are defining WLAN_HAL_ROAM_SCAN_MAX_CHANNELS to a
constant value.

Change-Id: Ic7db6cf4b6a930127f4581ec27957a19382c8e4d
CRs-Fixed: 612494