Commit Graph

89 Commits

Author SHA1 Message Date
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
9591970720 qcacld-3.0: Do not allocate large chunk of memory for rx hash
qcacld-2.0 to qcacld-3.0 propagation.
Do not allocate single large chunk of memory for rx hash
to avoid memory allocation failure. This change uses array
of pointers to reduce single large chunck of allocation.

Change-Id: I2aa7239be924b63c87f1044a74176a101d952108
CRs-Fixed: 954302
2016-05-18 16:33:49 -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
Prakash Manjunathappa
0c45f699e9 qcacld-3.0: Shrink ol_txrx_stats_tso_info
The structure is taking too much of a space and pre-alloc was
failing for a single allocation for ol_txrx_pdev. Shrunk the
structure from 112 KB to 12 KB.
This update has a corresponding update in qcacmn.

Change-Id: I358e74b47165fa08cb5d37f095b44bff3f83fdfc
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
CRs-fixed: 1012346
2016-05-13 16:20:44 -07:00
Prakash Manjunathappa
6dc1a9658a qcacld-3.0: Fix crash on WMA path
During a recent merge, a frame type was being set to a similar
looking value (ol_tx_spec_no_free instead of ol_tx_frm_no_free) and
this is causing crashes on tx-completion.
Also capitalize the constants.
This is a stability CR.

Change-Id: Ic86dafc5baa80ae634c5267794f3add0e06d076f
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
CRs-fixed: 1010581
2016-05-13 16:20:43 -07:00
Prakash Manjunathappa
d3ccca2545 qcacld-3.0: Remove extra ticks-to-msec conversion
qdf_wait_single_event expects msecs as the timeout value.
However, two references in dp, second of which is this instance,
passes the value in ticks. This causes the value to be converted
to msecs a second time by the function and hence an incorrect
timeout value.
The other instance is in the qcacmn project.

Change-Id: I11c36ecf54b04cf1e3671a86594822b39b8ccaaf
Acked-by: Orhan K AKYILDIZ <oka@qca.qualcomm.com>
CRs-fixed: 1012345
2016-05-13 16:20:43 -07:00
Manjunathappa Prakash
b757372528 qcacld-3.0: Add HTT datapath changes to handle monitor mode
Make special handling for monitor mode operation. Take care to handle
amsdu packets in which case firmware marks the last_frag in msdu_info
field. These MSDUs of AMSDU are stiched using frags_list of skb and
handed over to network stack.
Also take care to extract and update the radiotap header to head of
the packet.

Change-Id: I4ed9696175e63884b5db682a2a4c4df504a7fb20
CRs-Fixed: 963060
2016-05-06 17:01:48 -07:00
Dhanashri Atre
6e61e8cfba qcacld-3.0: Increase HTT Rx Ring
The firmware would like host to initially populate all 2K entries,
so that fw shadow ring will always have 1K entries to fetch after
the initial population of 512 entries to each mac.

Change-Id: I5f19a1e2693f54f9d7938b723d0d57487f842daf
CRs-Fixed: 1006872
2016-05-06 14:51:27 -07:00
Houston Hoffman
90e24d85f8 qcacld-3.0: Add hif_ctx to fastpath_cb_register api
Hif apis can't rely on a global context.

Change-Id: I2cad80573fc0102f210bb0f7c3f9e22c5f8e16f9
CRs-fixed: 1009274
2016-05-04 21:19:33 -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
Mohit Khanna
137b97dd46 qcacld-3.0: Fix for IBSS lock-up issue
During IBSS session tear down, we are hitting a lockup. The issue is
seen as the pdev->peer_ref_mutex is being taken up twice in
ol_txrx_remove_peers_for_vdev and ol_txrx_peer_unref_delete. The later
function gets invoked by the former and hence we are stuck while trying
to acquire the spinlock, the second time.

Fix issue by releasing peer_ref_mutex lock before invoking
callback (wma_remove_peer) in ol_txrx_remove_peers_for_vdev function.

The dmesg signature of the lock-up is as follows

