Commit Graph

805 Commits

Author SHA1 Message Date
Arunk Khandavalli
cae132b6a9 qcacmn: Get monotonic boottime from kernel in nano sec
qcacld-2.0 to qca-wifi-host-cmn propogation

Add support to get the boot time from kernel in nano seconds.

Change-Id: Iaa512248a5e56d77cff39da562e0c9ee4eaeeefd
CRs-Fixed: 1107219
2017-01-16 01:14:59 -08:00
Sathish Kumar
59113a4840 qcacmn: Add generic logging API adhering to converged framework
As part of cleaning up direct printk calls in WIN driver, a new
generic wrapper API QDF_PRINT_INFO() is added that is based on
the converged QDF debug framework.

All printks in the WIN driver will be replaced by calls to QDF_PRINT_INFO()
which will in-turn compile converged QDF trace API. Generic shared print
control index and module ID are defined for this purpose.

Change-Id: I818fbce9e46526ccdb4824d988b76c43e43eb3a4
CRs-Fixed: 1106829
2017-01-09 02:00:03 -08:00
Himanshu Agarwal
74782880c8 qcacmn: Init/deinit of mgmt txrx converged component
Initialization/deinitialization of mgmt txrx context,
mgmt desc pool, declaration of APIs for sending and
receiving mgmt. frames.

Change-Id: Icc1f181761721387bcd1f134c937204bfd3b645f
CRs-Fixed: 1103247
2016-12-27 11:11:21 -08:00
SaidiReddy Yenuga
186c3da226 qcacmn: Add check to avoid adf_dp_trace_cb_table over read
The size of adf_dp_trace_cb_table array is 30, possible over
read of adf_dp_trace_cb_table array in adf_dp_add_record API.

Add index condition check for adf_dp_trace_cb_table to avoid
array over read.

CRs-Fixed: 1041684
Change-Id: I4f0f9dda239efd404dff3f92b68a45aaf71875ae
2016-12-22 12:08:20 +05:30
Srinivas Pitla
fa5290fe30 qcacmn: Initial version of UMAC object manager
Define object manager framework. The object manager framework implements
the management of UMAC objects(PSOC/PDEV/VDEV/PEER). All components of UMAC
have to register their APIs with object manager to be invoked on object
creation/deletion.

It also provides public APIs to retrieve objects.

CRS-Fixed: 1096009
Change-Id: If1465aed8b5e05e23ee0e1d9c9818dbf92fbe55a
2016-12-17 11:05:36 -08:00
Rajeev Kumar
e91c6cf5c9 qcacmn: Separate qdf event complete and exit APIs
QDF already has event complete API. Define a separate new
API for exit in QDF and re-use qdf_event_set for event
completion.

Change-Id: If332425ee71b0a4759e0550a33add35e61680309
CRs-Fixed: 1101614
2016-12-16 20:46:31 -08:00
Yun Park
e23f9dd9c6 qcacmn: IPA uC: Round down Tx/Rx buffer count to nearest power of two
qcacld-2.0 to qcacmn propagation

In certain situation, allocated Tx buffer count could be an arbitrary
number, so not power of two. This could violate F/W ring buffer count
requirement. If allocated Tx buffer count is not power of two, round
down it to the nearest power of two.
The same change is also applicable for INI parameters IpaUcTxBufCount
and IpaUcRxIndRingCount.

Change-Id: I7c119886a669c79adbc7bd9b2c1c1d93de41cf72
CRs-Fixed: 973723
2016-12-15 23:17:13 -08:00
Krunal Soni
616c11233a qcacmn: Delete obsolete CONFIG_MCL from qdf_mc_timer.c
Delete obsolete CONFIG_MCL from qdf_mc_timer.c as cds_mc_timer.h/.c
are going away.

Change-Id: I9aaa7301ce46b001a1ce99ea46d5d92db0cfe73c
CRs-Fixed: 1095867
2016-12-14 21:17:05 -08:00
Krunal Soni
66eabcfdcc qcacmn: Add control path scheduler to common driver
Add control path converged scheduler functionality to common
driver.

Change-Id: I2087b985b4bed661c03e667dbcc082714add1266
CRs-Fixed: 1095867
2016-12-12 22:24:34 -08:00
Himanshu Agarwal
c61fdf6ea0 qcacmn: Change time format and default configuration in DPTRACE
Fix below in DPTRACE feature:
1) Change timestamp in DPTRACE records to hr:mm:sec.usec format.
2) Change default configuration in qdf_dp_trace_clear_buffer()
   to match that of qdf_dp_trace_init().

