Commit Graph

25 Commits

Author SHA1 Message Date
Bala Venkatesh
7fb389e576 qcacld-3.0: Check the p2p roc timer state by acquiring timer lock
In function p2p_process_scan_complete_evt roc timer state is checked
using the api qdf_mc_timer_get_current_state, this api does not take
timer lock while returning the state. In other thread, if the timer
state is changed then the wrong timer state is returned in current thread.
And wrong timer state can lead to destroying roc timer without stopping
it synchronously.

Call qdf_timer_stop_sync api without checking the timer state
as the timer already checking the state by taking a timer lock.

Change-Id: Idb22e405178f2e0f1ed80b7c8aac04170e5b69bc
CRs-Fixed: 2511768
2019-08-30 04:51:34 -07:00
Yu Ouyang
517a2200de qcacld-3.0: Fix memory leak issue
Object 'tx_conf_event' was dereferenced after being freed by calling
'qdf_mem_free(tx_conf_event)' function. Object 'tx_conf_event->nbuf'
can't be freed.

Free 'tx_conf_event->buf' before 'tx_conf_event' free.

Change-Id: Id5a8f17db4d58395837db9878c6c7d87e9fe40c4
CRs-Fixed: 2503761
2019-08-07 01:31:07 -07:00
Wu Gao
6c347a5369 qcacld-3.0: Support to tx more mgmt frames
It just support to tx probe request/response and action frames, and
reject to tx other frames. So add this change to support other mgmt
frames.

Change-Id: I6d99f1c1b0187105fc8eec1f170483980819d0ae
CRs-Fixed: 2485734
2019-07-16 15:53:32 -07:00
Wu Gao
cb70c0d571 qcacld-3.0: Support to tx probe request frame
It just support to tx probe respnse and action frames currently. So
add this change to support to tx probe reqest frame.

Change-Id: I4899eeca80958990aff2ec5eac3226f9a37ccbf3
CRs-Fixed: 2481346
2019-07-02 08:39:10 -07:00
Pragaspathi Thilagaraj
b3472f0fcd qcacld-3.0: Implement WAR for P2P GO 1x1 HT association with peer
In P2P GO mode, if the P2P client device is not VHT capable and
only HT capable, but the DUT P2P GO is VHT capable and advertises
2x2 NSS and sends packets with 2x2 rates, it results in interop
issues with HT only capable P2P client devices.

When GO is operating in DBS mode, GO beacons advertise 2x2
capability but include OMN IE to indicate current operating mode
of 1x1. But here peer device is only HT capable and will not
understand OMN IE.

Check if the P2P client device is only HT capable and has
"\x00\x50\xf2\x04". Then downgrade the P2P GO operation to 1x1
nss. Modify rx mcs map value in association response to enable
only mcs 0-7.

Change-Id: I7177c5aee9a560a20c50a63886c0ee77f7d617ae
CRs-Fixed: 2464925
2019-06-25 13:05:57 -07:00
Wu Gao
c61878cf42 qcacld-3.0: Send mgmt frame with NULL channel
It won't send mgmt frame with NULL channel information currently,
which is different to other branches. Add this change because up layer
pass NULL channel information when tx mgmt frame in some platform.

Change-Id: I689d64789187fe0df03ed57ef0ff10c5157aeeb6
CRs-Fixed: 2459485
2019-06-03 21:03:29 -07:00
Bala Venkatesh
dd72bf7367 qcacld-3.0: Stop ROC timer synchronously
Mc timer is used to initialize the p2p roc timer.
And the actual timer runs in the soft irq thread and
when the timer exipres it posts the message to mc thread.
Currently, qdf_mc_timer_stop is called to stop the timer.
It calls the del_timer internally to delete the timer.
del_timer() ensures that the given timer is not queued
to run anywhere in the system. But the callback may
be running on another CPU core can create race conditions.

So use del_timer_sync to delete the roc timer.

Change-Id: I2c0fd6e335fc342a3acf06ede534c84d40e19346
CRs-Fixed: 2445705
2019-05-08 02:51:25 -07:00
gaurank kathpalia
7b5efba296 qcacld-3.0: Modify scan type for RRM scan request
Currently in the case of concurrent sessions running,
the driver updates the active dwell time for the scan
request to the default value, overwriting the already
filled active dwell time which the DUT got from the
AP as part of RRM request, which results in violation
of protocol.

