Commit Graph

407 Commits

Author SHA1 Message Date
Rajeev Kumar
6dd45a84ec qcacld-3.0: Ignore target suspend if fw is down
Ignore target suspend timeout if fw is down such that
system can recover gracefully.

Change-Id: I26c3a1fb34483a46cd4f9d48d17408b688e5ad6c
CRs-Fixed: 2130097
2017-10-24 22:56:34 -07:00
Srinivas Girigowda
ea4d806da9 qcacld-3.0: Fix checkpatch warnings (SPACING)
Fix checkpatch warnings (SPACING).

Change-Id: I966fe641b4722cc15584defc42c90921090687fb
CRs-Fixed: 2126814
2017-10-24 16:40:54 -07:00
Srinivas Girigowda
4d65ebe983 qcacld-3.0: Fix checkpatch warnings (LINE_SPACING)
Fix checkpatch warnings (LINE_SPACING).

Change-Id: Ibac537792bfd68a1e4b42eec0f5ece579fb15a20
CRs-Fixed: 2126814
2017-10-24 16:40:49 -07:00
Yun Park
ff6a16ae6f qcacld-3.0: Enable RPS dynamically for SAP mode
SAP Rx TPUT is bounded by host network stack, which is running in the
context of IPA work-queue, when IPA offload data path enabled.
However RPS shouldn't enabled for legacy Rx data path, where NAPI is
enabled. So, we dynamically enable RPS for SAP interface when the vdev
comes up and IPA was enabled only.
Send RPS enable indication to CNSS daemon to enable RPS only when SAP
interface comes up and disable RPS when SAP interface is closed.

Change-Id: Ia669b2c3ae814d0577f5226d8acbf026740ad760
CRs-Fixed: 1113202
2017-10-24 02:33:25 -07:00
Dustin Brown
46a15a39bc qcacld-3.0: Call cds_sched_close in cds_open error path
When cds_open fails after calling cds_sched_open, cleanup is attempted.
However, cds_sched_close is currently protected by a faulty
conditional. Remove the conditional so the scheduler context can be
cleaned up appropriately for all cds_open failure modes.

Change-Id: I709e8d2af06ffdf1a2910d81d23fa3a33ffbe074
CRs-Fixed: 2129677
2017-10-24 00:49:47 -07:00
Manjunathappa Prakash
7b6cb00b26 qcacld-3.0: Disable LRO capability during concurrency
LRO rx jumbo packets cannot be forwarded to other vdev and kernel drops
them with warning message:
"skbuff: wlan0: received packets cannot be forwarded while LRO is enabled"
So disable LRO capability during concurrency.

Change-Id: Ib35e1ee5f9c18a846e21ce1eb293e12e17761fa8
CRs-Fixed: 1092193
2017-10-24 00:49:43 -07:00
Govind Singh
a1f6dacf0c qcacld-3.0: Add fw ready uevent to update driver state
FW ready state guarantees the completion of 2nd stage power on
reset sequence of wcn3990 target.

Add fw ready uevent to update driver state, which is required
to check if target registers are accessible or not, while
recovery is in progress.

Change-Id: I78d56644d4d4ac3a0371be625a2debed8ac7cebf
CRs-Fixed: 2058451
2017-10-24 00:49:41 -07:00
Venkata Sharath Chandra Manchala
4aaae0f586 qcacld-3.0: Propagate config parameters to datapath
Provide an interface to propagate the feature
specific config parameters to Lithium datapath.

Change-Id: Iec6f2205a87a02806933abf7538a95bddd82d5a0
CRs-Fixed: 2097229
2017-10-23 16:30:21 -07:00
Srinivas Girigowda
bafb8b7e6a qcacld-3.0: Fix to return error values properly
If probe failed because of no memory, the return values are
not properly perculated up the call stack.

Fix this to return error values properly up the call stack.

