Commit Graph

61 Commits

Author SHA1 Message Date
Balaganapathy Palanisamy
93645c4efd qcacmn: Ignore down pending flag for bridge vap
Ignore setting vdev down pending flag for MLO bridge vap

Change-Id: I445484dc557a45230f287b3854d6ef85ca73140f
CRs-Fixed: 3603860
2023-09-05 15:14:50 -07:00
Pragaspathi Thilagaraj
2eb6a33153 qcacmn: Avoid unlink bss in vdev INIT state
When some faulty AP changes the SSID from hidden to non-hidden
or vice versa, then unlink bss and update bss to kernel happens
multiple times. Then when disconnection happens, it causes
abnormal behavior since the bss entry looks corrupted.

So avoid unlink bss in INIT state to avoid corruption
since cfg80211_disconnected() calls
cfg80211_wdev_release_bsses(wdev) already.

Change-Id: If07d1b8fa92057c9320c9ab243b9cbef30ac21ba
CRs-Fixed: 3516816
2023-06-16 18:24:35 -07:00
Venkateswara Naralasetty
2b0b767e60 qcacmn: Add a new enum for SW2RXDMA_LINK_RING
Add a new enum for SW2RXDMA_LINK_RING which is used to
handover the links to HW in monitor mode for wcn6450.

Change-Id: I0a3cd19f9891ae323742fd8bebfca5ff20b14b20
CRs-Fixed: 3525001
2023-06-16 11:33:32 -07:00
Vijay Patil
c3a34a4987 qcacmn: Iterate through all vdevs and check if CAC is in progress
Add an API to iterate through all vdevs and check if any vdev is
in CAC in-progress state.

When DFS CAC is going on for SAP, if 5 GHz mac is occupied by the
SAP and it's not available for 5 GHz NAN discovery. Enabling NAN
on 5 GHz in such cases cause inconsistency in firmware state machine
and firmware may assert as DFS MAC is not supposed to be disturbed
while CAC is going on.

So, check if NAN enable request has 5 GHz NAN channel also and reject
the request. Allow NAN enable command if it's 2 GHz only NAN enable
request, while CAC is going on.

Change-Id: Idcd92e29d4b6078332d439efb75eba6800e986bb
CRs-Fixed: 3492054
2023-05-13 17:02:42 -07:00
Venkateswara Swamy Bandaru
f2c4751559 qcacmn: Add ie cap set and get APIs
Add ie capability set and get APIs

Change-Id: I25e9f8a5ee0cd049f1fe7abddc151217ff7668d3
CRs-Fixed: 3347566
2023-04-13 09:33:11 -07:00
Rachit Kankane
d525bc0165 qcacmn: Support WMI_CSA_IE_RECEIVED_EVENTID
Add support for WMI_CSA_IE_RECEIVED_EVENTID as:

   1. Register the handler
   2. Handler to extract the event

Change-Id: I9f476c7fbc51d9686d05fbdb5f46dec3bcd3c29e
CRs-Fixed: 3431363
2023-03-27 09:22:51 -07:00
Jeff Johnson
08131fd0bb qcacmn: Fix wlan_utility.h documentation
The kernel-doc script identified some documentation issues in the
umac/cmn_services/utils folder, all in wlan_utility.h, so fix them.

Change-Id: I91763c8103083b75dd26aa21b254f45de793b8b6
CRs-Fixed: 3390582
2023-01-31 08:36:17 -08:00
Pavankumar Nandeshwar
da32e55eb0 qcacmn: Add a new enum for WBM2SW_RELEASE used for DS
Add a new enum for WBM2SW_RELEASE ring used
specifically for handling tx completions from
ppe2tcl ring in DS

Change-Id: I88f033e87f2a40e6f730728da3168b18b5e39f5c
CRs-Fixed: 3303259
2022-11-13 20:41:52 -08:00
Jeff Johnson
ed240b1daf qcacmn: umac: cmn_services: Fix misspellings
Fix misspellings in umac/cmn_services/...

Change-Id: I74c006b3e585e3d4f6ec8c025ef313133c9e3068
CRs-Fixed: 3304695
2022-10-11 00:47:41 -07:00
Krishna Rao
3cc8ee5529 qcacmn: Shorten err strings in helper for defragmentation
Shorten the strings in error prints in the helper that carries out
802.11 element/subelement defragmentation. This is in order to
decrease the size of the modules generated as required for some
platforms.

Change-Id: Idd37ea59467aa5ebc3928f336f05b603e5d7f6f5
CRs-Fixed: 3248821
2022-07-23 21:04:50 -07:00
Krishna Rao
18774495ac qcacmn: Shorten err strings in helper for frag sequence info
Shorten the strings in error prints in the helper that determines
802.11 element/subelement fragment sequence information. This is in
order to decrease the size of the modules generated as required for
some platforms.