Fix is to not update the concurrency params if the scan
request is of type RRM.

Change-Id: I09ebfbee0d282391be17aed7eaf56e3c53c2a5e2
CRs-Fixed: 2438535
2019-04-27 01:01:42 -07:00
Will Huang
79af29fd46 qcacld-3.0: Fix smmu fault when inject deauth frame
1. The original mgmt send path changed by converged p2p component, now
wma_tx_packet() will not invoke when sending station mode action
frames, it invokes p2p_mgmt_tx() instead. But for tx buffers of PMF
frames sending to some target require to do bi-direction dma map to
pass smmu sanity check, which is missed in p2p_mgmt_tx() path.
2. The offchan flag passed to wlan_hdd_mgmt_tx() is not always accurate.
There have been cases where the flag is set even though the operation is
taking place on the home channel, and blindly following the flag leads
to an unnecessary ROC.

Fix it by adding QDF_NBUF_CB_TX_DMA_BI_MAP to new p2p mgmt tx path and
bring back home channel check to override the offchan flag if
necessary.

Change-Id: I9589157e57e95d0c61a432f87a07630c4b77f757
CRs-Fixed: 2423341
2019-04-19 01:56:32 -07:00
Abhishek Singh
7c1c7431da qcacld-3.0: Use peer to get the cipher to decide MIC length
Driver uses cipher stored in vdev to get the MIC length, which
may get updated if multiple peer(TDLS peer in STA case) get
connected to the vdev. Thus depending on latest peer cipher type
the MIC length will be calculated for all peers.

To fix store cipher info in peer and use it to calculate MIC length
for the frame.

Change-Id: I8afbf9a3bb43c294dbacbbaa7fa0746600937d11
CRs-Fixed: 2428482
2019-04-05 03:33:17 -07:00
Jeff Johnson
eb27860f1d qcacld-3.0: p2p: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within p2p replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I3f987cc2603bd3e4d41881db8c847046884d7e76
CRs-Fixed: 2418399
2019-03-19 22:54:38 -07:00
Srinivas Girigowda
cf161406dd qcacld-3.0: Use converged qcacmn macros (part 1)
Replace the existing qcacld-3.0 macros with qcacmn converged
macros.

Change-Id: Ie05f396fcd2e01cf86256f25dbc171bbdf763da9
CRs-Fixed: 2416429
2019-03-19 02:24:23 -07:00
Wu Gao
530adb5158 qcacld-3.0: Pass p2p psoc obj to tx timer callback
When forming P2P connection, mgmt tx timer timeout when tx ack event
queued in scheduler but not processed, and then wild pointer access
in tx timer timeout callback since processed tx ack event and tx
context is freed.

Change-Id: I598e611a9e1d72bbaddbbe3541f37479f3cb9bbb
CRs-Fixed: 2372686
2019-03-12 04:29:47 -07:00
Jayachandran Sreekumaran
2613f32128 qcacld-3.0: Set the correct the peer type in p2p go mode
In p2p go mode the peer type in wlan peer common object is always
set to P2P_CLI. This leads to non-cancellation of NoA after connecting
to legacy stations. Correct the peer type for legacy stations.

Change-Id: Ib706f9a80d0ad367e27fd21eca6cf026cba63f57
CRs-Fixed: 2406127
2019-03-08 06:04:23 -08:00
Wu Gao
4fe2308438 qcacld-3.0: Avoid to start ROC with invalid duration
Up layer tx probe response frame with wait/duration 0, which may be
start ROC with duration 0 and then tx mgmt frame fail since of very
short ROC and no enough time to wait for tx ack.

Change-Id: I5243ff10726b642d8cf18992a230d741f9d2655f
CRs-Fixed: 2397719
2019-03-05 05:36:28 -08:00
Bala Venkatesh
448e8cd53e qcacld-3.0: Move the INI gSkipDfsChannelInP2pSearch to scan component
Currently, INI gSkipDfsChannelInP2pSearch is initialized in P2P
component and later copied to scan component for usage.
Since this INI is only used by scan component and not the P2P
component, move the initialization part also to the scan
component.