1100.230392:   <2> [<ffffffc0002035a4>] el1_irq+0x64/0xd4
1100.235432:   <2> [<ffffffbffc17e890>]
ol_txrx_peer_unref_delete+0xc4/0x33c [wlan]
1100.242461:   <2> [<ffffffbffc17ecc8>] ol_txrx_peer_detach+0x1c0/0x1e0
[wlan]
1100.249020:   <2> [<ffffffbffc160914>] wma_remove_peer+0x7c/0x18c
[wlan]
1100.255141:   <2> [<ffffffbffc17dee4>]
ol_txrx_remove_peers_for_vdev+0x170/0x1b0 [wlan]
1100.262606:   <2> [<ffffffbffc16311c>]
wma_vdev_stop_resp_handler+0x204/0x460 [wlan]
1100.269816:   <2> [<ffffffbffc1886a8>] __wmi_control_rx+0x280/0x2c0
[wlan]
1100.276204:   <2> [<ffffffbffc188a34>] wmi_process_fw_event+0x8/0x14
[wlan]
1100.282595:   <2> [<ffffffbffc157054>] wma_mc_process_msg+0x80c/0x27fc
[wlan]
1100.289176:   <2> [<ffffffbffc13f238>] $x+0x190/0x3f4 [wlan]
1100.294115:   <2> [<ffffffc00023d7e8>] kthread+0xac/0xb8

CRs-Fixed: 1006847
Change-Id: Icedeb172bbd6736ab39343391ff0643ddd688444
2016-04-27 17:00:25 -07:00
Nirav Shah
24e697ff3e qcacld-3.0: Update htc_endpoint only for htt tx endpoint
Update htc_endpoint only for htt tx endpoint to avoid
double freeing of Tx Queue packets as it will be
freed in htt_htc_misc_pkt_pool_free.
Rename htc_endpoint to htc_htt_tx_endpoint to reflect
it's appropriate use.

Change-Id: I736ba08505acc829eb15be30538553dd945695f6
CRs-Fixed: 1006498
2016-04-25 22:56:20 -07:00
Nirav Shah
7a0a90597b qcacld-3.0: Free all TX descriptors in error scenario
Forcefully free all TX descriptors during driver unload
which is not freed because of unmap event missing from
firmware to avoid memory leak.

Change-Id: I47ff7e6a8f2aa130c77ac68a92eee9373d152e87
CRs-Fixed: 1001994
2016-04-25 22:54:11 -07:00
Nirav Shah
194ce08855 qcacld-3.0: Add HTT packet in misc_list to avoid memleak
Add HTT packet buffer in misc_list for
HTT_H2T_MSG_TYPE_FRAG_DESC_BANK_CFG command to avoid memleak.

Change-Id: I1c3fb6232c4b7dab6c10459d53e611d3358b69cc
CRs-Fixed: 1001996
2016-04-25 22:52:55 -07:00
Mohit Khanna
0696eef313 qcacld-3.0: Fix RX data, peer unmap race condition
During peer unmap handler, while the peer is being deleted, there is a
possible race condition if the OL Rx thread is processing RX packets
and accesses the peer structure after its contents have been nulled.

Remove race condition by -
* Flush all RX packets in ol_txrx_peer_detach function which happens
  before peer unmap event is received from firmware
* Avoid use of peer data structures (for example peer->local_id)
  outside of peer->info_lock in ol_rx_data_cb function. Use cached
  local copies of peer data structures instead

Crash signature due to the race condition:

wlan: [0:E :CDF] TXRX: Deleting peer ffffffc012fd13c0
(02:a0:c6:81:f8:c0)
Unable to handle kernel paging request at virtual address 400000001
pgd = ffffffc0018b4000
[400000001] *pgd=0000000000000000, *pud=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in: wlan(O) [last unloaded: wlan]
CPU: 1 PID: 29506 Comm: cds_ol_rx_threa Tainted: G        W  O
3.18.20-g5222edf-13780-g2219ed2 #1
Hardware name: Qualcomm Technologies, Inc. MSM 8996 v3 + PMI8996 CD (DT)
task: ffffffc09350d400 ti: ffffffc0556a4000 task.ti: ffffffc0556a4000
PC is at hdd_rx_packet_cbk+0x84/0x224 [wlan]
LR is at hdd_rx_packet_cbk+0x48/0x224 [wlan]
pc : [<ffffffbffdd55b5c>] lr : [<ffffffbffdd55b20>] pstate: 80000145

