Squashed commit of prima wlan driver import

Import prima wlan driver, release 3.1.1.14

WLAN Driver Release RB3:M8960AAAAANLGA100715.1
AU_LINUX_ANDROID_ICS_CHOCOLATE_RB3.04.00.03.10.037 WLAN driver
commit be2e2d0 from CAF prima/wlan, rb3.

Change-Id: Ibdf7c6f43eff3d5a3797dae883e27dbe32d0db70

Conflicts:

	arch/arm/configs/msm8960_xt925_cm10_defconfig

prima: update JB_CHOCOLATE.04.01.01.01.013

AU_LINUX_ANDROID_JB_CHOCOLATE.04.01.01.01.013 wlan driver
commit c1f4360c9e228bbcfe0c138c8737876754ee604f from CAF wlan/prima

Change-Id: I283c2aaa32718f5fbeb7458a2da2d98f3a70b440

Fix for WiFi Direct/SAP for 3.0.31 kernel

In 3.0.31 kernel when driver is sending new sta event to cfg80211, it
expects it to set STATION_INFO_ASSOC_REQ_IES flag in stainfo.
Disabled BT-AMP, as it is not used.

Change-Id: If0d4a4303f78f8c19c085b1199f7487df9172aa9

prima: update to AU_LINUX_ANDROID_JB_CHOCOLATE.04.01.01.01.053+

Squash of the following commits:

commit 8e86deaf1be2c080c049e4c51b917f1d89305284
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Mon Aug 27 19:27:25 2012 +0530

    prima: WLAN Driver Release 3.2.1.1

commit 1941f2e649631381ef1a03a04e8e212cc5875974
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Fri Aug 24 12:12:10 2012 +0530

    prima: WLAN Driver Release
AU_LINUX_ANDROID_JB_CHOCOLATE.04.01.01.01.053+

commit ba1676d629f742ecebac4e37e49b6b3960c6a551
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Tue Aug 21 21:26:28 2012 +0530

    AU_LINUX_ANDROID_JB_CHOCOLATE.04.01.01.01.052+

commit 042aeabd44f16dd6dbf505f18042e03517af58fe
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Mon Aug 13 15:32:50 2012 +0530

    AU_LINUX_ANDROID_JB_CHOCOLATE.04.01.01.01.034_M8960AAAAANLYA113101.1+

commit 1ee7301a231ca02a4b5ef8597a1d5fd09f3e8149
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Fri Aug 10 16:39:12 2012 +0530

    AU_LINUX_ANDROID_JB_CHOCOLATE.04.01.01.01.034_M8960AAAAANLYA113101.1

commit e7406de4cf6ab9370bbda9c603f50ca53762295d
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Thu Aug 9 11:38:27 2012 +0530

    AU_LINUX_ANDROID_JB_CHOCOLATE.04.01.01.01.032+

commit cbfcad89ac1908a0593857aff4fa9ee406c88d12
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Mon Aug 6 13:41:20 2012 +0530

    M8960AAAAANLYD100713P

Change-Id: Ia8898fc9861cdb864b6861926fff1079c57632aa

prima: update to 3.2.1.3

Squash of the following commits:

    commit 85227eac29398f18513a733ac787656c90209386
    Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
    Date:   Sun Sep 2 13:27:02 2012 +0530

        prima: WLAN Driver Release 3.2.1.3

    commit dc58223fa3244e78ee204220f4d9eb1d1b2dc9a4
    Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
    Date:   Fri Aug 31 17:05:35 2012 +0530

        prima: WLAN Driver Release 3.2.1.2

    commit 01a13801fc57c8bdd2118ccbf9852416bb560c53
    Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
    Date:   Fri Aug 31 16:58:48 2012 +0530

        Assoc Reject, UPNP ioctl, DB kernel panic issue fixed.

    Change-Id: I6972fec95e2d31f9a58d86a0d3862ba4e9f7be55

Change-Id: If39b2df439f13f1c834d538b164079497e42cce5

prima: fixes

Squash of the following commits:

commit 821b01d857fea2cffd29a05da128ae19664e5e79
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Tue Sep 18 13:11:49 2012 +0530

    SBA_M8960M8960AAAAANLYA113101.1_969874_9112012

commit aaa11d62b29975970c51bcb65968bd575caa9b2b
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Sun Sep 9 18:38:44 2012 +0530

    Fix-for-SR-932873-969157-00964299

