Commit Graph

8030 Commits

Author SHA1 Message Date
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
nobelj
34f6fe2132 qcacmn: update timestamp to mgmt ctrl payload head
update timestamp to mgmt ctrl payload head that is
needed for tx packet capture

Change-Id: Ic68124c994a351e6e8bf150ffa0193db24a71492
2020-01-13 19:04:51 -08:00
Sandeep Puligilla
395a799312 qcacmn: Fix beacon processing error
1. Modified logging level for RNR DB
2. Modified  add RNR DB entry API to
avoid null pointer dereference.

Change-Id: Ic5d91c05dd3e37e5e9099979e37fcbe9f42feb14
CRs-Fixed: 2599539
2020-01-13 15:19:01 -08:00
Yeshwanth Sriram Guntuka
cbd99a4af5 qcacmn: Add diag log structure for data pkt info
Add the diag log structure for protocol data packet
info to be sent as diag log to user-space.

Change-Id: I604a8e4d4355c39e66cd1b6b877aecb7f658b316
CRs-Fixed: 2595797
2020-01-13 15:18:53 -08:00
Nandha Kishore Easwaran
3232a8d88b qcacmn: Process lmac rings in polled mode
Add code to process lmac rings in polling.
Lmac rings can be switched between polling and interrupts
by using lmac_polled_mode flag in dp_soc.

Change-Id: I231e906930c9b42100a2df3e52acac97deba1c34
2020-01-13 15:18:46 -08:00
Nandha Kishore Easwaran
bd98e6205e qcacmn: Create new interrupt mask for msi
Created a new interrupt mask for msi chipsets so that both ahb
and pci chipsets can work together.

Change-Id: I78d1b9641e58f07d1582152c691c5ae29e6ddb03
2020-01-13 15:18:31 -08:00
Nandha Kishore Easwaran
1d9464d4fa qcacmn: Setting interrupt mode in soc_init
Setting interrupt mode in dp_soc_init as setting it in
dp_soc_attach is resulting in interrupt mode not set on
subsequent wifi down/up. soc_attach is called only in case
of wifi unload/load and not in case of wifi down/up.
Adding interrupt mode setting in soc_init helps in setting
correct interrupt mode in case of wifi down/up.

Change-Id: I9e6ad94e42b7bc2bf84f832ece8dc8779e335905
2020-01-13 15:18:17 -08:00
Rathees kumar Chinannan
e6d621740b qcacmn: Send re_ul_resp configuration through WMI resource config
Send configuration option to configure enable/disable of re_ul_resp..

Change-Id: I045e48bb1597c37805d792bdc34bcb34bcc0534c
2020-01-13 12:54:03 -08:00
Linux Build Service Account
2729e6d5d9 Merge "qcacmn: Fix WMI event registration context" 2020-01-12 23:38:38 -08:00
Naga
cb4e5140f4 qcacmn: Fix WMI event registration context
Fix WMI event registration context for peer
delete all event.

Change-Id: I310c5f4f0ea1d52d7d02adbbf22c70322c1bb1ea
CRs-Fixed: 2597430
2020-01-12 22:29:50 -08:00
Linux Build Service Account
8967ce71a8 Merge "qcacmn: Unified scheduler watchdog handler implementation" 2020-01-12 19:35:58 -08:00
Linux Build Service Account
2105b28e4c Merge "qcacmn: Reduce excessive console logging" 2020-01-12 19:35:57 -08:00
Vivek
bea437e229 qcacmn: Unified scheduler watchdog handler implementation
The scheduler watchdog timer handler currently either prints error or
prints error and panics based on CONFIG_SLUB_DEBUG_ON.

Considering the panic through QDF_DEBUG_PANIC is configurable and is
disabled on relevant builds, we can just have one version of the
function and depend on QDF macro for panic and dependency on
CONFIG_SLUB_DEBUG_ON is redundant

Change the default log levels from none to fatal for scheduler.