Change-Id: I5a15dc12404399c4670e0cb29205a728715f4923
CRs-Fixed: 3248813
2022-07-23 19:15:01 -07:00
Krishna Rao
607f20d387 qcacmn: Shorten err strings in helper for successor frags
Shorten the strings in error prints in the helper that determines
802.11 element/subelement successor fragments. This is in order to
decrease the size of the modules generated as required for some
platforms.

Change-Id: I4457e1228f848a52f9eea056541806220ff4e8da
CRs-Fixed: 3248806
2022-07-23 19:14:55 -07:00
Vinay Adella
e9a54debcb qcacmn: Fix buffer copy beyond max size causing corruption
During ML IE fragmentaion, the inline copy should account for
increase in size due to difference in destination and source.
This avoids corrupting the buffer beyond the max allowed size.

CRs-Fixed: 3236544
Change-Id: I8114c15accb70fa0c92ee51453dd112875bd09d5
2022-07-08 03:01:18 -07:00
Vinay Adella
dbf8b39a83 qcacmn: Remove excessive logging in console
Move to qdf_debug API to avoid excessive logging.
As these logs can come in interrupt context, it can cause
latencies to other threads.

Change-Id: Ibcada15235a74e9534588ae08d21bf97f4d61393
CRs-Fixed: 3120558
2022-02-28 09:10:17 -08:00
Krishna Rao
3f38db23d4 qcacmn: Add APIs to defragment elem/subelem fragment sequence
Add APIs to defragment a sequence of 802.11 element/subelement
fragments. Add an inline mode to carry out the defragmentation within
the source buffer in order to reduce buffer requirements and to
eliminate memory copies/moves for the lead element/sublement.
Conversely, add a non-inline mode to copy the defragmented payload to
a separate buffer.

Add common helper functionality shared between these APIs.

CRs-Fixed: 3124132
Change-Id: Ia68584e918ddcf626b748f2b0c3a5da6492b40b6
2022-02-19 10:54:58 -08:00
Krishna Rao
8b712ebbaf qcacmn: Add APIs to get info about elem/subelem fragment sequence
Add an API to get the following information for a first 802.11 element
present in the beginning of a given buffer, and a series of elements
after it in the given buffer: a) Whether a contiguous subset of these
elements starting with the first element form an element fragment
sequence. b) If they form an element fragment sequence, then the total
length of this sequence inclusive of headers and payloads of all the
elements in the sequence. c) If they form an element fragment
sequence, then the total size of the payloads of all the elements in
the sequence (not including the element ID extension of the lead
element, if applicable).

Similarly, add an API to get the following information for a first
802.11 subelement present in the beginning of a given buffer, and a
series of subelements after it in the given buffer: a) Whether a
contiguous subset of these subelements starting with the first
subelement form a subelement fragment sequence. b) If they form a
subelement fragment sequence, then the total length of this sequence
inclusive of headers and payloads of all the subelements in the
sequence. c) If they form a subelement fragment sequence, then the
total size of the payloads of all the subelements in the sequence.

Add common helper functionality shared between these APIs.

CRs-Fixed: 3124120
Change-Id: I26d2d75670dbb99c927517181d58f4d816ae754b
2022-02-18 04:53:12 -08:00
Krishna Rao
b76c403d0e qcacmn: Add APIs to create elem/sublem fragment sequence
Add an API to create a sequence of 802.11 element fragments, and
similarly, add an API to create a sequence of 802.11 subelement
fragments. Add an inline mode for both these APIs to carry out the
fragmentation within the source buffer in order to reduce buffer
requirements and to eliminate memory copies/moves for the lead
element/subelement. Conversely, add a non-inline mode to create the
fragment sequence in a separate buffer.

Add common helper functionality shared between these APIs.

CRs-Fixed: 3124099
Change-Id: I48ef6e529360ea40d58320327a50884bc1638689
2022-02-16 15:11:43 -08:00
Krishna Rao
046cd79da6 qcacmn: Add APIs to get elem/subelem frag generation requirements
Add an API to get information on requirements related to generation of
802.11 element fragment sequence. Currently this includes an
indication of whether fragmentation is required or not for the given
element ID and payload length, and if fragmentation is appplicable,
the minimum required size of the buffer where the element fragment
sequence created would be written.

Similarly, add an API to get information on requirements related to
generation of 802.11 subelement fragment sequence. Currently this
includes an indication of whether fragmentation is required or not for
the given payload length, and if fragmentation is appplicable, the
minimum required size of the buffer where the subelement fragment
sequence created would be written.

Create common helper functionality shared between the above APIs.

CRs-Fixed: 3124090
Change-Id: I7047e2117aae1a8856ee49c460f333914aa19a8b
2022-02-16 15:11:37 -08:00
Bing Sun
7ee4663048 qcacmn: Save quiet status to sta context of MLO mgr
Save quiet status of indicated link to sta contect of MLO mgr. Any link
should check quiet status of MLO connection, then decide whether it
can trigger inactivity to FW or not.

