Merge prima driver releases 3.2.0.1 and 3.2.0.2 from codeaurora.org

git clone git://codeaurora.org/external/wlan/prima.git
	d13512 prima: WLAN Driver Release 3.2.0.1
	43971f5 prima: WLAN Driver Release 3.2.0.2

prima: WLAN Driver Release 3.2.0.1

Integrate the following CLs from Perforce:

635258: Integrate the latest Riva API

635360: Cleaning up WDI_SendMsg for WDA requests with req callbacks
1. For WDI requests which have registered a request callback, inform
the WDA caller of the same via setting the return value (wdiStatus) to
WDI_STATUS_PENDING. This makes sure that WDA doesnt end up repeating
the functonality in the req callback for the WDI_STATUS_E_FAILURE case
2. General cleanup/restructuring of WDI_SendMsg.
(CR 356091)

635425: Add support for multicast MAC address list
Provision to configure multicast MAC address list "gMCAddrListEnable"
flag and support for Multicast MAC address List.  Currently Multicast
MAC address List is not supported. Nowit is supported in Riva and Host
changes are verified. In addition to this, one ini flag
"gMCAddrListEnable" is introduced to enable this support.
  # to enable Multicast MAC address list
  # Flags to enable filter Mcast MAC address list separately
  # gMCAddrListEnable=1 to enable the support
  # gMCAddrListEnable=0 to disable the support
  gMCAddrListEnable=1
Default value 0 if not configured in ini file.  (CR 371401)

635520: Fix a possible NULL pointer dereference in SME 'get statistics'
Fix a possible NULL pointer dereference while SME processes a 'get
statistics' de-register request. (CR 368659)

636116: Support multicast MAC address list

636138 & 636161: Remove hard tabs

636159: Avoid duplicate entries in gLimMgmtFrameRegistratinQueue
__limProcessSmeRegisterMgmtFrameReq is adding entry even there is an
entry for requested mgmt frame already exists.  This is creating
problem when wlan_hdd_request_remain_on_channel function get called
back to back.  Fix- First checking whether the entry for requested
mgmt frame exists in the list; if exists then deleting the entry and
adding new entry to make sure that there wont be no duplicate entries
in the list.

636356: Avoid unwanted reset of country code after disassoc/assoc failure
After dis-association or association failure, reset the country code
only if 11d is disabled and current operating country code and default
country codes are different.  If we reset the country code, driver is
flushing the scan results and which is triggering full scan. Full scan
is taking 3-4 sec and this delay is causing connection issues in
roaming.

636724: Fix for Prefetch Abort in Vos MC Thread
Fix to not invoke WDI callback function if it is NULL (CR 370598)

prima: WLAN Driver Release 3.2.0.2

Integrate the following CLs from Perforce:

636735: Insure PMK candidate notify event only sent up to supplicant for RSN
Insure that PMK candidate notify even only sent up to supplicant for
RSN associations (CR 362782)

636761,
636770,
636789: Feature for supporting roaming to an AP with better RSSI
This feature takes care of the station to roam to a new AP only if the
roamable/new AP has a better RSSI than current AP.  A new ini item has
been added named RoamRssiDiff using which we can configure how better
in terms of Rssi, the new AP that we want to roam should be. On
providing a value of Zero, the feature is disabled and the check for
an AP with better RSSI does not happen while roaming. (CR 366355)

636834: Set rssi filter period to FT value
if CCX is disable and LFR is enabled, rssi filter period was set to 20
(default value) because of which RSSI monitoring was not effective,
changes added to set rssi filter period to FT rssi value (5) even for
LFR enabled case also. (CR 372303)

636843: isFastRoamingEnabled passed during reassoc (CR 372303)

636970: Implemented getwlandbg for SoftAP
SoftAP does not have an ioctl to print the log levels and log
info. Implemented getwlandbg for SoftAP.  (CR 374467)

636989 & 636992: Remove hard tabs and DOS line endings