Change-Id: If588455ea2779311eb86bb39b3ab0f7fc67b6ccc
CRs-Fixed: 2593790
2020-01-12 18:58:25 -08:00
Sravan Goud
c064fc3b4a qcacmn: Reduce excessive console logging
There is excessive console logging in case of peer or vdev
null in mic error handling and wbm err processing in softirq
context which is delaying the interrupt to get enable and as a
result host is slow in reaping the wbm2sw3 ring. This leads to
wbm2sw3 ring full back pressure at FW and finally FW asserts.
As part of this change reduce reduce the error logging level from
err to info and for MSM info goes to the wifi logger logs and not
to the console.

Change-Id: I9b8be1feee5e807cecbe307b24a323e2b0ae631a
CRs-Fixed: 2596656
2020-01-12 17:01:25 -08:00
Jinwei Chen
5d2b019ea4 qcacmn: WAR for monitor mode HTT msg sending failure
If two back to back HTT msg sending happened in short time,
the second HTT msg source SRNG HP writing has chance to fail,
this has been confirmed by HST HW.
  For monitor mode, HTT msg for monitor status ring configuration
is the last msg for sending, if the 2nd HTT msg for monitor status ring
sending failed, HW won't provide anything into 2nd monitor status ring.
  as a WAR, add some delay before 2nd HTT msg start sending, > 2us is
required per HST HW, delay 100 us for safe.

Change-Id: Id2a5a8798fde79267f9d6f9ba23d8ed54a400aa7
CRs-Fixed: 2597248
2020-01-12 13:21:06 -08:00
Sravan Goud
d207ff2e28 qcacmn: Provide vendor extended stats from host
Currently in lithium FW is not always in datapath. As a result
can not provide all the wlan vendor extended stats. So as part
of this host provides some of the extended stats.

Change-Id: I876b6e905f7e25b7088f80f07e55e26a7a409241
CRs-Fixed: 2594797
2020-01-12 06:24:30 -08:00
Daniel Kim
8e63ff7840 qcacmn: Use correct phy id in the reg services
To support dynamic mode switch (phase 2), correct phy_id
should be used. Instead of pdev_id, target phy_id should
be used to retrieve correct channel range sent in target
capabilities (mac_phy_caps).

Change-Id: If0e2503cc99636b775721ecb3628290d19e5575c
2020-01-12 00:12:47 -08:00
Balamurugan Mahalingam
4120f06921 qcacmn: define SHADOW_REGISTER macro for QCN9000
Define shadow registers for QCN9000.

Change-Id: I47fc7057838bf6491dc292660a69b47a655fe0e9
2020-01-12 00:12:33 -08:00
Vignesh Mohan
86eba5902e qcacmn: Reinit DFS after HW mode switch (phase 2)
Supported dynamic HW mode switches:
DBS (full band 5G and 2G) <-> DBS_SBS (low band 5G, high band 5G and 2G)

Description of the changes:

1. NOL conversion:
  a. Introduce a temporary NOL list copy structure in DFS psoc obj.
  b. When mode switch is triggered:
    i.   Stop the NOL timers and clear the data, to avoid processing NOL
         expiry during mode switch.
    ii.  Allocate the psoc NOL copy for the target num_radios.
    iii. Store the NOL data of each radio to the target pdev ID
         (pdev ID after mode switch) in the psoc NOL copy,
	 using a unified mux/demux API.
  c. After mode switch is completed:
    i.   Resume NOL by re-initializing the list from the temporary psoc
         copy.
    ii.  Free the psoc copy after mode switch is complete.
    iii. Note: changes are made to support pause and resume of NOL,
         increasing NOL timeout by a few milliseconds.

2. PreCAC list conversion:
  a. When mode switch is triggered:
    i. Stop the existing preCAC timer and send ADFS abort command to FW.
  b. When mode switch is completed:
    i.  Unify/separate the preCAC list if the target mode is DBS/DBS_SBS
        respectively, using a single API.
    ii. Start ADFS again.

3. Radar detection lock:
  a. While detecting radar, acquire a lock to avoid handling user triggered
     mode_switch during this process. Release the lock once radar
     processing is completed and CSA start is triggered.

4. Radar detection/CAC completion defer during mode switch:
  a. While detecting radar or CAC completion, check if mode switch is
     in progress. If yes, defer the processing and wait for mode switch to
     complete before handling the events.
  b. Note: Precedence is Radar over CAC, i.e., if CAC processing is waiting
     and radar is received, CAC completion is no longer handled.

