Commit Graph

130 Commits

Author SHA1 Message Date
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
Vignesh Viswanathan
051ef2e644 qcacmn: Support FILS roaming
Add cmn support for the following:
- Update ERP info in RSO Start
- Update HLP info in a new command WMI_PDEV_UPDATE_FILS_HLP_PKT_CMDID
- Set/Delete PMK cache info with WMI_PDEV_UPDATE_PMK_CACHE_CMDID
- Process FILS TLV in Roam Synch Indication and update the FILS info
  [seq number,PMK, KEK, realm] to Supplicant.

Change-Id: I239bf5d6c4455d39181e335dbf73bcade16aee8e
CRs-Fixed: 2089128
2017-10-18 18:28:54 -07:00
Sandeep Puligilla
4296edb2c9 qcacmn: vendor support to block scans
Add vendor command support to block all the
scans triggered from host.

Change-Id: Id225ebade05f6cba11382b0dd8f67e9d1ee006e4
CRs-Fixed: 2080146
2017-10-17 11:48:44 -07:00
Wu Gao
02782bed09 qcacmn: Initialize variable in cfg80211 roc and mgmt tx
To avoid unexpect issue, initialize variable in cfg80211 roc and mgmt
tx.

Change-Id: I5cc11cf011a136f29f6815142a45918ed71583fa
CRs-Fixed: 2091906
2017-10-17 10:42:30 -07:00
Mukul Sharma
9b53a47e39 qcacmn: Add AUTH STATUS and RETAIN CONNECTION attribute
Add QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_STATUS /
QCA_WLAN_VENDOR_ATTR_ROAM_AUTH_RETAIN_CONNECTION attribute in vendor
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH_INDEX subcmd.

Change-Id: I1a96a240c314c1c4199b2fac38ebbaa4f667b28d
CRs-Fixed: 2045932
2017-10-13 09:48:13 -07:00
Manjeet Singh
c73cd7db11 qcacmn: Follow spec for NL80211_CMD_START_SCHED_SCAN
qcacld-2.0 to qca-wifi-host-cmn propagation

If no SSID are passed to NL80211_CMD_START_SCHED_SCAN cmd,
interface spec requires that an active scan is not needed.
Therefore a passive scan is now requested by cfg80211_sched_scan_request
for this case.

Change-Id: I1b1b9232ffb9d8d5c0bc9a1d75145d39c9fe9e6b
CRs-Fixed: 902092
2017-10-12 14:22:11 -07:00
Yue Ma
04dfab5ac6 qcacmn: Add API to init scan runtime suspend lock
Commit fb9d5acfed and 645749571d introduce an API to deinit scan
runtime suspend lock in order to fix a memory leak issue. However,
it breaks SSR because scan lock init and deinit are not matching
during SSR which results double free happens in the rmmod after
SSR. Add the API to init scan runtime suspend lock so that it can
be added in the correct place during SSR.

Change-Id: Ied85b16b199fdbf43fef4c966bed56c9f7bb0e86
CRs-fixed: 2120661
2017-10-12 14:21:48 -07:00
Anurag Chouhan
6e56986cae qcacmn: Introduce QCA_NL80211_VENDOR_SUBCMD_HANG
Event indicating to the user space that the driver has detected an
internal failure. The driver is expected to recover from such a failure
automatically, e.g., by resetting the device.
This event carries the information indicating the reason that triggered
this detection.

Change-Id: Ia13e6f102e5e18ec4864ed258728369d51a77ff4
CRs-fixed: 2120886
2017-10-06 07:58:02 -07:00
Dustin Brown
54771c7c6d qcacmn: Throw error if nla_parse is used directly
In order to support multiple nla_parse function signatures across
different kernel versions, a new wlan_cfg80211_nla_parse wrapper was
introduced. However, it is easy for propagations or new code to
reintroduce nla_parse. Redefine nla_parse to throw an error, to prevent
the function from being reintroduced into the code base.

Change-Id: I3015d1b3f25a1469632401899555a6260ba2dfc1
CRs-Fixed: 2116051
2017-10-05 16:59:43 -07:00
Naveen Rawat
dec67cca98 qcacmn: Fix compilation error in os_if_wifi_pos_register_nl
Fix compilation error in os_if_wifi_pos_register_nl

