Commit Graph

383 Commits

Author SHA1 Message Date
Abhishek Singh
9e93043272 qcacld-3.0: Fix Static analysis error.
qcacld-2.0 to qcacld-3.0 propagation

Fix Static analysis errors as below:
1) Memory leak in limHandleDelBssInReAssocContext

Change-Id: I9dc0c630d62c06fb55e953f9506b04dbeff9bd51
CRs-Fixed: 919502
2015-12-09 23:21:40 -08:00
Himanshu Agarwal
e1086fad37 qcacld-3.0: Cleanup checks in the driver exit path
Propagation from qcacld-2.0 to qcacld-3.0

Added sanity checks for below variable before accessing in the
driver exit path.

nl_srv_sock
pdev_txrx_ctx

Change-Id: I793db21e1a6d1eded027ecbd2805494ea7610852
CRs-Fixed: 846457
2015-12-09 23:21:39 -08:00
Varun Reddy Yeturu
044bda2e10 qcacld-3.0: Create configuration item gfirst_scan_bucket_threshold
qcacld-2.0 to qcacld-3.0 propagation

Create a configuration item to program the first bucket
threshold of the scan results to have the flexibility to
adjust the first bucket threshold.

CRs-Fixed: 922979
Change-Id: I6fad27a2990f7555173e4735131e8392d0277009
2015-12-09 23:21:39 -08:00
Varun Reddy Yeturu
f76f6de348 qcacld-3.0: Fix Static Analysis Issues
1) Check for bssid if it is NULL, before dereferencing it.
2) Check for hal_ctx if it is NULL, before dereferencing it.

CRs-Fixed: 940721
Change-Id: I836416a4717b15902e8b8f27fa2e5e5e7935c12f
2015-12-09 23:21:39 -08:00
Houston Hoffman
b8954c6402 qcacld-3.0: Remove from_irq
From irq variable is not serving a good purpose.

Change-Id: I362e4fa8c5202e748fac455fb76ce676bd1ea31b
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
a499f30bd5 qcacld-3.0: Replace target_lock with ce_index_lock
Target_lock was a global lock for all target and copy engine data
structure access. Replacing target_lock with a per copy engine
lock permits paralel completion handling for different copy engines.

Change-Id: I9c09d557c85f9e48beafe5e3f936e105183ddd3f
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
15ec6c6895 qcacld-3.0: Remove target_lock from hif_crash_shutdown
This is called by the platform driver in case of kernel panic.
Replacement syncronization might be needed here if the kernel
panic doesn't stop the other host cpus before the platform driver
calls this.

Change-Id: Ic6d4eb1cb08f6363029463994ec7e3837212e271
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
3e551e46b9 qcacld-3.0: Remove target_lock from watermarks_set functions
If watermarks are going to be used, the should be set as part of a
single threaded initialization sequence.

Change-Id: I3e1e9cd0f55f46d9f46718c139963931311fe8ae
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
5d2697f78d qcacld-3.0: Remove target_lock from ce_h2t_tx_ce_cleanup
No other thread should modify the copy engine indexes while we
are cleaning up the data structures.

Change-Id: I324286c3a8eed24ddd94aa868dbaac425cc30dbf
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
542a5eeeb8 qcacld-3.0: Remove ce_disable_any_copy_compl_intr
Remove ce_disable_any_copy_compl_intr and
ce_enable_any_copy_compl_intr since they aren't
used and give a false sense of thread safety.
Modifying copy complete interrupt currently needs
to be synchronized with completion handling.

Change-Id: Ieb27a8c71363ebd56f16eda9e1037a161a5eeb62
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
a7163174a3 qcacld-3.0: Remove target_lock from cb regsitration
Send and recv callback registration currently occurs durring init
and after bmi download is complete.  In either case no transactions
are in progress and no race condition can exist.
Similarly watermark callback registration would happen at the same time
if it were used.

Change-Id: Ia77bf30fb3bcefa500465cea9ad9927990bb7ced
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
1186b91046 qcacld-3.0: Remove target_lock from ce_pkt_dl_len_set
Download length should be set before messages are recieved, so
no race condition should exist.

