Commit Graph

96 Commits

Author SHA1 Message Date
Yingying Tang
86492dee0d qcacld-3.0: Correct NULL pointer check in epping_cookie_init()
Propagate from qcacld-2.0 to qcacld-3.0

Currently in epping_cookie_init() when the cookie array is allocated
the wrong pointer is checked for a NULL allocation. Update the
function to check the correct pointer.

Change-Id: I56384197a8729996d7aa87d3c51903525b3be93c
CRs-Fixed: 979671
2016-10-18 09:03:10 -07:00
Poddar, Siddarth
538581282b qcacld-3.0: Remove the processing for depreciated pktlog msg
Remove the processing of following msg types PKTLOG_TYPE_TX_MSDU_ID,
PKTLOG_TYPE_TX_FRM_HDR and PKTLOG_TYPE_TX_VIR_ADDR for ihelium as
support for these events is removed from FW.

Change-Id: Ic526507d8adf87e580bd5c23ad2e68e2154c38a8
CRs-Fixed: 1074043
2016-10-10 02:37:42 -07:00
Poddar, Siddarth
eefe348b69 qcacld-3.0: Store pktlog events when pktlog is enabled by default in INI
Host should not honor any vendor pktlog disable command
if NO vendor pktlog enable command is sent previously.

Currently, vendor sends pktlog disable command without sending enable
command during init and because pktlog is enabled in ini by default,
Host sends the pktlog disable command to firmware which is not as expected.

To fix this, host uses reserved flag in wifi_start_log to distinguish
vendor command from iwpriv or pktlog conf tool command and vendor disable
pktlog command will be sent to firmware only when vendor pktlog enable
commands is sent previously.

Moreover, pktlog INI enable by default and Pktlog buffer size are now
controlled using a macro FEATURE_PKTLOG depending on build variant.
For production/user build, pktlog is default disable and buffer size is
1 MB, whereas for dev build, pktlog is default enable and buffer size is
10 MB.

Change-Id: If64cd522e91cbe9a6d94d8626eb758282fcfd1bd
CRs-Fixed: 1072584
2016-10-03 17:39:04 -07:00
Poddar, Siddarth
49fb4d74b6 Revert "qcacld-3.0: Store events in pktlog buffer when Pktlog is enabled by default in INI"
This reverts commit Id0b7dd6b4573147eef9b80b57bc78284e52807ec.

This change is not required anymore as now vendor related pktlog
enable/disable command will be handled via flag in wifi start log
structure.

Change-Id: I82f32d3d8021361e92d67a53624a1d5d027fd9b8
CRs-Fixed: 1072584
2016-10-03 16:48:00 -07:00
Komal Seelam
78ff65a8c6 qcacld-3.0: Add NL event to indicate SSR shutdown is triggered
propagation from qcacld-2.0 to qcacld-3.0.

On Dual-WiFi Platforms, Radio Device 1 (R1 - SDIO interface) should
be functional only if Radio Device 0 (R0 - PCIe interface) is active.
If SSR is indentified on R0, indicate userspace application to unload
R1 on this event and Reload R1 once R0 SSR and reload is complete.

CRs-Fixed: 1046397
Change-Id: I8a06b569fe536bb93dbb37bdb289295bfce62f6e
2016-09-26 04:49:39 -07:00
Rajeev Kumar Sirasanagandla
60d6ca7a54 qcacld-3.0: Mask the log message which is affecting tput KPI
qcacld-2.0 to qcacld-3.0 propagation

"log buffers are dropped" are consistently printed which
is affecting the tput KPI's.  Masking the same with debug level
which is not enabled by default.

Change-Id: I6e9abc7d65f276d71810aedad9062152035699c0
CRs-Fixed: 956599
2016-09-21 17:04:40 -07:00
Nitesh Shah
d732f74d74 qcacld-3.0: Diag event for WOW reason code
Propagation from qcacld-2.0 to qcacld-3.0

Add diag event for WOW reason code.
The event EVENT_WLAN_POWERSAVE_WOW will be used to
inform the WOW reason code.

