Commit Graph

174 Commits

Author SHA1 Message Date
Jeff Johnson
3d70ae460b qcacmn: os_if: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I0d9c1ff59217a115770baea9edd17c57a10a3bc2
CRs-Fixed: 2230684
2018-05-18 02:17:33 -07:00
Jeff Johnson
dc9c55962d qcacmn: Fix typo "lenght"
Replace typo "lenght" with correct spelling "length".

Change-Id: Ieea0c547c61248e510835d16a9fa55ace486df23
CRs-Fixed: 2238309
2018-05-17 00:47:02 -07:00
Jeff Johnson
3a1832e598 qcacmn: Fix typo "capabilites"
Replace typo "capabilites" with correct spelling "capabilities"

Change-Id: I8efa1d974ecabb1466bdf27ec305fd9960da0616
CRs-Fixed: 2238309
2018-05-17 00:46:46 -07:00
Naveen Rawat
c223147287 qcacmn: Add osif implementation of get_stations_stats
Add changes to support get station stats from within the cp stats
component.

Change-Id: I17235bf66931b2221a5ddd24aa5f761d5db7eab7
CRs-Fixed: 2210313
2018-05-16 23:20:14 -07:00
Naveen Rawat
6b44ef3460 qcacmn: Use NDP vendor attribute from qca_vendor.h
Update qca_vendor.h with latest NDP vendor attribute definitions
and use those definitions in NAN component.

Change-Id: I43f0457690b1c4027adcd0abe4ef2ac2a8f9b068
CRs-Fixed: 2239047
2018-05-14 16:50:48 -07:00
Jeff Johnson
6500e56b38 qcacmn: Fix NDP Config QoS policy
The qca_wlan_vendor_ndp_policy for the attribute
QCA_WLAN_VENDOR_ATTR_NDP_CONFIG_QOS currently specifies type
NLA_BINARY with a maximum length of NDP_QOS_INFO_LEN (255). However
this attribute is defined to be an unsigned 32 bit value, and
nla_get_u32() is used to read the value, so change the policy to use
type NLA_U32 so that nla_parse() can properly verify that the TLV
payload has (at least) 4 bytes of data.

Change-Id: Iee5b620ef199b731fc6a449d0055db328430921b
CRs-Fixed: 2237660
2018-05-14 16:50:46 -07:00
Jeff Johnson
e30a7f5b7d qcacmn: Fix NDP Response Code policy
The qca_wlan_vendor_ndp_policy for the attribute
QCA_WLAN_VENDOR_ATTR_NDP_RESPONSE_CODE currently specifies type
NLA_U16. However this attribute is defined to be an unsigned 32 bit
value, and nla_get_u32() is used to read the value, so change the
policy to use type NLA_U32 so that nla_parse() can properly verify
that the TLV payload has (at least) 4 bytes of data.

Change-Id: I915a94e7449c2bc1abde64e2a7f5df6a58488ed6
CRs-Fixed: 2237659
2018-05-14 13:58:58 -07:00
Jeff Johnson
444703f75f qcacmn: Fix NDP Discovery MAC address policy
The current qca_wlan_vendor_ndp_policy for attribute
QCA_WLAN_VENDOR_ATTR_NDP_PEER_DISCOVERY_MAC_ADDR uses type NLA_BINARY.
Unfortunately this type uses the len as a maximum length and not a
minimum length which means that nla_parse() cannot guarantee that 6
bytes of MAC address are present.  Change the policy to use type
NLA_UNSPEC so that nla_parse() will ensure that the NDP Discovery MAC
address TLV contains (at least) 6 bytes.

Change-Id: I2c7e1efdb413dbd2f79c36ed1626c006b86e8b5b
CRs-Fixed: 2237658
2018-05-14 13:58:54 -07:00
Edayilliam Jayadev
df3100c157 qcacmn: Share Spectral HW gen as part of capability exchange
Spectral scan period is not in terms of tclk periods for
generation 3 Spectral HW. It is directly in micro seconds.
Default value is 224 us. Driver needs to use 224 us as
default value. Application needs to display the unit as
tclk period till generation II and micro second for
generation III. For this driver will be sharing the
Spectral HW generation info to application as part of
the capability exchange.

CRs-Fixed: 2225740
Change-Id: Iaeda8ebb77c2a39824b5f919e8578ff4d56c1aa5
2018-05-14 11:39:29 -07:00
Edayilliam Jayadev
0a04a141c2 qcacmn: Add spectral hardware generation attribute
Add spectral hardware generation attribute to
QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO vendor command.

CRs-Fixed: 2225740
Change-Id: I81a2780319ea7b9c5a895dc3e41ad6730b8dd9bc
2018-05-14 11:39:27 -07:00
Naveen Rawat
9fdd4f55e6 qcacmn: Re-factor buffer len calculation for NDP events
Re-factor vendor event buffer length calculation for NDP events
to a separate function call.

Change-Id: I6828067d0e81987d7c903fd7f7df05b3a4eadbe3
CRs-Fixed: 2183658
2018-05-02 18:46:14 -07:00
Naveen Rawat
1a9ee7dc49 qcacmn: Define ucfg api to free stats_event
Define ucfg api to free stats_event, since it will be called from
osif and hdd.

Change-Id: Ifeea3e970ddca1ed508960c39a2a39f0ed755bd9
CRs-Fixed: 2231150
2018-05-02 04:35:12 -07:00
Naveen Rawat
581787f9af qcacmn: Add osif implementation of getting peer rssi
Add changes to support get peer rssi from within cp_stats
component.

