Commit Graph

349 Commits

Author SHA1 Message Date
Nachiket Kukade
30ed5c4456 qcacmn: Add support for the new NAN EXT vendor command
As part of the NAN Discovery DBS support, new vendor command
- QCA_NL80211_VENDOR_SUBCMD_NAN_EXT - has been defined that
can carry the binary blob encapsulated within an attribute
and can carry additional attributes to enhance the NAN command
interface. Add the related definitions to support this command.

Add definitions to support the new NAN EXT vendor command.

Change-Id: I83c12c7512066434f8974619e1d953ac78d3a40d
CRs-Fixed: 2339032
2018-12-18 10:13:08 -08:00
Edayilliam Jayadev
83da2273d9 qcacmn: Add Spectral bin scaling parameters as attributes
Add Spectral scaling parameters as vendor attributes to
QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO
vendor subcommand.

CRs-Fixed: 2368187
Change-Id: I212515782c052dca52be1c17f2ec28878554fdb6
2018-12-18 07:46:19 -08:00
Wu Gao
8e0f32b161 qcacmn: Remove TDLS component and related files from hostcmn
TDLS component used in CLD only and needn't in hostcmn. So there
is requirement to move it from hostcmn to CLD. This change removes
policy mgr related files/codes from hostcmn.

Change-Id: Ifeaf1447e74f83a17072d08c4a0ff62a13e91518
CRs-Fixed: 2361584
2018-12-13 02:38:03 -08:00
Wu Gao
9c68825b0b qcacmn: Remove P2P component and related files from CMN
P2P component used in CLD only, and needn't in hostcmn. So move P2P
component from hostcmn to cld. This change remove P2P related/codes
files from hostcmn.

Change-Id: I351ee153588bbcdb62041b4626370d451a3f56bb
CRs-Fixed: 2361487
2018-12-11 17:26:12 -08:00
Bala Venkatesh
ad2b2af274 qcacmn: Trim operation classes to max supported in tdls_extract_params
Operation classes supported can be controlled by user, which can
be sent greater than the max supported operations. This results
in stack overflow in change station command for TDLS sta.

Add check to validate operations supported param given by user
and if it exceeds max supported value, set it to max supported
value.

Change-Id: Idd3a35e38b091546a17d7ec6329f19429e5c289c
CRs-Fixed: 2361464
2018-12-10 11:11:06 -08:00
Sourav Mohapatra
040e9df4a8 qcacmn: Fix rx_rate population in upper layers
Presently the rx rate is not being populated in the upper layer.

Populate the rx rate in the upper layer via the callback function
get_station_stats_cb

Change-Id: I4729bebd56d550152b0af41017a8c9bd5fb5f187
CRs-Fixed: 2359955
2018-12-05 19:01:45 -08:00
Nachiket Kukade
2b5448d685 qcacmn: Remove NAN component and related files from CMN
NAN will not be needed in CMN codebase, to reduce the
unnecessary lines of code all the NAN related files have
been merged into CLD. Remove all those files from CMN,
remove NAN related API's and structures from init-deinit,
target if and lmac components.

Remove NAN component and related files from CMN.

Change-Id: I8fa22b84aff30cfbb7a8cd0a573acf6e0a9d8744
CRs-Fixed: 2338061
2018-12-03 15:18:11 -08:00
Abhishek Singh
fda72d751c qcacmn: Use objmgr API to get 1st vdev from pdev
If Vdev id is not present driver tries to get vdev with vdev id 0
from pdev. Vdev with vdev_id 0 might not be present on pdev so use
objmgr API wlan_objmgr_pdev_get_first_vdev to get the first vdev.

Change-Id: I2ae0d6056709339a8167582ec327269aa84c93f4
CRs-Fixed: 2349699
2018-11-15 05:11:12 -08:00
Min Liu
2fa0775090 qcacmn: Use vdev instead of pdev as parameter
For the case that there is leakage of vdev due to incorrect reference
count usage, and another vdev for the adapter is created, get ref of
vdev by mac address might get the incorrect vdev object since both vdevs
will have the same mac address and the leak one will be first matched
since it is created first.

To address this issue, use vdev pointer in adapter instead of pdev as
input parameter of related functions.

