Commit Graph

8111 Commits

Author SHA1 Message Date
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
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
Rakesh Pillai
c1aeb35c3c qcacmn: Do not process RX packet if vdev is pending delete
If the vdev is marked as delete in progress, then the
packets received on that particular vdev should not be
submitted to the network stack.

Drop the packets if the vdev is marked to be deleted.

CRs-Fixed: 2599128
Change-Id: I0996669bea368b6c0afc10e1d929bc2f314ae6fe
2020-01-21 14:03:05 -08:00
Jeevan Kukkalli
3476f08bd8 qcacmn: Set num_user to 0 if peer id is invalid
Peer id field is set to HTT_INVALID_PEER when failed to
populate cdp rx indication structure.Set num_user to 0 in
such cases.This avoids out of bound access during rx stats
update.

Change-Id: I112713deee1ec3cb9c37ba3571aff05fb816c76d
CRs-Fixed: 2596779
2020-01-21 03:38:53 -08:00
Edayilliam Jayadev
94e232827d qcacmn: Cleanup Spectral bin length WAR and FFT report logging
Modularise the logic of FFT bin length adjustment SWARs and
Spectral FFT report logging logic.

Change-Id: Ia1382e3bdd78589c5192263d23e31bc74e2bfbbd
CRs-Fixed: 2599080
2020-01-21 02:00:02 -08:00
Surya Prakash Raajen
ed8ea05a7e qcacmn: Clear console log boot up error prints
Clear console log boot up error prints by removing unnecessary
prints, modifying prints to appropriate info or debug and
by fixing the errors

Change-Id: Ica3f126280399eef59b894236849e2079a62565f
CRs-Fixed: 2597026
2020-01-21 00:29:08 -08:00
Srikanth Marepalli
7debbac825 qcacmn: Add support for pmkid generation fallback in FIPS mode
Add support to fallback the PMKID generation from firmware to
wpa_supplicant.
Firmware fallbacks PMKID generation to host when FIPS enabled
due to the crypto library availability limitation.
Once the roam candidate selection is done in the firmware, it
sends the WMI_ROAM_PMKID_REQUEST_EVENTID. Once this event is
received, the host driver triggers an event to wpa_supplicant
for PMKID generation.

Change-Id: Ica00d27ce3f9f4a8f966261b38e238c389fcf05c
CRs-Fixed: 2507617
2020-01-20 23:09:26 -08:00
Vevek Venkatesan
4a07e3949d qcacmn: cdp: Converge cdp_ctrl_ops
Currently cdp ops are given pdev/vdev 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/vdev_id which will be used to get the
respective handles, and hence avoiding unwanted
access of the handles if it has been deleted.
Also deleting few ops which stores and retrieves
such handles and adding ops to set/get pdev params.

- txrx_get_psoc_param
- wdi_event_sub
- wdi_event_unsub

Change-Id: Id089d9b6b4737d700d2436e2081291a3741affb5
CRs-Fixed: 2541658
2020-01-20 17:52:48 -08:00
Pavankumar Nandeshwar
13aabf095c qcacmn: tgt_if changes for ctrl_ops modifications
tgt_if module changes due to umac-dp decoupling changes in
ctrl_ops APIs

Change-Id: I6c49c83472f497b2ba3dd7135500aeb4fff25336
2020-01-20 17:52:29 -08:00
Pavankumar Nandeshwar
0ce3870654 qcacmn: Modify set 2 of ctrl_ops in dp to for umac-dp decoupling
Change set 2 of ctrl_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle

Change-Id: I3f180c9c360d564f0b229b447074ad23b7c0a737
2020-01-20 17:52:06 -08:00
Pavankumar Nandeshwar
e6f443f27a qcacmn: Add new parameters for dp handles set/gets
Add new parameters for converging multiple set/get
APIs into common psoc/pdev/vdev/peer set/get APIs.

Change-Id: I0802dea028c9e935ef899169cf7d86f2dc7632bc
2020-01-20 17:51:51 -08:00
Pavankumar Nandeshwar
6c83405439 qcacmn: Modify set 1 of ctrl_ops to acheive umac-dp decoupling
Change set 1 of the ctrl_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle

Change-Id: Iedf6dea2215d3d04b2212c71c8ec8c7328c559e8
2020-01-20 17:51:36 -08:00
Nisha Menon
7e8f67cfca qcacmn: Update Wifi netdevs for IPA exception path NAPI
Starting Kernel 4.19 IPA LAN RX supports NAPI polling
mechanism. Netdevs that hook into IPA need to call
netif_receive_skb() or similar to deliver the packet
to network stack instead of using netif_rx_ni().

IPA driver exports ipa_get_lan_rx_napi(void) API for
this purpose. If this API call returns true use
netif_receive_skb() or fallback on legacy api.

Add the changes under a feature flag IPA_LAN_RX_NAPI_SUPPORT
which is enabled under a linux kernel version check for 4.19
and above.

Change-Id: I449404e86e934fd6113cb71e494575e67602f678
CRs-Fixed: 2588500
2020-01-20 14:02:13 -08:00
Neha Bisht
5f25cbe8f2 qcacmn: remove fw headers in init_deinit component
Avoid direct fw headers usage in init_deinit component since
can have functional impacts. The inclusion is done at wmi level 
to fix the inconsistency of code. 

Change-Id: I73cc1aac500cec041de81750b9c7654d21344e6c
CRs-Fixed: 2505399
2020-01-19 23:40:21 -08:00
Christopher Chopp
294f63373d qcacmn: Add wmi support for btwt wifitool commands
Add WMI support for broadcast twt sta invitation and
sta kickoff. Additionally, update the current WMI twt
fields to include btwt recommendation and btwt persistence.

Change-Id: I88dee854557bbb8c3263f42041e0b90a07cdd27e
2020-01-19 23:40:08 -08:00
Pavankumar Nandeshwar
df2c759d94 qcacmn: Do not check delete in progress in peer teardown
Since delete in progress for peer is set in roaming cases
explicitly, do not return from peer teardown after checking
this flag.

Change-Id: Icc514d9500075409d907546a26b2725b5334cbce
2020-01-19 15:59:04 -08:00
Debasis Das
96bf2aff93 qcacmn: Support multi_vdev_restart extension
Add extended multi-vdev-restart service to support
variable param list for pre-Lithium platforms.

Change-Id: I33a3677bdf97aea4be5a8a3759dc2d5ea8369f68
2020-01-19 11:57:27 -08:00
Alan Chen
850a888935 qcacmn: Change enable_runtime_pm from bool to uint8_t
Change enable_runtime_pm from bool to uint8_t in correspondence to
changing CFG_INI_BOOL to CFG_INI_UINT for enabling runtime PM.

Change-Id: Ib5031ada43fac864d933cdfee875593f896b2a62
CRs-Fixed: 2603918
2020-01-19 09:48:20 -08:00