Change-Id: I44a6208ab5f3ee062073550143e23e5800342376
CRs-Fixed: 2405395
2019-02-28 18:35:37 -08:00
Bala Venkatesh
31cca2f512 qcacld-3.0: Start the driver roc timer same as supplicant requested
Driver multiplies the supplicant requested roc duration by either
6 or 10 times and then requests FW roc of that much duration.
This is because to extend the roc after rx frame is received.
Currently, host is initializing the internal roc timer for the
duration same as requested to FW.
In such case we cannot extend the roc as currently there is only check
for timer running, but not the remaining time. And FW may give
scan completion event immediately after sending the tx frame.

Change-Id: Ib864949d232c31422f83d78bd6b318cadbf13366
CRs-Fixed: 2397924
2019-02-19 06:56:53 -08:00
gaurank kathpalia
2b2f1b1432 qcacld-3.0: Replace scheduler post msg with scheduler post messsage
Currently many modules use the scheduler_post_msg API which
doesn't allow the driver to know about the src, and destination
modules.

Fix is to call scheduler_post_message which has src, dest, and
the que id.

Change-Id: Ia5c43fe3ceeb7db9dde6241cbabac0ce48f88061
2019-02-06 11:16:22 -08:00
Wu Gao
0bdcbed515 qcacld-3.0: sta interface supports to tx p2p action frames
Required sta interface to support to tx p2p action frames, this is
part of customer requirement.

Change-Id: I1ebebce4d70dcba34427bb2276cd3e1cc23c2bd8
CRs-Fixed: 2388414
2019-01-29 14:31:45 -08:00
Madhvapathi Sriram
3e6627a9f9 qcacld-3.0: Optimize schedule msg post error logging
Change-Id: Ieaddca5f141c99c42ed4a7c954dea2788e353640
CRs-Fixed: 2373015
2019-01-22 02:37:31 -08:00
Jeff Johnson
678ddc4b16 qcacld-3.0: Remove ignore_dynamic_dtim_in_p2p_mode
Change I9b0126d9cc71f7de0d255981ba5fe88f3da05ce2 ("qcacmn: Define
configures about P2P") introduced struct p2p_param. One of the fields,
ignore_dynamic_dtim_in_p2p_mode, has apparently never been used, so
remove it.

Change-Id: I1c7c34d72f22c89f243d2639ec2baccb76be7dc2
CRs-Fixed: 2379074
2019-01-15 18:41:15 -08:00
hangtian
127c953c7f qcacld-3.0: Use qdf_mem_zero for zero initialization
Use qdf_mem_zero for zero initialization.

Change-Id: Ic2b8d907623cf67a4569aaf01398c1b3a2bff707
CRs-Fixed: 2376644
2019-01-14 08:38:03 -08:00
Wu Gao
637d58a4c1 qcacld-3.0: Enable P2P component in CLD
P2P component related files moved from hostcmn to CLD, this change
adds initial functions, enables P2P in Kbuild.

Change-Id: I04102a5f3e59ded13ada15b1b417ae81c7a10e90
CRs-Fixed: 2361500
2018-12-11 17:25:51 -08:00
gaurank kathpalia
b3645e79ae qcacld-3.0: Fix memory allocation latency in beacon process
This is mirror change for 0f9f01950

Currently if the number of APs in the STA environment
are many, then the STA will receive many beacons, whose
beacon process path can take long time, in the kernel
work queue, hence the other processes have to wait
for them to complete, and may get timeout, if the
the time to process the beaocns is larger than their
process timeout.
Fix is to :-
1. Add rate limit to failure conditions of memory
not allocated
2. Make memory allocation in path of beacon process
atomic.

Change-Id: I488b446c23fd01c993f7dd9bd989867fda2331d8
CRs-Fixed: 2363307
2018-12-11 06:11:02 -08:00
Linux Build Service Account
11a56702a8 Move umac/p2p to components/p2p
Change-Id: I8ca4c55470674422eca2dc80dd269cf45d4942ea
2018-12-04 15:32:54 +05:30