Change-Id: I855497358b5dabf3fc5c0f71a859dd7cae1b450a
CRs-Fixed: 2312155
2018-11-15 01:38:30 -08:00
Alok Kumar
db0d42384f qcacmn: Add vendor event to update TCP parameters
Currently, TCP params are configured through cnss-daemon.

Add vendor event to configure TCP params through Wi-Fi HAL.

Change-Id: Ifb81b810f0fb830515fb4558d016778083323b5a
CRs-Fixed: 2348945
2018-11-14 01:10:55 -08:00
Arunk Khandavalli
2131523a2b qcacmn: Return success during the sched stop request
In a scenario wherein after the sched_scan_start there is a system
recovery and previous pending sched_scan request is lost and during
the sched_scan_stop driver is returning error.
Because of which __cfg80211_stop_sched_scan will not
clear “rdev->sched_scan_req” blocking further sched_scan requests.

Return success in the event that the driver does not have any pending
sched scan to flush.

Change-Id: I6aba88ce033c59ebae54ca792e241a17b649ad73
CRs-Fixed: 2340653
2018-11-12 01:23:52 -08:00
Kiran Kumar Lokere
7b5131b757 qcacmn: Add test config attribute for action frame tx in TB PPDU
Define new test config attribute to configure action frame
transmission in HE trigger based PPDU.

Change-Id: Iad53381ec75303ba0717292b1cff94e94cda3de5
CRs-Fixed: 2322602
2018-11-06 16:16:20 -08:00
Kiran Kumar Lokere
82ba870f2d qcacmn: Define test config attribute to configure HE SU PPDU Tx
Define new test config attribute to configure HE single user
PPDU transmission.

Change-Id: I4539ead98f31d0f0c4dee0534f6a8f29b8bd86cc
CRs-Fixed: 2322595
2018-11-06 16:16:17 -08:00
Kiran Kumar Lokere
fd7bd58138 qcacmn: Define test config for HE OM control config
Add a new wifi test config QCA vendor attribute to configure
HE operating mode control field bandwidth and number of
spatial streams.

Change-Id: Ibe70d28329353e48c7bb323ab367c63be9706038
CRs-Fixed: 2320749
2018-11-06 16:16:14 -08:00
Frank Liu
f846d94d79 qcacmn: Fix potential resource leak when post msg in TDLS
Fix potentail memory leak when post message in TDLS module:
1. Add flush callback to hanlde memory free and release reference count;
2. Check the return status when post message and free the resource for
failure case.

Change-Id: I0a693ccb5704509a4220f26e024ce8c6c823890c
CRs-Fixed: 2341652
2018-11-05 16:15:24 -08:00
Liangwei Dong
cc8676b6a8 qcacmn: Action frame random mac addr tx support
1. Send add random mac addr rx filter WMI command
to target
2. Add/Del the active random mac addr entry
3. Clear random mac addr from target if not active

Change-Id: I9dcbdc20b76d9865da7a8db6ee013bf5e44e4407
CRs-Fixed: 2322097
2018-10-26 10:39:34 -07:00
Min Liu
e6403310ab qcacmn: remove time-consuming debug log
print format "pS" in module will call module_address_lookup in
kernel, which will disable preempt. This could result in some
performance issues, like block rt task vsync_retire_work and
then cause janks.

Change-Id: Ic334490b607d2fcee9eede2a0175c0f92cfc7ffd
CRs-Fixed: 2304391
2018-10-23 08:11:53 -07:00
Abhishek Singh
383ec70e7c qcacmn: Fix the return type of wlan_cfg80211_scan
In success scenarios wlan_cfg80211_scan return the qdf status without
converting it to os return status.

Convert the qdf status to os return status before returning in
wlan_cfg80211_scan.

Change-Id: Iee0503191aca371634c9dae9daf15f5aadfe7e2e
CRs-Fixed: 2334591
2018-10-17 19:37:34 -07:00
Yeshwanth Sriram Guntuka
17f7ea9f26 qcacmn: Fix incorrect NDP ids in NDP end request
NDP ids copied from NDP instance id array for NDP
end request does not use nla_data to copy the ids
resulting in incorrect data getting copied.

Fix is to use nla_data for NDP instance id array to
copy the ids.

Change-Id: I74795367a5c5a57f42cb1a67ece9cebfeb259b71
CRs-Fixed: 2328245
2018-10-06 00:01:36 -07:00
Edayilliam Jayadev
2256850e61 qcacmn: 160 MHz/80p80 support for gen III Spectral
For generation 3 spectral reports for the 80 MHz segments
come as part of different events. To deal with this a
state machine is added to report handler. Noise floor
value of the lowest chain in the chain mask is populated
in the SAMP message.