Change-Id: I92de4b3c4077f23032df45ceca6e169616351b8b
CRs-Fixed: 941355
2015-12-09 23:21:39 -08:00
Houston Hoffman
eab684b511 qcacld-3.0: Check for SSR before sending messages to upper layers
FW is asserted, dont service the messages.  The hif completion
thread used to prevent processing of messages when firmware crashed.

Change-Id: I42a5a285056e989d302e766f2922bb7c114634dc
CRs-Fixed: 941358
2015-12-09 23:21:39 -08:00
Houston Hoffman
7523d226a3 qcacld-3.0: Remove hif_completion_thread
Remove hif_completion_thread serialization mechanism.
Allow for parralel processing of copy engine transactions.

Change-Id: I8ecd325314542c2950294fd769a7f127d319df8f
CRs-Fixed: 941358
2015-12-09 23:21:38 -08:00
Houston Hoffman
b4eb2b20b4 qcacld-3.0: Remove spinlocks from ce_enable_msi
ce_enable_msi should happen before interupts are enabled.  Therefore
we should be single threaded here and don't need to protect access
with a spin lock.

Change-Id: I24feec02003bdb402201d71d1cd5254dacae0b72
CRs-Fixed: 941355
2015-12-09 23:21:38 -08:00
Houston Hoffman
7099f33d04 qcacld-3.0: Remove spinlocks from ce_init
ce_init should happen before interupts are enabled.  Therefore
we should be single threaded here and don't need to protect access
with a spin lock.

Change-Id: I5e1cfd32860eeda8a403744cf1589e35c57ee6df
CRs-Fixed: 941355
2015-12-09 23:21:38 -08:00
Houston Hoffman
79f8ecd3c4 qcacld-3.0: Move recieve count to CE_state
Removing references to global data in the processing of
copy engine interupts.

Change-Id: I1ecc2ee67526498a56680870969ec529f0ac6e95
CRs-Fixed: 941355
2015-12-09 23:21:38 -08:00
Houston Hoffman
3d491e2e07 qcacld-3.0: Bypass hif_completion_thread in recv
We want to process the completions in parallel.
Upper layer should take care of its own thread safety.
hif_completion_thread is a legacy function that does in
context serialization of hif completions. Bypass it.

Change-Id: I7953545b55dae093931741359bbf985e2fb9faca
CRs-Fixed: 941358
2015-12-09 23:21:38 -08:00
Houston Hoffman
e0d54529fb qcacld-3.0: Move force break to CE_state
Removing references to global data in the processing of
copy engine interupts.

Change-Id: I4d18198c392aab8c46aa755e2007ba2da0c47a57
CRs-Fixed: 941355
2015-12-09 23:21:38 -08:00
Naveen Rawat
efa0108205 qcacld-3.0: Enable gEnableTxSUBeamformer by default
This patch enables gEnableTxSUBeamformer by default in config ini
which will help to uncover some of the bugs in default DEV testing.

Change-Id: Ib64d53d307aced8f5384d691a3d7f4b383d52a0f
CRs-Fixed: 930322
2015-12-09 23:21:38 -08:00
Naveen Rawat
e7d8605471 qcacld-3.0: Increase SME cmd queue to support max clients connected
This is qcacld-2.0 to qcacld-3.0 propagation

Currently in SAP mode, if max STA connected a operation to turn off
SAP will result in more than SME queue length cmds being enqueued.
To fix, this patch:
1) Makes the SME cmd queue length, 3 times the max STA.
2) Because of increased SME cmds, the allocation for all cmds
   together will fail, hence allocate each SME cmd individually
   and free them accordingly.

Change-Id: Ia1dfc5b00eacd9bdb503ce18927c62f1edd15320
CRs-Fixed: 928840
2015-12-09 23:21:38 -08:00
Naveen Rawat
b493844375 qcacld-3.0: Add support for FST Action frames
This is qcacld-2.0 to qcacld-3.0 propagation

Currently driver drops the action frame category 18 - FST action frames.
This patch adds support for these frames in wlan host code.

