커밋 그래프

72 커밋

작성자 SHA1 메시지 날짜
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
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
Houston Hoffman
bee3aab26f qcacmn: Remove list traversal from qdf_mem_free in successfull case
Make O(1) checks for corruption and list state to rule out
suspicion of double free and memory corruption.  Only traverse
the memory tracking list to differentiate between memory corruption
and freeing an untracked pointer.

Since we check for corruption before traversing the list, the qdf_mem_free
api may crash with a use after free signature before printing out the
double free error message.

Change-Id: I0862822a65634dc68d8146f44f0474b672b6fc0a
CRs-Fixed: 1049430
2016-08-13 14:49:04 -07:00
Arun Khandavalli
75ea891eca qcacmn: Add bus_id memeber to qdf_device
With Load once unload never architecture, the cds modules
will be opened/closed several times. As part of configuration
of modules bus id needs to passed. So, add a new member to save
the bus_id passed by the platform driver during the driver
intialization,

Change-Id: Ic580e03076e5e8c557dde1879e223606a14f79b8
CRs-Fixed: 1049224
2016-08-04 10:34:22 +05:30
Hardik Kantilal Patel
343739296c qcacmn: Address 32 bit specific compilation issues
Fixing 32 bit compliation issues due to improper type
casting and shift operation.

CRs-Fixed: 1043823
Change-Id: I2c05a0c0940c5d65c40aefdc80dc2888fbe87be1
2016-07-25 00:41:12 -07:00
Yuanyuan Liu
26476b51eb qcacmn: Add workqueue APIs in QDF
Add qdf workqueue APIs for schedule_delayed_work, cancel_work_sync,
cancel_delayed_work_sync and flush_delayed_work

Change-Id: Idb4de3c30c9c8cfdeb9af5b92f40a6e3dc954a6d
CRs-Fixed: 1009560
2016-07-13 18:49:41 -07:00
Nirav Shah
b70bd731ec qcacmn: Add per CPU interrupt statistics
Add per CPU per copy engine interrupt statistics.

Change-Id: I1619f0db3314ae3d915284459f2b191f31fc2190
CRs-Fixed: 1017437
2016-06-30 03:11:34 -07:00
Anurag Chouhan
8f7d421854 qcacmn: Fix qdf_wait_single_event api to wait for infinite timeout
qdf_wait_single_event have contradicting impelmentation
when timeout value is set to 0.
The fix provides an implementation that works when timeout is
to zero aswell.

Change-Id: I1f03bd79227988b76fc9eb0fe9db3cf41542bd71
CRs-Fixed: 1035161
2016-06-29 21:02:49 -07:00
Anurag Chouhan
ced2345f71 qcacmn: Define qdf_mempool_t for non kernel users
Fix implicit declaration error when qdf_mem.h is included from userspace

Change-Id: I88ccec9c53abb8d5844f42984af3f8693c1d3000
CRs-Fixed: 1012511
2016-06-28 10:45:01 -07:00
Nirav Shah
cede289aad qcacmn: Enhance data path related statistics
Enhance data path related statistics.
- Add per reason pause time
- Enahnce TSO stats
- clear DPTRACE buffer

Change-Id: Ic884e5a2ba9da34651f524a5b099c20d3b7f83a1
CRs-Fixed: 1017437
2016-06-24 16:48:07 -07:00
Abhishek Singh
06c3f0a7a8 qcacmn: Reduce the info level logs in STA/SAP
qcacld-2.0 to qcacmn propagation

Reduce the info level logs in STA/SAP

Change-Id: I5918ea8e9dd2f7654e5a994ad366f92d2ca3cd77
CRs-Fixed: 988195
2016-06-23 12:32:50 -07:00
Nirav Shah
4cc0ba809c qcacmn: Fix to avoid redefination error in AP code
Fix to avoid redefination error in AP code.

Change-Id: Ib57e7e2936aefe6abf0945b249ae1cd44e50aceb
CRs-Fixed: 1008087
2016-06-15 11:26:39 -07:00
Nirav Shah
da0881a68f qcacmn: Datapath changes for WiSA specification
Datapath changes for WiSA specification.
 - Multicast packets with 50000 as destination
   port should go at 6Mbps.
 - Multicast packets with 50001 as destination
   port should go at 24Mbps.

Change-Id: I582b13fd85e2bdc0e49739a1c6f8d8a3b295902f
CRs-Fixed: 1010412
2016-06-14 13:48:41 -07:00
Nirav Shah
31d694b25a qcacmn: Remove PROTO_TRACE feature
Remove PROTO_TRACE feature and add MGMT packet
logging in DPTRACE

Change-Id: I0437a2100554628607c561b0e815c0009f1c5606
CRs-Fixed: 1008087
2016-06-14 13:48:39 -07:00
Nirav Shah
29beae0ab5 qcacmn: Enhance DPTRACE to support RX path
Enhance DPTRACE framework to support RX path.

