Commit Graph

8127 Commits

Author SHA1 Message Date
Pankaj Singh
1e0b32404c qcacmn: Add QCA vendor command to support thermal mitigation
Add a QCA vendor sub command QCA_NL80211_VENDOR_SUBCMD_THERMAL_CMD
to implement thermal mitigation. Different operations required to
implement this feature can be specified in
QCA_WLAN_VENDOR_ATTR_THERMAL_CMD_VALUE,
QCA_WLAN_VENDOR_ATTR_THERMAL_LEVEL.

Userspace requests the driver to enable/disable thermal mitigation
based on the thermal state of the device and wlan host performs the
required appropriate action. wlan host driver maps the thermal level
provided from userspace via vendor command to corresponding duty
cycle off percent value and duty cycle value,send
WMI_THERM_THROT_SET_CONF_CMDID cmd to FW.

Make changes to perform vendor command handling, mapping thermal level
to duty cycle value and communicating the thermal information to FW.

Change-Id: Idc9c87dcb4275122980713471544baa23e705a53
CRs-Fixed: 2610403
2020-01-31 12:46:13 -08:00
Sourav Mohapatra
d6b3fee9b3 qcacmn: Rectify fetching PDEV before creation
In the change I0165f3bd4638280b45ad54391319806fba62e2fe, driver tries to
fetch the PDEV in init_deinit_handler before it is created in MCC. This
can cause driver init to fail.

Move the fetching of the PDEV to after the PDEV is created.

Change-Id: I028ac14da333084ce68f03f3d3771cdb6298933b
CRs-Fixed: 2611379
2020-01-31 08:38:48 -08:00
Abhishek Singh
1c46a20660 qcacmn: Optimize logs in serialization
Remove redundant logs and optimize the logs in serialization.

Change-Id: I7eaf252c8266ca1c60d213b0309ef217bc95ff33
CRs-Fixed: 2612823
2020-01-31 05:37:23 -08:00
Nandha Kishore Easwaran
b7c18849ae qcacmn: Replace 8074_VP with WIFI_EMULATION_3_0
Replace QCA_WIFI_QCA8074_VP with CONFIG_WIFI_EMULATION_WIFI_3_0
since VP platform is not being used anymore.
Most of the parameters present inside QCA_WIFI_QCA8074_VP are related
to emulation timeouts. Hence replacing it with a more meaningful flag.

Change-Id: I22a0e5803e765333947f1613b376dcc6bd25b5af
2020-01-31 02:34:19 -08:00
Abhinav Kumar
b59458c284 qcacmn: Send val of separate iface support for NAN INI to Fw
Update value of new ini for separate iface support for NAN
"nan_separate_iface_support" to fw through a command
WMI_INIT_CMDID.

Change-Id: I55830e0d16d86ee5a0bfa7d3e44c6309c0d3d54b
CRs-Fixed: 2612010
2020-01-31 00:57:35 -08:00
Alok Kumar
fef1078ed0 qcacmn: DP change to get buffer size from INI file
DP layer change to read the packet log buffer size
from INI file.

Change-Id: If307ad5abfd0360c3f39247ccc62abd32095303f
CRs-Fixed: 2611406
2020-01-30 23:24:11 -08:00
Alok Kumar
0265d7917a qcacmn: Add INI support for packet log buffer size
Add INI parameter "PacketLogBufSize" to populate
packet log buffer size.

Change-Id: Ic9b963a88a6f6d884d5fa3a63b4fed6768ba2fc4
CRs-Fixed: 2611409
2020-01-30 23:23:53 -08:00
Surabhi Vishnoi
61df09450e qcacmn: Add wmi interface changes for wlan time sync eventid
Add wmi event id's for ftm based wlan time sync feature.

CRs-Fixed: 2610092
Change-Id: Ifd7b10bbbe2b4c3f954233da55f318bef99fa13a
2020-01-30 23:23:33 -08:00
Pragaspathi Thilagaraj
778e4b7163 qcacmn: Handle roam stats event with neighbor report tlv alone
Currently, the driver rejects the roam stats event if any of the
roam trigger or roam scan or roam results tlv is not present.
Now the firmware will send neighbor report immediately after the
neighbor report response is received from AP instead of buffering
it as done before.

So do not parse the roam trigger, roam scan, roam result tlv if
the tlv is not present. Add new flag in the tlv parsing structure
if the TLV is not present.