Change-Id: Ic294bbe6452030b6cae495ca0dd3e504416e2c9e
CRs-Fixed: 3117825
2022-02-11 02:57:40 -08:00
Rahul Gusain
949beb6cad qcacmn: Send fils discovery template to wmi layer
Add support to send Fils discovery template via target if

Add func to compute shortssid with the help of shortssid table

Change-Id: I78fa50641ee5ae0c338719c4cec91573a212f396
CRs-Fixed: 3114903
2022-02-07 12:27:04 -08:00
Aditya Sathish
af7379f8c4 qcacmn: Fix the second cfreq2 for channel 33 for 320MHz
Fix the second cfreq2 frequency returned by the service
API, wlan_get_320_center_freq, for a channel ranging
between 33 (6115MHz) to 61 (6225MHz).

CRs-Fixed: 3060832
Change-Id: I656a5d6633cfa48aaeff5f0ba53e4c6138f5d8f8
2021-10-25 12:15:47 -07:00
Chaithanya Garrepalli
0702aaf463 qcacmn: initialize PPE rings
Changes to initialize PPE rings based on ini
configuration

Change-Id: Id6a26b557c45fd78ae17675b0292424e979958ad
2021-08-13 12:04:22 -07:00
Venkateswara Swamy Bandaru
8bc0945029 qcacmn: Add 11be puncturing support
Add puncturing bitmap along with channel parameters
in vdev structures for filling during vdev start.

Change-Id: I5e5afd6e118ed9933e4d9c30e2ad65cd4259bca0
CRs-Fixed: 2958389
2021-07-14 02:05:32 -07:00
Venkateswara Swamy Bandaru
78124d2ec7 qcacmn: Add utility function to get 320MHz cfreq2s
Add utility function to get possible center frequencies for
320Mhz channel.

Change-Id: I5fbdd82ed167a5fe30987430f4f6d03fa9d03add
CRs-Fixed: 2961188
2021-06-08 13:18:29 -07:00
Santosh Anbu
09231b4fd6 qcacmn: Wait until START cmd is removed from ser active queue
When START cmd is activated in scheduler context, due to system load
the scheduler may not process the START cmd time for certain time.
During which if VDEV is checked for INIT state, we proceed to
further operation and return.

Now, start cmd in scheduler will be processed, which will try to bring
up the VDEV leading to undefined issue.

To fix this
1. When we are waiting on VDEV to move to INIT state, we should also wait
until START cmd is removed from serialization active queue.
2.With this we ensure that START cmd processing is completed in the
scheduler context as well as make sure that STOP moves from pending to
active and moves the VDEV SM to INIT state.

Change-Id: I51d0a695cd8c0a8b54e74226e04f9cd32ce58e4f
CRs-Fixed: 2894578
2021-03-15 05:16:17 -07:00
Aditya Kodukula
1c6fef8450 qcacmn: Modify the minidump_remove function
The wlan_minidump_remove function utilizes the updated kernel API.
So, modify the function definition and parameters accordingly.

Change-Id: Ib62a46688400d5d9c2ff45c17dc41d5f0b7f58d0
CRs-Fixed: 2860432
2021-03-09 21:06:58 -08:00
Liangwei Dong
f29e4c0315 qcacmn: export wlan_get_connected_vdev_by_bssid API
Export wlan_get_connected_vdev_by_bssid API as utility API.

Change-Id: Ia412d324aaf5b47ab7bece63d9a6e6cbc5c2e06a
CRs-Fixed: 2855501
2021-01-18 05:40:43 -08:00
Srinivas Pitla
bf0f1c90b3 qcacmn: Dynamic Tx VDEV config
This change allow Tx VDEV of MBSS mode to configured
dynamically by reset the VDEVs.

This change includes FW service bit parsing, checking
VDEV state of all VDEVs, sending MBSS information in
VDEV start command

Change-Id: I46b13629bd1c07be86b408d72c2967642ce8542e
CRs-Fixed: 2759229
2020-08-26 23:57:44 -07:00
Himanshu Batra
07d99bea43 qcacmn: Add API to check vdev INIT state
Add API to check if vdev is in INIT state.
Also add api to iterate vdev list and test/set flag if
vdev is in init state

Change-Id: Idfc4268fd166a583de45a0f166ff5d0ac8ec660e
CRs-Fixed: 2755257
2020-08-14 12:34:48 -07:00
Santosh Anbu
9e9e3c1719 qcacmn: Define restart bitmap using qdf_bitmap
Add change to define restart bitmap using the generalized bitmap
declaration. Also use generalized function to check if any of the
bits are set in the bitmap.

Change-Id: Ibfc48ef10fe9afcaefa16ef429ef9903343afe24
CRs-Fixed: 2674483
2020-05-17 23:12:51 -07:00
Sumedh Baikady
d188789876 qcacmn: Enhancement in Minidump feature
Handle minidump logging using dynamic
configurablity options. Data structures
to be logged in minidump can be configured
using internal INI file.

Change-Id: I99f12b3f98c4a9c0e15c3e5d611019e6b8d0909a
2020-02-26 08:35:46 -08:00
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