Commit Graph

39 Commits

Author SHA1 Message Date
Wu Gao
a68714fc61 qcacld-3.0: Drop action frames for SAP mode
For SAP mode, FW doesn't support tx action on different band, and
shouldn't send on DFS channel. So drop action frames for SAP mode.

Change-Id: I2015957346824787d0d902b2d21746d10e2cc9c0
CRs-Fixed: 2718417
2020-06-25 21:27:07 -07:00
Abhishek Singh
2281c2d6bb qcacld-3.0: remove dependency of public files from wlan_objmgr_psoc_obj.h
Remove dependency of wlan_lmac_if_def headerfiles from
wlan_objmgr_psoc_obj.h

Change-Id: I5f6120a97be3ae6835023ceaef455088820809de
CRs-Fixed: 2657771
2020-05-15 10:41:20 -07:00
Abhishek Ambure
48b790c62d qcacld-3.0: Add INI support to disable STA roaming
Use INI "sta_disable_roam" to disable roaming on STA interface if
connection on other interfaces ex. p2p, ndp comes up. Each bit of
the INI "sta_disable_roam" represents an interface.
ex. LFR3_STA_ROAM_DISABLE_BY_P2P BIT(0)
    LFR3_STA_ROAM_DISABLE_BY_NAN BIT(1)

As INI "sta_disable_roam" is generic for all the interfaces, cleanup
for INI "p2p_disable_roam" done.

Change-Id: Icd05a97c640ca07978d9960a33de036ed6fe38df
CRs-Fixed: 2637555
2020-03-13 19:22:14 -07:00
Pankaj Singh
8cf6c634b6 qcacld-3.0: Disable all roam scan in case p2p connection is present
Glitches seen after the STA disconnection because of the roam scan
triggered on a heartbeat failure ( beacon miss ).STA does a partial
scan followed by full scan causing the DUT to go off-channel from
the STA and P2P home channel, causing the music BLIP.

Fix is to disable roaming irrespective of data traffic present
or not on P2P interface and enabled again once P2P is disconnected.

Change-Id: I5ddf946adbfbe99d5b20c23c46b2b4ac0bfac47f
CRs-Fixed: 2632939
2020-03-04 15:31:46 -08:00
Pankaj Singh
ab580fb1fb qcacld-3.0: Remove wait for event from p2p_cleanup_param
Currently the driver waits for cancel roc request in the
API p2p_cleanup_param which gets executed in the scheduler context.
Scan cancel requests also executes in the scheduler context, so
the wait would fail as the scheduler thread is waiting for
the message to get processed which it would only process, which
would in turn cause a latency in P2P connection.

Fix is to remove the wait which is mentioned above.

Change-Id: I12a1a7e4896ecf3a9c6e8f138e18637690cbd049
CRs-Fixed: 2622051
2020-02-27 06:28:59 -08:00
Abhishek Singh
6d5bac846a qcacld-3.0: Optimize logs in STA disconnect path
Optimize logs in STA disconnect path

Change-Id: I3534f3ab89ebbdd919c02120328013e42d2894f4
CRs-Fixed: 2623124
2020-02-18 01:53:50 -08:00
Abhishek Singh
3c56fdd796 qcacld-3.0: Optimize logs in TX assoc req and RX assoc rsp
Optimize logs while sending assoc req and assoc rsp handling
frame by dumping the assoc req frame and not printing each
params separately. Also avoid multiple dump of same frame.

Change-Id: Ibcf2d9aa8de292b9b9f4b4c6a53a0f694d69475c
CRs-Fixed: 2619553
2020-02-13 22:08:33 -08:00
Pankaj Singh
a740a9a310 qcacld-3.0: Reduce excessive logging in P2P module
Currently there are lot of duplicate logging. Identify and
reduce those logs that are not absolutely necessary.

Change-Id: Ia2df5a46610b885be5e27455aef7f7281c7c3c55
CRs-Fixed: 2617719
2020-02-13 08:11:31 -08:00
Pankaj Singh
134bb1fe06 qcacld-3.0: Reduce excessive logging in P2P module
Currently there are lot of duplicate logging. Identify and
reduce those logs that are not absolutely necessary.

Change-Id: I649ce3bec8c3c8542fe9edd08907da9ab01fa948
CRs-Fixed: 2617504
2020-02-07 14:13:03 -08:00
Arun Kumar Khandavalli
83d42e241d qcacld-3.0: Selectively reduce the p2p logs
Reduce p2p component logs loglevel form info to debug.

Change-Id: I56e3710a33de280d7c62e88de53f11d61a6515da
CRs-Fixed: 2607028
2020-01-27 05:16:46 -08:00
Abhishek Singh
fe26a582f9 qcacld-3.0: Handle the error action frames in mgmt tx
For Action frame which are not handled, the resp is sent back to the
source without change, except that MSB of the Category set to 1.
so driver may get action frame with WEP BIT set and category with
MSB set.

Due to the error category, driver is not able to determine if its
a RMF frame and thus doesn't add the MIC header and data length to
the frame.

Now with WEP bit set and MIC header and MIC data length not
added to the frame, the firmware assert due to invalid frame length.

Thus reset the WEP bit in the frames sent by mgmt tx path and add
WEP only if keys are set and frame is RMF. Also ignore MSB to get
the actual action category of the action frame.

Change-Id: I2a2918dbb15979e4184dbf8489e5c3ade15d0e6f
CRs-Fixed: 2580233
2019-12-05 16:39:36 -08:00
Wu Gao
480a304199 qcacld-3.0: Cleanup tx context if cancel mgmt tx
It doesn't cleanup tx context immediately, which cause mgmt will be
tx again unexpectly. Then P2P state mismached and form connection
failed.

Change-Id: I9eba9df057221e5dabf5ff42fe0d2fd695aea9df
CRs-Fixed: 2564622
2019-11-19 01:45:36 -08:00
Ashish Kumar Dhanotiya
ca5d922263 qcacld-3.0: Process rx_mgmt_pkt based on frequency
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: Ib063070738ecdb4f83379eafe50629778a490aae
CRs-fixed: 2522693
2019-10-18 02:55:17 -07:00
Tushnim Bhattacharyya
731d63660d qcacld-3.0: Replace timer_stop with timer_stop_sync in p2p module
Replace timer_stop with timer_stop_sync & add some debug print to
track the roc cookie.

Change-Id: I9a71d30b31da3de2bf3242e4a310bad4542b10aa
CRs-Fixed: 2537164
2019-10-03 03:33:47 -07:00
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