Change-Id: I366d8853f7f45dcdac6d4aa5c3a8a12a8b602a4f
CRs-Fixed: 2610377
2020-01-30 19:39:09 -08:00
Vignesh U
23341d356d qcacmn: Revert "qcacmn: Add filters to the MKKN filter table"
This reverts the change
Icf3fecb5c6027ba827cac05dbd43a1a55463209b.

Change-Id: Icb31d211142b84a4fa5cf4f5af84a6a90585059e
CRs-Fixed: 2611421
2020-01-28 23:20:11 -08:00
Linux Build Service Account
7f6a682ce8 Merge "qcacmn: Fix kernel panic in hif_ahb_configure_grp_irq" 2020-01-28 14:10:27 -08:00
Linux Build Service Account
2607e82127 Merge "qcacmn: API support for AST flow override" 2020-01-28 14:10:27 -08:00
Linux Build Service Account
7780d140a2 Merge "qcacmn: Add wmi config for AST flow override" 2020-01-28 14:10:27 -08:00
Venkateswara Swamy Bandaru
b3989495c7 qcacmn: Fix kernel panic in hif_ahb_configure_grp_irq
Move qal_vbus_get_irq out of irq locks as it can sleep
and cause kenel panic.

Change-Id: Id00e0cdc978fbd3889a39a48d8b757d8c3e0d754
CRs-Fixed: 2602900
2020-01-28 12:44:47 -08:00
Linux Build Service Account
952d18b487 Merge "qcacmn: Reap timer and batch count threshold values for CE dest" 2020-01-27 20:05:39 -08:00
Mainak Sen
d13ed3e9e1 qcacmn: API support for AST flow override
Lithium HW can parse each MSDU when packets are enqueued to transmit
classifier and each MSDU can get enqueued to different MSDU-Queue.
By default, there are 2 queues per TID – UDP and NON-UDP. Based on
the flow parsing, packets will be queued to either of them.
Enterprise customers uses RAW mode frames which transmit classifier
would not be able to identify L4 protocol for  UDP or NON-UDP queue
for encrypted frames.
Customer can also have different application based packets which needs
to be enqueued to differently prioritized queues. They can choose to
tag each MSDU based on application DPI and derive the flow priority
as below –
•	UDP
•	NON-UDP
•	HI-PRIO
•	LOW-PRIO
Customer needs API support from host which will provide an ast-index
based on a particular flow id given peer mac address. Based on the mac
address, host will find the associated peer and return the ast_index &
cache set number corresponding to the flow id from peer flow based ast
entry table. Customer will then program this ast-index and ast override
in transmit classifier CMD ring to enqueue MSDU to a specific
flow-queuein TQM.
Host API:
Input parameter – uint8_t *peer mac address, uint8_t flow id
Output – uint16_t ast_index
Change-Id: I79557c31532514ad5ec0c1848827a3e5cd91cdf2
2020-01-27 17:37:43 -08:00
Mainak Sen
394483b4a4 qcacmn: Add wmi config for AST flow override
Add wmi configuration to send AST flow override
config to wlan fw during init

Change-Id: Ia2915b40273bce25ab2cb48fdf34a618991c44bc
2020-01-27 17:37:25 -08:00
Gerrit - the friendly Code Review server
b32c4c82ba Merge changes into wlan-cmn.driver.lnx.2.0 2020-01-27 16:26:57 -08:00
Venkata Sharath Chandra Manchala
e0a2b69883 qcacmn: Reap timer and batch count threshold values for CE dest
Enable timer and batch count threshold interrupt for CE1, CE2
and CE5 rings through INI and retrieve the parameters through
psoc handle.

Change-Id: Ifa6cd768ed41ded46cae652ad7c910ffa62f2310
CRs-Fixed: 2593531
2020-01-27 15:43:36 -08:00
Shashikala Prabhu
8533bb54fe qcacmn: Add API to set/get number of monitor vdev counts in pdev
Add API to set/get monitor vdev count in pdev object.

Also update the max peer count in pdev and psoc when FW allocated peer
count is different than host requested.
Number of vdevs and beacon tx offload max vdevs in wlan_res_cfg are updated
in target_if_update_pdev_tgt_info().

Also, add radio related parameters to get number of vdevs and peers per
psoc and pdev.