Change-Id: I7021e328b7ebe9a1e46f526e3928c7d1279e1ad7
CRs-Fixed: 921117
2015-12-09 23:21:38 -08:00
Naveen Rawat
c0c91cd58c qcacld-3.0: Fix UL TPUT issue when connected to 160MHz AP
This is qcacld-2.0 to qcacld-3.0 propagation

When STA is connected to 160MHz AP, channel width is updated to
20MHz since the 160MHz channel width is not handled.
Add support to handle the 160MHz BW in beacon IEs.

Change-Id: Id13164762d6da142093f049121440ce976cecfc1
CRs-Fixed: 924219
2015-12-09 23:21:38 -08:00
Masti, Narayanraddi
f8f6e7e95d qcacld-3.0: free cfgState->buf in failure cases.
qcacld-2.0 to qcacld-3.0 propagation

As part of cleaning up pending action frame, if timeout happens
for tx cnf event then indicate tx failure status as FAIL and free
cfgState->buf to avoid memory leak.

Change-Id: I6caaa8efeab769cce8c4cdfcc868101e63fd8e76
CRs-Fixed: 880779
2015-12-09 23:21:38 -08:00
Masti, Narayanraddi
fd0d19c399 qcacld-3.0: channel bonding is not valid for channel 14
qcacld-2.0 to qcacld-3.0 propagation

Channel bonding mode in not valid for channel 14. So don't
consider it while deriving the channel bonding mode.

Change-Id: I7ceae149cdd9e2f3c75f937c56cc5e93455fa8ee
CRs-Fixed: 908439
2015-12-09 23:21:37 -08:00
Masti, Narayanraddi
1c63044721 qcacld-3.0: Delete all TDLS peers on receiving CSA from AP
qcacld-2.0 to qcacld-3.0 propagation

On receiving channel switch announcement from AP delete all TDLS
peers before leaving BSS and proceed for channel switch.

Change-Id: I898f501d9d0afbbfef3a553ed63b52da5cd8f978
CRs-Fixed: 914129
2015-12-09 23:21:37 -08:00
Masti, Narayanraddi
f049382092 qcacld-3.0: Send assoc response for duplicate assoc request frames
qcacld-2.0 to qcacld-3.0 propagation

Few STA/P2P-client's are sending assoc req frame and waiting for
300-500ms. If they don't receive the assoc resp frame within
this time then they resending the assoc req frame. These frames
are not going to have retry bit set.

In the current design host driver is not handling these duplicate
assoc req frames without retry bit set.

To mitigate this issue, while processing assoc request frame,
if pStaDs entry already exists then send assoc response with
same tid and stop processing the assoc req further.

Change-Id: I6d67f4cd352bbee422301b832742e7386666037f
CRs-Fixed: 868736
2015-12-09 23:21:37 -08:00
Masti, Narayanraddi
3d8690cf14 qcacld-3.0: Fix memory leak in tx flow control timer
qcacld-2.0 to qcacld-3.0 propagation

TX flow control timer initialized when STATION interface is created.
During IBSS startup, STATION interface is changed to ADHOC type.
TX flow control timer is not required, so close tx flow control
and destroy timer.

Change-Id: Id9c440638964fb3ab0e95d8a7c747708886a94ff
CRs-Fixed: 882821
2015-12-09 23:21:37 -08:00
Masti, Narayanraddi
c4a7ab8239 qcacld-4.0: TDLS: provide operating class and channel to HAL
qcacld-2.0 to qcacld-3.0 propagation

1.Provide off channel and operating class info to user space
in HAL API wifi_get_tdls_status. If off channel is not enabled
then provide base channel info and in that case pass opclass as 0.
2.Provide correct tdls state based on tdls off channel
configuration.

Change-Id: Ic60500b95ebddcb88b4e03f29178068c5322b2b9
CRs-Fixed: 838167
2015-12-09 23:21:37 -08:00
Masti, Narayanraddi
21bde25bda qcacld-3.0: Fix race condition between disassoc/deauth from peer
qcacld-2.0 to qcacld-3.0 propagation

When disassoc request is received from peer and at the same time
if deauth request is received from supplicant, LIM cleanup
may not happen properly as there is a chance of session deletion
in limSendSmeDeauthNtf while cleanup in progress from
limProcessSmeDisassocCnf. This can result in not sending delbss to FW.
Hence, FW can crash when config bss is sent for new connection.