CRs-Fixed: 2580403
Change-Id: I506f3b569bad2e351c6f336e50f203cf5fa8b223
2020-01-11 22:28:17 -08:00
Chaithanya Garrepalli
79b64ac4ba qcacmn: fix potential memory leak in dp_rx_process
There is a chance of leak of RX buffers if peer disconnects
while we are in middle for processing the list of MSDUs in a
AMSDU

Change-Id: I0081ec96da95ea570903dbd5d91c866c8c141667
2020-01-11 22:28:04 -08:00
Linux Build Service Account
5e7141ceb3 Merge "qcacmn: Do not get/put the pm_runtime if RPM is disabled" 2020-01-11 20:06:29 -08:00
Linux Build Service Account
131bc0cd37 Merge "qcacmn: CFR: Process PPDU status TLVs and extract CFR information" 2020-01-11 20:06:29 -08:00
Tiger Yu
0778a3973d qcacmn: Do not get/put the pm_runtime if RPM is disabled
Do not get/put the pm_runtime if RPM is not enabled to avoid the WMI
command sending block.

Change-Id: Id6cddc4d5b6322fea063f08a1b641034ba0272d9
CRs-Fixed: 2587797
2020-01-11 19:23:39 -08:00
Neha Bisht
741041405a qcacmn: Structure optimized through poke-a-hole tool
Structure memory is being optimized by aligning field with
bus address length using pokeahole tool.
This patch optimizes structure linked in wmi module
(for both 64 bit and 32 bit platform)

Structure                     Bytes saved(64bit)     Bytes saved(32bit)
fd_params                               8 bytes                 4 bytes
wmi_mgmt_params                         8 bytes                 4 bytes
wmi_offchan_data_tx_params              16 bytes                8 bytes
sta_uapsd_trig_params                   8 bytes                 0 bytes
wifi_passpoint_network_param            8 bytes                 8 bytes
ctl_table_params                        8 bytes                 4 bytes
mcast_group_update_params               8 bytes                 0 bytes
rtt_meas_req_params                     8 bytes                 4 bytes
wmi_host_peer_adv_stats                 8 bytes                 8 bytes
wmi_host_rf_characterization_event_param4 bytes                 4 bytes
wmi_host_oem_indirect_data              8 bytes                 8 bytes
wmi_oem_response_param                  8 bytes                 0 bytes

Change-Id: I539e0fe6c599aab70952b1ad26f92c0b9b94429f
2020-01-11 16:19:06 -08:00
Neha Bisht
503663c6da qcacmn: Structure optimized through poke-a-hole tool
Structure memory is being optimized by aligning field with
bus address length using pokeahole tool.
This patch optimizes structure linked in obj_mgr and scheduler
modules.
Structure           Bytes saved (64bit)   Bytes saved (32bit)
scheduler_ctx       8 bytes               4 bytes
wlan_channel        8 bytes               8 bytes

Change-Id: I298946b55328d8d9b564c140e0a59e0b8702fab0
CRs-Fixed: 2587842
2020-01-11 16:18:50 -08:00
Venkata Sharath Chandra Manchala
09d116aee9 qcacmn: Avoid invalid invalid_peer_head_msdu list
Add a check to validate invalid_peer_head_msdu before accessing
to avoid NULL dereference.

Change-Id: I9218bdd1100b48a32240546f380b1437ae72c406
CRs-Fixed: 2585651
2020-01-10 20:12:26 -08:00
Ashish Kumar Dhanotiya
ef9d824e14 qcacmn: Fill center frequency also in channel list with power
Currently get channel list with power api fills only
channel number and tx power, fill center frequency also
in the response with this api.

Change-Id: Ib4487e20d7da0c59d6b4a041deac4d4ecc8dd8c1
CRs-Fixed: 2597550
2020-01-10 20:12:11 -08:00
Shwetha G K
d4e0f6104e qcacmn: Provide sys entries to list down top allocations
Provide sys entries to list down top mem and dma allocations (based on
configurable threshold). This can help to check allocations at run-time
and can provide clue if some function is allocates memory continuously.

CRs-Fixed: 2589632