Change-Id: I0165f3bd4638280b45ad54391319806fba62e2fe
CRs-Fixed: 2600984
2020-01-27 12:44:51 -08:00
Yeshwanth Sriram Guntuka
70ea6afc3f qcacmn: Add qdf APIs to support data pkt diag logging
Add support to send protocol data packet info via diag log
command to userspace at tx entry point, on receiving tx
completion indication and in rx path, before delivering the
packet to network stack.

Change-Id: I6a95a16b7ebedf505ecb501107b1bbb89b16b67d
CRs-Fixed: 2595799
2020-01-27 07:54:57 -08:00
Arun Kumar Khandavalli
7c3ce2d05f qcacmn: Selectively reduce the dbr logs
Reduce loglevel of some logs from info to debug.

Change-Id: Id4cc241b48defeb5abb122a8c50ef4e81fff9760
CRs-Fixed: 2607982
2020-01-27 02:39:05 -08:00
Arun Kumar Khandavalli
d3ebfc2db6 qcacmn: Selectively reduce the serialization logs
Reduce the serilization logs from info to debug.

Change-Id: If25749086cc05a97eed5b438cf3e14237428acfd
CRs-Fixed: 2606566
2020-01-26 22:16:59 -08:00
Jinwei Chen
0b92469595 qcacmn: fix invalid accessing to rx_tlv_hdr due to scattered msdu
long length msdu is received and looks this msdu is spread across
multiple nbufs, there is no corresbonding logic for this case.
qdf_set_pkt_len will invoke pskb_expand_head to renew skb->head
buffer, but the rx_tlv_hdr is still pointed to original skb->data
buffer, invalid accessing will happen.
  As a WAR, drop this msdu related nbufs after dp_rx_sg_create is done.

Change-Id: Iceb09fd04e4d768325018a8ddd4261ab4f75991a
CRs-Fixed: 2597927
2020-01-26 16:23:50 -08:00
Sandeep Puligilla
f6485c72bb qcacmn: Fix RNR entry list access error
Failed to read RNR entries from the RNR list
while issuing the scan.

Arguments passed to access the next node from RNR list
is not initalized due to which RNR entry accessing failed.

Change-Id: If5d1f4cace8e393e93b82ac3881b9627bde5f9e1
CRs-Fixed: 2605732
2020-01-26 14:27:35 -08:00
Arun Kumar Khandavalli
eebd3a1019 qcacmn: Selectively reduce the vdevmgr logs
Reduce the vdevmgr loglevel from info to debug.

Change-Id: Ia6dbe2b25f0ee227096f2cdf900ce9145a089dc4
CRs-Fixed: 2606562
2020-01-26 05:11:54 -08:00
Alok Kumar
74bbfc8aee qcacmn: Add the utils and cfg changes for Moselle
Add the changes in utils and wlan configuration
layer for supporting the newly added IPCI bus type
for Moselle.

CRs-Fixed: 2597342
Change-Id: I4484d6e774e9f94a322b8dee4ae7ff4460ed2634
2020-01-26 00:53:03 -08:00
Ashish Kumar Dhanotiya
86ff37b1b5 qcacmn: Remove channel 170, 171, 172 and 174 from APL11 and APL19
APL11 and APL19 reg domains are mapped to FCC radar detection
pattern which enables the channels 170, 171, 172 and 174
but according latest regulatory database version 30
APL11 and APL19 does not support channels 170, 171, 172 and 174.

Channels 170, 171, 172 and 174 are DSRC channels and should
not be enabled by default.

To address above issue make channels 170, 171, 172 and 174
valid only for DSRC case otherwise make these channels
invalid.

Change-Id: I5fe2c7a5db44f1cf8d6cb6317396c4527482137c
CRs-Fixed: 2593174
2020-01-25 18:55:07 -08:00
Arun Kumar Khandavalli
595c2eead2 qcacmn: Selectively reduce the objmgr logs
Reduce the loglevel of the objectmanager logs from
info to debug.

Change-Id: Iad29420e73be405ec937930165905fbfffe09de6
CRs-Fixed: 2606485
2020-01-25 15:27:18 -08:00
Alok Kumar
9bb30c19ed qcacmn: Add callback to get WBM internal error in qca6750
Add target specific callback to read the WBM internal error
for qca6750.