637100: Fix of WDA Stop timeout kernel panic issue.
WDA stop timeout should never happen. Increasing WDA stop timeout
after considering 1 pending request and cleaning up WDI pending queues
once driver unload is trigerred.  (CR 367261)

637246: Fixed WLAN_BAPReset() to avoid sending Disassoc on STA interface.
Due to some reason(Seen just after driver load and whenever
hdd_netdev_notifier_call get called with netdevice state
NETDEV_GOING_DOWN where we call WLANBAP_DeregisterFromHCI())
WLAN_BAPReset was getting called through BSL_Write -> bslWriteFinish.
Even If the BT-AMP session is not opened(in this case
btampHandle->sessionId will be zero(default value) and if
WLAN_BAPReset is called, BAP was issueing sme_RoamDisconnect with
sessionId 0 which is station interface which results in Disassoc of
STA with AP.  Fixed the issue by checking BT-AMP session is opened or
not. (btampContext->isBapSessionOpen). If its opened then only call
sme_RoamDisconnect.

637340: SAP does not beacon on Country code to which STA is associated
(CR 368474)

637497: completed tx statistic reporting functionality
(CR 370923)

637687: Support for MC/BC & hostARPOffload with ini to work instead of ioctl
Fixes MC frames are still passed to host driver although
McastBcastFilter=1, hostArpOffload=0 (CR 363707)

637850: Fix for SAP Auto Channel Selection feature
For SAP auto channel selection, WLAN host driver do scan to find less
noise channel. While performaing scan do not check for Active session
in CSR module and change CSR roam state to eCSR_ROAMING_STATE_SCANNING
state for scan command irrespective of session is active or not.  (CR
375829)

638022: Fix for CCX-STA to connect to CCKM-RSN AP
because of the incorrect if-else-if authentication type overwritten to
255 (CR 376930)

638142-638147: Fix compilation warnings caused by GCC -Wenum-compare
Recent versions of the GCC compiler include an "enum-compare" warning
which will emit a warning when an enum of one type is compared with an
enum of a different type.  The compiler has found occurrences of this
issue in the WLAN code.  Fix those issues such that enum comparisons
are restricted to enums of the same enumerated type.

638253: Implemented getAutoChannel ioctl for SoftAP
SoftAP does not have an ioctl to get auto channel. Implemented
getAutoChannel for SoftAP and fixed getchannel ioctl for softap (CR
369147)

638267: Fix GCC 4.6 compile failure in WDI due to inlining failure
WDI_GET_PAL_CTX() was defined to be an inline function, but the
function body was not available to the compilation units that refer to
it.  Other versions of the compiler have silently ignored this, but
GCC-4.6 is emitting an error "sorry, unimplemented: inlining failed in
call to 'WDI_GET_PAL_CTX': function body not available".  So we remove
the unnecessary "inline" directive from the definition of
WDI_GET_PAL_CTX().

638291: Fix WLAN suspended flag
If WLAN driver suspend fails becuase of a TX, RX or MC thread suspend
timeout, the suspended flag is not reset. So set the suspended flag
only after all three threads are suspended successfully.  (CR 375230)

638703: Disabling AMP flag
Disabling AMP flag from config file, so that we don't register with
HCI any more as BT AMP is not PORed (CR 375826)
New prima driver release jb_rel-3.1.7.11 from codeaurora.org

git clone git://codeaurora.org/external/wlan/prima.git
git checkout jb_rel-3.1.7.11

prima: WLAN Driver Release 3.1.7.11 for JB

Initial version of the JB Release driver
New prima driver release jb_rel-3.1.7.16 from codeaurora.org

git clone git://codeaurora.org/external/wlan/prima.git
git checkout jb_rel-3.1.7.16

prima: WLAN Driver Release 3.1.7.16
prima: WLAN Driver Release v3.2.0.9

git clone git://codeaurora.org/external/wlan/prima.git
git checkout  v3.2.0.9

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: WLAN Driver Release v3.2.0.10

remote: git://codeaurora.org/external/wlan/prima.git
v3.2.0.10

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: Release 3.2.1.1

The following changes were merged in this release:

-- Scan optimizations to support concurrency:

   New Features:
   1. Sessionize SME scan cache
   2. Separate beacon & porbe rsp entry for PE scan cache
   3. Enable scan break down logic in SME for multi-session

   Fixes:
   The change fixes issue with host initiated scans interferring with WFD
   connection and causing jitter in the video stream on the WFD
   connection

-- IMPS mode, TX COMP interrupt flooding fix:

   To stop TX COMP interrupt with IMPS mode, RIVA shuld power down. But
   whatever reason, if RIVA could not power down, TX COMP INT could not
   be cleared and infinite INT may happen

-- Fix for issue RIVA does not seem to be getting into BMPS mode:

   The reason riva does not enter in to power save is because after the
   connection to the AP (Configured 40Mhz channel in 2.4Ghz) the driver
   sends the invalid cb mode in the finish scan request to the Riva if we
   are in scan window. The issue does not show up if we are not in scan
   window.

   The reason driver sends the invalid cb mode is because after receiving
   the join beacon the variable psessionEntry->htSecondaryChannelOffset
   in the function limCheckAndAnnounceJoinSuccess is over writing with
   the AP secondary offset.

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: revert scan optimizations to support concurrency

git://codeaurora.org/external/wlan/prima.git

commit 1a5942e30953311dce805e6b3b473bf1baea2c2d
Author: Jeff Johnson <jjohnson@codeaurora.org>
Date:   Wed Sep 19 08:54:34 2012 -0700

    prima: Scan optimizations to support concurrency

    New Features:
    1. Sessionize SME scan cache
    2. Separate beacon & porbe rsp entry for PE scan cache
    3. Enable scan break down logic in SME for multi-session

    Fixes:
    The change fixes issue with host initiated scans interferring with WFD
    connection and causing jitter in the video stream on the WFD
    connection.  This partially addresses b/7138968.

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.3b

git://codeaurora.org/external/wlan/prima.git

2e61bd3 wlan: Release 3.2.1.3b
000442c RX async detect and reloading bug fix
ad02ec2 wlan: Release 3.2.1.3
a91fd8f Invalid WLAN driver reloading fix
a0ccd8a Handle WMM params when concurrent sessions are on the same channel
9f50814 Support for dynamic MC/BC HW filter setting
c9af20f wlan: Release 3.2.1.2
0cba033 prima: Revert log level changes
25d894e prima: p2p_discovery fails when wifi is set to 5GHz in advanced settings.
6e8d09b prima: Fix for driver crash if the nv file is old.
1872ee6 prima: Fix for scanning 5GHz upper band channels.
0cfe5a2 prima: Fix for a double free and recover logic in DXE
1e044e1 prima: Fix lock used while doing any modification on vos packet lists.
88a8d91 prima: Fixed problem of SAP stop beaconing after SSR
d405d83 prima: Enable statically linked driver to support FTM mode
ec808f6 prima: Clean the WDI global variables in shutdown method
ed6c480 prima: Handling De-auth from AP in Roaming State machines
7ca77d0 prima: CSR pre-auth timer is made larger than Lim timer
428bdf2 prima: Fix for memory corrution in TL.
624fd21 prima: Freeing the memory to avoid the memory leak
f7965a0 prima: Deregister with TL and flush all data packets prior to reassoc
56ff1f2 prima: MCC support for different beacon intervals
f3d6bac prima: Fix to avoid sleep in invalid context.
c4620d1 prima: Wlan host driver logging improvements
7b3b4a2 Changes related to BMPS workaround enable/disable dynamically
307e37b prima: Fix for crash in wlan_hdd_cfg80211_connect
18caa01 Revert "prima: Scan optimizations to support concurrency"

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release 3.2.1.4a

git://codeaurora.org/external/wlan/prima.git

cddc752 wlan: Release 3.2.1.4a
ad5a4b1 Fix bug introduced in "dynamic removal of BMPS workaround"
8db75cb ERROR log level cleanup
022b399 wlan: Release 3.2.1.4
af5eb7f DXE TX stall issue fix.
f4f9d4c Fix for memory corruption in WDA WDA_TriggerBaReqCallback
1731c66 Subsystem restart invoke mutex_lock in atomic environment
f1dc853 Fixed problem of dangling pointers to freed memory
0daac20 Realtime DXE debugging capability enable
79b6397 Changes for tx packet statistics

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.5b

git://codeaurora.org/external/wlan/prima.git

f0de27e wlan: Release 3.2.1.5b
47ce79d Reduce the age count only for valid scan entries
d0b91b1 wlan: Release 3.2.1.5a
2409064 Do not drop coming late probe response
0e1e7d3 Fix for BMPS workaround kicking in after SSR
d5c3a24 Update Kconfig and Makefile to support roaming
9ff8b97 wlan: Release 3.2.1.5
a5cae50 Changes to acquire wakelock to avoid the apps suspend during the scan.
0c3229e Reduce PE logging
ea72fd5 If the WDI Join fails not able to tun off the WLAN
f354457 Host Crash fix for set and clear Packet filter
6237972 p2p-GO not clearing the Use Protection bit
f9b3e85 Reduce the log level of a P2P listen duration to INFO HIGH
16e7aa0 wlan: Fix for crash during wlan unloading

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.6

git://codeaurora.org/external/wlan/prima.git

d29fa4c wlan: Release 3.2.1.6
b074dbb Fix for setting properly the AC mask for TxConn
a66ea5c Stop scan refresh timer while resetting report scan state
5eb765b Set RoamRssiDiff=0 to disable roam hysteresis.
632cb65 Update the Channel Change Reason
efaed58 Inform TL about pending packets whenever Queue is filling up
4f74d03 Enable gEnableBypass11d to reduce the connection time.
9f918a0 Remove gNeighborScanChannelList from cfg.ini
2da87e7 Preferentially scan occupied channels (learned from previous scans).
b340701 Update template cfg.ini for LFR
e10a7e3 Fix for passing proper reason code to supplicant

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.6a

git://codeaurora.org/external/wlan/prima.git

351e056 wlan: Release 3.2.1.6a
fc26b52 Fixed driver initialization problem in case of init error

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.7b

git://codeaurora.org/external/wlan/prima.git

d79e81f wlan: Release 3.2.1.7b
eb0542d Convert VOS_ASSERT to an ERROR log
7f23467 Revert "TL Low resource problem fix"
83a0e64 wlan: Release 3.2.1.7a
af9315b Revert "No longer call csrNeighborRoamHandleEmptyScanResult()"
57be66e wlan: Release 3.2.1.7
aca98a1 Changes to handle gracefully init scan failure in roaming case
1ea8824 Ignore TX completion failure for Data Null (PM=1) mode during roam
2708e06 No longer call csrNeighborRoamHandleEmptyScanResult()
9edea5d TL Low resource problem fix
f76988f wlan: Fix for memory corruption
19d871e Fix for vos_lock_acquire() failing with return code -4 (i.e -EINTR)
ede9643 Not able to connect back to security AP
2c18409 wlan: Release 3.2.1.6d
a6861f9 Included a Missing prototype declaration
02970dc Return an error if a scan is requested while one is ongoing.
0df9a8b Enqueue preauth in sme command queue
c273de3 wlan: Release 3.2.1.6c
925d334 Proper handling of ENTER IMPS/BMPS failure in host side
c4295cb wlan: Release 3.2.1.6b
ddb06c8 Out-of-bound array indexing while preparing scan channel list.

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.8b

git://codeaurora.org/external/wlan/prima.git

e898e0f wlan: Release 3.2.1.8b
cec588a Disable LFR when a concurrent session is active
9405b17 wlan: Release 3.2.1.8a
4566648 Revert "Don't support LFR when concurrent."
3dd2c24 wlan: Release 3.2.1.8
654a74c TX data path hang issue fix
6877698 Kick DXE TX channel when exit IMPS, if any valid pending frame in the ring
af98ff3 TX DXE Channel descriptor async uncovered cover case fix
1ec64d6 State Machine Cleanup during State transitions
5460b45 Log levels changed appropriately
cb96ba4 Don't support LFR when concurrent.
91dc957 Fix buffer overflow and NULL pointer dereference
c9bcca5 Add support for SoftAP Random BSSID

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.9

git://codeaurora.org/external/wlan/prima.git

ff565af wlan: Release 3.2.1.9
f504ed3 Do not disassoc upon reassoc timeout failure
a8ed53c Cap cache size properly
0f34735 Don't deactivate the heartbeat timer for BG scans.
78eeee5 wlan: Release 3.2.1.8d
cbcb399 Flush only P2P results during p2p_find
3eff030 No Scan Interference During HandOff
f26def9 Increase number of buckets to categorize roamable APs
563d048 Even BMPS mode, display correct RSSI within TL log MSG
256f301 Prevent P2P from flushing scan results while roaming

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release 3.2.1.9c

    git://codeaurora.org/external/wlan/prima.git

    5c6c1a0 wlan: Release 3.2.1.9c
    95ca1a8 Allow social channels in p2p scan even if not in valid list
    c3f892c Set scan_type to P2P_DISCOVERY only for social channel scan
    2f1acb3 wlan: Release 3.2.1.9b
    177b8a6 Handle disconnects in reassoc state
    4fe38bd Ensure pre-auth is processed before invoking HDD callbacks
    87a94eb wlan: Release 3.2.1.9a
    181ccd0 Do not count frames to start BA session too early
    5a9671d Fix for race condition between scan done callback and triggering scan.
    53a480c Process deauth from reassoc AP to trigger disconnect.

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.10d

    git://codeaurora.org/external/wlan/prima.git

    1544551 wlan: Release 3.2.1.10d
    51dca29 Include LFR flag to delete FT preauth session upon failure.
    1737a64 Unconditionally return TRUE from csrIsScanAllowed.
    c79e4d0 wlan: Release 3.2.1.10c
    863fb5d Fix for WDI stack varibles > 1K
    611d562 Reduce the stack size in the CORE Stack module.
    419f004 wlan: Release 3.2.1.10b
    eb21f24 Reduce stack usage in the HDD
    aaba1f7 wlan: Release 3.2.1.10a
    52d23ea Do not drop mgmt frames if peer sta idx is not found
    0b73e06 Drop frames if peer sta entry is not found.
    edc478d wlan: Release 3.2.1.10
    b2492d6 Dampen scan periodicity if no roamable candidates found.
    fa89fae Lowered the log level of a WDI print
    1a132f9 Unable to connect if the AP sends country code as "I".

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release 3.2.1.10e

    git://codeaurora.org/external/wlan/prima.git

    4c8540b wlan: Release 3.2.1.10e
    c8c7c53 Add dummy handlers for Android PNO commands

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.10f

    git://codeaurora.org/external/wlan/prima.git

    2dac1fd wlan: Release 3.2.1.10f
    f55ef6d Fix GCC 4.6 compile failure due to inlining
    3070878 In csrRoamLostLink(), only send HDD 1 eCSR_ROAM_LOSTLINK

Signed-off-by: Iliyan Malchev <malchev@google.com>
prima: release v3.2.1.10g

    git://codeaurora.org/external/wlan/prima.git

    985fb65 wlan: Release 3.2.1.10g
    8efbc30 wlan: Enable ERROR level logs by default across all components

Signed-off-by: Iliyan Malchev <malchev@google.com>