CRs-Fixed: 2124159
Change-Id: Iba20a73555c86c26f3f07fe89e9030159e3974c0
2017-10-20 05:55:57 -07:00
Vignesh Viswanathan
c6d1e1cc13 qcacld-3.0: Add FILS roaming support
Add FILS roaming support changes as follows:
- Update ERP info in RSO Start
- Update HLP info in a new command WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID
- Set/Delete PMK cache info with WMI_PDEV_UPDATE_PMK_CACHE_CMDID
- Process FILS TLV in Roam Synch Indication and update the FILS info
  [seq number,PMK, KEK, realm] to Supplicant.

Change-Id: I78c3bdde080701deb8d2bdb92d8d57d18cceb864
CRs-Fixed: 2081252
2017-10-19 13:49:15 -07:00
Orhan K AKYILDIZ
30e8cbcd4f qcacld-3.0: Make max msdus per pkt configurable
Introduce a new parameter in the ini file for the maximum
number of MSDUs per HTT_RX_INORDERIND message.
This parameter is now sent over to the FW through the RFS
configuration message.

Change-Id: Id0057861bc172a36483804170274b202198b6824
CRs-Fixed: 2106760
2017-10-18 19:42:10 -07:00
Houston Hoffman
59c9c91465 qcacld-3.0: add error handling for cdp_soc_attach
If cdp_soc_attach returns null, need to handle the error.

Change-Id: I8fe9c176ecf777564830baca9fc3b1e919fbb6e4
CRs-Fixed: 2118029
2017-10-12 13:59:56 -07:00
Sandeep Puligilla
819d94f731 qcacld-3.0: Don't roam to 2G AP when 5G only configured
STA is roaming to 2G AP even though 5G
only is configured through ini.
Set weightage of the 2G social channels
to zero so that firmware will not roam
to 2G channels.

Change-Id: I7dea8413618265e0f1fe353da4b858583c1921af
CRs-Fixed: 2117614
2017-10-12 13:59:27 -07:00
Yu Wang
66a250bbb5 qcacld-3.0: add ini config for PTP options
Add ini param 'gtsf_ptp_options' to control
PTP options, it's a bitmap:
bit0 - PTP_OPT_RX(0x1)
  set this bit to enable RX time stamping
bit1 - PTP_OPT_TX(0x2)
  set this bit to enable TX time stamping
bit2 - PTP_OPT_RAW(0x4)
  set this bit to use raw time as timestamp
bit3 - TSF_DBG_FS(0x8)
  set this bit to add device attriubte 'tsf' for iface

The default value of gtsf_ptp_options is 0xf

Propagated from qcacld-2.0.

Change-Id: Ie53d503bdd2e85790502583a238ee138f4bcf6c6
CRs-Fixed: 2079466
2017-10-12 13:57:17 -07:00
Hanumanth Reddy Pothula
ab3959506f qcacld-3.0: Update ini param g_auto_detect_power_failure_mode
Update ini param g_auto_detect_power_failure_mode to incorporate below
values,
0 - Don't register wow wakeup event and FW crashes on power failure
1 - Register wow wakeup event and FW sends failure event to host on
    power failure
2 - Don't register wow wakeup event and FW silently rejuvenate on
    power failure
3 - Don't register wow wakeup event and the auto power failure detect
    feature is disabled in FW.

Change-Id: I8a704954ecbacadbc035c1523fa41a18b6300f66
CRs-Fixed: 2087144
2017-10-09 03:47:52 -07:00
Vignesh Viswanathan
34cf475c6b qcacld-3.0: Add FILS HLP parsing support in Assoc Resp
Parse and update HLP IE info if present in Assoc resp.

Change-Id: If166d71459b622e44511370e49c2ef8d983f8b76
CRs-Fixed: 2034452
2017-10-06 12:27:46 -07:00
Anurag Chouhan
4085ff7e51 qcacld-3.0: Add vendor event to get the driver hang reason
Add Vendor Event to get the driver hang reason indicating to the
user space that the driver has detected an internal failure.
This event carries the information indicating the reason that triggered
this detection.