CRs-Fixed: 2236331
Change-Id: Ie24426449cf8503c9d7f7c30ca617a6697ca2b5e
2018-10-05 02:14:07 -07:00
Yeshwanth Sriram Guntuka
d3ceb840a7 qcacmn: Release vdev ref in os_if_ndp_end_ind_handler
NAN vdev ref count incremented as part of end_ind handler
is not released which will result in the nan vdev not
getting physically deleted.

Fix is to release nan vdev ref in os_if_ndp_end_ind_handler.

Change-Id: I31a32fa241fb9e86d3a64d490722bc42905970c4
CRs-Fixed: 2325580
2018-10-04 14:05:43 -07:00
Varun Reddy Yeturu
49149e898b qcacmn: QCA vendor command support for TWT test configuration
Define new QCA vendor specific test config attributes to configure TWT.

Change-Id: I6386fba6aa794a6e3ecd50e6672810d7738876ef
CRs-Fixed: 2320867
2018-09-28 01:21:32 -07:00
Harprit Chhabada
94508fceaf qcacmn: Update kernel version check
Kernel version check updated for fils akm suite
to support x86 kernel.

Change-Id: I19f57a91ddda90e3007ec26f35ddec95073df1c5
CRS-Fixed: 2315925
2018-09-17 06:09:55 -07:00
Harprit Chhabada
e166eb7b15 qcacmn: Add APIs to translate NL to crypto param
Add following APIs to translate NL param type to
crypto param type.

1.osif_nl_to_crypto_auth_type()
2.osif_nl_to_crypto_akm_type()
3.osif_nl_to_crypto_cipher_type()

Change-Id: Iba0d57e63db98cf81ed0ce5c0a79ae7f8239d1a9
CRs-Fixed: 2300761
2018-09-12 22:27:24 -07:00
Ashish Kumar Dhanotiya
0e1895a859 qcacmn: Add mtrace logging for scan request
We are transitioning to new logging infrastructure
by using existing mtrace functionality.
Add new logging for complete scan request and response path.

Change-Id: Iac644a78ef521721d33ce7568be56b47c55fed6b
CRs-Fixed: 2308272
2018-09-12 00:14:17 -07:00
Kiran Kumar Lokere
7ba00f3455 qcacmn: Define new test config attribute for HE OM control
Define new test config attribute to configure the support
for receiving the MPDU with operating mode control field.

Change-Id: I8f4885ebc705e2d6acfa0c97bdcd6b2bb4baaaca
CRs-Fixed: 2305757
2018-09-11 12:03:00 -07:00
hangtian
71a0cfb91a qcacmn: Copy randomize configuration to sched_scan
Copy randomize configuration to sched_scan, for MAC spoofing.

Change-Id: I357ab5f601bf9e6b17389c621adb63f4977ac844
CRs-Fixed: 2293441
2018-09-06 07:20:02 -07:00
Rachit Kankane
898f6ff055 qcacmn: Featurize P2P Listen Offload
P2P Listen offload is not a requirement for Genoa, hence featurize
P2P listen offload code to save memory foot-print for Genoa.

Change-Id: I3c32b4ee2b37421e49acee4bd20d36e7a8a3bf77
CRs-Fixed: 2304555
2018-09-06 01:42:01 -07:00
Akshay Kosigi
0987f2dcf7 qcacmn: Add FTM build flags
Add FTM flags to enable/disable FTM and enable NL80211 only, enable TX99
only or both.

Change-Id: I18bbbadd65d23221dc4d739e05235f4d81c12043
CRs-Fixed: 2240572
2018-08-29 14:03:02 -07:00
Debasis Das
c2af7e7648 qcacmn: Wrappers for OS API's used for device cfg
Use appropriate wrappers for OS API's used for
device configuration.

Change-Id: I6a8042175d1a5939742be077fa45e8b776eee180
CRs-Fixed: 2222560
2018-08-17 10:29:26 -07:00
Arif Hussain
ba57f10c4a qcacmn: Do not free stats resource in get_peer_rssi_cb()
Do not free stats resource in callback handler,
Let caller free the resource.

