Commit Graph

8068 Commits

Author SHA1 Message Date
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
Debasis Das
40a60c5196 qcacmn: Extend multi_vdev_restart parameter-list
Extend the parameter-list of the multi_vdev_restart
command to add phymode.

Change-Id: I2d9a48e6721813817ae47e992f5569d379fe2923
2020-01-19 08:28:26 -08:00
Abhishek Singh
87a5ab62be qcacmn: Add security info in scan entry
Add security info in scan entry and print the same.

Change-Id: If8f0c05a526b86cb3ae0020c2e144beb3510cb98
CRs-Fixed: 2603004
2020-01-18 20:16:48 -08:00
Paul Zhang
c5a417e285 qcacmn: Set the right cc_src for reg country
Currently, if the country code which is going to be set is the
same as the country currently being used, it will be ignored.
It does not consider its country code source. This causes the
working of 11d logic unexpected.

To fix this issue, check the country source when trying to set
the same country code.

CRs-Fixed: 2583172
Change-Id: I9c574a62d11676bc0305510f1da9848cc044f874
2020-01-18 06:28:47 -08:00
Chaoli Zhou
1f6c0cdad8 qcacmn: Add Genoa IPA disable info to WMI_INIT_CMDID
For Genoa, the WLAN FW enables IPA by default, if the
IPA is disabled by kernel config, the IPA status is
not same between wlanhost driver and WLAN FW. So add
such info in the first WMI command to let WLAN FW knows
the IPA state from host, and do the according copy engine
initialization, otherwise, the mismatch IPA copy engine
configuration will casue the Genoa FW assert.

Change-Id: Iec2f86ffb40b296c51bee41adc0d895beb200e5c
2020-01-18 06:28:32 -08:00
Rakesh Pillai
984343c2ea qcacmn: HAL layer changes for Moselle
Add the HAL layer APIs for supporting Moselle

CRs-Fixed: 2597328
Change-Id: Idc59af4ee093e702da95aa704fd3abd76ae5834f
2020-01-18 04:45:14 -08:00
Rakesh Pillai
e3c018c0c7 qcacmn: Datapath changes for QCA6750
Add the datapath changes for supporting
the newly added IPCI bus type for QCA6750

CRs-Fixed: 2597326
Change-Id: I27e3e9f746eb383e85c7345150bda03320d041b9
2020-01-18 04:45:01 -08:00
Alok Kumar
44e048386b qcacmn: Add IPCIE directory for QCA6750
Add HIF changes for supporting the newly added IPCI
bus type for QCA6750

Change-Id: Icc06ac71caa3bb23aac5d4ec2f2e5aee8b7f8baa
CRs-Fixed: 2597345
2020-01-18 04:44:47 -08:00
Alok Kumar
ffc116e798 qcacmn: HIF changes to support Moselle
Add HIF changes for supporting the newly
added IPCI bus type for Moselle

CRs-Fixed: 2597321
Change-Id: I9097e4622e9d6d561e92f5a21cb279c4d631cfbb
2020-01-18 04:44:35 -08:00
Sravan Goud
a4030a4261 qcacmn: Access initial ipa tx doorbell after enable pipes
Currently host writes to TX doorbell register after ipa connect
pipes to indicate number of free TX buffers. In case when IPA
clocks are off and host tries to access the register will leads
to invalid access. So access the tx doorbell register after ipa
enable pipes which makes sure IPA clocks are always on.

Change-Id: If11fdc9c408ebf7f22eef6a020b507bc39ee6a8e
CRs-Fixed: 2599029
2020-01-18 01:43:26 -08:00
Mainak Sen
03b82f7365 qcacmn: Support for dynamic mode chnge in NSS ofld
Update pdev id to lmac and target pdev id mapping in NSS

Change-Id: I111a975ad9ed3ef61753c8d9afe91083a8cca4aa
2020-01-18 00:19:28 -08:00
bings
ae8afdf042 qcacmn: Fix memory leak and NULL access in scm_add_rnr_channel_db
In scm_add_rnr_channel_db, if pointer channel is NULL, it should return.
Allocate rnr_node buffer whenever it is used, otherwise memory leak
happens if the BSS channel is not 6Ghz.

Change-Id: Iecba2453c2e9cdf9301826e0e11f740190616110
CRs-Fixed: 2601014
2020-01-17 22:53:01 -08:00
Balaganapathy Palanisamy
3020842b6d qcacmn: Serialize PDEV CSA channel switch
CSA channel switch call directly interacts with VDEV
state machine, move CSA restart to go through serialization
service.

CRs-Fixed: 2598123

