Commit Graph

30 Commits

Author SHA1 Message Date
Manikandan Mohan
ae310478dd qcacmn: Fix channel conversion utility functions
Update wlan_chan_to_freq and wlan_freq_to_chan utility functions to
handle invalid channel number and freq value of 0 respectively.

Change-Id: I92e2d5026bb93439b77b749d447654ceb9413fde
CRs-fixed: 2546771
2019-10-19 22:11:54 -07:00
Om Prakash Tripathi
03db80d4e7 qcacmn: Fix deadlock in wlan_pdev_chan_match due to cross locking
wlan_pdev_chan_match used to take current vdev lock on current
iterating vdev and then on vdev for which channel set is triggered.
If two cores happed to try setting channel on two different vdevs,
cross locking may occur. Fix this by releasing one lock and then
acquiring other lock.

Change-Id: Ic1a6ca448c6d535e949102bc5a8a45971c8babd2
CRs-Fixed: 2460054
2019-05-31 07:40:25 -07:00
Abhishek Singh
3b2666f1a5 qcacmn: Cleanup VDEV SM related flags and unused code
Legacy code for VDEV_SM is no more used, thus clean up flags
CMN_VDEV_MLME_SM_ENABLE and CMN_VDEV_MLME_CMPT_ENABLE.

Change-Id: I4f7b1099d4929f6250b1868c53b73d7c235a9c22
CRs-Fixed: 2457270
2019-05-24 06:42:20 -07:00
Bala Venkatesh
2864718af8 qcacmn: Update comments in scm_req_update_concurrency_params
Update the commment sections in function
scm_req_update_concurrency_params and
wlan_util_get_mode_specific_peer_count.

Change-Id: I076beddacb6efa10f78a1d850f9b74886e9cdcdc
CRs-Fixed: 2439552
2019-04-29 01:44:40 -07:00
Karunakar Dasineni
142f9baf47 qcacmn: Add new feature to support protocol tags
With this feature, using appropriate commands, link layer, network layer,
transport layer and some of the application protocols can be tagged with
the user provided tag values for easier identification of protocols. The
supported protocols today are as follows.

ARP, DHCPv4, DHCPv6, DNS over TCP (v4), DNS over TCP (v6), DNS over UDP
(v4), DNS over UDP (v6), ICMPv4, ICMPv6, TCPv4, TCPv6, UDPv4,
UDPv6, IPv4, IPv6, EAP.

Receive packets are tagged by hardware. Tags are applied after the first
matching rule. Hence it is recommended that the rules are
programmed in such a way that tags are configured from application layer
to data link layer to get expected results.

Change-Id: Ibdc2bd2b78234f482074955e89fb93f05988eaca
2019-04-26 15:31:10 -07:00
Bala Venkatesh
d0838f8a9c qcacmn: Restrict dwell time only if SAP/GO is connected
Currently, in case of SAP/GO present active dwell time of scan req
on STA iface is restricted. This can result in less scan time but
STA can miss some AP's. So, decrease dwell time only if some client
is connected to SAP or GO.

Change-Id: I46fb76792941b7c79f541b8b358d02bb944f0086
CRs-Fixed: 2436910
2019-04-19 01:57:01 -07:00
Nachiket Kukade
dace806a9d qcacmn: Move wlan utility modules due to layering violation
Modules wlan_util_get_vdev_by_ifname/wlan_util_vdev_get_if_name,
which are part of wlan utility under UMAC, are accessing OS IF
private structure that points to the interface name. This is a
layering violation since OS IF private structure should only be
accessed from OS IF layer. Move these modules in NAN OS IF files
in CLD where they are more appropriate.

Move modules that access os if priv to NAN OS IF files in CLD.

Change-Id: Ie4c2f51cddf3abfccbaa6a80580f38345697cfd1
CRs-Fixed: 2384474
2019-03-24 14:54:58 -07:00
Srinivas Pitla
604e249bc1 qcacmn: Limit channel compare to num, sec freq2
In current code, full channel pointer is compared.
From testing, it is found that FW can handle different modes on
same frequency, so limiting the check to channel number and sec freq2

Change-Id: Iafb43c911937ee8ae6ebb7d15887a30e6dd43679
CRs-Fixed: 2393554
2019-02-07 00:13:15 -08:00
Vivek
332df1206f qcacmn: Change log level of a debug message
Add change to decrease the log level from error to debug

Change-Id: Ic07a0dd083e6bd112a7d45af5397330ce4f29890
CRs-Fixed: 2391733
2019-02-04 15:36:45 -08:00
Srinivas Pitla
39a9222d27 qcacmn: VDEV MLME SM changes
1) Fixes to enable VDEV MLME SM with legacy code
2) Define/Enable PDEV MLME component object.

Change-Id: Ieb87e5b7b70d6bb593ba0950297894a81c6a4feb
CRs-Fixed: 2384173
2019-01-26 19:58:58 -08:00
Srinivas Pitla
1ff074ce30 qcacmn: Add support for scan and MLME synchronization
Reject scan request, if any VDEV is in START/DFS_CAC/SUSPEND states.

Change-Id: I1047ba510df5ae5debd1e3d5c8a064a57af65fbf
CRs-Fixed: 2384163
2019-01-24 09:59:14 -08:00
Yeshwanth Sriram Guntuka
c4a14ea149 qcacmn: Add host support for db2dbm RSSI changes
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.

Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
2018-12-24 03:33:04 -08:00
Srinivas Pitla
90713473d1 qcacmn: Implement VDEV MLME State machine
This change implement VDEV MLME State machine based on design,
and handles valid events in each state and invokes legacy callback
APIs to perform state specific operations