Change-Id: I0d77e95d81b8bb995492eb0aebaa3ebf0282718e
CRs-Fixed: 2296924
2018-08-15 16:58:15 -07:00
Kiran Kumar Lokere
cb0c0a1d8b qcacmn: Define new config attribute for MU EDCA param override
Define new wifi test config attribute to override the MU EDCA
params with defaults in the driver.

Change-Id: Ic12e322a82a558a5b01e13d6d5e288eb6933c1cc
CRs-Fixed: 2290381
2018-08-10 20:45:29 -07:00
Arif Hussain
35d89071c2 qcacmn: Refactor cp status callback handlers
Duplicate stats buffer in the callback so that all
allocations get freed by its owner, this will avoid
memory leak issue because of race condition between
umac and upper layer.

Change-Id: Id18d75eb9adc46a6147634eb5b1e0babe32c7c37
CRs-Fixed: 2289355
2018-08-09 14:34:22 -07:00
Shiva Krishna Pittala
6db0dac5b6 qcacmn: Fix SKB leak in Spectral Netlink
Spectral allocates its nbuf using qdf_nbuf_alloc() and calls
Netlink functions to send the SKB to the application layer.
After sending SKB, the Netlink send functions free the SKB using
dev_kfree_skb(). As a result, QDF nbuf tracker treats this
an SKB leak and panics the system.
To avoid this leak, remove the SKB entry from QDF nbuf debug hash table
by calling qdf_net_buf_debug_release_skb() before handling
the SKB to Netlink send functions.

Change-Id: I62c7046d1481c2a38ef5321410ebca9f5f5f34ed
CRs-Fixed: 2285654
2018-08-08 09:12:00 -07:00
Jeff Johnson
589959b228 qcacmn: Remove session_id from nan_datapath_peer_ind (Step 1)
Currently struct nan_datapath_peer_ind contains the following:
	uint8_t session_id;

This is problematic since "session_id" is a legacy concept and should
not be used in the converged project. Fortunately this field does not
actually serve any purpose. But in order to cleanly remove it a 3-step
approach is required.

Step 1 (this change):
Remove the logic from the converged NAN code which currently reads
this field and logs the value.

Step 2 (qcacld-3.0 Change I2819556d48a9dd901158aaa04d6bda9c36f33012):
Remove the logic from the legacy NAN code which sets this field.

Step 3 (qcacld Change Ibeb8007c96ae1a902bfd7dd99a42ba4a291a1dc6):
Remove the session_id field from struct nan_datapath_peer_ind.

Change-Id: If6cf48ccbfe87b23b275720df51c6cc26af9fa5e
CRs-Fixed: 2284399
2018-07-26 12:23:28 -07:00
Edayilliam Jayadev
b3911b4c48 qcacmn: Initialize spectral samp message with zero
Initialize the spectral samp message structure to zero.

CRs-Fixed: 2278403
Change-Id: I5d36662db32820c40f7fb2eafb56942d8654e7f6
2018-07-25 01:24:29 -07:00
Basamma Yakkanahalli
be68e7fa06 qcacmn: Add support to enable strict passive scan
Normally probe request is sent in a passive channel if the
beacon received from the AP. With the strict passive scan
feature, STA doesnot send the probe request even if it
receives beacon from AP.

This can be enabled by using below command.
iwpriv /cfg80211 wifix pas_scanen 1/0

Added a support to send strict passive scan flag to FW in
cfg80211 framework during scan start command.

Change-Id: Ia2c069872541dba64c3d11fc0b533c2d202ee898
CRs-Fixed: 2280181
2018-07-23 23:22:08 -07:00
Jingxiang Ge
2b64e4d5ff qcacmn: Fix use after free for vdev in tdls
When disconnect happens, TDLS_NOTIFY_STA_DISCONNECTION will be
send to scheduler_thread, in bad case, it is processed after
3s later, and the vdev passed in notify msg has been freed in
the period, invalid vdev causes invalid memory access.

change as below:
 1.1 Get vdev ref before send msg
 1.2 register callback for release ref
 1.3 send msg to scheduler_thread
 1.4 process tdls notify msg and call callback function.

Change-Id: I2b03db8b30db623796f2e8299f14ee31e28efb91
CRs-Fixed: 2275019
2018-07-23 09:41:55 -07:00
Yeshwanth Sriram Guntuka
dad6b5beb3 qcacmn: Change log levels in scan component
Change log level for few scm and cfg80211 logs from info
to debug.