Change-Id: I3934f2a18c796ed3b53175dcbe7efd7f4d1409b9
CRs-fixed: 2098498
2017-10-06 07:58:08 -07:00
Venkata Sharath Chandra Manchala
9abac31eba Revert "qcacld-3.0: Propagate config parameters to datapath"
This reverts Change I852b14cb04b1c2c01a697434bc5fe8b29dbfe9ea.

Change-Id: Ia433fdcb58feea27c5897975002bb347d6b96bb4
CRs-Fixed: 2097229
2017-10-04 18:29:40 -07:00
Arunk Khandavalli
932a9e161a qcacld-3.0: synchronize interface change timer with driver shutdown
As part of the last interface down, driver starts the interface
change timer to close the modules of 15seconds, if there is no
request to use the interfaces from upper layer during this time
the timer expiers and closes modules. There can be SSR/PDR triggered in the
different context which during shutdown tries to call the
respective module notifiers which can be purged/freed
in the timer context.

Synchronize the interface change timer callback with the shutdown
using the interface change timer lock. Following steps are taken
to make sure one thread is completed before other thread starts
execution:
	* Set the respective flag of recovery inprogress or fw_down
          so that access to firmware is blocked.
	* Take the interface change lock, so if the timer callback
	  is running it will complete the closing the modulkes,
	  or if the uevent gets the lock it completes the calling
	  notifiers and purges the same.
	* Release the interface change lock.

Change-Id: I1d7f62cd0ce7268cc9a5bda2a72dae384b70a6e2
CRs-Fixed: 2100846
2017-10-04 08:41:26 -07:00
Venkata Sharath Chandra Manchala
880a948ed9 qcacld-3.0: Propagate config parameters to datapath
Provide an interface to propagate the feature
specific config parameters to Lithium datapath.

Change-Id: I852b14cb04b1c2c01a697434bc5fe8b29dbfe9ea
CRs-Fixed: 2097229
2017-10-03 03:30:31 -07:00
Jeff Johnson
31a67585b7 qcacld-3.0: Change cds_get_global_context() return type
cds_get_global_context() is the only remaining API which uses
the v_CONTEXT_t typedef. It was always strange to have an
abstraction for (void *) since that is an integral part of C99
and hence does not require abstraction, so replace the return
type of cds_get_global_context() from v_CONTEXT_t to void *.

Change-Id: I836994bf7405db54eea333bbb29785e606fb0196
CRs-Fixed: 2117092
2017-09-28 03:49:17 -07:00
Jeff Johnson
7aaeeea315 qcacld-3.0: Change return value of cds_init()
Currently cds_init() returns a pointer to the CDS Global Context.  At
one time this was necessary since it was required to subsequently pass
this context pointer to other CDS APIs. But now CDS internally
maintains a pointer to its context, and no CDS APIs now require this
pointer, so no longer return the pointer. The ultimate goal is to keep
all references to the CDS context inside CDS.

Change-Id: Id068a2d351e492eca7b84ef23f277939104c8b46
CRs-Fixed: 2117004
2017-09-28 03:49:12 -07:00
Jeff Johnson
3543fb202e qcacld-3.0: Fix CDS layering violation in hdd_context_create()
Currently hdd_context_create() directly dereferences the global CDS
context pointer in order to save a pointer to the HDD context. This is
a layering violation. Instead update cds_set_context() to handle the
HDD context, and call that from hdd_context_create() to save the
pointer to the HDD context.

Change-Id: Ie54725225a7dd5653eeb35e94aa3f3a752edc62a
CRs-Fixed: 2115513
2017-09-28 03:47:13 -07:00
Ashish Kumar Dhanotiya
bfee5898b7 qcacld-3.0: Update driver according to latest reg domain info
Update driver for the latest reg domain info according to
Regdomain_23 and Regdomain_24 excel sheets.