commit b8694e32dafed5d9623f075931a6afba82af890b
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Sun Sep 9 18:35:05 2012 +0530

    Fix-for-SR-969683-969874-969969-965587

Change-Id: I2e0aa16d529cf23f8ab0f88cd04104442aac7539

prima: update to 3.2.1.5

WLAN Driver Release JB_CHOCO+Fixes for 401359,
396460, 401980, 396002, 407901, 407902, Invalid WLAN
driver reloading fix

Change-Id: Icb145df9fee612fee0ed9c488db4bde8fbce68a8

prima: various fixes

Squash of the following commits:

commit 91e68ce112fd12816f73bfc74f4f5e63b98c20cc
Author: Madan Mohan Koyyalamudi <c_mkoyya@qca.qualcomm.com>
Date:   Fri Oct 5 14:56:51 2012 -0700

    wlan: Decreasing the priority of unnecessary logs observed during
    loading/unloading wlan module

    Removed unnecessary logs which were observed when starting/turning off
    wifi.

    Change-Id: I9fdbf75a2cf31a16c5e402ab1bda978648cbd83d
    CR-Fixed: NA

    Conflicts:

    	prima/CORE/SME/src/csr/csrApiRoam.c
    	prima/CORE/WDI/CP/src/wlan_qct_wdi.c

commit 7d44ea63296398c1619ac632a45cccf28aca28a8
Author: Madan Mohan Koyyalamudi <c_mkoyya@qca.qualcomm.com>
Date:   Fri Oct 5 14:37:13 2012 -0700

    wlan: Lowering the priority of lim logs

    Lowering the priority of lim logs which are wrongly logged with error
    priority to info_high, these logs are printed out continuosly when p2p
    GO starts a scan and 1 or more client is connected to the GO.

    Change-Id: I2c18382f74a988dc68656ebfe2b330cb28945e44
    CR-Fixed: NA

commit 2b31ede6e053d229bceae2b8269f3060380768b8
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Tue Oct 30 19:18:47 2012 +0530

    wlan: Fix to call limSetHtCaps with correct data len.

    while calling limSetHtCaps we offset the data ptr by
    PROBE_RSP_IE_OFFSET, but we pass the lenght of the original data, we
    should subtract PROBE_RSP_IE_OFFSET from len so that we do not get
    errors

    Change-Id: Icde260be4f6b254f963305c28b6abb5eaaed5e60
    CR-Fixed: NA

commit e1398e31a0f28bc070599b3429443a961b600371
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Tue Oct 30 15:11:01 2012 +0530

    wlan: Send updated 11d information to PNO.

    Fix for sending updated 11d information to PNO for
    scanning and filter for DFS channels

    Change-Id: I2dd185db625abf77642dee067e07ae643dd8768a
    CRs-fixed: 408347

commit ad4c5ca2ed2c47f7a297b6655166db63e26c6762
Author: Hardik Kantilal Patel <c_hardik@qti.qualcomm.com>
Date:   Mon Oct 1 15:26:19 2012 +0530

    Wlan: ERROR log level cleanup (2)

    Move the logs gnerated when the deferred message queue is full to WARN
    level and other changes.

    CR-Fixed: 379947
    (cherry picked from commit 33d71c932e69685fafdd25712e6fb59989e0e8cf)

    Conflicts:

    	prima/CORE/SME/src/csr/csrApiRoam.c
    	prima/CORE/SME/src/csr/csrNeighborRoam.c

    Change-Id: I7021238b159ad576c07e7e84d8e4cee0e8f6949a

commit fa593c8c1053a82b17466234e19b587f68225171
Author: Hardik Kantilal Patel <c_hardik@qti.qualcomm.com>
Date:   Mon Oct 1 15:11:04 2012 +0530

    Wlan: ERROR log level cleanup

    This CL takes care of cleaning up the ERROR level logs
    so that we do not end up printing out irreleveant messages.

    CR-Fixed: 379947
    (cherry picked from commit ac0b6c1ea99dc3173d8ad1d3b4f6ed6543a0e7a8)

    Conflicts:

    	prima/CORE/SAP/src/sapFsm.c
    	prima/CORE/SME/src/csr/csrNeighborRoam.c
    	prima/CORE/TL/src/wlan_qct_tl.c
    	prima/CORE/WDI/CP/src/wlan_qct_wdi.c

    Change-Id: I2796e4a0f6579497cc1a98e11798e0bd2505ea06