Change-Id: Ic0bea64b56f54eed354e11d0873ae4423e365cca
2020-01-17 21:29:38 -08:00
Ankit Kumar
53581e92fd qcacmn: Update counter in mutipass rx packet drop
multipass_rx_pkt_drop is peer level stats counter
used to count multipass rx packet dropped frame.
Accumulate this counter at vdev and pdev level.

It also initializes multipass_en flag to false at
vdev attach.

Change-Id: Idaa85a71c80eefb9359abb026402b71aa28ad6a2
CRs-Fixed: 2595551
2020-01-17 19:50:47 -08:00
Venkata Sharath Chandra Manchala
1affbbad46 qcacmn: Move pktlog API to platform specific file
Move process_sw_event API to pktlog_wifi2.c file as
it is only applicable to legacy product line.

Change-Id: I8eee102ea2eb70c0ffcec4ac20dfdf6ef48bca5b
CRs-Fixed: 2585613
2020-01-17 13:42:45 -08:00
Venkata Sharath Chandra Manchala
95d127a876 qcacmn: Move pktlog rate event handlers to specific files
Move pktlog_rate_find API to pktlog_wifi2.c as they are
only needed for legacy product lines.

Change-Id: I2a232e283cf5bf151ce84ba77f4359f25b60a5ac
CRs-Fixed: 2585613
2020-01-17 13:42:32 -08:00
Venkata Sharath Chandra Manchala
1896d2e534 qcacmn: Move process_rx_info API to platform specific file
Move process_rx_info to pktlog_wifi2.c file as it
is only applicable to legacy products.

Change-Id: I2a758c26ac560459f22fbb691863bf1fea17cf65
CRs-Fixed: 2585613
2020-01-17 13:42:19 -08:00
Venkata Sharath Chandra Manchala
41538b57b3 qcacmn: Move pktlog API's to specific files
Move process_tx_info from pktlog_internal.c to pktlog_wifi2.c
as they are only needed for legacy product line.

Change-Id: I53b90deaf86aa2bb6533b9957879e7860d91b352
CRs-Fixed: 2585613
2020-01-17 13:42:05 -08:00
Venkata Sharath Chandra Manchala
1140065e4c qcacmn: Move pktlog API's to specific files
Move pktlog hardware dependent API's from pktlog_internal.c
to pktlog_wifi3.c as they are hardware dependent.

Change-Id: I421b3116a35e735a51c82839005bbc2d4cb138d7
CRs-Fixed: 2585613
2020-01-17 13:41:54 -08:00
Nisha Menon
4d77312b6d qcacmn: Check if FW or host in recovery before invoking assert
Force wake request is sent before register write. If this req
fails check if FW is down or host is in recovery before
asserting.

Change-Id: I6d31b1f95b68ae4e462f59ed32ed933de55cacae
CRs-Fixed: 2601364
2020-01-17 07:28:13 -08:00
Himanshu Batra
21ade1514e qcacmn: Componentize Multicast Enhancement
Remove dependency of ME on VAP layer and radio(ic) layer data
structure.

Change-Id: I4d0c8e11a4049c01cd355b794d650cd3342293bf
CRs-Fixed: 2580388
2020-01-17 04:18:48 -08:00
Sandeep Puligilla
a94efa0175 qcacmn: SAP is not advertising 20TU probe response
SAP not advertising 20TU probe response when
FILS Discovery is disbaled through ini.

Updated WMI fields to enable 20TU probe response
when 6Ghz SAP is operating.

Change-Id: Idc4b95047d2149f68a68a434afda4d325a5d0547
CRs-Fixed: 2600485
2020-01-17 02:57:48 -08:00
Santosh Anbu
99028d078d qcacmn: Support multivdev restart response handling
Add TGT_IF change to support consolidated multi vdev restart
response handling.

Change-Id: I8d507dda8f39d36102a7aa7a7baf425335097047
CRs-Fixed: 2595769
2020-01-17 01:21:57 -08:00
Santosh Anbu
34a9dd134f qcacmn: Support multivdev restart response handling for TLV
Add WMI change to support extraction of consolidated multi vdev
response handling from TLV.

Change-Id: Ida4c346870c99cf5df17b664c4233963585e36cd
CRs-Fixed: 2600388
2020-01-17 01:21:46 -08:00
Amit Shukla
2352b070f5 qcacmn: Fix for NSS interrupt mask issue in Dynamic mode change FR
Interrupt masking should use lmac id instead of pdev id
in NSS mode.

Change-Id: Ib5f974a18e6536249e4f422eb5c677947cb6e3be
CRs-Fixed: 2557902
2020-01-16 17:15:03 -08:00
Amit Shukla
1edfe5ae7c qcacmn: Data path changes for Dynamic Mode Change FR. Changes include-
1. Move all LMAC rings to SOC from pDEV
	2. Dynamically obtain lmac->pdev mapping while handling LMAC interrupts