Change-Id: I6b259be20de650886a16c32b69f8ed82b96dbcd8
CRs-Fixed: 2112485
2017-09-27 20:09:01 -07:00
Nachiket Kukade
f44b33eac4 qcacld-3.0: Let probe fail gracefully after htc_wait_target returns NOMEM
During probe if htc_wait_target fails with any error status, driver will
BUG_ON except when the FW_DOWN bit is set. This is to let probe fail
gracefully in case of recoverable errors and BUG_ON for fatal errors.
So driver will BUG_ON for NOMEM errors as well, even though recovery is
possible in this case with a driver load retry.
Do not BUG_ON in case of error status is NOMEM or FW_DOWN is set.

Change-Id: I0e7cbd4db8263765f0d97709ec30de6aefb6fae5
CRs-Fixed: 2102844
2017-09-26 21:30:33 -07:00
Ashish Kumar Dhanotiya
ecf4db04c7 qcacld-3.0: Add driver support for new country codes
Country codes IQ and GI are not recognized by driver.
Add driver support to recognize country code IQ and GI.

Change-Id: I76997d4426718a57fee23c9774153f1adc597c44
CRs-Fixed: 2104094
2017-09-26 17:52:35 -07:00
SaidiReddy Yenuga
cc733aff70 qcacld-3.0: Add ini param to control the crash inject
qcacld-2.0 to qcacld-3.0 propagation

Currently the crash can be injected by iwpriv command and FW
gets crashed.
Changes are done to add the gEnableCrashInject ini parameter

1) This ini param is disabled by default.
2) If this param is disabled the crash inject is ignored.

Change-Id: I7e908be1e37090a9d343dc04411fe387f776a937
CRs-Fixed: 864932
2017-09-19 02:28:33 -07:00
Jeff Johnson
7d56227ba8 qcacld-3.0: Remove cds_context param to cds_sched_close()
Currently cds_sched_close() takes a cds_context param. However CDS
already maintains its own context, hence this param introduces an
unnecessary coupling, so remove it.

Change-Id: Ic7ceb85653acd2acdb700ae9d2ef15f4e09b81c7
CRs-Fixed: 2109435
2017-09-14 06:51:58 -07:00
Jeff Johnson
e4b145949f qcacld-3.0: Remove cds_context param to cds_close()
Currently cds_close() takes a cds_context param. However CDS already
maintains its own context, hence this param introduces an unnecessary
coupling, so remove it.

Change-Id: I9c5231ef5d1e2ca969ff01c3fa0dc9b202e1aabd
CRs-Fixed: 2109430
2017-09-14 06:51:57 -07:00
Jeff Johnson
ea5c2aa194 qcacld-3.0: Remove cds_context param to cds_disable()
Currently cds_disable() takes a cds_context param. However CDS already
maintains its own context, hence this param introduces an unnecessary
coupling, so remove it.

Change-Id: I539b3c19a52a9c663268bade6a0acfaa411906dd
CRs-Fixed: 2109429
2017-09-14 06:51:57 -07:00
Jeff Johnson
8f9dd5fd64 qcacld-3.0: Remove cds_context param to cds_enable()
Currently cds_enable() takes a cds_context param. However CDS already
maintains its own context, hence this param introduces an unnecessary
coupling, so remove it.

Change-Id: I13a9a0cbdb8b869f8f543c4f7f89cffbcf4fd210
CRs-Fixed: 2109427
2017-09-14 06:51:57 -07:00
Jeff Johnson
adb3b1cadf qcacld-3.0: Remove cds_[alloc|free]_context() parameter
Currently cds_alloc_context() & cds_free_context() take a CDS context
parameter. However CDS already maintains its own context, hence this
parameter introduces an unnecessary coupling, so remove it.

Change-Id: I4501a0fea7acc7b4a764b0d425da386922b93bcb
CRs-Fixed: 2109265
2017-09-13 20:07:39 -07:00
Jeff Johnson
ff6addf320 qcacld-3.0: Remove wma_open() cds_ctx parameter
Currently wma_open() takes a cds_ctx parameter. All of the other WMA
functions which previously took a cds_ctx no longer use that
parameter, and those functions have been modified to remove the unused
parameter. wma_open() still needs the cds_ctx, but it can get that
context by calling cds_get_global_context(), so remove the cds_ctx
parameter to be consistent with the other WMA functions.

