Graphe des révisions

113 Révisions

Auteur SHA1 Message Date
Deepak Dhamdhere
f74d6f8a97 qcacld-3.0: Fix peer unmap/map handling during roaming
Roam_synch indication processing in host performs peer detach/attach
operations after firmware has already moved to the new peer. Out of
sequence peer unmap and map events can mess up the reference count
for reused peer_id values, which can lead to crash.
Solution:
While detaching a peer during roam sync indication processing,
copy its peer_id_ref_cnt in peer_id_to_obj array to new variable
in the same peer map for that peer id. Peer is deleted at that point.
When the unmap events come in, decrement the old ref_cnt and
map events increment the real ref_cnt.
Once the old ref_cnt goes to 0, subsequent unmap operations apply to
the real peer.

CRs-Fixed: 1063177
Change-Id: I9b20f28f17dea1647a213b9f36060109264addf0
2016-10-07 21:18:46 -07:00
Deepak Dhamdhere
561cdb9c4a qcacld-3.0: Fix improper use of qdf_event_create
Improper use of qdf_event_create caused QDF_ASSERT. Use qdf_event_reset
in ol_txrx_peer_attach(). Use correct comparison for return value
of qdf_wait_single_event().

CRs-Fixed: 1065451
Change-Id: I735fe12230b6558123f73d68f09fd126bf0406d6
2016-10-07 21:18:44 -07:00
Houston Hoffman
abaf6736eb qcacld-3.0: Reset skb->cb when forwarding intrabss packets
skb->cb has different meaning for rx & tx packets. Reset the
cb to avoid mis-interpretation of the data that leads to
eratic misbehavior the least of which is failure to forward
packets.

Change-Id: I5d1396c70cd93d165aa825c4408ad46d082693f3
CRs-Fixed: 1065769
2016-10-04 15:44:07 -07:00
Ankit Gupta
a507601be7 qcacld-3.0: Align return value check for qdf_mem_cmp
qdf_mem_cmp api returns zero when comparison string matches
else returns non zero. Checking return value with true/false
can cause confusion and errors.

Replace the return value check from true/false to
zero/non-zero values.

Change-Id: I485d69a4bf85d1e6273ea780af6d0423c3910686
CRs-Fixed: 1066946
2016-09-21 17:08:59 -07:00
Mahesh Kumar Kalikot Veetil
32e4fc75d1 qcacld-3.0: Cleanup IBSS feature
Fix compilation errors when turning off QCA_IBSS_SUPPORT

Change-Id: I3a493c710077bec0a8bc5521d0d433ccd62b4e74
CRs-Fixed: 1067029
2016-09-15 21:04:40 -07:00
Mohit Khanna
38d0e9335d qcacld-3.0: 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: Ie0cf8434902c0713ef8d36dc36c105afa6b5eabc
CRs-Fixed: 1062556
(cherry picked from commit 0a851f054171cf4b2f5bd7e8cd6841e90d999928)
2016-09-10 19:26:50 -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
Houston Hoffman
088e4b94ae qcacld-3.0: Use atomic bit ops in ol_tx_desc_dup_detect functions
Bitmasks should use atomic operations when they can be
modified in multiple contexts.  Also sanitize msdu_id length
to avoid potential memory corruption.

Change-Id: I119916dba883ab7aa27d8c42035af5588774f535
CRs-Fixed: 1061195
2016-09-06 17:24:52 -07:00
Houston Hoffman
c2c4762062 qcacld-3.0: Use htc_pm_runtime put/get apis
The htc_pm_runtime provide a convenience wrapper arround
the hif modules put/get apis

Change-Id: Ic2ef437390501e269278e68aa3a219364de8b2c0
CRs-Fixed: 1058274
2016-09-05 01:23:18 -07:00
Dhanashri Atre
5e584fa2eb qcacld-3.0: Fix Defrag Address Compare
Fix the address compare operation that is used for defragmentation.
Also add hook to release the debug qdf node.