Change-Id: I595ddd54c51a601fa2e985c8a221c5dea2e698d8
CRs-Fixed: 2279511
2018-07-21 12:05:49 -07:00
Kiran Kumar Lokere
8b60f1e6c0 qcacmn: Define new wifi test config for HE MAC padding duration
Add new wifi test config for HE trigger frame MAC padding duration.

Change-Id: I77c5cc5c0998111a08d8e805b8c15610e79920d3
CRs-Fixed: 2273827
2018-07-17 21:26:23 -07:00
Nirav Shah
a175314c51 qcacmn: Map all module logs to per-level log APIs
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.

Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719
2018-07-13 10:36:22 -07:00
Chaoli Zhou
d519e6b287 qcacmn: Remove boring log of spectral scan
Such log will show once has the spectral scan result message
need to send to application, which is boring and delete it

Change-Id: I4e7fd8877b354d94022b65a8e43cc4ca3e285943
CRs-Fixed: 2274032
2018-07-13 06:42:57 -07:00
Paul Zhang
d82819b457 qcacmn: Use peer mac to get station stats
Currently, it uses the dev mac as peer mac addr for parameter and
the function wlan_obj_psoc_peerlist_get_peer_by_pdev_id returns
NULL because the mac addr does not match. Then the callback will
be ignored for WMI_UPDATE_STATS_EVENTID.

Change-Id: I6e257d3103315bbacb66b3f5db660cfa883966b5
CRs-Fixed: 2272056
2018-07-13 02:58:43 -07:00
Sandeep Puligilla
6f083bace3 qcacmn: Fix spectral scan compilation issue
Forward declare 'struct wmi_spectral_cmd_ops' in
file wlan_spectral_utils_api.h to avoid
compilation issue when spectral feature flag
is disabled.

Change-Id: Iba8dfbb2007f20d409fbb2d67ee29f702264e50d
CRs-Fixed: 2269005
2018-07-11 23:36:30 -07:00
Kiran Kumar Lokere
0c66f3ef10 qcacmn: Define new test config for HE MU EDCA params
Add new wifi test configs for HE MU EDCA parameters

Change-Id: I1818d7d5ca106b1d5d22188e484fe630a757a67e
CRs-Fixed: 2273817
2018-07-11 18:45:59 -07:00
Kiran Kumar Lokere
9c0d0e0422 qcacmn: Define new test config for Tx beamformee NSTS
Add new wifi test config for Tx beamformee NSTS configuration

Change-Id: I60244985934c042a0b8178ace3a856de66bcaf61
CRs-Fixed: 2269068
2018-07-06 16:34:28 -07:00
Kiran Kumar Lokere
b49263bc0b qcacmn: Add support for SRD channels in ETSI domain
Add support for Short Range Devices 25 mW max power
channels in ETSI regulatory domain.

Add Short Range Devices 25 mW max power channels only
if DSRC feature is disabled.
Provide service apis to check SRD and DSRC channels.

Change-Id: Ib2a1d7cf191d07319cb29038ad60130f5cbe7f16
CRs-Fixed: 2264790
2018-07-05 20:49:34 -07:00
Jianmin Zhu
143f083967 qcacmn: Fix compile implicit conversion from enumeration type error
Error: implicit conversion from enumeration type
'enum wlan_umac_comp_id' to different enumeration type
 'wlan_objmgr_ref_dbgid' [-Werror,-Wenum-conversion]

Change-Id: I641c1eee77e977547841cebb4fd2fef8c06ca18c
CRs-Fixed: 2271058
2018-07-04 10:22:16 -07:00
Sandeep Puligilla
dc89e47503 qcacmn: Fix vendor abort scan failure
Vendor abort scan request is cancelling all
the pdev scans instead of a specific scan command.

Modified vendor abort scan API to cancel specific
scan request.

Change-Id: I087637e44b8ee7f6cc12e9e47db04eec3f9ff93e
CRs-Fixed: 2270030
2018-07-03 15:16:46 -07:00
Kabilan Kannan
762ad5db89 qcacmn: Add SAR V2 support
Add changes to support SAR V2 power limits

Change-Id: Ife7af8db51a45660bc27d1e5b857e38f4dd40935
CRs-Fixed: 2217069
2018-06-29 13:31:50 -07:00