Change-Id: Ibad674e3b94a2c7ac5cbefa5fc18efb48f6ca694
CRs-Fixed: 1098928
2016-12-12 14:43:35 -08:00
Kai Liu
62e4d70de3 qcacmn: Store tx desc id in sk_buff instead of skb head
qcacld-2.0 to qcacmn propagation

Store tx desc id in skb_buff.

Change-Id: I2186a06ad3ec929683292c4c052904a18427cc64
CRs-Fixed: 951208
2016-11-24 20:21:10 -08:00
Ankit Gupta
7ee2ab073b qcacmn: Increase timeout values for napier emu
Increase the timeout duration for protocol events
for napier emulation platform.

Change-Id: I358259801018dc7ce48bd85f35594dec44704017
CRs-Fixed: 1089638
2016-11-21 15:20:02 -08:00
Sathish Kumar
5b2cd35073 qcacmn: Add vap_hardstart function to NIC_DEV structure
vap_hardstart function was added as a structure element to NIC_DEV
as part of OL/DA modularization. These changes were added in the
NIC_DEV structure in osdep_adf_internal.h

Move declaration to NIC_DEV in qdf/linux/src/i_osdep.h introduced
as part of QDF convergence.

Change-Id: Ie9ea734818cbf4b335831155f55701549b13f435
CRs-Fixed: 1090532
2016-11-17 21:25:09 -08:00
Leo Chang
5ea93a4527 qcacmn: wifi3 compile against cdp
Wifi 3.0 compile against cdp apis.
Make compilable against mobile code base.
selective hw common header include.

Change-Id: I051f917001c0d13c762d9cb5a3ec141cd278d0e7
CRs-fixed: 1075736
2016-11-17 19:13:03 -08:00
Frank Liu
bc2d1c9a0b qcacmn: Define IBSS mode
qcacld-2.0 to qcacld-3.0 propagation

Firmware can't support all station feature and 32 ibss clients
in one bin because of the mem limitation. So host supports to
download IBSS firmware bin if con_mode=6.

CRs-Fixed: 962246
Change-Id: I6c3dca17c82fdfd2bdadcee319cc157e6aa2ead9
2016-11-17 17:57:41 -08:00
Houston Hoffman
8a3539345e qcacmn: Do not export dump_hex_trace
Since dump_hex_trace is defined as a static function,
it should not be exported. The 2 scopes conflict.

Change-Id: Ia39a4fdcffeffa452b684f77d015eabd421e89e8
CRs-Fixed: 1089727
2016-11-15 02:18:23 -08:00
Houston Hoffman
78feca302e qcacmn: Prepend DPT timeout messages with 'DPT:'
Mark the timeout messages in qdf_dp_display_record with
the 'DPT:' prefix and print them with the same error
level as other DPT messages.

Note that there are allready error level logs in HDD to
indicate that a timeout occured. The value add here is that
this timeout is noted in the contect of DPTRACE where prior
successfull packets will also have been logged.

Change-Id: I87b041895462474d37d092d48aa4c7e957ff45c5
CRs-Fixed: 1089725
2016-11-15 02:18:22 -08:00
Houston Hoffman
bba5ca6af7 qcacmn: Reduce log level of DPTRACE prints
DPT prints were flooding kmesg and causing watchdog bark
in stress testing cases.  Reduce log level to info and
only include the prints in the driver log.

Change-Id: If6ba6786cfe9ff050a21673002ef273a670c3f68
CRS-Fixed: 1089051
2016-11-15 02:18:20 -08:00
Manjunathappa Prakash
2146da30dd qcacmn: Add changes for per NAPI or per Rx CE LRO manager
Make changes for per per Rx context LRO manager, this addresses
all parallel Rx concurrency issues. There by removes all the contention.

Change-Id: I90604ffdf7b7fd930eee636426a4c7fc9b92c7d7
CRs-Fixed: 1079320
2016-11-15 00:35:31 -08:00
Sreelakshmi Konamki
e2e313532a qcacmn: Change time format of MTRACE logs
qcacld-2.0 to qcacld-3.0 propagation

MTRACE logs timestamp format is different from logcat logs,
and it's difficult to correlate with other logs.

This fix changes the timeformat of MTRACE logs
from qtimer ticks to hr:min:sec:msec