Change-Id: I782e0234d5b61bb118578788947aa8b13e8e189c
CRs-Fixed: 1059538
2016-09-02 17:24:32 -07:00
Himanshu Agarwal
19141bb676 qcacld-3.0: Add capability based logic to mark first packet after wakeup
Propagation from qcacld-2.0 to qcacld-3.0.

Add a capability in service bitmask to indicate that fw also supports
this feature of marking first packet after wow wakeup to maintain backward
compatibility.

Change-Id: I3d41f5425e3a170c046941a439d17e06df0c6bef
CRs-Fixed: 1021382
2016-08-27 16:02:41 -07:00
Deepak Dhamdhere
c47cfe8fa7 Revert "qcacld-3.0: Force delete peer entry during LFR3 roaming"
This reverts commit-id: "Ib028c29863d4e95ccac434f7d47bfedd59ef883f"
It caused peer object memory access after it was freed.

CRs-Fixed: 1057347
Change-Id: I99842eb646371e186ade3b126ea0e8f84b7f2187
2016-08-22 12:44:49 -07:00
Nirav Shah
d59b3b253e qcacld-3.0: Log rx packet in packetlog as per rx ind message
Log rx packet in packetlog as per HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND
message from firmware.

CRs-Fixed: 970647
Change-Id: I5773b67a9269063531d038d46ac404c978818dcc
2016-08-20 10:36:59 -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
Deepak Dhamdhere
363c6bc5bf qcacld-3.0: Force delete peer entry during LFR3 roaming
While processing ROAM_OFFLOAD_SYNCH_IND, delete the peer entry
even if reference count is non-zero sine firmware has already
deleted that peer. It allows addition of new peer without waiting
for peer_unmap events. Fix the logic error in checking the timeout
in ol_txrx_peer_attach().

Change-Id: Ib028c29863d4e95ccac434f7d47bfedd59ef883f
CRs-Fixed: 1046754
2016-08-19 19:25:46 -07:00
Mohit Khanna
c6f03989a8 qcacld-3.0: Add USB bus support (DP)
Add datapath changes for USB bus support

Change-Id: Iabb6f5bbfa4d0c2a8026262d2ecb11cdc0533742
CRs-Fixed: 1023663
2016-08-19 18:33:24 -07:00
Mohit Khanna
47384bcd39 qcacld-3.0: fix peer map handler race condition
The existing peer_map_unmap_lock in ol_txrx_peer_find_add_id
does not include call to ol_txrx_peer_unref_delete. The peer addition
handling needs to be atomic with peer reference deletion (in case peer
ref deletion is required).

Move the peer_map_unmap_lock to include ol_txrx_peer_unref_delete.

CRs-Fixed: 1056442
Change-Id: Ica15ea70527f0ea116b960dd7958da73f304288b
2016-08-19 18:33:07 -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
Poddar, Siddarth
74178df581 qcacld-3.0: Add argument to ol_tx_queue_free for vdev or peer queues
qcacld-2.0 to qcacld-3.0 propagation

Add additional argument in ol_tx_queue_free to indicate whether
txq is vdev or peer queues to avoid extracting peer_id in case of
vdev txq queue in ol_tx_queue_log_free function.

Change-Id: Ic521c23b4001f15a382e9435413cdafca0c8b49f
CRs-Fixed: 1023457
2016-08-17 17:07:03 -07:00
Poddar, Siddarth
0cec8eaf67 qcacld-3.0: add NULL check and drop rx indication for a frame
qcacld-2.0 to qcacld-3.0 propagation

Add check to handle kernel NULL pointer dereference
during calling ol_rx_reorder_release.

Change-Id: If0367e0a7910d7ee460709fc8ae25ecc6de3485d
CRs-Fixed: 994435
2016-08-17 17:07:01 -07:00
Nirav Shah
5e74bb81d5 qcacld-3.0: 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: Id2ea9b08bdcbc62b1d96d983d19bcf71becc9c42
CRs-Fixed: 1022454
2016-08-17 17:06:28 -07:00
Mohit Khanna
37ffb29390 qcacld-3.0: Fix for race condition in peer map/unmap handlers
In case there are multiple copy engines (for example in ihelium), the
peer map and unmap handlers may be executed on different CPUs
concurrently. These functions access global peer data structures and are
not SMP-safe.