Change-Id: I9273c9e737b97207ce0acee131ab6f3c19cd3e0d
CRs-Fixed: 1037383
2016-09-21 17:00:51 -07:00
Padma, Santhosh Kumar
eb0191f574 qcacld-3.0: Add proper lengths to payload
qcacld-2.0 to qcacld-3.0 propagation

Currently, sizeof(tAniHdr) is not added to payload length in
messages in wlan_send_sock_msg_to_app, ptt_sock_send_msg_to_app.
These missing lengths can cause user space
to drop these messages. Fix this by adding appropriate lengths.

Change-Id: I2609029445110e661440a7fc55f36801e4f72afc
CRs-Fixed: 985614
2016-09-16 21:06:36 +05:30
Mahesh Kumar Kalikot Veetil
0641e37974 qcacld-3.0: Fix a compilation error ing nl_srv_init()
Fix compilation errors when turning on CONFIG_CNSS_LOGGER

Change-Id: I65cf319d6e0a608d51708bb1acaa320207ec17f0
CRs-Fixed: 1067048
2016-09-15 21:04:43 -07:00
Rajeev Kumar
0fad1762fe qcacld-3.0: Do not log current->comm from hw/sw irq context
Interrupt handlers do not have valid process context and hence
current pointer is not valid for software/hardware interrupt
handlers. In WLAN log to user space API current process name is
logged using current->comm but hardware/software interrupts do not
have corresponding current pointer because they use current pointer
of interrupted process. Make changes to not to log process name when
log message is generated from hardware/software interrupt handlers.

Change-Id: I42420c501f9e7161112c5210909f83755ba4813e
CRs-Fixed: 1065898
2016-09-14 15:53:03 -07:00
Kondabattini, Ganesh
96ac37b226 qcacld-3.0: maintain the backward compatibility for svc events
qcacld-2.0 to qcacld-3.0 propagation

Add radio index at the end of wlan svc msg in TLV format inorder
to maintain the backward compatibility with user space application
like wlan_services and cnss_daemon.

Change-Id: If578d66eada17784eef7daafa7351df95fc74f5a
CRs-Fixed: 1019664
(cherry picked from commit 6a1d4b9d33b10ed50990efc825e530e020661153)
(cherry picked from commit 53627e3d41d55a9d71889443daa2ab769227c170)
2016-09-11 17:12:23 -07:00
Poddar, Siddarth
2a8bb56299 qcacld-3.0: Store events in pktlog buffer when Pktlog is enabled by default in INI
When pktlog is enabled in INI (i.e. no iwpriv commands are issued),
store the events forwarded from firmware into the pktlog buffer.
Host will not honor any pktlog disable command if pktlog enable command
was not sent previously with WMI_PKTLOG_ENABLE_FORCE.

Change-Id: Id0b7dd6b4573147eef9b80b57bc78284e52807ec
CRs-Fixed: 1062295
(cherry picked from commit 07e5fbfcf0ec1ca7e92721a523e401e70887f487)
2016-09-10 19:08:41 -07:00
Himanshu Agarwal
f03f81036d qcacld-3.0: Fix NULL pointer dereferencing issues
Fix below issues:
1) check cds_get_context results before use
2) remove function calls from ASSERTs
3) make sure variables are initialized before use
4) check pointers for NULL before dereferencing

Change-Id: Iac92e6f2d1030a7dd12469e34341135bea7c781f
CRs-Fixed: 1047286
(cherry picked from commit a2547fd35fc517abfbc96363768b5d036d59d057)
2016-09-10 19:08:39 -07:00
Mahesh A Saptasagar
5eb6c0f45a qcacld-3.0: Dont send logs to userspace until logging service is initialized
qcacld-2.0 to qcacld-3.0 propagation

Observed kernel panic due to the race between initialization of
logging wait_queue in supplicant thread context and the same
uninitialized wait_queue is referenced in MCThread context.
To mitigate this issue, don't send logs to upper layers if logging
service is not initialized.

Change-Id: I96e3efb3947279be64b83a27a7e2458d04021c4e
CRs-Fixed: 963275
(cherry picked from commit fe200c52491b12087752a46bc602288adaf26557)
2016-09-10 19:08:02 -07:00
Padma, Santhosh Kumar
e7835652d6 qcacld-3.0: Add diag events for debugging
qcacld-2.0 to qcacld-3.0 propagation