Change-Id: I4b32313024ec214f33dcdcfc401aadfa8af9d692
CRs-Fixed: 1002081
2016-04-21 20:23:50 -07:00
Yuanyuan Liu
bb116f2d4f qcacld-3.0: Fix compilation error for msmcobalt
Fix compilation error for msmcobalt when enable
CONFIG_WLAN_TX_FLOW_CONTROL_V2 feature.

CRs-Fixed: 1006068
Change-Id: Iab1c632c00a65a2c972c7701d66f3adff3073221
2016-04-21 20:23:44 -07:00
Houston Hoffman
23e76f99ce qcacld-3.0: enable additional two HTT data services
Enable HTT_DATA2_MSG_SVC and HTT_DATA3_MSG_SVC, using only
rx legs, CE 9 and 10, respectively. Add required CE entries
to the map that gets sent to the FW, and define the latter
service.
Rename htc_endpoint to htc_tx_endpoint in htt_pdev to
represent the role better.

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

Change-Id: I81ae796bdb7e632aa24f15c63a2811791dd29d28
CRs-Fixed: 982728
2016-04-20 22:25:01 -07:00
Poddar, Siddarth
8390502e2e qcacld-3.0: add ini support for throttling period duty cycles
qcacld-2.0 to qcacld-3.0 propagation

Provide support to configure duty cycle by adding ini item for
different level duty cycle.

CRs-Fixed: 990798
Change-Id: I95e4f4af669fd50c5b9fc10ffc61fa5d447b5bcf
2016-04-20 22:23:19 -07:00
Krishna Kumaar Natarajan
b7f9a35ce8 qcacld-3.0: Fix layering violation while handling management frames
Fix layering violation while handling management frames. Currently
LIM data structures are accessed before dropping Assoc, Disassoc and
Deauth packets to avoid DoS attacks. Since the LIM data structures
are accessed in different thread context, data present in them are
out of sync resulting in a crash.

Fix the layering violation by doing appropriate check in WMA instead
of doing the same in LIM

Change-Id: I8876a4d4b99948cd9ab3ccec403cf5e4050b1cff
CRs-Fixed: 977773
2016-04-20 22:23:06 -07:00
Rajeev Kumar
a4d80b5879 qcacld-3.0: Fix IPA backward compatibility
Fix IPA WDI 1.0 update for overwrite of previous commit and use
only QCA_WIFI_3_0 build flag for qcacld-3.0.

Change-Id: I3bff4a4e10102e97aeb57fb0f67d48933e0bae9b
CRs-fixed: 994144
2016-04-20 22:20:52 -07:00
Manjunathappa Prakash
585178db34 qcacld-3.0: Cleanup fastpath changes
Do following cleanup on fastpath code changes:
1) Remove reaping of Tx HIF buffers in Rx handling, instead handle
   reaping in Tx fastpath itself.
2) In ce_per_engine_service_fast check for more Rx packets after
   packet processing.
3) Make stub functions as static inline for non-fastpath enabled case.

Change-Id: If07c4344a424ce13b94128bf28931a24255b661a
CRs-Fixed: 987182
2016-04-17 18:16:51 -07:00
Manjunathappa Prakash
1c95626911 qcacld-3.0: add fastpath Rx support
With dedicated CE for Rx HTT messages, skip processing in HTC layer.
Do special handling in HIF-CE and HTT layer, this optimization results
in 3-4% CPU utilization gain.

Change-Id: I400148a0e24ac62dd09e2a95d5f35d94d83fe2df
CRs-Fixed: 987182
2016-04-17 18:16:43 -07:00
Manjunathappa Prakash
7e16b0a68f qcacld-3.0: Use fastpath Tx entry point with flowcontrol V2
Use common entry point ol_tx_ll_wrapper and use fastpath Tx if enabled.

Change-Id: I3a19fd6af43ab10eb5d8dd2754134a8dbc3783ab
CRs-Fixed: 987182
2016-04-17 17:59:18 -07:00
Nirav Shah
93e789e6d5 qcacld-3.0: Fix firmware statistics mask and format
Send prorper firmware statistics mask and fix
firmware statistics format

