Commit Graph

349 Commits

Author SHA1 Message Date
gaurank kathpalia
74f2a30e7d qcacmn: Modify dwell time and DBS scan based on scan request
Based on the scan request flags from kernel, modify the
adaptive dwell time and DBS scan request policy.
In high accuracy mode, disable DBS scan and adaptive dwell
time scan mode.
In a low power/span mode, enable aggressive adaptive dwell time
and DBS scan to save power and time.

Change-Id: I23498799c05a252cbc9c9f6d50b847130dd0ceac
CRs-Fixed: 2197171
2018-03-24 02:51:22 -07:00
Om Prakash Tripathi
8a54599b3a qcacmn: put bss reference taken in cfg80211_inform_bss_frame
cfg80211_inform_bss_frame_data() takes an extra reference of
bss and it shall be freed by caller.

Change-Id: I6e2a37327fc369d01d237e7ff57221333709b53f
CRs-Fixed: 2205608
2018-03-21 03:39:31 -07:00
Manikandan Mohan
5bdb2fe470 qcacmn: Fix export symbol for multi drivers compilation
Update driver files to use qdf_export_symbol to facilitate
multiple driver module compilation support.

Change-Id: Ic7d7f65b79e92957b02c0386ba98af2adf17506b
CRs-fixed: 2197751
2018-03-19 19:58:03 -07:00
Poddar, Siddarth
697449805e qcacmn: Add new attibutes to NUD vendor subcommand
Add new attributes to vendor subcmd
QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_SET.
This carry the requisite information to
start / stop the connectivity stats collection.

CRs-Fixed: 2168412
Change-Id: Ie8a60754780433f40ed4d103b737c5e8d4e59c28
2018-03-07 03:55:48 -08:00
Yeshwanth Sriram Guntuka
64de344cd7 qcacmn: Add vendor command to get HW mode info
Add vendor command that provides the current
information of WLAN hardware MAC and its
associated WLAN netdev interfaces.

Change-Id: I70ffbdf44ddc45fe606d0ad6e69f1b284cffc6fe
CRs-Fixed: 2194757
2018-03-06 19:11:48 -08:00
Shiva Krishna Pittala
a143f83a27 qcacmn: Add Netlink deinit functionality in Spectral
Define os_if_spectral_netlink_deinit to close the Spectral socket and
de-register the os_if callbacks

Change-Id: I3d054c2a2d630d4d959861d3620592010d04c09a
CRs-Fixed: 2186113
2018-03-06 03:53:47 -08:00
Mukul Sharma
c42f0c13b7 qcacmn: Disable indoor channel on sap start
There are scenario where indoor channel operations
(like  active / passive scan/connect/roam etc)
are not desired / permitted specially in sap case.
Hence add support of disabling indoor channel
on sap start and revert it on sap stop.

Change-Id: Id6e01534532e3076a3e662e6a4f71e8be924165a
CRs-fixed: 2161319
2018-03-05 22:33:53 -08:00
Kiran Kumar Lokere
42398afc08 qcacmn: Add vendor attribute to configure addba and noack
Add vendor wifi test config command attribute to send
addba request with user configuration and to set the
no ack policy.

Change-Id: I2afd62478961a774d16becba49889e855ecf7415
CRs-Fixed: 2196977
2018-03-05 21:43:58 -08:00
Kiran Kumar Lokere
2a450cc1c3 qcacmn: Add vendor attribute to configure WEP/TKIP in HE
Add vendor wifi test config command attribue to force
WEP/TKIP in HE mode.

Change-Id: Iaa00b296b7bcadf355eeddfa837f82a68d1c7b35
CRs-Fixed: 2196977
2018-03-05 21:43:55 -08:00
Soumya Bhat
8b2a535e7a qcacmn: Extend cfg80211 scan cleanup API to support netdev level cleanup
In existing code scan queue cleanup is done during radio detach,
leading to access of freed vdev netdev.

Extend cfg80211 scan cleanup API to support netdev level cleanup.

Change-Id: Ice6b6d262788e71c6d229ed7de6ab0e17f270b6c
CRs-Fixed: 2185302
2018-03-05 04:28:19 -08:00
Dustin Brown
2cd4bfb104 qcacmn: Include qdf_str.h
The qdf_str APIs have recently been moved from qdf_mem. Reference the
new qdf_str.h header file where appropriate.