Change-Id: Ib017d49243405b62fc34099c01a2b898b25341d0
2020-01-16 17:14:39 -08:00
Santosh Anbu
3033883308 qcacmn: Support multivdev restart response handling
Add WMI change to support consolidated multi vdev
restart response handling.

Change-Id: I54e90af15f52204a28b85b4506ad2fb99930de3b
CRs-Fixed: 2593340
2020-01-16 08:09:11 -08:00
Santosh Anbu
060bf3975a qcacmn: Support multivdev restart response handling
Add UMAC change to support consolidated multi vdev
response handling.

Change-Id: I3383c723a96b1c8009665b00e19aa5aa4bf65bfb
CRs-Fixed: 2595743
2020-01-16 08:08:52 -08:00
Himanshu Batra
8fcc17ccf9 qcacmn: Create wrapper API to check all leaks at psoc
The current implementaion check for peer, vdev and pdev leaks on
psoc in order and if any leak is found for peer then QDF_DEBUG_PANIC
is called and vdev and pdev leaks are not checked. Similar is the case
if vdev leak is found, pdev leaks are not checked

Adding a wrapper API to check all the leaks and then do panic if any
leak is found

Change-Id: Icf6622760f3646b82f893beb7415b95307e2ccd7
CRs-Fixed: 2599228
2020-01-16 08:08:33 -08:00
Naga
29b109fa93 Revert "qcacmn: Move deletion of datapath vdev to vdev destroy handler"
This revert commit Change-Id: I727d70e77f8e913ca732b6ae56c60049161547de.

Change-Id: I2481f74d417db257ac2ab448ab6a3d7b55d2f34e
CRs-Fixed: 2593434
2020-01-15 23:32:18 -08:00
Rhythm Patwa
d1976297c8 qcacmn: Add corresponding host wmi for 6GHz vdev params
Add host wmi vdev param 'wmi_vdev_param_6ghz_params' for the
corresponding FW wmi WMI_VDEV_PARAM_6GHZ_PARAMS

Change-Id: I78022c7ff48a187bb4dd9d35f5eca3737afbd452
2020-01-15 19:33:21 -08:00
Abhishek Ambure
d49729cd47 qcacmn: Add oem target six ghz support disable flag in wifipos
Host driver sends channel list and number of channels to lowi-server
in ANI_MSG_GET_OEM_CAP_RSP. 6Ghz channels in the channel list are not
useful for legacy lowi-server not supporting 6Ghz channels.

For legacy oem targets, driver sets "oem_6g_support_disable".

Change-Id: Ibc072ff2df3d7b246d3a48d7cebcb5feac35b715
CRs-Fixed: 2597645
2020-01-15 19:33:06 -08:00
Saket Jha
540da9a56c qcacmn: Add 6GHz Monitor Mode Support
Add monitor mode support to capture packets over 6GHz frequencies by
getting capture frequency from pdev.

Change freq type to qdf_freq_t.

Change-Id: I7b6edc43e254dc98a3c2939c369874bec9d16ddd
CRs-Fixed: 2568970
2020-01-15 11:30:21 -08:00
Rakesh Pillai
374e7c25dc qcacmn: Support IPCI bus type in QDF
Add newly added IPCI bus type support in QDF.

CRs-Fixed: 2597341
Change-Id: I476556e831d41be9ee71f8083a95d8d9da6ceb85
2020-01-15 04:44:03 -08:00
Tallapragada Kalyan
fa6f80fcad qcacmn: use proper HAL abtraction APIs to get WBM internal error
the current HAL API is to read the WBM internal error
bit from the wbm release ring descriptor is always taking
HKv1 HW structure. But the wbm_internal_error bit
placement has changed from HKv2, for this reason we have
to use target specific HAL API.

Change-Id: I44789180754ca21ae59650b6d8620321a1f12569
2020-01-15 01:30:23 -08:00
Tallapragada Kalyan
ccf5b37f7d qcacmn: re-arrange is_raw_frame bit in qdf_nbuf_cb
"qdf_nbuf_cb.u.rx.lro_eligible",
"qdf_nbuf_cb.u.rx.is_raw_frame"
bits occupy same memmory as
"qdf_nbuf_cb.u.tx.flags.bits.flag_efrag",
"qdf_nbuf_cb.u.tx.flags.bits.flag_nbuf" as it is a union
but flag_efrag and flag_nbuf are always set during
qdf_nbuf_alloc, this is resulting in is_raw_frame to be
explicitly set even when the received frame is not RAW

memory location of these fields in qdf_nbuf_cb
D:0xBCDFE0F4.0 lro_eligible = 1
D:0xBCDFE0F4.1 is_raw_frame = 1