Change-Id: If9a6da535233fc48828f2e9fb2bdacb8153270e4
2020-01-10 16:55:58 -08:00
Shwetha G K
9be8b1fe75 qcacmn: Add support to disable the panics in memory debug
Support to disable panics in qdf memory debug. This can be used when KASAN
or SLUB or SKB debug options are enabled

CRs-Fixed: 2580399
Change-Id: If8617a16d0b96279f0afef8299632662dea498bf
2020-01-10 16:55:39 -08:00
Shwetha G K
21378e0c93 qcacmn: Support to disable the memory debug at load time
Disable the mem_debug when qdf argument mem_debug_disabled=1 is passed
through uci command "uci set wireless.qcawifi.mem_debug_disabled=1".

CRs-Fixed: 2572159
Change-Id: I6ab5e1f28ce4c58d46c7467bac3853054f4cf56c
2020-01-10 16:55:18 -08:00
Krishna Rao
44de5a5d45 qcacmn: Add dwell time parameters to cfg80211 scan request API
Add active and passive scan dwell time parameters to cfg80211 scan
request API.

Change-Id: I39f479d7b941e4671f1ad4495ab48031153dd5e7
CRs-Fixed: 2598504
2020-01-10 13:49:54 -08:00
Venkateswara Swamy Bandaru
46082ed4e3 qcacmn: Fix issue in RNR IE processing
Fix RNR IE processing by correctly adjusting offsets.
neighbour ap info field processing is present only at
beginning of IE skip it only once.

Change-Id: I05923e4ff9efa00aeed141b0cff8b62913622cf6
CRs-Fixed: 2592014
2020-01-10 13:49:39 -08:00
Abhishek Ambure
f39c249a32 qcacmn: Add support for LOWI 6GHz enhancements
Append 4 bytes enhancement flags in ANI_MSG_APP_REG_RSP message.
NL_ENABLE_OEM_REQ_RSP i.e. 0x00000001 in ANI_MSG_APP_REG_RSP message
represents host driver support for NLA type request and response
for oem commands.

Change-Id: I5d07d017a27b676537c24fbf15f224af8964c665
CRs-Fixed: 2591896
2020-01-09 23:00:33 -08:00
Gerrit - the friendly Code Review server
842d9b1bc5 Merge changes into wlan-cmn.driver.lnx.2.0 2020-01-09 15:00:23 -08:00
Shwetha G K
6d85a9e8da qcacmn: Track netlink allocations
Track netlink allocations when mem debug is enabled.

Change-Id: Icba58f93cf0364678d730f32bd56645efab934e1
CRs-Fixed: 2588037
2020-01-09 04:51:33 -08:00
Yu Wang
a0dc6b9144 qcacmn: implement interfaces for configuring BT coex chain mode
Add interfaces for get/set BT coex chain mode.

CRs-Fixed: 2565088
Change-Id: If74dcba4ad3b69caa895264eaff64ef06b3b0714
2020-01-09 02:40:41 -08:00
Yu Wang
1cd103900e qcacmn: Initial version of coex component
Add initial set of coex files, implement the basic functions.
Coex component is used to process coex related configurations.

CRs-Fixed: 2565088
Change-Id: I8b9600809691b808f97c621cb329a6ab9941814c
2020-01-09 02:40:23 -08:00
Yu Wang
e7f177ac80 qcacmn: add new component id QDF_MODULE_ID_COEX
This new component COEX is added for coex related
configurations/operations.

CRs-Fixed: 2565088
Change-Id: I3faa2d18b341d91278268f52d9d7d05a1eba445f
2020-01-09 02:40:11 -08:00
Padma Raghunathan
5cd2e56349 qcacmn: CFR: Process PPDU status TLVs and extract CFR information
Channel Frequency Response(CFR) feature requires PPDU information
for correlation with CFR data. Host subscribes for the relevant PPDU
status TLVs via the Host RX monitor status ring. During monitor status
ring reap, all information needed for CFR correlation is accumulated
in a HAL PPDU structure and delivered to WDI event subscribers.

Change-Id: I3662b60375cb8886447a2fba3efead6a1ef3a98d
CRs-Fixed: 2593408
2020-01-09 10:34:35 +05:30