Change-Id: If97c9c37a7d720a7b93e50ec228da67a8e980c2e
CRs-Fixed: 2196129
2018-03-01 11:39:20 -08:00
Dustin Brown
013ae979a6 qcacmn: Use size_t for qdf_str_len() return type
A recent commit changed the return type for qdf_str_len() to size_t from
int32_t. Update call sites for qdf_str_len() to store the return value
as size_t to match.

Change-Id: Ib8bfad2c1fc7de1f6fc601d1be69e734d3a49dcf
CRs-Fixed: 2196858
2018-02-28 13:22:36 -08:00
gaurank kathpalia
26f9833fb8 qcacmn: Send per chain rssi to upper layer
Add support to send the per chain rssi to upper layer
for each beacon and probe responses.

Change-Id: Ife6cb9e8e65591baf485c54a985f84d842400321
CRs-Fixed: 2177638
2018-02-27 01:57:52 -08:00
Wu Gao
3e25780223 qcacmn: Save vdev id of current roc ctx
RX mgmt frame is from interrupt thread, it may be access freed roc
ctx for low rate case. Save vdev id of current roc ctx in p2p psoc
object. Low log level of P2P RX and TX conf since too many output.

Change-Id: I4c944244f32b844d78bb69d66e341a1f3bf13abf
CRs-Fixed: 2180116
2018-02-27 01:57:47 -08:00
Venkateswara Swamy Bandaru
ce6b9444a4 qcacmn: Add command and attributes for MSDU queue depth threshold
Add QCA vendor command and attributes for vendor specific command to
set MSDU queue depth threshold in target per peer per tid. This command
contains mac addrees, tid, update mask and threshold value.

Change-Id: Ie119ff5aa333bcffcec0850464982dec59fb6a07
CRs-Fixed: 2162455
2018-02-23 06:05:58 -08:00
Kiran Kumar Lokere
ddf7f8840a qcacmn: Add new vendor sub command for wifi test configuration
Define new vendor sub command for configuring the device with
wifi test configuration. Add new test config attributes for this
sub command that are used to configure the device for testbed
configuration.

Change-Id: Ic866d54ba528525c94bcc7b4a5a8cf9c5c1408d0
CRs-Fixed: 2186214
2018-02-10 09:12:43 -08:00
Sandeep Puligilla
cd793f38a3 qcacmn: Configure spectral module for Gen2
-Initialize the default Configuration as
gen2 for spectral module on MCL.
-Add support to general netlink socket.

Change-Id: Iab06f66d18c4791f0ff5483781634df2a7268ddb
CRs-Fixed: 2183870
2018-02-09 09:21:02 -08:00
Shiva Krishna Pittala
101778698b qcacmn: Move Spectral Netlink APIs to os_if layer
Spectral Netlink related APIs are currently present in
target_if layer, move them to os_if layer.

Change-Id: I86a5495f6ec8aa85a2e9639902503a522b023f8e
CRs-Fixed: 2151548
2018-02-09 09:21:00 -08:00
Yeshwanth Sriram Guntuka
f70a37bb90 qcacmn: Move wma_get_buf_start_scan_cmd to ucfg_scan_update_params
Move wma_get_buf_start_scan_cmd logic to common code in
ucfg_scan_update_params.

Change-Id: I4c9dcb48b4862ad10f64e260d87938251e270185
CRs-Fixed: 2180960
2018-02-08 23:34:41 -08:00
Om Prakash Tripathi
7dd49fec17 qcacmn: scan all channels in A/G if 0 channels provided
When wide band scan is enabled, host configures all possible
channels with all possible phy modes. In his case if a scan
is invoked with 0 channels, target will end up scanning each
channel with all possible phy modes which increases scan time
exponentially.
If wide band scan is enabled and scan is issues with 0 channels,
configure target to scan all available channels only in 11A/11G mode.