D:0xBCDFE0F4.0 flag_efrag = 1
D:0xBCDFE0F4.1 flag_nbuf = 1

in qdf_nbuf_alloc the flag_efrag & flag_nbuf is set.
skb_alloc:
memset(skb->cb, 0x0, sizeof(skb->cb));

/*
 * * The default is for netbuf fragments to be interpreted
 * * as wordstreams rather than bytestreams.
 * */
QDF_NBUF_CB_TX_EXTRA_FRAG_WORDSTR_EFRAG(skb) = 1;
QDF_NBUF_CB_TX_EXTRA_FRAG_WORDSTR_NBUF(skb) = 1;

As discussed over email this is a temporary WAR
until a long term solution is in place.

Below is the email conversation

	This is a temporary change to unblock the present sanity issues
	There seems to be a basic issue with nbuf_alloc, with following logic

	QDF_NBUF_CB_TX_EXTRA_FRAG_WORDSTR_EFRAG(skb) = 1;
	QDF_NBUF_CB_TX_EXTRA_FRAG_WORDSTR_NBUF(skb) = 1;

	nbuf_lloc is assuming that the buffer is allocated for TX always
	and setting fields in the area of TX portion of union.
	If that skb is used for RX can lead to wrong interpretation of the RX
       	union fields, which is causing present issue.

	This got exposed with a recent change that shuffled the fields of
	RX union which made the imp fields got manipulated with this TX setting.

	We need to resolve this basic issue with wider consent and validations,
	while this fix unblocks the basic sanity issues.

Change-Id: I24a6d0faf3a874c54b4859dc027e059c693d6759
2020-01-14 15:03:43 -08:00
Padma Raghunathan
1fa6534bf7 qcacmn: CFR: Capture cfr info for PPDUs from non-associated clients
CFR has specific modes where status TLVs from non-associated
clients will be used for correlation with CFR data. In the
common API used by STATS and CFR, add an exception for CFR to
collect the necessary PPDU information. STATS on the other hand,
does not collect information from non-associated clients.

Change-Id: I2987010ae84ff02a25bfce5cc77bbc3e5383560b
CRs-Fixed: 2598547
2020-01-14 05:34:11 -08:00
Padma Raghunathan
d2afc70e7c qcacmn: CFR: APIs to get/set CFR RCC mode
APIs to set/get cfr rcc configuration in DP layer.

Change-Id: I4f8740f5f4cc1dd3af0f8d5915639f2a17918359
CRs-Fixed: 2593416
2020-01-14 05:34:02 -08:00
Padma Raghunathan
f75841764c qcacmn: CFR: Copy hal ppdu info to cdp ppdu structure
CFR information extracted from PPDU status TLVs is already stored in
HAL ppdu structure. Extract the same and copy it to CDP ppdu structure.
This is delivered to subscribers through a WDI event, similar to PPDU
stats.

Change-Id: I4315626c7f79f85b75b8d1b9e1e5caf8d65abed9
CRs-Fixed: 2593416
2020-01-14 05:33:47 -08:00
Tiger Yu
685e960433 qcacmn: Move dp_rx_vdev_detach out of vdev list spin_lock protection
No need to protect with vdev list spin lock for dp_rx_vdev_detach and
which might wait event from dp rx thread when doing the RX GRO flash.
Do the same for dp_tx_vdev_detach.

Change-Id: I8f191ed62a174a9a88999c36d47ef18f39e8bd82
CRs-Fixed: 2600680
2020-01-14 02:02:26 -08:00
Shaakir Mohamed
68a9a92a15 qcacmn: Support phyid conversion map for wmi_handle
Support phyid conversion map for dynamic mode switch.

Change-Id: I02aa1831bf48ca1365354d0ab9ebc240fa116043
CRs-Fixed: 2601427
2020-01-13 23:18:39 -08:00
Naga
ab425a2edf qcacmn: Fix return values in if_ahb.c
Fix return code to return error code instead
of -1 in if_ahb.c.

Change-Id: I41a6e0b6db44c9ade02a0f835232b5d6c9ba7a73
CRs-Fixed: 2597545
2020-01-13 23:18:22 -08:00
sumedh baikady
4db109a3d2 qcacmn: Add null check while extracting tbtt qtime
The tbtt qtime value is given by target via WMI event.
This can be null when target doesn't give this buffer.
Add check in host to prevent null deference.

Change-Id: Id9b4a4093b0422a0337e4dabff1ca74ff0d0472e
2020-01-13 19:05:19 -08:00
Ruben Columbus
073874c4aa qcacmn: tx peer capture filtering and discard
removing functions from cmn since they are used in component_dev

Change-Id: I3df5cf280a6922bb90284ee817e28009aa06db2b
2020-01-13 19:05:05 -08:00