Currently there are no diag events to debug auth, assoc timeouts
and memory failure. Add such diag events which can be useful during
failures.

Change-Id: Iec4c2a9946fbef388959fdc796273944d3be8003
CRs-Fixed: 954888
(cherry picked from commit 96f330d11abe16a35c13a87346e8e60cbd0c7141)
2016-09-10 19:06:23 -07:00
Anurag Chouhan
05d124f8cb qcacld-3.0: Logging level changes on wlan HOST
qcacld-2.0 to qcacld-3.0 propagation.

As there are a lot of prints dropped on the console in
short duration, it leads to interrupt disablement on
the cpu.

So reducing the logging level of log statement from
ERROR to INFO

Change-Id: I3eefac49378a7bfbcc235b1dd3362e1213fa1f42
CRs-Fixed: 886644
(cherry picked from commit 06c7d1b4aa89fb5c25241cec0558d559ee93b683)
2016-09-10 19:06:06 -07:00
Anurag Chouhan
1a77236aa5 qcacld-3.0: Reduce unwanted netlink log messages
qcacld-2.0 to qcacld-3.0 propagation

Reduce unwanted netlink log messages and modify the error value
print format from hex to decimal.

Change-Id: Ia94efe17b80d5f3c4a7006b914f4f0586360fded
CRs-Fixed: 804176
(cherry picked from commit f986a945d7124c5bcc962dc0b7f0642828b7687f)
2016-09-10 19:06:04 -07:00
Poddar, Siddarth
1dbc316690 qcacld-3.0: Add type_specific_data for PKTLOG_TYPE_SW_EVENT in the pktlog header
Add type_specific_data for PKTLOG_TYPE_SW_EVENT in the pktlog header
to parse it so that pktlog script can do further processing based on the
value passed in that field.

Change-Id: Ia68d9e3ea02942c050c133f4547a353634d65e1c
CRs-Fixed: 1062295
(cherry picked from commit 1ab48b89e671ee62b384c2cbd7fede68cf963da6)
2016-09-10 19:05:21 -07:00
Dustin Brown
6a609d60e4 qcacld-3.0: Prevent apps power collapse if negotiating DHCP
Currently, the apps processor can power collapse in the middle of
DHCP negatiation. A wake lock was added to prevent sleeping until
negotiation is complete.

Change-Id: I9f133667ddb8fe27f43e6d7491006b881ad56d44
CRs-Fixed: 1061879
2016-09-02 18:27:04 -07:00
Abhishek Singh
e740517a7b qcacld-3.0: Do not call pr_info while using spin_lock_irqsave
qcacld-2.0 to qcacld-3.0 propagation

wlan_queue_logmsg_for_app is called while holding spin lock with
interrupts disabled. It may call pr_info to log if node is dropped
while sending to user space.

This may cause interrupts disabled for some time.
As part of fix remove all pr_info from wlan_queue_logmsg_for_app.

Change-Id: Iffa5d463ae4e807bb30ff6eec5f3949735663fd5
CRs-Fixed: 1005714
2016-08-27 15:31:25 -07:00
Srinivas Girigowda
c34f11dfd8 qcacld-3.0: Add support to enable/disable packetlog using iwpriv
Add support to enable/disable packetlog using
iwpriv wlan0 pktlog command.

Change-Id: Ia17f659e16221985be5cd9e75ebf0c46f2dc5693
CRs-Fixed: 970647
2016-08-20 10:36:55 -07:00
Nirav Shah
dcc4c875c4 qcacld-3.0: Changes to support WDI_EVENT_SW_EVENT for packetlog
Changes in host to support WDI_EVENT_SW_EVENT for packetlog.

Change-Id: I8936a408a7da21ad293b6da7af146298c049052d
CRs-fixed: 1047382
2016-08-20 10:36:52 -07:00
Nirav Shah
c657ef50ea qcacld-3.0: Changes to update mac_id in packetlog
Changes to update mac_id in packetlog header
for DBS.

Change-Id: I602d399e1ef34077b5d7bfc867fb60678ed8612c
CRs-fixed: 1047382
2016-08-18 00:41:01 -07:00
Nirav Shah
bd36b0690b qcacld-3.0: Changes to support different rx data path
Changes to configure different rx data path rx_thread,
RPS or NAPI through ini parameters. Also added support
for RPS mask setting using cnss-daemon.