Re-factor the existing code to make it SMP-safe.

Change-Id: I3f52e17a80d7eae8d4c2fb88da7f57f64455b031
CRs-Fixed: 1050653
2016-08-13 14:07:28 -07:00
Houston Hoffman
5bf7482658 qcacld-3.0: Move memory free out of spinlock in ol_tso_seg_list_deinit
Assign the list to null inside the spinlock such that no one else
can access the free nodes. Then free the list outside of the spinlock.
This spinlock was causing a watchdog bark.

Change-Id: I9a34c8c3ea8451004814bcabfcbb81744d71ec45
CRs-Fixed: 1052458
2016-08-13 14:07:28 -07:00
Mohit Khanna
3aee13142b qcacld-3.0: Debug commit to track peer refcount
Add prints to track how peer->ref_cnt and peer_id_ref_cnt change

Change-Id: I518f58ec053e53ec2d82bcce85f872cd48029c99
CRs-Fixed: 1046458
2016-08-01 12:34:05 -07:00
Himanshu Agarwal
8903461b0f qcacld-3.0: Move QDF_NBUF_UPDATE_TX_PKT_COUNT before freeing netbuf
Propagation from qcacld-2.0 to qcacld-3.0.

Move QDF_NBUF_UPDATE_TX_PKT_COUNT in ol_tx_completion_handler to make
sure that netbuf is not accessed after it is freed.

Change-Id: Ifba9de788b11ce8cb323827d10f8005029609231
CRs-fixed: 1040612
2016-07-29 18:15:17 -07:00
Hardik Kantilal Patel
e9b97ea6ea qcacld-3.0: Address 32 bit specific compilation issue
Fixing 32 bit compliation issues due to improper print
format type.

CRs-Fixed: 1043823
Change-Id: I22330c4598532142f2c84636e7c890dcb4435e70
2016-07-25 00:33:48 -07:00
Dhanashri Atre
41c0d28570 qcacld-3.0: Check inputs during vdev register
Change to ensure that the vdev and txrx operations passed to
data path during vdev registration are valid.

Change-Id: I912194184ae65229ddd7243afa58c56f4579959a
CRs-Fixed: 1035414
2016-07-11 19:27:44 -07:00
Naveen Rawat
c45d162627 qcacld-3.0: Remove IBSS from MAX_IBSS_PEERS macro
Remove IBSS from MAX_IBSS_PEERS, since this is a generic macro.

Change-Id: Ic50205e84890e6a3bda603ad0f54bebfb2a727ea
CRs-Fixed: 1039559
2016-07-11 16:59:53 -07:00
Poddar, Siddarth
21e7bf0a3a qcacld-3.0: Move NULL check before dereferencing pdev
Move NULL check before dereferencing pdev in ol_tx_create_flow_pool

Change-Id: I42398c9473690a0a8f70f35cc7d5aac87c4ec7e7
CRs-fixed: 1034748
2016-07-11 04:59:47 -07:00
Govind Singh
8c46db9759 qcacld-3.0: Correct fw common references in dp layer
FW common files needs to be in sync with host and fw.
Correct fw common references in dp layer with latest copy
of fw common files.

Change-Id: I194c25045ca978634027a94bc74f22253b1afc86
CRs-Fixed: 1012542
2016-07-08 06:12:06 -07:00
Nirav Shah
da008344a6 qcacld-3.0: Enhance data path related statistics
Enhance data path related statistics
- Add per reason pause time
- Enahnce TSO stats
- clear DPTRACE buffer