Change-Id: I851e0aeef694967ca7580fdb3799baaf74397fd7
CRs-Fixed: 2120477
2017-10-04 19:25:54 -07:00
Krishna Rao
ddd81ae024 qcacmn: Add 11ax channel property flags for use with external ACS
Add 11ax channel property flags for use with external ACS. Use the
remaining available bits in qca_wlan_vendor_channel_prop_flags for the
first few 11ax flags. Then add qca_wlan_vendor_channel_prop_flags_2 as
a continuation of qca_wlan_vendor_channel_prop_flags and add the
remaining 11ax flags there. qca_wlan_vendor_channel_prop_flags_ext is
not used since it is currently not intended for holding such
information.  Rather it is meant for holding additional control
information related to features such as DFS, CSA, etc.

CRs-Fixed: 2115743
Change-Id: I5294f9a8649f79f7012cd790119be773b40f049d
2017-10-04 14:36:03 -07:00
Jeff Johnson
6a1a0dafb4 qcacmn: os_if: Replace instances of unadorned %p
Replace instances of unadorned %p in os_if.

Change-Id: Iddbd3deb6562e462358ed7bd0f51b18a027eee5a
CRs-Fixed: 2111274
2017-10-03 16:02:35 -07:00
Nachiket Kukade
6e3ecc0cb4 qcacmn: New vendor sub-cmd id to change BmissFinalBcnt dynamically
To support the CLD implementation to change BmissFinalBcnt dynamically
(Change-Id: Ie3c3895d48248d349400e755f07edc807e335b44), add new vendor
sub-command id QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BMISS_CNT as 52.

Change-Id: I8df8faab1b49d8fc30a1b775d5f5fec5139ca25d
CRs-Fixed: 2084255
2017-09-27 19:23:53 -07:00
Ganesh Kondabattini
727c4b3880 qcacmn: Add support for QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS
Add support for handling vendor sub command
QCA_NL80211_VENDOR_SUBCMD_ACTIVE_TOS and its attributes.

CRs-Fixed: 2100587
Change-Id: I8734deb4eb2e2481329131d47b747d266463350a
2017-09-25 13:21:41 -07:00
yeshwanth sriram guntuka
074f5e91b8 qcacmn: Send default ies in scan request to fw
On framework initiated scan, ies are not sent in
scan request from upper layer and default scan ies are
not sent as part of scan request sent to firmware. This
results in not including oce ie in probe requests for
framework initated scans

Fix is to copy default ies to ie field in scan request
sent to firmware.

Change-Id: I895563bafc2a2b6e483d08cb28ee44ad34f5af70
CRs-Fixed: 2087124
2017-09-21 23:30:19 -07:00
Anurag Chouhan
d40d1d1df4 qcacmn: Add wmi interface command to support debug stats
Add wmi interface command to support set/get NUD debug stats.

Change-Id: I2c5e9e2f6b0bb2e7b7b0a6404e939b33bffa3f18
CRs-Fixed: 2011463
2017-09-21 16:41:48 -07:00
Dustin Brown
bbc972659d qcacmn: Remove name indirection for ieee80211_get_channel()
Versions 4.11+ of the Linux kernel removed '__' from the beginning of
ieee80211_get_channel(). Migrate all calls from __ieee80211_get_channel
to ieee80211_get_channel instead.

Change-Id: I0548259beb59f0a3cb27fe6fee1dd9626cc624cc
CRs-Fixed: 2098795
2017-09-18 12:21:19 -07:00
Dustin Brown
9feb201862 qcacmn: Fix compile error for cfg80211_sched_scan_results()
The 4.12 Linux kernel adds a request id parameter to
cfg80211_sched_scan_results(). Add conditional compilation to provide
the correct parameters based on the kernel version.

Change-Id: I2008895e390af88af0b22df6bfd7ef753d25b419
CRs-Fixed: 2092073
2017-09-18 12:21:05 -07:00
Dustin Brown
1b57dba257 qcacmn: Add wrapper for nla_parse()
The Linux kernel version 4.12 introduced an API change to nla_parse().
Add conditional compilation to call nla_parse with the correct
parameters based on the version of the linux kernel being compiled
against.

Change-Id: Ie904d217a42a2396f8245251a9c90a15dac2c0c9
CRs-Fixed: 2093354
2017-09-15 15:26:31 -07:00
Sreelakshmi Konamki
77dd1efb64 qcacmn: Add support for PNO scan in connected state
qcacld-2.0 to qcacmn propagation

Add changes to support PNO scan in connected state to find better Ap's
based on rssi threshold, band and rssi preference.

Change-Id: I0744297cc5269f0fe37613247c911102e293d8e9
CRs-Fixed: 2000342
2017-09-08 15:46:55 -07:00