Note: the fact that wma_open() needs the cds_ctx, and then
dereferences it, is a layering violation that needs to be addressed in
the future.

Change-Id: I176e2ac68cc2e8081645a4ce3c158b41d3018587
CRs-Fixed: 2109263
2017-09-13 20:07:37 -07:00
Jeff Johnson
7b3ddc2a5b qcacld-3.0: Remove wma_wmi_service_close() cds_ctx parameter
Currently wma_wmi_service_close() takes a cds_ctx parameter. All of
the other WMA functions which previously took a cds_ctx no longer use
that parameter, and those functions have been modified to remove the
unused parameter. wma_wmi_service_close() still needs the cds_ctx, but
it can get that context by calling cds_get_global_context(), so remove
the cds_ctx parameter to be consistent with the other WMA functions.

Note: the fact that wma_wmi_service_close() needs the cds_ctx, and
then dereferences it, is a layering violation that needs to be
addressed in the future.

Change-Id: I02564bae87077314fea58c1509b3a50b8d567a7a
CRs-Fixed: 2109262
2017-09-13 20:07:35 -07:00
Jeff Johnson
6b8473d136 qcacld-3.0: Remove wma_wmi_work_close() cds_ctx parameter
Currently wma_wmi_work_close() takes a cds_ctx parameter. At one time
this was needed for the call to cds_get_context(), but that is no
longer the case, so remove this unused parameter.

Change-Id: Ibc64cd1398babc899c21a1ee4c0fc280769c4d9e
CRs-Fixed: 2109261
2017-09-13 20:07:33 -07:00
Jeff Johnson
542da35e39 qcacld-3.0: Remove wma_close() cds_ctx parameter
Currently wma_close() takes a cds_ctx parameter. At one time this was
needed for the call to cds_get_context(), but that is no longer the
case, so remove this unused parameter.

Change-Id: I31d1016cff580f9330027f8104348466df9f01dd
CRs-Fixed: 2109259
2017-09-13 20:07:31 -07:00
Jeff Johnson
f7ab814a0c qcacld-3.0: Remove cds_wma_complete_cback() parameter
Currently cds_wma_complete_cback() takes a parameter that is a pointer
to the CDS context. However CDS already maintains its own context,
hence this param introduces an unnecessary coupling, so remove it.

Change-Id: I1b4588f18f807008fd212a8e5d04e3895a12922c
CRs-Fixed: 2109257
2017-09-13 20:07:27 -07:00
Jeff Johnson
8ad89c6cd4 qcacld-3.0: Remove wma_pre_start() cds_ctx parameter
Currently wma_pre_start() takes a cds_ctx parameter. At one time this
was needed for the call to cds_get_context(), but that is no longer
the case, so remove this unused parameter.

Change-Id: Ic4582ecafbee6fc1d0f8ebbf3c62ed8c7b47a179
CRs-Fixed: 2109255
2017-09-13 20:07:24 -07:00
Jeff Johnson
acc1cc7a4e qcacld-3.0: Remove wma_stop() cds_ctx parameter
Currently wma_stop() takes a cds_ctx parameter. At one time this was
needed for the call to cds_get_context(), but that is no longer the
case, so remove this unused parameter.

Change-Id: Iba40ac86e5916be3b8c2a62cf5483c9b7a242be5
CRs-Fixed: 2109254
2017-09-13 20:07:23 -07:00
Jeff Johnson
d489255594 qcacld-3.0: Remove wma_start() cds_ctx parameter
Currently wma_start() takes a cds_ctx parameter. At one time this was
needed for the call to cds_get_context(), but that is no longer the
case, so remove this unused parameter.

Change-Id: If6756ca37a7e4ec4ade1c72eea080f3bc89ad7e4
CRs-Fixed: 2109253
2017-09-13 20:07:21 -07:00
Jeff Johnson
1f8d0a0a9c qcacld-3.0: Remove wma_setneedshutdown() cds_ctx parameter
Currently wma_setneedshutdown() takes a cds_ctx parameter. At one time
this was needed for the call to cds_get_context(), but that is no
longer the case, so remove this unused parameter.