Change-Id: I7c678ccf43c3238aacbfc59cc7e7bd19763453cc
CRs-Fixed: 2165025
2018-02-07 03:07:47 -08:00
Sameer Thalappil
2d45067512 qcacmn: Replace nla_parse API with the wrapper API
Wrapper API is required to support building against multiple
Linux Kernel versions.

CRs-Fixed: 2184496
Change-Id: Ic4f3f6cf10910bd20b89dee0b250ea3ff265be70
2018-02-07 01:02:11 -08:00
Srinivas Girigowda
ce25ca3027 qcacmn: Add packet fate and driver dump enums
Add packet fate and driver dump enums.

Change-Id: Id27730c014536fb419574ba1270bc50654fea258
CRs-Fixed: 2176675
2018-01-26 00:34:28 -08:00
Dustin Brown
490d818d1d qcacmn: Replace QDF_MAC_ADDRESS_STR
QDF_MAC_ADDRESS_STR has been depreciated in favor of
QDF_MAC_ADDR_STR. Replace all usages with the new macro.

Change-Id: I534923783a32288f7861caf9ae52ca3aac965809
CRs-Fixed: 2179126
2018-01-25 23:39:30 -08:00
akosigi
fffcebf2e9 qcacmn: Converge FTM feature
Support for FTM to make it common between WIN and MCL.

Change-Id: I4a65ca6d73d83e71f6a04405b5c41cdddb0a3c71
CRs-fixed: 2148283
2018-01-16 18:29:53 -08:00
Jiachao Wu
a00b71b980 qcacmn: Use after free when clean up scan queue
When invoked wlan_cfg80211_cleanup_scan_queue, it will try to clean
up pending scan requests in queue from kernel. However, when the
netdevice is down, this request could be already freed by kernel.
To fix this issue, also add the pointer to netdevice in scan_req
so what we can check the status of netdevice in scan_req instead
of cfg80211_scan_request which might already be freed for this case.

Change-Id: I6189c52b638bc4f408e4d4c694c178c7d2f3de52
CRs-Fixed: 2164404
2018-01-14 21:27:44 -08:00
Abhishek Singh
d4212c2c9e qcacmn: Add vendor attribute to enable RSNIE test mode
Adds support for vendor attribute to enable RSNIE test mode. Once test
mode is set the driver will use the RSN IE's as-is from the connect
request. Exclusively used for the scenarios where the device is used as
a cert test bed and not recommended for production.

Change-Id: I5ae9856fe9fb0785a625cadd9a1fed1752bcb08a
CRs-Fixed: 2164530
2018-01-13 01:28:21 -08:00
Jeff Johnson
f2f8dea00b qcacmn: Define a QCA vendor command to retrieve SAR Power limits
Implement a command to retrieve the current SAR power limits.

Change-Id: I599b96b7efd26ca109ebdddfe1f064c649af5c95
CRs-Fixed: 2161445
2018-01-12 01:53:48 -08:00
Dustin Brown
de3edcbb9e qcacmn: Add wrapper for nla_parse_nested()
The Linux kernel version 4.12 introduced an API change to
nla_parse_nested(). Add conditional compilation to call
nla_parse_nested with the correct parameters based on the
version of the linux kernel being compiled against.

Change-Id: I878a29b352c998a751a979f66a9c3c4c7ecfd442
CRs-Fixed: 2167861
2018-01-10 13:40:23 -08:00
Naveen Rawat
68805125fd qcacmn: Avoid WMI TLV structures in NAN target_if
Refactor NAN target_if to make it wmi-type agnostic. Specifically
do not access wmi structures in NAN target_if. All the access to
wmi structures should happen in tlv and non-tlv specific wmi files.

Change-Id: I944b678fc501723d7cd26c9b21c4cc6ddb7fda4e
CRs-Fixed: 2159876
2018-01-09 06:12:48 -08:00
Naveen Rawat
7b5cffe84f qcacmn: Avoid null pointer dereference and OOB access
Avoid possible null pointer dereferece and out of bound access
in NAN component.

Change-Id: I40ba4e340e34e8975c782c0a6329322e3c151326
CRs-Fixed: 2160751
2018-01-04 15:34:36 -08:00
Sandeep Puligilla
4fe1d4b0ee qcacmn: Fix spectral scan compilation errors
Fix spectral scan component compilation errors
on MCL build system.