Following changes are added to handle this.
1. Add state eLIM_SME_WT_DISASSOC_STATE in __limProcessSmeDeauthReq
   and allow host to post LIM_MLM_DEAUTH_REQ instead of invoking
   limSendSmeDeauthNtf, where session is deleted.

2. Send eWNI_SME_DEAUTH_RSP if cleanup is already in progress to avoid
   cleanup again. If mlm state is not eLIM_MLM_LINK_ESTABLISHED_STATE,
   then it means cleanup is already in progress.

3. Return from __limProcessSmeDisassocCnf if cleanup is already in
   progress.

4. Add check in limProcessMlmDeauthCnf to send deauth confirmation even
   if state is eLIM_SME_WT_DISASSOC_STATE.

5. Add similar checks in limProcessMlmDisassocReqNtf to handle disassoc
   from peer and supplicant simultaneously.

Change-Id: Ie19a7b79d835a5e5a77ef48f9379c1cf90dc38d7
CRs-Fixed: 878334
2015-12-09 23:21:37 -08:00
Nirav Shah
bf6450fa5b qcacld-3.0: CL 1411038 - update fw common interface files
qcacld-2.0 to qcacld-3.0 propagation

add WMI_TRANSFER_TO_FLASH message defs.

CRs-Fixed: 935128
Change-Id: I21c55e7aee54c4f6beb6f455a395d1e2a233c9d9
2015-12-09 23:21:37 -08:00
Satish Singh
eea62029a7 Release 5.0.0.147 QCACLD3 WLAN Driver
Release 5.0.0.147 QCACLD3 WLAN Driver

Change-Id: Ib90ae6900b75fa0626f1c32f84a1f65abd1dda6c
CRs-Fixed: 688141
2015-12-02 12:57:08 -08:00
Dhanashri Atre
cb979fa188 qcacld-3.0: Remove unused LRO logging function
Remove LRO logging function that is not used

CRs-Fixed: 943482
Change-Id: Ia0c3dd93d02183ae7ace2d930fb874ca01b4397e
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
2e60287b81 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirTdlsLinkEstablish Req/Rsp
Replace tSirMacAddr with cdf_mac_addr in tSirTdlsLinkEstablish Req/Rsp.

Change-Id: I089e9835e08aa029b25113f260b4ba3088599075
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
0e321a956c qcacld-3.0: Remove obsolete struct sSirTdlsDisappearAPInd
Remove obsolete struct sSirTdlsDisappearAPInd

Change-Id: Ia9823cddc401374b0e411f50c9618a8aceee56af
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
96d68d3eee qcacld-3.0: Remove obsolete struct sSirPsReqData
Remove obsolete struct sSirPsReqData.

Change-Id: I262fcd2e9e5a7258bc516533f1bafe6a54011065
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
9dc32cfb0f qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirLPHBTcpParamStruct
Replace tSirMacAddr with cdf_mac_addr in sSirLPHBTcpParamStruct

Change-Id: I55cbe3c441c2b1540e946e52c815bc5518935964
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
9eddfdaf4c qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirLPHBUdpParamStruct
Replace tSirMacAddr with cdf_mac_addr in sSirLPHBUdpParamStruct

Change-Id: I6439494feb18824cc9054c66ae426646c055f3d4
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
afede1885a qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirRateUpdateInd
Replace tSirMacAddr with cdf_mac_addr in sSirRateUpdateInd.

Change-Id: I28dc76e07721f6472bbc1ec5c107cd12b2123a8f
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
34b634c4d5 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirModifyIE
Replace tSirMacAddr with cdf_mac_addr in sSirModifyIE.

Change-Id: I36783326eb35bd6c9c4987ae0655b0313f398886
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
8b98396253 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirUpdateIE
Replace tSirMacAddr with cdf_mac_addr in sSirUpdateIE.

Change-Id: Id190e74be5063ecd7792380c6f25ba8de1461c51
CRs-Fixed: 898864
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
0f09f999bd qcacld-3.0: Find extscan_in_progress irrespective of connected or pno
This is a qcacld-2.0 to qcacld-3.0 propagation.