commit 49bd609c3716de3c2f8a7b65c22f9c7af74a7c87
Author: Hardik Kantilal Patel <c_hardik@qti.qualcomm.com>
Date:   Mon Oct 1 15:01:52 2012 +0530

    wlan: host driver logging improvements

    Made changes to enable ERROR logging levels for all modules, changed the
    levels of some logs so the kmsg ring buffer is not flooded (Part 1)

    CRs-Fixed: 379947
    (cherry picked from commit 3dd42dc3396564772d0459852e4acea87dca573f)

    Conflicts:

    	prima/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
    	prima/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
    	prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
    	prima/CORE/SME/src/csr/csrApiRoam.c
    	prima/CORE/SME/src/csr/csrApiScan.c
    	prima/CORE/SME/src/pmc/pmc.c
    	prima/CORE/SYS/legacy/src/platform/src/VossWrapper.c
    	prima/CORE/SYS/legacy/src/system/src/sysEntryFunc.c
    	prima/firmware_bin/WCNSS_cfg.dat

    Change-Id: I76fa45b3316c4fdfe9f5b153a395db5fe1443001

commit 93b79306503df857b942e19651eee3081a604cab
Author: Hardik Kantilal Patel <c_hardik@qti.qualcomm.com>
Date:   Mon Oct 1 14:45:26 2012 +0530

    Wlan: Reduce the log level of a P2P listen duration to INFO HIGH

    P2P listen duration log is not an ERROR level log and was getting
    printed continuously sometimes causing p2p search failure. Reduce its
    log level to INFO HIGH

    CR-Fixed: NA
    (cherry picked from commit e6a4381ecc61fa3d157f3cd062a4caab6a3a3803)

    Change-Id: I73ef658a91c863add69c27a11d8586325d038352
    Signed-off-by: Hardik Kantilal Patel <c_hardik@qti.qualcomm.com>

commit a6c5e97d6d7574a0c0197bb48d14a7b7f29ef040
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Tue Oct 30 12:01:41 2012 +0530

    wlan: Fix for the usage of huge local variables

    Fixes: Huge local variables are causing stack overflow.

    CRs-Fixed: 389536
    (cherry picked from commit 5828a1f504847921340e6d49a8eb2a76b23b8dda)

    Conflicts:

    	prima/CORE/MAC/src/pe/lim/limAssocUtils.c
    	prima/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
    	prima/CORE/SYS/legacy/src/utils/src/parserApi.c

    Change-Id: I60269e83c3472b58fdd1dd73a4c8564ebc5f377f

commit d1f25c9a001dc6577c146e6bc794d999e8ff2c63
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Mon Oct 22 13:48:59 2012 +0530

    wlan: Fix for mutilple ASSERTS in WDA.

    Removed the usage of wdaMsgParam and wdaWdiApiMsgParam from
    WDA control Block.

    Change-Id: If48a42c7cf829ae2fc59f002c18dff8a01f7f41d
    CRs-fixed: 412031

commit 528bc7d0c2cf8dd85e82b1ae9f4e077247b265b9
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Sun Oct 28 20:19:31 2012 +0530

    Wlan: Invalid WLAN driver reloading fix and RX async detect.

    During fix origianl bug, introduced new logical bug. This is the merge
    error. Fix for not corret driver re-loading

    CR-Fixed: NA
    Change-Id: I7a46674bc4cf266ea5bbf715569632dbefcd6447

commit 893756700ee57249aaf91b80a0f30fb397c2055c
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Thu Oct 25 12:14:41 2012 +0530

    Prima WLAN Release: Restored file permissions

commit 741c4a421708f641897cfc3185514e8674f3ced2
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Thu Oct 25 12:07:05 2012 +0530

    Prima WLAN Release: Fixes for CR# 400804, 400621 and 403819

commit d3d0aba1195add6359ca9074e766b2fbb2916dd7
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Tue Oct 23 17:55:28 2012 +0530

    wlan: Fixes for SR's 993087, 996710

    1.Disable WLAN driver initiated SSR if Riva crashes
    during unload.
    2.Fix for not able to turn off WLAN, when join request fails in WDI.
    3.If the WDI Join fails, WDA state is stuck in WDA_PRE_ASSOC_STATE, this
    result in ASSERTING in WDA_Stop and not able to tun off the WLAN.
    4.Do not access free pointers while aging out scan entries.