Change-Id: I903431fba923859e796e0786354608cac2841b0c
CRs-Fixed: 2160819
2017-12-21 01:39:17 -08:00
Krishna Rao
fcb834f3bc qcacmn: Add QCA vendor command and attributes for RROP
Add QCA vendor command and attributes for vendor specific
Representative RF Operating Parameter (RROP) information. This
information is intended for optional use by external ACS. It provides
guidance values for some RF parameters that are used by the system
during operation, so that external ACS can utilize these to compare
between channels, bands, etc.

CRs-Fixed: 2152786
Change-Id: I911a96ad860331ab7af718c166806ffc7d1c5052
2017-12-19 05:45:32 -08:00
Paul Zhang
d6d1635ec8 qcacmn: Implement interface to set WLM level
WLAN Latency module (WLM) is added by fw to gain latency
because of schedule out of service like power saving,
scanning, roaming etc. per the level set by framework.

Change-Id: I6b8775e5f492b6f287d60d39610a544114185a23
CRs-Fixed: 2152290
2017-12-11 22:08:28 -08:00
Chaithanya Garrepalli
30927c532c qcacmn: changes for httstats application
Added a cdp call back to indicates HTT stats response
to ol layer

Change-Id: I90024469a7877419508c230358fdebe4c1525ee7
CRs-Fixed: 2133000
2017-12-08 00:21:23 -08:00
Kabilan Kannan
7efa6e4ab7 qcacmn: Add validity check in tdls deinit path
Add validity check in TDLS deinit path to avoid the
crash.

Change-Id: Id1b782c22346182e182e55557aa41dda99aa4c43
CRs-Fixed: 2151078
2017-12-06 15:25:38 -08:00
Frank Liu
283a2f4221 qcacmn: Dynamic antenna switch in TDLS operation
Support dynamic antenna switch in TDLS:
1. If TDLS NSS is configured to be 1x1, TDLS connections not teardown;
2. When antenna mode switched from 2x2 to 1x1, TDLS connections teared
down and EAGAIN returned; When antenna mode switched from 1x1 to 2x2,
TDLS connections is still teardown, but success in one trial.

Change-Id: I1877002122a96dc8f40c796f8a1b938199d3b67a
CRs-Fixed: 2080461
2017-12-04 23:39:02 -08:00
Adil Saeed Musthafa
65dabe448c qcacmn: Add WMI_UNIT_TEST_EVENTID extraction code
Add corresponding host side extraction for WMI_UNIT_TEST_EVENTID

CRs-Fixed: 2073983
Change-Id: Id8455f58d1ba1accdee7095b211abf9a25c7538c
2017-11-30 17:39:10 -08:00
Edayilliam Jayadev
e0c7fbdb93 qcacmn: Callback functions for legacy spectral apis
Use table of function pointers for legacy api calls
instead of calling legacy apis directely

CRs-Fixed: 2146231
Change-Id: Ia5840208d0de5bd4e78c1d27b8ffdc0cf6cbf298
2017-11-30 05:27:58 -08:00
Edayilliam Jayadev
d8c6a467dd qcacmn: Add QCA vendor commands for spectral scan
Add following vendor commands and their handlers.

 1) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START
        Set the spectral parameters and start scan.
 2) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
        Stop spectral scan.
 3) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CONFIG
        Get current values of spectral parameters.
 4) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_DIAG_STATS
        Get stats for spectral scan debug.
 5) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO
        Get the spectral hardware capability.
 6) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
        Get the current status of spectral scan.

CRs-Fixed: 2146272
Change-Id: I8e048d6c21e9fb1ed286c19df0edcad46f6e6414
2017-11-30 05:27:57 -08:00
Ashish Kumar Dhanotiya
1872489c4c qcacmn: Fill correct mode information for deleted sta
80211 mode information is not getting filled correctly,
fill correct 802.11 mode information.

Change-Id: I7013db95c5010bdaac1f84209534f63d6c7f5719
CRs-Fixed: 2142110
2017-11-30 05:27:51 -08:00
Kabilan Kannan
70113f22aa qcacmn: Add TDLS user command getTDLSPeers
Add TDLS user command getTDLSPeers for TDLS functional verification