Change-Id: I45e5d28fbeccd757648f05ce4e593d8ca4fe7804
CRS-Fixed: 1049125
2016-11-08 22:54:45 -08:00
Mohit Khanna
6e1de59a3e qcacmn: Fix DP trace logging during HDD Tx timeout
Currently on a HDD Tx timeout, we are recording the event in DP Trace
framework. Currently the framework is unable to handle calls where skb
is NULL.
Add code to handle cases in qdf_dp_trace where the skb could be NULL.

Change-Id: I4d04cd59f11f19c4ba81219925c7f3011c97de29
CRs-Fixed: 1083941
2016-11-04 11:13:32 -07:00
Service qcabuildsw
2a3162d0e5 Merge "qcacmn: add tx descriptor handle" into wlan-cmn.driver.lnx.2.0-dev 2016-11-01 14:54:49 -07:00
Leo Chang
c2a7b763d1 qcacmn: add tx descriptor handle
Add memory optimized tx descriptor alloc, free and handle code

Change-Id: Iabd499b7690bbf8bc09223ea7e72e8f81818482a
CRs-fixed: 1076601
2016-10-31 09:54:11 -07:00
Himanshu Agarwal
3f54962309 qcacmn: Enable logging of all DPTRACE logs for protocol packets
Enable logging of DPTRACE logs at each layer of driver and at tx
completion for all tx as well as rx protocol packets.

Change-Id: Id568c19196702034989a0f55490bc62667b3b20e
CRs-Fixed: 1083002
2016-10-28 04:09:12 -07:00
Himanshu Agarwal
c0b7145916 qcacmn: Add infrastructure to log roam events in DPTRACE
Add infrastructure to log all roam related commands and
events in DPTRACE.

Change-Id: I66773fc23dfeacf3a63688819e099bf44676d95b
CRs-Fixed: 1081851
2016-10-26 10:49:22 -07:00
Jeff Johnson
4729b6f857 qcacmn: Fix -Wmissing-prototypes in QDF
We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in qdf.

Change-Id: Ib499e7d0a5bfb6d2e5a7eaa7fbe769bb2b49772a
CRs-Fixed: 1076314
2016-10-25 17:08:40 -07:00
Himanshu Agarwal
0bf10fa3b2 qcacmn: Print proto type for ICMP/ICMPv6 packets
Propagation from qcacld-2.0 to qcacmn.

Print proto type for ICMP and ICMPv6 packets which
cause wow wakeup in HOST driver.

Change-Id: I6d8cf8ad65652205bfad1a3531daf48a42a79350
CRs-Fixed: 1080772
2016-10-25 13:10:09 +05:30
Srinivas Girigowda
8a0b665897 qcacmn: Replace DEBUG macro with WLAN_DEBUG
This is a qcacld-2.0 to qcacld-3.0 propagation.

pr_debug() should not appear by default in kernel log (kmsg).
DEBUG is a kernel macro, since host driver is using the same name macro,
pr_debug log statements are appearing in kmsg.

Fix this by moving the code under DEBUG to WLAN_DEBUG and
remove DEBUG macro from Kbuild.

Change-Id: I5bb385f91f9b6ba15629a5878625fefc21d4a7e1
CRs-Fixed: 1003261
2016-10-20 01:39:05 -07:00
Houston Hoffman
da6120072f qcacmn: Reduce log level in qdf_nbuf_track_memory_manager_destroy
These logs were being printed in the kmesg durring every unload.
Questions about these logs wasted time and indicated the logs were
too prominent and confusing.

Only log nbuf tracking free list stats to the kernel log when
unexpected conditions occured.  Also distinguish between pre-filled
tracking nodes and nodes that were used to track nbufs.

Change-Id: I835ef2a04500dbab3229e6765fe7a168c05837fa
CRs-Fixed: 1072098
2016-10-07 18:12:14 -07:00
Houston Hoffman
125423fde1 qcacmn: Add cb funtion to qdf_dp_trace_cb_table for QDF_DP_TRACE_MAX
Function tables based on enums should have entries for all available enum
values.

Change-Id: I452006d177c7651c43938de47fdff5fe78d2e582
CRs-Fixed: 1072077
2016-10-07 18:12:11 -07:00
Padma, Santhosh Kumar
75394d6c8f qcacmn: Dump driver information
qcacld-2.0 to qcacmn propagation