Change-Id: I79960a972d024ead33903415b4094561a22ad99b
CRs-Fixed: 2607116
2020-01-25 14:08:15 -08:00
Jinwei Chen
3222184e14 qcacmn: fix RX desc is using but freed back to pool
Crash scenario:
(1) frag data A is dropped and related RX desc A is replenished
and reused, but pdev->free_list_tail is still pointed to RX desc A.
(2) frag data B/C is coming, defrag fails then pdev->free_list_head
will point to B-->C RX desc, but pdev->free_list_tail still point to A.
(3) for defrag failing case, host only will replenish 1 RX buffer for
current case, RX desc B is replenished, while C will be free back to
RX desc pool.
(4) dp_rx_add_desc_list_to_free_list will set RX desc A-->next =
free_list, free_list point to C insted.
(5) when step (1) RX desc A replenished buffer indicated to host by
REO2Dst ring, RX desc A -->nbuf actually is pointed to another RX
desc, invalid skb accessing will happen.

Solution:
a. reset tail pointer in dp_rx_add_desc_list_to_free_list at last.
b. reset tail pointer same as head in dp_rx_add_to_free_desc_list
if head->next is NULL.
c. set correct rx_bufs number for replenish when dp_rx_defrag fails.

Change-Id: Ib297baea3605a09dd7d85d1f5ceb95db48a2e1f1
CRs-Fixed: 2603676
2020-01-25 07:43:47 -08:00
Uraj Sasan
acb460015b qcacmn: Compile qdf as part of single module
Adds support to include qdf as part of single module.
This is needed for WHUNT testing where we need to have
single module, one inserted as AP and one as STA.

Change-Id: I8c2aef4cc18391e92f537e2ce791bd5b58b6e764
2020-01-25 04:18:03 -08:00
Pavankumar Nandeshwar
29c280ef73 qcacmn: Use lmac_id to get the rx_desc_pool instead of pdev_id
Use lmac_id to get the rx_desc_pool while freeing
the rx_desc_pool for rx_desc_buf.

Change-Id: I549e7f54b267d2c82dceb391a766297dfe18ceb7
CRs-Fixed: 2608209
2020-01-24 20:08:38 -08:00
Surabhi Vishnoi
7f64ef005b qcacmn: Add the wmi interface changes for sending wlan time sync cmd
This patch adds the support for forming tlv commands
WMI_AUDIO_SYNC_TRIGGER_CMDID and WMI_AUDIO_SYNC_QTIMER_CMDID.

CRs-Fixed: 2607605
Change-Id: Ifaf2b43b60cf604d79d5649b27632422850a0d61
2020-01-24 00:56:32 -08:00
Venkateswara Swamy Bandaru
0605cde1f1 qcacmn: Fix issue in athstats
Incorrect size is given while copying pdev stats.
Fix this by properly passing pdev stats struct
while calculating size of pdev stats.

Change-Id: I4b4be2542d092c5c984252a62e2406cb1e83bcd8
CRs-Fixed: 2603674
2020-01-23 22:17:26 -08:00
Pavankumar Nandeshwar
61ec40476d qcacmn: Avoid exchanging dp handles with non dp modules
Corresponding changes in datapath for avoiding storage
of dp handles in umac objects.

Change-Id: I61ba9cca9a10cc7e3d618c7f1ec384dda2e85132
2020-01-23 14:28:38 -08:00
Pavankumar Nandeshwar
75d112497b qcacmn: Remove dp handles from umac objects
Remove pdev, vdev and peer dp handles from umac objects,
and also remove corresponding APIs used to set and get
these handles

Change-Id: I1abc8ba91e9a697b85d1711a9a37ce675e1f6d3d
CRs-Fixed: 2602133
2020-01-23 14:28:21 -08:00
Chaithanya Garrepalli
960a937799 qcacmn: use right API to get pdev from lmac_id
Use appropriate API to get pdev from lmac_id

Change-Id: I5cca2f7f57b80b7a94111a10afb257fa197aba20
2020-01-23 07:56:20 -08:00
Shivani Soni
a5707a4ded qcacmn: Update MAC address format dp
Updating MAC Address format in dp

Change-Id: I9e855d4081a5c5eadd69945d94596a699e2c2cd1
CRs-Fixed: 2599241
2020-01-23 06:27:28 -08:00
Subhranil Choudhury
22434e5ebd qcacmn: Add ast-type in wds_add
Add ast-type as argument in wds peer create command.
This helps to identify the ast entry from the time when ast add is done.

Change-Id: Ia0c073cf8f2573608e6a84410dffee6edf9b064b
2020-01-22 19:23:51 -08:00
Chaithanya Garrepalli
b543c23ae2 qcacmn: Create new CDP API for mode change
Add new CDP API for mode change instead of reusing
map_pdev_to_lmac API