commit ea3bdff2a6c8a0d941a84fe0b3f6200a68f95d03
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Thu Oct 18 10:51:39 2012 +0530

    wlan: Handle Probe request in Host for SAP with WPS mode

    To detect PBC overlap in SAP with WPS mode, Probe request should pass
    to supplicant through host. Based on wps state value host driver set
    proxyProbeRspEn value for SAP mode. With proxyProbeRspEn=1 FW will
    send probe response where in othercase host driver send probe response

    Change-Id: I4f0d6835b1e6924c0c6c9d309100533c34ac90c8
    CRs-Fixed: 362543

commit 7aff4d01c8229e020704940c70b440f8b9d2a1a9
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Thu Oct 18 10:37:37 2012 +0530

    wlan: Fix for Hidden SSID - Soft AP

    Ensure that the hidden SSID flag is populated in the config BSS request

    Change-Id: I39cf7b9765375907dfafccbebed2867d8bc27111
    CRs-Fixed: 361231

commit dc5c74910057354e19337ee7316a5d978dd5e389
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Thu Oct 18 10:34:21 2012 +0530

    wlan: SAP proxy probe req handling in RIVA for Hidden SSID.

    In case of hidden SSID enable Host driver need to insert SSID in probe
    respons template such RIVA can directly use the template for
    sendignthe probe response. This saves a lot of unnecessary code in
    RIVA for inserting SSID and it makes proxy probe request handling in
    RIVA much simpler.

    Change-Id: I2fc76738145b91ff694df9323fd017fdb7edf9f2
    CRs-Fixed: 368892

Change-Id: I8edb566c2ea5bd41e45ce973d6db44b7ee1b6536

prima: more fixes

Squash of the following commits:

commit ced4cb8ab1a12ebe0fad528d0e78d92116c8260e
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Fri Nov 9 22:30:35 2012 +0530

    wlan: handle DXE CHs transfer error cases

    Handle DXE CHs transfer error cases
    Currently, FW cannot handle DXE transfer error cases properly
     - RX error most likely corrupted frame pushed into DXE RX
       FW should remove this corrupted frame from WQ, but FW does not have error handler
        - TX error most likely HW already BMU fatal error state
        Cannot be recoverable
     So, quick solution to resolve this problem is restart WLAN driver.

    CRs-Fixed: 415791

commit 20cec15c03212eb957325cae1cc7077b6e1ef579
Author: Ganesh Kondabattini <ganeshk@qualcomm.com>
Date:   Fri Nov 9 22:19:23 2012 +0530

    wlan: Support for passive scan in driver when
     num_ssids=0.

    Driver doesn't do passive scan when number of ssids received
    from Supplicant is Zero. Supplicant expects driver to do
    passive scan. Hence support for passive scan has been added
    to the driver.

    CRs-Fixed: 418404

commit 622f31328fe6ec0b1679c6f1dd6c21d86bbb7c1e
Author: Hardik Kantilal Patel <c_hardik@qualcomm.com>
Date:   Thu Sep 13 15:52:58 2012 +0530

    wlan: Klocwork fixes - SME\csr

    CRs-Fixed: 395526
    (cherry picked from commit f7d2c9208159cbe14ceb723fb5a66292f1139d82)

    Signed-off-by: Hardik Kantilal Patel <c_hardik@qualcomm.com>

    Conflicts:

    	prima/CORE/SME/src/csr/csrApiRoam.c

    Change-Id: Icc9c287d6f4ccae3c2bfc7b06c9f381a19875c52

commit 7f5347345799f37964a40a8b3615d74711e3f16d
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Wed Nov 7 18:20:43 2012 +0530

    wlan: Klocwork fixes - MAC\PE\lim

    Change-Id: Ieb0320eb10e164440a3a3c2aea633adeb744f871
    CRs-Fixed: 395526

commit 4186f64068e87945fec1493efdf88d05a2c8a51a
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Wed Nov 7 17:37:48 2012 +0530

    wlan: Fix for not closing the smd channel.

    Fix for not closing the SMD channel, when WDI time out happens
    for message NV_DOWNLOAD_REQ.

    1) calling WDA_stopFailed() if WDA_stop() fails in vos_start().
    2) Fix to call wdaDestroyTimers() only if they are created.
    3) Triggering the SSR in hdd_wlan_startup() if vos_start() fails.

    Change-Id: I3c16de1a221c0910df8ceccc62c8396056b674bc
    CRs-Fixed: 416542