Change-Id: I786a7a6e3cec46660c497a001b4b39fb1a049b3a
CRs-Fixed: 986060
2016-04-17 17:55:45 -07:00
Nirav Shah
36a87bfb6e qcacld-3.0: Use sta id to derive peer in ol_rx_data_cb
Derive peer from sta id in ol_rx_data_cb to
make sure that peer is still valid before
using peer to avoid NULL pointer dereference

Change-Id: I8f9219d4c6ffbfb207385b08bc704cc0f86a1e1b
CRs-Fixed: 962949
2016-04-13 21:51:25 -07:00
Dhanashri Atre
50141c53a3 qcacld-3.0: Register vdev before registering peer
Ensure that the per vdev rx callback is registered before
registering the peer. The peer registration function may
try to flush the rx frames so we need to ensure that the rx
callback is registered before it is called.

Change-Id: Ibd1d73d89105bbc3f9d29fa2c64e9f515d4b0da5
CRs-Fixed: 1000834
2016-04-07 16:28:28 -07:00
Manjunathappa Prakash
2593a640d4 qcacld-3.0: Replace cdf references with qdf
Replace cdf references with qdf.

Change-Id: Ifba0c1045af57e285c87017e62ae240c2faa28ff
CRs-Fixed: 994638
2016-04-01 16:19:51 -07:00
Manjunathappa Prakash
3454fd61da qcacld-3.0: Data path changes to use converged APIs (Part 5)
Changes in the data path to use the converged MCL specific APIs.

Change-Id: Iaedc5e7e175d6b8eb905a04178fe9772dc7bb797
CRs-Fixed: 994638
2016-04-01 16:19:43 -07:00
Manjunathappa Prakash
10d357a17c qcacld-3.0: remove references to datapath structures from other modules
Core datapath structures should be opaque to non-datapath modules,
remove the references to them.

Change-Id: I3618253566a971c27f16b14923d1ff8028718918
CRs-Fixed: 994638
2016-04-01 16:19:36 -07:00
Dhanashri Atre
b08959a747 qcacld-4.0: Data path changes to use converged APIs (Part 4)
Changes in the data path to use the converged MCL specific APIs.

Change-Id: Ib6ae1917a9678dcd735b81e3aa83d086406ac404
CRs-Fixed: 994638
2016-04-01 16:09:57 -07:00
Dhanashri Atre
168d2b492e qcacld-3.0: Data path changes to use converged APIs (Part 3)
Changes to register a per vdev tx callback function.

Register a per-vdev transmit function during vdev registration.
The OS interface (HDD) adapter stores this transmit function and
invokes it to transmit data frames.

Change-Id: I1dfe6f58d1d26069dadc2d719fff242c29071bad
CRs-Fixed: 994638
2016-04-01 15:52:33 -07:00
Dhanashri Atre
182b027a73 qcacld-3.0: Data path changes to use converged APIs (Part 2)
Changes to register a per vdev rx callback function.

Register a per-vdev receive callback function using the vdev registration
API provided by the converged data path API. The changes include
- removing the older method of registering the receive callback
- modify the HDD callback to adhere to the rx callback function defined
by the converged data path API
- modify the invocation of the callback function in the data path

Change-Id: I2aef905132af4b3d7db22c7ec315d114607c9383
CRs-Fixed: 994638
2016-04-01 15:51:59 -07:00
Dhanashri Atre
12a0839cd6 qcacld-3.0: Data path changes to use converged APIs (Part 1)
Change the data path and external modules to use the new
converged common data path APIs.

Change-Id: Ifb48178efd012b6ad9ea6f6d5230d0a809922b1c
CRs-Fixed: 994638
2016-04-01 15:46:10 -07:00
Yue Ma
1e11d79646 qcacld-3.0: Remove CDS related functions in HTC
Update runtime PM APIs and HTC connection mode parameter
accordingly.

Change-Id: I2f54933b90aaed233042c113d246fae4726f5707
CRs-fixed: 982024
2016-04-01 15:24:33 -07:00
Houston Hoffman
c2cd5d472e qcacld-3.0: Remove power_gating from upper layers
These are pci specific power management features.  These should
be consolidated instead of littering bus agnostic code.