Dump state information of HDD, SME, PE and WMA layers
into a buffer. Contents of this buffer will be copied
into user space using proc entry /proc/debugdriver/
driverdump.

Change-Id: Ifbb102e440d7df20defa1a397964cb9b55082bf9
CRs-Fixed: 955357
2016-10-07 12:54:59 -07:00
Sathish Kumar
eb7d24e1f6 qcacmn: Add new ftype enums to distinguish rx stats information
Introduce new enum in ftype to identify rx stats data pointed by fctx.
It is added so that only a pointer to the feature specific data can be stored
in fctx. ftype will be used to identify what feature in currently being
pointed to by fctx .

Change-Id: Ic4d8e23c27873875a9cac25e9a5c26096b1705f3
CRs-Fixed: 1055391
2016-10-04 20:21:16 -07:00
Sathish Kumar
0cfad497cb qcacmn: Fix memory leak caused by fctxt overwriting ipa field in skb->cb
Memory leak is observed while running multicast to unicast conversion tests.
The reason was fctxt overwriting ipa field in skb->cb.
In struct qdf_nbuf_cb, offset of skb->cb->u.tx.dev.win.fctx happened to be
same as offset of skb->cb->u.tx.dev.mcl.ipa causing fctxt to sit on top of
ipa field and hence dev_kfree_skb () is not invoked.

Issue fix defines a different function that is invoked when ipa is not in use.

Change-Id: I47cb2a992730a2200b4315e492daa164d1bdfbda
CRs-Fixed: 1068852
Acked-by: Om Prakash Tripathi <otripath@codeaurora.org>
2016-10-04 16:49:52 -07:00
Sathish Kumar
79c2bf597e qcacmn: Fix compilation errors in QDF for Big Endian platform
Fix compilation issues faced on the WIN big endian
platform due to QDF convergence related changes.

Change-Id: I33b2a4bbe063acb4585b86e12fa79f96dc12ac73
CRs-Fixed: 1039318
2016-10-04 16:49:48 -07:00
Padma, Santhosh Kumar
496dbad32b qcacmn: Add diag events for debugging
qcacld-2.0 to qcacmn 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: 1072675
2016-09-30 06:42:32 -07:00
Ankit Gupta
38e9275e5a qcacmn: Correct the comment for qdf_mem_cmp
Comment in the api specifies that qdf_mem_cmp api
return bool value which is not correct.

Replace bool to int to reflect the correct return
type of a qdf_mem_cmp api.

Change-Id: Iff83fbf588a072dcda8b0aaef3c6743e572b1ac5
CRs-Fixed: 1066946
2016-09-29 15:10:31 -07:00
Mohit Khanna
2235081d87 qcacmn: Maintain length for each TSO segment
In current codeflow, we are maintaining the length of the TSO segments
belonging to one jumbo packet inside tso_info, which is common for
all the segments of one jumbo packet. This works if the length of
the segments (frag[1]) is the same. In case it is not, it ends up
assigning incorrect length to all the segments. This is resulting
GMS login failure.
Fix issue by maintaining the total length of the segment in the
qdf_tso_seg_t structure.
Re-factor code for easy readability
Add TSO_DEBUG prints which can be enabled (compile time) to debug
TSO issues

Change-Id: Ifb5a0f1493224c66c3acc394e47a74b2dd84bbc9
CRs-Fixed: 1062556
2016-09-12 18:02:29 -07:00
Houston Hoffman
fd52ffbe33 qcacmn: Track size of qdf_mem_list
Decrement qdf_mem_list.count when removing elements to avoid
assert when destroying the list.

Change-Id: I0d0989f3a9009184b898b8b27517e6d12fa3dc97
CRs-Fixed: 1063093
2016-09-12 18:02:28 -07:00
Anurag Chouhan
61d118eb9b qcacmn: Remove ani_global.h from qca-cmn
Currently ani_global.h is included in qca-cmn,
This change removes ani_global.h and there are
corresponding changes in Driver

Change-Id: I4c1cf70e8eb1f4391a25783a560c02a43c483054
CRs-Fixed: 1012452
2016-09-08 18:22:28 -07:00
Himanshu Agarwal
ccd38dc2b4 qcacmn: Add APIs to get lower 32 and upper 32 bits
Add APIs to get lower 32 and upper 32 bits from an
address.

Change-Id: I283792333075c11219a491d305b2822849c025f3
CRs-Fixed: 1062916
2016-09-06 12:15:51 +05:30
Sathish Kumar
5947138237 qcacmn: Implement QDF API to get queue mapping and total ram size
This change adds the following QDF APIs -