commit cad3e605c9257cd77931a87e1971e1d97dae5cd5
Author: Mohit Khanna <mkhanna@qca.qualcomm.com>
Date:   Thu Sep 6 16:47:25 2012 -0700

    wlan: Fix for SCAN command crash

    Fixes:Scan command with zero SSID leads to 'NULL pointer access' crash

    Change-Id: I948b12ebc5ebf2770a504c59a9330ed8840eaba9
    CRs-Fixed: 396672

commit a38d3a5c483d19e5e2f40af3e80bed7f0b9a5188
Author: Madan Mohan Koyyalamudi <c_mkoyya@qca.qualcomm.com>
Date:   Mon Oct 15 15:52:54 2012 -0700

    wlan: Kick DXE TX channel when exit IMPS, if any valid pending frame in
    the ring

    Kick DXE TX channel when exit IMPS, if any valid pending frame in the
    ring
    When exit IMPS, if TX ring has any pending frame with valid descriptor,
    kick DXE TX channel to flush TX ring. This procedure will clean up TX
    data channel which pushed previous connected session, and will prepare
    next connection session, even previous session has TX data stall.
    This is recovery logic.

    Change-Id: I5e8016c8bb9794ded3a1ff70370671577f2e0d48
    CR-Fixed: 409807

commit ab5b511b0f542257f9100cbc0ff6d3cd8c1ee2ac
Author: Madan Mohan Koyyalamudi <c_mkoyya@qca.qualcomm.com>
Date:   Mon Oct 15 15:49:02 2012 -0700

    wlan: TX DXE Channel descriptor async uncovered cover case fix

    When TX CH does not have pending frame when EXIT IMPS, current logic
    could not detect descriptor async
    Even there is no valid descriptor on DXE TX ring try to detect
    descriptor async
    - If no pending frame within DXE ring, just check with HW register value
    and head descriptor physical address
    - If there are some pending frames and no valid descriptor, program
    head descriptor to HW register

    Change-Id: Ia8089aeedf8bcd39057cc4656c01982e9745f748
    CR-Fixed: 409804

commit 3d829d0c43c177ed0f8e6589c0ee1fb5c6227562
Author: Hardik Kantilal Patel <c_hardik@qualcomm.com>
Date:   Thu Sep 13 15:34:52 2012 +0530

    wlan: Klocwork fixes - SME\p2p (removing hard tabs)

    CRs-Fixed: 395526
    (cherry picked from commit 8452bb7986957851e1e8a9b06b5b89591ddda2c1)

    Conflicts:

    	prima/CORE/SME/src/p2p/p2p_Api.c

    Change-Id: If80fde39e5dbd33af31204bc85a91902eda61de4

commit a7c06583c8ea7db7ea2f3322b0ec47f6e6a1f3a3
Author: Hardik Kantilal Patel <c_hardik@qualcomm.com>
Date:   Thu Sep 13 15:33:38 2012 +0530

    wlan: Klocwork fixes - sme_common (removing hard tabs).

    Fixes: Klocwork fixes - sme_common

    CRs-Fixed: 395526
    (cherry picked from commit 9af485ead4e420f271be7f098b44da77623e94ff)

    Conflicts:

    	prima/CORE/SME/src/sme_common/sme_Api.c

    Change-Id: I26e7143bf1e54b8788304332b5239b1576f06302

commit dfebd9954f9ff846b605c3e765dbf5d2ad8e7c89
Author: Deepthi Gowri <c_gowri@qti.qualcomm.com>
Date:   Thu Nov 1 15:43:11 2012 +0530

    wlan: Fix for WLAN driver hang, because of stuck in WDI.

    1) Added the changes in LIM to set the link state to IDLE,
    in error conditions.

    2) If WDI receives a DEL_BSS when there no session for this
    BSSID in it's BSS table, still allowing that request to go to
    HAL as HAL needs to cleanup its BSS table.

    3) With the above changes we should not hit the issue of
    "Association is already in place for this BSSID" in WDI,
    If we still hit this error condition added the code to
    reload the driver to recover from this error condition.

    CRs-Fixed: 411227

    Change-Id: I54f1aaca724147b69b448074c49549c01769166f

Change-Id: Id3f9d8cba4fc592cf80f768384aafd669ec06eb7
Updated for WLAN