Change-Id: Ie0bcf9a9faec96b633986c64a43b8eeae813e78e
2020-01-22 16:26:34 -08:00
Pavankumar Nandeshwar
2771d985bc qcacmn: provide an API to fetch individual peer stats
Provide an API to fetch required individual peer stats
from the data path peer stats instead of copying the
whole peer stats structure.

Change-Id: I1c9619bc7d9bb0e3e3df6d38cc5f4570869e31fe
2020-01-22 14:58:29 -08:00
Chaithanya Garrepalli
06f280e5b5 qcacmn: add QDF wrapper for qdf_atomic_inc_not_zero
Add API to increment atomic variable only when current
value is non zero

Change-Id: I3d0df35e39fb1b08b45e0731a86f002b5dbcb662
2020-01-22 09:25:48 -08:00
Padma Raghunathan
752b5a18a2 qcacmn: CFR: Adapt to changes made for dynamic mode change feature
As part of Dynamic mode change feature, rxdma_mon_status_ring
has been moved from dp_pdev to dp_psoc. Adapt CFR to this change.

Dynamic mode change feature change -
Ib017d49243405b62fc34099c01a2b898b25341d0

Change-Id: I43ee4e08ad70614d042be3e08c0add66e7e011f9
CRs-Fixed: 2606001
2020-01-22 09:25:35 -08:00
Pragaspathi Thilagaraj
fea4e3090f qcacmn: Update diag log codes excluding the offset
Update the diag log codes for below excluding the LOG_1X_BASE_C
offset, as its added explicitly:
LOG_WLAN_AUTH_ASSOC_TX_RX_INFO_C
LOG_WLAN_ROAM_TRIGGER_INFO_C
LOG_WLAN_ROAM_SCAN_INFO_C
LOG_WLAN_ROAM_RESULT_INFO_C
LOG_WLAN_RRM_TX_RX_INFO_C

Change-Id: I7f4918542760b518a9ea5ffa90ca554a5c9c5c8a
CRs-Fixed: 2599120
2020-01-22 04:48:13 -08:00
Vevek Venkatesan
af776988bf qcacmn: cdp: Converge cdp_peer_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

Also remove the ops which are used to store
and retrieve such handles, that no more needed.

- register_peer
- clear_peer
- change_peer_state
- peer_get_ref_by_addr
- peer_release_ref
- peer_state_update
- get_vdev_by_sta_id
- register_ocb_peer
- get_peer_state
- get_vdev_for_peer
- update_ibss_add_peer_num_of_vdev
- remove_peers_for_vdev
- remove_peers_for_vdev_no_lock
- copy_mac_addr_raw
- add_last_real_peer
- is_vdev_restore_last_peer
- update_last_real_peer
- peer_detach_force_delete

Change-Id: I4a41211464a30e018e8b73b8e9b91c7a509327b4
CRs-Fixed: 2541711
2020-01-22 02:46:27 -08:00
Shwetha G K
7b81f682b0 qcacmn: Support to not consider mem_debug_disabled mod arg
Support to not consider mem_debug_disabled mod arg

Change-Id: If58f6fbabf1b2cf3bed9da00ca920bfcb2a91a27
CRs-Fixed: 2607383
2020-01-22 02:46:17 -08:00
Sandeep Puligilla
9019baa26d qcacmn: Reduce time for scan when miracast is active
Scan can cause issues in video streaming when miracast session
is active.

Reduce the scan time by removing the DFS channels
from scan list during the active miracast session.

Change-Id: I14666ebccabaf373a67f396fb7f85c2f7ee34449
CRs-Fixed: 2603528
2020-01-22 01:17:59 -08:00
Nandha Kishore Easwaran
4842f87b82 qcacmn: Define shadow register as 0 in else case
Define shadow register value as 0 in else case where none
of the chips supporting SHADOW configuration are enabled. This
is needed for low memory configuration profiles where
QCN9000 and QCA6290 are undefined.

Change-Id: I6281568e830b506707aeb96d3ea03811cc1de8a7
2020-01-21 16:59:20 -08:00
Alan Chen
4e1154ac78 qcacmn: Define QDF API to check if driver unload is in progress
Define a QDF API to check if driver unload is in progress such that
driver unload can be checked from CMN components.

Change-Id: I397b0b6252ed8fd9558f04802cf55fdc61a39d83
CRs-Fixed: 2605656
2020-01-21 15:37:35 -08:00