qdf_nbuf_get_queue_mapping: To get the queue mapping set by linux kernel

qdf_get_totalramsize: To get total ram size in Kb

Change-Id: I86daffebba759c086d15951dfcc72ea626c74bb4
CRs-Fixed: 1055387
2016-09-01 13:27:55 -07:00
Rajeev Kumar Sirasanagandla
92cf0523d8 qcacmn: Modify __qdf_assert to invoke QDF_BUG
Currently, __qdf_assert is doing kernel panic, deviating the purpose of
assert - "Asserts are NOT used for stopping a program in case of an
error".

To address this, modify __qdf_assert to invoke QDF_BUG which in turn
warns or crashes based on the macro PANIC_ON_BUG.

Change-Id: Ie62484f8f369d8aafa3b1970feafe556b2c94ffa
CRs-Fixed: 1015603
2016-08-26 12:19:14 -07:00
Himanshu Agarwal
feeffba91b qcacmn: Add API to update mark parameter in sk_buff structure
Propagation from qcacld-2.0 to qcacmn.

Add API to update skb->mark whenever first packet after WOW wakeup
is received through HTT layer.

Change-Id: I877dd7af9a58ebc02d73461cc2a29e86a3945dec
CRs-Fixed: 989984
2016-08-24 11:33:27 -07:00
Himanshu Agarwal
81ce26de0d qcacmn: Add API to find IPV6 mcast packet
Propagation from qcacld-2.0 to qcacmn.

Add API to find IPV6 mcast packet to use it in wma_wow_wake_up_stats
func. This is required to know if there is a IPV6 mcast packet embedded
in a link layer unicast packet.

Change-Id: Ic2af69032262237b8751019817ae181913346818
CRs-Fixed: 1049254
2016-08-19 18:34:06 -07:00
Himanshu Agarwal
bf1a7c223b qcacmn: Add API to find IPV4 mcast packet
Propagation from qcacld-2.0 to qcacmn.

Add API to find IPV4 mcast packet to use it in wma_wow_wake_up_stats
func. This is required to know if there is a IPV4 mcast packet embedded
in a link layer unicast packet.

Change-Id: Iceaf1226edbf909ca3881e049c33f7d121860ef2
CRs-fixed: 1049254
2016-08-19 18:34:05 -07:00
Himanshu Agarwal
ab4d9e94be qcacmn: Dump more WoW wakeup packet info
Propagation from qcacld-2.0 to qcacmn.

Dump some more info for WOW wakeup packet:
   1) ether_type
   2) proto_type in case of IPV4 and IPV6 packets
   3) src port and dst port in case of TCP/UDP

Change-Id: I1578aa5322af50f0ae43248c48a2f754ea081970
CRs-Fixed: 1043939
2016-08-17 18:04:02 -07:00
Himanshu Agarwal
fcd64e9e64 qcacmn: Add APIs to get packet type and subtype
Propagation from qcacld-2.0 to qcacmn.

Add APIs to get DHCP, EAPOL, ARP, ICMP, ICMPV6, TCP
and UDP packets type and subtype from the netbuf.

Change-Id: I8837ad1b976744eeb0e7f0a836eded3a5d34124b
CRs-Fixed: 1019037
2016-08-17 18:03:48 -07:00
Nirav Shah
9c3b3fe251 qcacmn: Parse tx packets only once in tx datapath
Classify tx packets at one place and store packet type in
skb cb structure to avoid multiple check to determine
packet type at various layers.

Change-Id: If39fb1c9741bb213c7f22e0dfe7f662a256e637c
CRs-Fixed: 1022454
2016-08-17 18:03:31 -07:00
Mohit Khanna
d8a881864c qcacmn: Add USB bus support (QDF)
Add module specific changes for USB bus support.

Change-Id: Idb9fe1232d451e4f88a001fbd6591ba13b0c859a
CRs-Fixed: 1023663
2016-08-17 12:05:38 -07:00
Houston Hoffman
cb9bc6333d qcacmn: Configure the wakeup sources for the snoc bus
Need to register the device as a wakeup source and configure
the corect interrupt as a wakeup source for the snoc bus.

Change-Id: I2afcd69a8308183e141d7560a225a3b48d0e9f55
CRs-Fixed: 1051968
2016-08-13 14:49:04 -07:00