Change-Id: I34594911aeb89cf36d87a7753f1e5c7261b4ceb9
CRs-Fixed: 1008087
2016-06-14 13:48:37 -07:00
Nirav Shah
ae6a0b31d2 qcacmn: Add ini support for DPTRACE
Add ini support and feature flag for
DPTRACE to enable/disable as per requirement.

Change-Id: I22c614460f4c95539e9183935be0d2057379c6d4
CRs-Fixed: 1008087
2016-06-14 13:48:35 -07:00
Manjunathappa Prakash
5693051379 qcacmn: Enable DEBUG_Rx_RING_BUFFER to keep track of posted buffers
This enables the tracking of posted rx ring buffers. With this we can
identify if host/fw is wrong when we hit below issue:
"wlan: [0:E :QDF] rx hash: htt_rx_hash_list_lookup: no entry found for
<physical address>"

Change-Id: Ib973a2e2a69e881beddea23cdc1d2d994eeb1e12
CRs-Fixed: 864569
2016-06-14 13:48:31 -07:00
Poddar, Siddarth
cdebcd5d1c qcacmn: Add firmware download support for sdio bus (Part 5 - HIF SDIO)
Add BMI and firmware download support for sdio bus platform.
Refactor fw and bmi download routines to get rid of compile
time bus specific macro.
Refactor allocation and free routines for high latency bus.

CRs-Fixed: 969334
Change-Id: I2c217891d0ca4b503e7388b3ebe2f787e8325af5
2016-06-14 13:48:24 -07:00
Govind Singh
4cc8213cc2 qcacmn: SDIO bus support (Part 1 - HIF SDIO)
Add legacy hif sdio code.
Implement new hif sdio interfaces with respect to new hif design.
Add datapath to HIF interfaces.
Refactor hif-sdio codebase.
Remove references to older kernel version.

Change-Id: Ieca3e512edca5f960d6f2b64d15121db6c8138c7
CRs-Fixed: 969334
2016-06-14 13:48:12 -07:00
Houston Hoffman
28803728da qcacmn: Check null in qdf_nbuf_track_free
Freeing a null pointer shouldn't do anything.
Some code relies on this.  Specifically, in a
rare scenario, an allocation is made outside of
a spinlock and may freed without being used or
verified inside the spinlock.

Change-Id: Ib5f8ecabc62454a0ca9b6723cd80ff2f701196c3
CRs-Fixed: 1024277
2016-06-13 11:28:06 -07:00
Dhanashri Atre
5cfd37e211 qcacmn: Store the DMA address in the TSO meta data
Store the DMA address in the TSO meta data as opposed to
storing the higher and lower bits separately. The DMA address
can be convering to higher and lower 32 bit addresses if needed
by the hardware at a later point.

Change-Id: Iff706ca980ee86400952e8b3087a619f4a2728e1
CRs-Fixed: 1024169
2016-06-09 22:18:30 -07:00
Houston Hoffman
2bb5098d5e qcacmn: Do not truncate DMA addresses to 32 bits
A few apis were truncating DMA addresses to 32 bits

Change-Id: Ib827e3097c8319cb8932f21e2f2810a0219431e0
CRs-Fixed: 1024300
2016-06-09 22:18:24 -07:00
Houston Hoffman
2b0525b0f2 qcacmn: Implement a freelist for net buf tracking
The net buf tracking feature spend most of its time allocating
tracking cookies.  By not tracking these tracking cookies in
qdf we achieve a 90% time saving.  By keeping a freelist and
avoiding allocations altoogether, we save another 90%.  This
feature is 99% cheaper.  Throughput suffers less under when
the driver is forced to be cpu bound (eg. by mucking with the clockspeed).

Change-Id: If3268bdbbcf39aeb7278b1e51e17955eb2b47510
CRs-Fixed: 1024277
2016-06-09 22:18:13 -07:00
Anurag Chouhan
e5dc6df496 qcacmn: Add WIN Driver compilation fix
Fix compilation errors for WIN driver.

Change-Id: I3c13f3d75a929e418118863d0976016c81436504
CRs-Fixed: 1012511
2016-06-09 22:18:01 -07:00
Anurag Chouhan
b348ba478a qcacmn: Add WIN Driver Compilation fix
Initially, the QCA Wi-Fi driver was ported to support kernel
4.4. However, after the code changes due to converged code,
few issues were re-created when compiled on kernel 4.4.X.

This change resolves the newly introduced issues by the
converged code changes.

Change-Id: Iae76cdfee97675ff4bf2508ce5a42f08515bb168
CRs-Fixed: 1012511
2016-06-06 18:52:30 -07:00