Change-Id: Ia59fa5ba326504eb54e14d44f42a335c6b835ee4
CRs-Fixed: 1017437
2016-06-24 14:30:49 -07:00
Siddarth Poddar
b2011f6435 qcacld-3.0: Add txrx apis for High Latency systems (Part 2 - HL Datapath)
Add tx schedular module, tx classify module within the data SW,
tx frame queues logging,  group credit support and
send-recieve tx frames instance for HL system.

CRs-Fixed: 975526
Change-Id: If1655d4d832f88e565ab946ef9e9719f256ab7b1
2016-06-23 12:27:50 -07:00
Nirav Shah
2e583a0344 qcacld-3.0: 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: Ic219f58f3e8b2f6863a275928429153defe63b5a
CRs-Fixed: 1010412
2016-06-14 14:28:44 -07:00
Nirav Shah
1da7768385 qcacld-3.0: Remove PROTO_TRACE feature
Remove PROTO_TRACE feature and add MGMT packet
logging in DPTRACE.

Change-Id: I9bc019bb03e703cb8044cb5d4290fd438b1c3e69
CRs-Fixed: 1008087
2016-06-14 14:28:41 -07:00
Nirav Shah
0d58a7ef5f qcacld-3.0: Enhance DPTRACE to support RX path
Enhance DPTRACE to support RX path and
add support for live mode.
Live mode will print info in kmsg and
log it in buffer as well.
To enable live mode use below command.
iwpriv wlan0 dump_dp_trace 1 0

Change-Id: Id309a4d75cec93654b4acac51e5be42eae7f0b35
CRs-Fixed: 1008087
2016-06-14 14:28:38 -07:00
Himanshu Agarwal
a6cedee349 qcacld-3.0: Change unsigned long to uint64_t
Change unsigned long to uint64_t while updating intra bss forwarded
packets count to make sure that the assignment is compatible for all
architectures.

Change-Id: I6bc0e2d7524c117ce199b4a373f541fd06fc9ef8
CRs-Fixed: 996735
2016-06-14 14:28:06 -07:00
Manjunathappa Prakash
92db771024 qcacld-3.0: Do not modify vdev Rx callback in peer (de)init functions
Do not reset vdev->rx callback in peer modification functions, same vdev
corresponds to multiple peer.
Without this TDLS handshake fails, vdev->rx null callback function
results in dropping of datapath packets.

Change-Id: I39b51d2596cde494bee888009583a42f12a3f068
CRs-Fixed: 1024298
2016-06-14 14:27:59 -07:00
Poddar, Siddarth
27b1a60e64 qcacld-3.0: Add datapath layer changes for sdio bus (Part 4 - HIF SDIO)
Remove bus specific calls from data path layer.
Add sdio specific target address
Add sdio bundling rates in datapath layer.
Fix rx data callback for UMP system.

CRs-Fixed: 969334
Change-Id: I0cd45479ca89b97455b4a9c71ce326646f38a5f3
2016-06-14 14:27:53 -07:00
Dhanashri Atre
5166d573eb qcacld-3.0: Higher 32 bits in the dma address are ignored
In TSO the higher bits in the 64 bit dma address are being ignored.
This is resulting in an incorrect address being programmed in the
fragment descriptor.

Change-Id: Id015e81212d2ded3f0716ca5cc06ae2220952270
CRs-Fixed: 1024169
2016-06-09 22:10:03 -07:00
Himanshu Agarwal
5ac2f7bef9 qcacld-3.0: Refactor intra bss forwarded packets count
Propagation from qcacld-2.0 to qcacld-3.0.

Initially, when a packet is forwarded from txrx layer, it is added in
count only once although the count should increase by 2 as there is one
rx packet and one tx packet that is not getting considered in the hdd
packet count.

Add code to ensure that when packet is forwarded from lower layers,
it get considered accurately in the packet count.

Change-Id: I47bc1e0ecfa2e831438534cf34d37086a306b4e9
CRs-Fixed: 996735
2016-06-06 18:45:27 -07:00
Himanshu Agarwal
8c66df3699 qcacld-3.0: Remove error print from kmsg
Propagation from qcacld-2.0 to qcacld-3.0.