CRs-fixed: 1026370
Change-Id: I23ab8fe0f05245b38cf4b37e93da8fd99d4c1f68
2016-08-17 17:06:26 -07:00
Krunal Soni
bf5840bd7d qcacld-3.0: Fix to resolve checkpatch errors
In current code base, some of files are not meeting linux coding
standard.

Fix them to satisfy coding standard.

Change-Id: Iedb1ec9ad7c75cb9f7ef97b19f14dca3b5eb9b6c
CRs-Fixed: 1051212
2016-08-13 14:07:28 -07:00
Himanshu Agarwal
5e302a7e6e qcacld-3.0: Avoid NULL pointer dereference when ASSERT disabled
Propagation from qcacld-2.0 to qcacld-3.0.

Avoid NULL pointer dereference when ASSERT is disabled by adding
extra handling in epping_tx_complete_multiple.

Change-Id: I06696bb2588620244fafde431c4cd56bcb8a4301
CRs-fixed: 1038668
2016-07-29 18:15:18 -07:00
Govind Singh
5b48620c03 qcacld-3.0: Add host changes for latest fw common changes
FW common files needs to be in sync with host and fw.
Add changes to compile successfully with latest version
of FW interface file.

Change-Id: I487a18185c406da5c2fb07e2a95cafe4793578aa
CRs-Fixed: 1012542
2016-07-08 06:12:10 -07:00
Himanshu Agarwal
879a3bec5c qcacld-3.0: Add NULL checks before dereferencing
Add NULL checks before dereferencing in:
1) BMI layer
2) HTT layer
3) EPPING layer.

Change-Id: I9998d4aeb983dc101121a71d791d7ec626e3f5d4
CRs-Fixed: 1036390
2016-07-06 13:30:39 -07:00
Houston Hoffman
e248264ce4 qcacld-3.0: Add context checking in epping_disable
epping_disable needed to check that contexts were
not null before trying to perform the disable opperations.

Change-Id: Ia8182b1deed1a6a1d2643f91660880fb52450e3d
CRs-Fixed: 1027691
2016-06-23 12:28:26 -07:00
Mohit Khanna
43f433d719 qcacld-3.0: Add USB bus support (CDS, Utils, SAP)
Add Module specific changes for USB bus support for qcacld3.0.

Change-Id: Idb9fe1232d451e4f88a001fbd6591ba13b0c859a
CRs-Fixed: 1023663
2016-06-23 12:28:04 -07:00
Abhishek Singh
7a995582d6 qcacld-3.0: Change struct of EVENT_WLAN_SECURITY diag event
qcacld-2.0 to qcacld-3.0 propagation

Currently for diag event EVENT_WLAN_STATUS, diag
structure only allocates 6 bytes for ssid, though
ssid can be upto 32 bytes.

Also for diag event EVENT_WLAN_SECURITY, event id is
filled as PTK and GTK req/rsp for unicast and broadcast
req/rsp. PTK,GTK request doesn't make sense for wep case.

As a part of change, increase ssid size to 32 and replace PTK,
GTK req/rsp event id with Unicast, Broadcast req/rsp respectively.

Change-Id: I5aad1875262dd73878cc8393d09de1b23953d3a2
CRs-Fixed: 921847
2016-06-23 12:26:41 -07:00
Yuanyuan Liu
9736118d7e qcacld-3.0: Add NULL check for qdf_ctx
Add NULL check for pointer qdf_ctx as it returned from call to
function 'cds_get_context' may be NULL and could be dereferenced.

Change-Id: Iea44cd1a2d20ee04d1720c4e8af1065320a589fd
CRs-Fixed: 1024778
2016-06-09 22:14:39 -07:00
Ryan Hsu
50da826021 qcacld-3.0: Add check to avoid NULL pointer access
nlmsg_put might return NULL if the tailroom is insufficient
to store the nl message. Add the check to avoid the NULL
pointer access.