Change-Id: I65f2af2e97b09523f5cf00369b5cf95ad01194d9
CRs-Fixed: 2109252
2017-09-13 20:07:19 -07:00
Jeff Johnson
1b5404e93c qcacld-3.0: Remove wma_needshutdown() cds_ctx parameter
Currently wma_needshutdown() takes a cds_ctx parameter. At one time
this was needed for the call to cds_get_context(), but that is no
longer the case, so remove this unused parameter.

Change-Id: I31fd07480719bf3401ed52b57951e19ccb4d143c
CRs-Fixed: 2109251
2017-09-13 20:07:17 -07:00
Jeff Johnson
3a28012805 qcacld-3.0: Remove cds_context param to cds_pre_enable()
Currently cds_pre_enable() takes a cds_context param. However CDS
already maintains its own context, hence this param introduces an
unnecessary coupling, so remove it.

Change-Id: I5a33859583ea4245c79daf42addd62ecedfd11df
CRs-Fixed: 2109242
2017-09-13 20:07:15 -07:00
Rajeev Kumar
bcfddfd968 qcacld-3.0: Log driver entry point in every alternate attempt
Driver unload and SSR waits for all driver entry point to exit.
Log driver active entry point in every alternate attempt such
that debugability is improved.

Change-Id: I36558b473401b86f1fafcdc0346e4f42f264c203
CRs-Fixed: 2106140
2017-09-12 18:09:37 -07:00
Jeff Johnson
c18b26ce0c qcacld-3.0: Rename pHddCtx in cds_api.c
The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation, so rename pHddCtx to align with the Coding Style.

Change-Id: I1d5be4ab122f3e179cabbd94c24b6f10a437b153
CRs-Fixed: 2103651
2017-09-12 13:20:18 -07:00
Tushnim Bhattacharyya
ed678f97ae qcacld-3.0: Add logic to force SCC in SAP+STA concurrency
If SAP is up & STA comes up or moves to a DFS or passive or LTE
unsafe channel that causes MCC, move SAP to the other band if DBS
is supported. This logic is enabled only if gWlanMccToSccSwitchMode
is non zero.

Change-Id: I56f78dfaedec31c4c41aea6ac8c66261c9ad4c91
CRs-Fixed: 2063060
2017-09-08 14:28:06 -07:00
Srinivas Girigowda
161b9f298a qcacld-3.0: Schedule work for cds_trigger_recovery() in atomic ctx
Currently wherever cds_trigger_recovery() is called in atomic
context, work is being scheduled.
This change is to modify cds_trigger_recovery() itself detect
that it is being called in atomic context and then
itself schedule work to its own handler.

Change-Id: Id37e97c9b838ad18c355234aa13f2b9c05503029
CRs-Fixed: 2081666
2017-08-31 22:40:11 -07:00
Jeff Johnson
7819caa75b qcacld-3.0: Replace hdd_context_t in cds_api
The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The hdd_context_t typedef does not
meet any of those criteria, so replace references to it with a
reference to the underlying struct.

Change-Id: I8404fa2fc32269a92522f6ae15f8d9d1a8aebf85
CRs-Fixed: 2100140
2017-08-31 02:52:38 -07:00
Sridhar Selvaraj
8c6f5e82b0 qcacld-3.0: Changes to support FILS authentication
Add changes to add support of sending and parsing
authentication packets based on 80211ai specifications.

Change-Id: I684dbc89945ba3aef3186c872e5e1f7564d7e44c
CRs-Fixed: 2028113
2017-08-30 10:45:10 -07:00
Dustin Brown
100201ecca qcacld-3.0: Avoid recovery trigger while recovering
Currently, cds_trigger_recovery is unconditional. Instead, avoid
triggering recovery if recovery is already in progress.

Change-Id: I5c77048701930591e0e520e07275e6f8631108a0
CRs-Fixed: 2070845
2017-08-30 10:43:49 -07:00