Change-Id: Ic5e9d85e24b1f272df1fa7b6482a797af2aca66a
CRs-Fixed: 2222777
2018-05-02 04:35:09 -07:00
Arif Hussain
083d9da267 qcacmn: Add kernel backport versions
Add kernel backport versions for below kernel flag
- CFG80211_REPORT_BETTER_BSS_IN_SCHED_SCAN

Change-Id: Ie89b8c639070ffe25c4410088c0e154801f5f07d
CRs-Fixed: 2232251
2018-05-01 21:37:31 -07:00
Aditya Sathish
0e6b17aeb3 qcacmn: Add NL80211 Testmode Conditional Directives
Added NL80211 testmode if directives to enable compilation when not
supporting the feature.

Change-Id: I00b8d982035b78f5893bd1bec79309c7ffa48d05
CRs-Fixed: 2231059
2018-04-26 21:39:05 -07:00
Naveen Rawat
b7ffd12530 qcacmn: Add osif implementation of get_tx_power
Add changes to support get tx power from within cp_stats component.

Change-Id: Ifafee77033b8db75e6c9ad201a26ba8bbe72efd4
CRs-Fixed: 2210311
2018-04-19 22:06:57 -07:00
Ravi Joshi
4d577e4c2b qcacmn: Fix issue while handling ndp response without iface name
Check for interface name only when ndp response is "accept" from user. In
case of "reject" discard interface name provided and instead use first NDI
available.

CRs-Fixed: 2222041
Change-Id: Ib02fe7d5b93f8e388658e511317664a4999b5fa6
2018-04-19 14:15:24 -07:00
Ravi Joshi
295cfd1a85 qcacmn: Accept nan responder request without iface name
The service layer need not provide the iface name in the
responder request to the driver if the request is being rejected.
The service layer maps the ndp_instance_id only after accepting
the request, if the ndp indication is rejected, the user space
has no knowledge of the iface name on which the NDP would have
gotten mapped if it were successful

CRs-Fixed: 2222041
Change-Id: I94a7de0c98c14dbe2389dd8364b6dd78858a9d0a
2018-04-19 14:15:21 -07:00
Naveen Rawat
0b83e8489c qcacmn: Add osif implementation of get_wake_lock stats
Add changes to support get wake lock stats from within cp_stats component.

Change-Id: I1bee578a773c6c2b4cac69c907422a4cb30084d3
CRs-Fixed: 2210309
2018-04-17 13:17:56 -07:00
Shashikala Prabhu
48ecda84bf qcacmn: Fix 4.9GHz cfg80211 issues
Send correct channel list to Firmware. When cfg80211 is enabled, STA
is scanning in a set of wrong channels. When scan callback happens
from cfg80211 module the cfg80211 module gives us the channel numbers.
There are some channel numbers which are same in both 5GHz and in
2.4Ghz bands. For example, channel number 1 maps to frequency 4942MHz
in 5GHz band, but in 2.4GHz band channel number 1 maps to frequency
2412MHz. So cfg80211 may give us a wrong channel number. Since we have
the exact frequency of the channel we should use that instead of the
one given by cfg80211.
The channel object given to the driver by cfg80211 during scan callback
is the same as the one registered to cfg80211 by the driver. So we can
use the channel frequency inside the channel object for scan which is
not changed by the cfg80211 module.

Use regdb function to convert channel number to frequency while receiving
scan entries from FW. Use pdev band (5/2.4GHz) information to map to
correct 2.4Ghz/5Ghz channel frequency.

Half/Quarter rate flags in the scan_ctrl_flags are not set. Set
Half/Quarter rate flags in scan_ctrl_flags.

Change-Id: I9df8f0e90938f86f6987574f8259a5cf66b672aa
CRs-Fixed: 2180273
2018-04-13 14:51:30 -07:00
Naveen Rawat
685bf25eb3 qcacmn: Move hdd_request_manager to qcacmn osif layer
Move hdd_request_manager to qcacmn osif layer, which will be used
by CP_STATs component.

Change-Id: Iebf7f9d259793b56cc70c5b3f9dec14a5ef35b25
CRs-Fixed: 2220035
2018-04-13 12:16:03 -07:00
Kiran Kumar Lokere
cbb21ca115 qcacmn: Add wifi test config attribute for HE LTF config
Add wifi test config attribute to configure HE LTF.

Change-Id: Id7e8919a983d47e661b71c032c99fed69e010323
CRs-Fixed: 2221172
2018-04-13 09:30:39 -07:00
Naveen Rawat
70fd32e41b qcacmn: Add new files for cp_stats mobile connectivity component
Add file for mobile connectivity to use control path stats component.

Change-Id: I11ba1103745371ebf740ee2ec06dd04912afa7c9
CRs-Fixed: 2210307
2018-04-11 10:52:45 -07:00
Naga
f325f1fe60 qcacmn: Add support for cp stats in os_if
Add framework for cp stats cfg80211 command handlers

CRs-Fixed: 2192386
Change-Id: Ief2a9f3f7d1f26722f9db09fcab674270d1859a1
2018-04-06 17:49:52 -07:00
Tushnim Bhattacharyya
f940918d4f qcacmn: Use enum type policy_mgr_con_mode instead of enum QDF_OPMODE
Use enum type policy_mgr_con_mode instead of enum QDF_OPMODE.

Change-Id: Ia7a6bb5e05c6dac650dc6386734462547365a4eb
CRs-Fixed: 2214003
2018-04-02 16:41:50 -07:00
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