Remove error print from kmsg as this print is unnecessary and
may flood the kmsg.

Change-Id: I0978f88af6677cb0c1e1db5eae7e5d6a69bd4b70
CRs-Fixed: 997243
2016-06-06 18:45:25 -07:00
Himanshu Agarwal
11c874abae qcacld-3.0: Add intra bss forwarded packets count
Propagation from qcacld-2.0 to qcacld-3.0.

In lpm qos voting, no. of packets or bytes sent or received in a
particular amount of time is recorded and decision of disabling
or enabling lpm is done based on that. These packets are recorded
in HDD layer. In case when packets are forwarded to tx only, packets
don't come upto HDD layer and so in case of intra bss forwarding,
lpm qos voting is not being executed appropriately.

Add code to calculate the intra bss forwarded packets in txrx layer
and update them in calculating lpm qos voting.

Change-Id: I805663688cb300c8735b3e2f9680818a7b50bc9f
CRs-Fixed: 990868
2016-06-06 18:45:21 -07:00
Nirav Shah
07e39a6738 qcacld-3.0: Refactor DPTRACE to support new features
Refactor DPTRACE to support new datapath features like
TSO and FASTPATH and add support to log DHCP, ARP and
EAPOL packets.

Change-Id: I9b80a003759c962020165c21dbe29330700c4667
CRs-Fixed: 1008087
2016-06-06 18:45:16 -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
Nirav Shah
f099e5e180 qcacld-3.0: Handle multiple map/unmap handler for same peer_id
Handle multiple map/unmap handler from firmware
for same peer_id. Firmware sends map/unmap event
per copy engine enabled for RX path.

CRs-Fixed: 1009289
Change-Id: Id8b0c27920a7aae95ddd4cff26731de85248457e
2016-06-01 10:45:58 -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
Mohit Khanna
043efbd6ae qcacld-3.0: Fix race condition between tx traffic and peer deletion
A race condition has been observed between outgoing TX traffic and
peer deletion when DUT has concurrent SAP(DBS) and STA sessions in 5G
and 2G respectively and the peer connected to SAP moves away triggering
peer deletion at DUT. Due to peer being deleted, the vdev corresponding
to the peer is void which results in a crash in ol_tx_data function
while trying to send Tx data.

Fix crash by checking for a null vdev in ol_tx_data.

CRs-Fixed: 1012681
Change-Id: Id0aab4b1f03ed24dfb55e09fa1a115edfdfcce84
2016-05-18 16:35:10 -07:00
Nirav Shah
76291969a5 qcacld-3.0: Add logic in host to detect msdu_id duplication
Add logic in host to detect if host is using
musdu_id which is already in use.

CRs-Fixed: 929428
Change-Id: I10413ed4b5b76e16211aa0cbb9012cfb8f26cae0
2016-05-18 16:33:43 -07:00
Nirav Shah
6a4eee661c qcacld-3.0: Add histogram for MSDUs per RX indication
Add histogram for MSDUs per HTT RX indication
message and update drop counters in RX path.

Change-Id: Ia861f6cd3d6a91f01a07f9bc4e2bc3afcf62c8f2
CRs-Fixed: 999861
2016-05-18 16:33:32 -07:00
Manjunathappa Prakash
ef45abaa6e qcacld-3.0: Fix lro dereg crash on driver unload
If lro_disable is called after  cds_close, which is the case
for module unloads, then many of the pointers used in dereg
sequence are NULL (CE_state, hif, txrx_pdev). There is a case,
when interfaces are removed, when these pointers are there.
Check pointers before using them in dereg code.
Update hif_map_service_to_pipe so that it will return E_INVAL if
the service is not in the table. Add logs for cases where either
leg information is not updated on return.

Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>

Change-Id: I5b88a297134dcc1d7a6a68dd2a9879dfd1553a7e
CRs-Fixed: 1014428
2016-05-18 16:09:48 -07:00