Change-Id: I01f88262e7cf84cd611c8f72a11577e61e7af1a3
CRs-fixed: 1024810
2016-06-09 22:13:26 -07:00
Nirav Shah
7f337dbb7a qcacld-3.0: Use different copy engine for packetlog
Create new endpoint and use CE11 for packetlog
messages from target to host.

CRs-Fixed: 995628
Change-Id: I0df597468b0b7399dc545b5a4d4fd1a4c04a1df0
2016-06-06 18:45:14 -07:00
Ryan Hsu
ceddceb391 qcacld-3.0: Add support for cnss logger module
qcacld-2.0 to qcacld-3.0 propagation

CONFIG_CNSS_LOGGER is introduced to move the logging feature from
CLD driver to kernel module.

This change will mainly benefit for two things for CLD driver.

    - To support for dual wifi driver instances and also
      future plan of moving out the logging thread and buffer
      management to the kernel module.

    - While debugging the critical feature that triggers the
      autoshutdown and SSR, the log buffer in the CLD driver will
      be lost after the driver restart or unload.

The CLD driver will register itself to the cnss logging module and
get the radio index as the indentification for rest of the operation.

Also the message sent from CLD driver to usespace need to be packed with
struct tAniNlHdr; and the hddctx.radio_index need to be filled along with
the message, so that usespace can differentiate the message.

Change-Id: I7ea6cdefac0916b9d4dd76da175607bf7169a8fa
CRs-fixed: 995073
2016-06-01 10:49:09 -07:00
Mahesh A Saptasagar
da5a6823b1 qcacld-3.0: Broadcast logs irrespective of cnss_diag is running or not
qcacld-2.0 to qcacld-3.0 propagation

Current cnss_diag implementation, do not send NL message in order to
register with host driver, as host driver broadcasts both firmware and
host messages to all the userspace apps whoever is listening on NL
socket.

Hence broadcast logs irrespective of cnss_diag is running or not. Also
do not indicate host driver load/unload status to cnss_diag app.

Change-Id: Ib36324f5bb8dc50521e4646b6184cfe586c10104
CRs-Fixed: 993754
2016-06-01 10:48:59 -07:00
Yuanyuan Liu
0e0aa93d32 qcacld-3.0: Use PLD APIs
Replace CNSS/ICNSS APIs with PLD APIs.

Change-Id: Ic0be1ff00dd7b4fc0b125e625f5d3977f4580c5e
CRs-Fixed: 1014363
2016-05-23 11:45:57 -07:00
Manikandan Mohan
5b1980ac9d qcacld-3.0: Send Auto shutdown cancel event
qcacld-2.0 to qcacld-3.0 propagation

Auto Shutdown cancel indication is needed to identify if a
driver is active in multi wlan radio platforms. Userspace
application processing auto shutdown event combines these events
from multiple drivers to arrive at system idle condition for
auto shutdown.

Change-Id: Icc51386bde58d3882e36ab09cd31a527b140a937
CRs-fixed: 1001128
2016-05-18 16:31:32 -07:00
Rajeev Kumar
e871734de8 qcacld-3.0: De-serialize FW diag log events from MC thread
FW DIAG log events are serialized to MC thread(WMA message queue)
which is causing PE/SME message queues starvation when FW is
generating flood of debug log events. Since WMA message queue has
higher priority than PE/SME message queue serialized FW debug log
events eventually lead to SME command queue time out because PE
message queue is starved. Fix this PE/SME message queue starvation
by moving FW diag log event processing to kworker thread.

Change-Id: Ifd8688c61bfdd132a4727d377cfc2e975e5c5b13
CRs-Fixed: 1011762
2016-05-13 16:20:43 -07:00
Agrawal Ashish
bb09f5eca1 qcacld-3.0: Remove redundant logs
qcacld-2.0 to qcacld-3.0 propagation

Some logs while Processing netlink messages are excessive.
Remove these redundant logs.

Change-Id: Ic5104e6fb2d306b488adf2a3919e004e5b57e186
CRs-Fixed: 879049
2016-05-09 11:28:51 -07:00
Houston Hoffman
a769ed3ba1 qcacld-3.0: Add wow_nack to TargetSendSuspendComplete api
TargetSendSuspendComplete should take the HTCInitInfo
context as an argument.  The wow_nack should be its
own argument.