Change-Id: Ia02461a364ca604672d728f7dad7c3537e78f067
CRs-Fixed: 2146626
2017-11-20 16:27:00 -08:00
Sandeep Puligilla
4bd7f8c513 qcacmn: Clear the scan list before destroy
cfg80211 scan list is not empty during the
scan priv deinit/list destroy because of that
qdf mem module triggered an assert.

Clear the cfg80211 scan list before
destroying the list.

Change-Id: I391d3b91869d085ec6ff405b7ddca37d7002e5ca
CRs-Fixed: 2136702
2017-11-15 23:37:06 -08:00
Vignesh Viswanathan
3c11bdd460 qcacmn: ADD Vendor Command to enable/disable FILS
Define new Vendor Command to enable/disable FILS.

Change-Id: I4c1a95312a28b184c36854fc2639fb2b431ff99c
CRs-Fixed: 2134802
2017-11-12 11:26:54 -08:00
Om Prakash Tripathi
3e166ff7e4 qcacmn: Add support for wide band scan
Add support for 40 MHz or wider channel bandwidth scan

Change-Id: I72f3cf42e6dc957ef56842d0c333c62169cb6d68
CRs-Fixed: 2139415
2017-11-10 17:41:00 -08:00
Jeff Johnson
a4262320ce qcacmn: Use enum QDF_OPMODE
Change "qcacmn: Rename enum tQDF_ADAPTER_MODE" (qca-wifi-host-cmn
Change-Id I20f1b6d1a0ab4b8fe6a85cefdff96a49e2f4652c) renamed enum
tQDF_ADAPTER_MODE to QDF_OPMODE. Update all references to use the
new name.

Change-Id: Ic6f663dac11a100f168b2626c7c0fbcaccbfca4f
CRs-Fixed: 2141061
2017-11-09 23:42:58 -08:00
Edayilliam Jayadev
20edcbb5e0 qcacmn: Add QCA vendor commands for spectral scan
Add following vendor commands and their vendor attributes for
spectral scan.

 1) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CONFIG
        Get current values of spectral parameters.
 2) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_DIAG_STATS
        Get stats for spectral scan debug.
 3) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO
        Get the spectral hardware capability.
 4) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
        Get the current status of spectral scan.

CRs-Fixed: 2126313
Change-Id: Id1e9b030f85de166696835fadd36d7856a89625d
2017-11-09 22:08:05 -08:00
Poddar, Siddarth
0a1742186a qcacmn: Add vendor attribute to set/get wifi configuration
Add vendor attribute for data used by
VENDOR_SUBCMD_SET_WIFI_CONFIGURATION and
VENDOR_SUBCMD_GET_WIFI_CONFIGURATION subcommands.

Change-Id: If64da28c040868d5b42af202c647251db1a684c0
CRs-Fixed: 2137081
2017-11-06 19:21:26 -08:00
Kiran Kumar Lokere
584e6617ca qcacmn: Enable scan mac randomization if user cfg is set
Enable scan randomization only if gEnableMacAddrSpoof
configuration is enabled

Change-Id: I1b9accb7fe1049ee6c5dda2a4f5920c0908196ff
CRs-Fixed: 2104796
2017-11-01 14:39:19 -07:00
Kabilan Kannan
52a3a3ad05 qcacmn: Fix TDLS set state cmd sequence in concurrent TDLS connections
TDLS set state cmd to firmware is going out of sequence, if STA
is disconnected, when concurrent TDLS connections are active.
This out of sequence causes crash in the firmware.
Fix the out of sequence issue, by grouping all the TDLS delete
peer commands into one single command.

Change-Id: Idd315d544c46bcf063881bff5be70cb5d9ad0ea2
CRs-Fixed: 2123838
2017-10-23 08:06:24 -07:00
Naveen Rawat
9523aa15fa qcacmn: Add ucfg_wifi_pos set/get apis for FTM value
Define ucfg_wifi_pos apis for set/get of fine_time_meas_initiator.

Change-Id: Id33ba633c58e5b286211da9343797fc99ec364aa
CRs-Fixed: 2124286
2017-10-20 13:54:00 -07:00