The problem with the current code is we are finding whether connected or
pno_in_progress or extscan_in_progress in the same for loop and whenever
one of them matches, we break out of loop. It makes sense to keep
connected flag and pno_in_progress inside the for loop because both are
mutually exclusive. But same is not the case with extscan_in_progress,
this flag can be set to true or false irrespective of connected or
pno_in_progress.

Hence the fix is to move finding extscan_in_progress to a separate for loop.

Change-Id: Ie72ff7f7382adaea5626c0808a206d18c2916e0d
CRs-Fixed: 899322
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
a4db76f1f2 qcacld-3.0: Cleanup WOW_NLO_SCAN_COMPLETE_EVENT
This is a qcacld-2.0 to qcacld-3.0 propagation.

Currently WOW_NLO_SCAN_COMPLETE_EVENT is enabled on receiving
PNO match found event, but it is never cleared.
This is causing regular host wake ups with the reason
WOW_REASON_NLO_SCAN_COMPLETE even if pno match is not found in the
next successive iterations.

Fix this by enabling/disabling WOW_NLO_SCAN_COMPLETE_EVENT before suspend
based on the flag pno match is found.

Change-Id: I21d73de0c03e0c09b5a91a521d848e71eaf359e0
CRs-Fixed: 888964
2015-12-02 12:55:30 -08:00
Srinivas Girigowda
e80cea9353 qcacld-3.0: Add support for wakeable NLO_SCAN_COMPLETE_EVENT
This is a qcacld-2.0 to qcacld-3.0 propagation.

With RunTime PM feature enabled, after receiving the PNO matched event
RunTime PM puts the host back in WoW suspend after 500ms (default).
Since WMI_NLO_SCAN_COMPLETE_EVENTID is not a wakeable event, this event
does not wakeup the host hence PNO scan not completed and PNO is broken.

Fix this by making NLO_SCAN_COMPLETE_EVENT a wakeable event.
Host driver configures this WoW event only after PNO match is received.

Change-Id: I81cccc86942fc75bc63235038c50ba6edb0fee8b
CRs-Fixed: 884211
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
f2599dd3c6 qcacld-3.0: WLAN logs cleanup
This is a qcacld-2.0 to qcacld-3.0 propagation.

1. Add log to print ssid, bssid, rssi, channel and country code
   while connecting to an AP.
2. Add log to print disconnect reason when disconnect request is
   received from user space.
3. Cleanup some of the logs moving it to appropriate log level
   which are showing up as ERROR level in bug report.

Change-Id: Id8ea69a14a18565c226f89a8a5e10be46741d76d
CRs-Fixed: 914336
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
ba3091c366 qcacld-3.0: Increase MAX_CFG_INI_ITEMS to 1024
This is a qcacld-2.0 to qcacld-3.0 propagation.

Increase the maximum config ini items from 512 to 1024.

Change-Id: I5c4958d5c743f1e0b03a4f7b41e21ff9787ccd07
CRs-Fixed: 914336
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
117e7fbb09 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sir_ocb_config_channel
Replace tSirMacAddr with cdf_mac_addr in struct sir_ocb_config_channel.

Change-Id: I0f22ba3b3b63f8d56d3285522c0d8d1303e2f89c
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
296105aaad qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sAniDHCPStopInd
Replace tSirMacAddr with cdf_mac_addr in sAniDHCPStopInd.

Change-Id: I56dfa86947e9711c8727d4e3d025f0f03fc39d3c
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
4962a56771 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sAniGetTsmStatsReq
Replace tSirMacAddr with cdf_mac_addr in sAniGetTsmStatsReq.

Change-Id: I1f98fdfdaddf79af848c927d1443dcf6e52bcb54
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00
Srinivas Girigowda
37c133b074 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeMicFailureInd
Replace tSirMacAddr with cdf_mac_addr in sSirSmeMicFailureInd.

Change-Id: I65371e094fc8fb02a400960aca192b5bf7034413
CRs-Fixed: 898864
2015-12-02 12:55:29 -08:00