Change-Id: I366f1d14ab04368d77a144bebaeb038c1469abed
CRs-Fixed: 986480
2016-03-24 11:58:38 -07:00
Anurag Chouhan
f04e84f24a qcacld-3.0: Add qdf references in place of cdf
Replace CDF references with QDF references.

Change-Id: Ifb4571174719b5fce61dd305545d05628265f317
CRs-Fixed: 981188
2016-03-24 11:58:26 -07:00
Nirav Shah
cbc6d72570 qcacld-3.0: Update driver to use QDF NBUF APIs(1/2)
Update driver to use QDF NBUF APIs

Change-Id: I4409b6c046de1221b57baed45088d5f3b898b565
CRs-Fixed: 981188
2016-03-24 11:58:23 -07:00
Anurag Chouhan
600c3a00be qcacld-3.0: Add QDF mem API's
Replace CDF mem API's with QDF mem API's

Change-Id: Icf247b4dc5b26f4b960dcb98e323b096c1d6076c
CRs-Fixed: 981188
2016-03-24 11:58:16 -07:00
Anurag Chouhan
df2b26883d qcacld-3.0: Fix compilation issues after rebase
Remove the compilation issues for references to cdf after rebase

Change-Id: Ia39c5c72fe5c95f9a91d5f6967ea60904b46f756
CRs-Fixed: 981188
2016-03-24 11:58:14 -07:00
Anurag Chouhan
b2dc16fefe qcacld-3.0: Add QDF trace API's
Replace CDF trace API's with QDF trace API's.

Change-Id: I5b99dce73297f7de8f0755fa0b47dc3f84c78747
CRs-Fixed: 981188
2016-03-24 11:58:11 -07:00
Anurag Chouhan
2ed1fced92 qcacld-3.0: Add QDF osdep changes
Replace CDF osdep with QDF osdep

Change-Id: Id2ba89c75df1fb8c4973a87219785353c3c2ff3c
CRs-Fixed: 981188
2016-03-24 11:58:05 -07:00
Anurag Chouhan
c554842327 qcacld-3.0: Add QDF utils
Replace CDF utils with QDF utils.

Change-Id: Ib6b3ad56b3268b1be438f3204f91d995f8bb3900
CRs-Fixed: 981188
2016-03-24 11:58:03 -07:00
Anurag Chouhan
c73697b4da qcacld-3.0: Add QDF net types
Replace CDF net types with QDF net types API's.

Change-Id: I0599a2f0cfe7c9a9b7fe589f7619f88fd5a72518
CRs-Fixed: 981188
2016-03-24 11:58:00 -07:00
Anurag Chouhan
a37b5b783a qcacld-3.0: Add QDF lock API's
Replace CDF lock API's with QDF lock API's.

Change-Id: I7c4a59920e17915f077c87457c513e763738c062
CRs-Fixed: 981188
2016-03-24 11:57:57 -07:00
Anurag Chouhan
6d760664ee qcacld-3.0: Add QDF types
Replace CDF types with QDF types

Change-Id: Idd6e65b148efb54f22d6951572957f1c6166465b
CRs-Fixed: 981188
2016-03-24 11:57:54 -07:00
Anurag Chouhan
754fbd8d95 qcacld-3.0: Add QDF timer API's
Replace CDF timer API's with QDF timer API's

Change-Id: I43aa23676ed893a7309135dec6a8b897b113f00e
CRs-Fixed: 981188
2016-03-24 11:57:52 -07:00
Anurag Chouhan
512c7d5fca qcacld-3.0: Add QDF threads API's
Replace CDF threads API's with QDF threads API's

Change-Id: Ic20e6734f85b37ed11580ff3ed7e1a6de1356afb
CRs-Fixed: 981188
2016-03-24 11:57:49 -07:00
Anurag Chouhan
8e0ccd330b qcacld-3.0: Add QDF atomic API's
Replace CDF atomic API's with QDF atomic API's.

Change-Id: I18b4ab3487357d150bdfb96f9a078e1b5abb3156
CRs-Fixed: 981188
2016-03-24 11:57:44 -07:00