Change-Id: Ib13385cf0a04730d066ffcd53c1f669c7a5ced60
CRs-Fixed: 1003793
2016-05-04 21:18:56 -07:00
Houston Hoffman
371d4a9340 qcacld-3.0: Use qdf macro for epping mode
Use QDF macro to check if we are in epping mode.
Remove bit masks of epping configuration.

Change-Id: I454ef259dfcc4b7c7860a5adfda605837f4a89cc
CRs-Fixed: 1003792
2016-05-04 21:18:51 -07:00
Abhishek Singh
5ea86536ef qcacld-3.0: Add scenario based BUG report
qcacld-2.0 to qcacld-3.0 propagation

Change to initiate BUG report in case of fatal event
Add INI support to Enable/Disable it.

The fatal event handled are as below:
 - Roaming failed after successful preauth.
 - SME command timeout.
 - PE defer queue is full.
 - CDS run out of message wrapper.
 - HDD level wait for event timeout.

CRs-Fixed: 912560
Change-Id: I64dff8b7d0836340ce3bec5f5985d1919b600c23
2016-05-04 21:18:44 -07:00
Abhishek Singh
437606ac2d qcacld-3.0: Add diag event for TDLS management frame tx and rx
qcacld-2.0 to qcacld-3.0 propagation

Add diag event for EVENT_WLAN_TDLS_TX_RX_MGMT. This event contains
TDLS action frame type, subtype and if its rx or tx.

Change-Id: I6ec744518b7a391e4511c503cb858d532ef11322
CRs-Fixed: 934447
2016-05-04 21:18:26 -07:00
Abhishek Singh
af1d0c92ec qcacld-3.0: Add diag event for scan blocked by TDLS.
qcacld-2.0 to qcacld-3.0 propagation

Add diag event for EVENT_TDLS_SCAN_BLOCK. This event indicates if
scan is blocked because of TDLS.

Change-Id: I00dd9d2a54cbe054b400b2d1cb74c0e14b9a13d7
CRs-Fixed: 934456
2016-05-04 21:18:19 -07:00
Abhishek Singh
4aad0f7daa qcacld-3.0: Add diag event for offload requests
qcacld-2.0 to qcacld-3.0 propagation

Add diag event for EVENT_OFFLOAD_REQ. This events contains info
if host has enabled or disabled the offload.

Change-Id: I19fe216ac0900dedbcb7b247cf0d171979308dc5
CRs-Fixed: 934455
2016-05-04 21:18:15 -07:00
Abhishek Singh
baea27d52a qcacld-3.0: Add diag event for suspend and resume
qcacld-2.0 to qcacld-3.0 propagation

Add diag event for EVENT_WLAN_SUSPEND_RESUME.
This contains info if driver has entered early suspend, suspend,
early resume or resume state.

Change-Id: Ic9bb815667ea9203d44a3c3cfcecbdbae573e717
CRs-Fixed: 934452
2016-05-04 21:18:12 -07:00
Abhishek Singh
74bcb0ab41 qcacld-3.0: Add diag event for TDLS enable link
qcacld-2.0 to qcacld-3.0 propagation.

Add diag event for EVENT_WLAN_TDLS_ENABLE_LINK.
This event contains below info:
- peer mac address
- Does peer supports off channel
- Is off channel configured
- Is off channel established

Change-Id: Ib491d8ac1d8a7850a050bf14a60b6eb08ab94078
CRs-Fixed: 934449
2016-05-04 21:18:08 -07:00
Abhishek Singh
4ef5fe00a4 qcacld-3.0: Add diag event for TDLS teardown
qcacld-2.0 to qcacld-3.0 propagation

Add diag event for TDLS teardown. Event contains reason for
teardown and peer mac address.

Change-Id: Ib04deac6cf7d61fae1a7bb0d0fb8f4dc652b3217
CRs-Fixed: 934448
2016-05-04 21:18:03 -07:00
Peng Xu
07e6e08f3a qcacld-3.0: Correct EPPING mode macros
Correct EPPING mode related macro definitions.

Change-Id: If8ca48145e4e1043e3e5bd8d7df967d6140f610e
CRs-fixed: 995819
2016-04-27 17:00:27 -07:00