Change-Id: I38a11778cba31276c720bc13c085ade60b1fb0c4
CRs-Fixed: 2307722
2018-09-14 08:16:51 -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
Kabilan Kannan
6c3cb57806 qcacmn: Fix Green AP reference count ID mismatch
Green AP incorrectly uses object manager ID for reference
counting, and it causes inconsistency in the system.
Create a unique reference count ID for green AP
and use it.

Change-Id: Ia7d9545e95add01d209b11f1b000e38bc1591a47
CRs-Fixed: 2220280
2018-05-14 16:50:42 -07:00
Manikandan Mohan
a2993a595c qcacmn: Fix export symbol for multi drivers compilation
Update umac module files to use qdf_export_symbol to facilitate
multiple driver module compilation support.

Change-Id: Id982b3e0593b7c90244f2025decd10e97cb62f9c
CRs-fixed: 2197751
2018-03-19 19:58:12 -07: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
Vivek Chettri
40789ff92d qcacmn: Add NULL check for wdev member of vdev's ospriv
Add NULL check for access to wdev.
There could be cases where the wdev could not we initialized
to appropriate values, so we should have a NULL check before
we access its members.

CR's Fixed: 2168374

Change-Id: Id0a3f9b64c5e9beed86f5a3c019a5fe5dbdb8bd7
2018-02-13 04:53:31 -08:00
Jeff Johnson
3b17c379c5 qcacmn: Introduce wlan_is_ie_valid()
In change "qcacld-3.0: Validate Scan Default IEs" in the qcacld-3.0
project (Change-Id: Ifd8739c96a9990f01ff159eb59a7e904f7b8c592) the
utility API hdd_is_ie_valid() was introduced. One review comment was
that this should be a converged API, so rename and relocate the API.

Change-Id: I8d2a520ea70645ab54b450de83452c0035653485
CRs-Fixed: 2169420
2018-01-24 08:27:26 -08:00
Soumya Bhat
108f090a00 qcacmn: Greenap componentization follow up patch
Greenap APIs and calls

Change-Id: I1242db788155f68dd91b72b94a48f78869eb835f
CRs-Fixed: 2142183
2018-01-15 04:26:43 -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
Dustin Brown
74587948ff qcacmn: Use try_get_ref API in wlan_util_get_vdev_by_ifname
wlan_util_get_vdev_by_ifname currently uses the unconditional vdev ref
grabbing API, wlan_objmgr_vdev_get_ref. Using this API outside of objmgr
core is very dangerous, as a reference to a destroyed vdev can be
obtained, leading to double-free and use-after-free scenarios. Use the
conditional wlan_objmgr_vdev_try_get_ref API instead, and return a NULL
vdev if a reference cannot be obtained.

Change-Id: I44484b664577e6d9a79057ee35150abfb60ca0b3
CRs-Fixed: 2150257
2017-12-07 03:38:36 -08:00
Naveen Rawat
8b1ec565cc qcacmn: Add APIs to get IE by EID and Ext ID
Add wlan utility APIs to get IE pointer from within IE buffer by
EID or Ext ID.

Change-Id: I26492078cec73b5877f3fc346a91223a045f31aa
CRs-Fixed: 2103529
2017-09-18 20:27:41 -07:00
Naveen Rawat
9da3f01914 qcacmn: Add wlan utility API to retrieve vdev from interface name
Add wlan utility API to retrieve vdev object from interface name. This
can be used by NAN vendor commands where user space provides interface
name.

Change-Id: I003ab9602c5bd5afd046f588b58677514581a742
CRs-Fixed: 2070770
2017-07-21 23:25:54 -07:00
Sathish Kumar
64cdfa8a23 qcacmn: Extract pdev id from vdev id received in WMI_CHAN_INFO_EVENTID
Add support in utils layer to extract pdev id from vdev id using object
manager APIs.

Use the API to extract pdev id from vdev id received through the
chan info event handler for lithium based chipsets.

CRs-Fixed: 2043869
Change-Id: Ibf1f1f91d505d53219ca9a2f5d94beb8553edfe3
2017-05-12 19:54:18 +05:30
Anish Nataraj
da0e2f41b7 qcacmn: Add SCAN WAR for hawkeye emulation
Emulation being clocked at lowest rate,
SCAN and serialization timers are modified to handle
these scenarios

Change-Id: Ia937930483dbcd0268fd2fe2d0393e49f09b215f
CRs-Fixed: 2009490
2017-03-29 09:09:43 -07:00
Wu Gao
dfc571c521 qcacmn: mgmt frame txrx
Modify P2P IE and tx mgmt frame. Handles tx confirm and rx frame
events.

Change-Id: I0c0ada2e12ee5ebdd3e8d7b7a6f2bd2af4357548
CRs-Fixed: 2015297
2017-03-22 18:42:14 -07:00
Wu Gao
396518b08f qcacmn: Defines os and target interfaces
Defines API and callbacks of os interface for P2P component. At the
same time, defines API of target interface.

Change-Id: Ice1c86ecba1f2410d965d9f84923589f229a1864
CRs-Fixed: 2013763
2017-03-15 17:10:14 -07:00
Sandeep Puligilla
7acd31fa33 qcacmn: Add cfg80211 scan start and stop command
Add cfg80211 scan start and scan stop commands.

Change-Id: I20b6c7743496ae82cc3a93befb5b68812047ec1a
CRs-Fixed: 1095299
2017-03-02 16:11:46 +05:30
Wu Gao
f482dea2a7 qcacmn: Initialization of P2P component
Defines main APIs and data structures. Initial basic frame work of
P2P component.

Change-Id: I08d2e2cec734ddc535d88996f7d5ece5ef3d270a
CRs-Fixed: 1099441
2017-02-17 17:34:25 -08:00