提交線圖

7968 次程式碼提交

作者 SHA1 備註 日期
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
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
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
Padma Raghunathan
fe453dfd10 qcacmn: CFR: Monitor/Data ring filter settings
Channel Frequency Response(CFR) captures FFT bins corresponding to a PPDU
received and this is relayed to user space application. Since FFT bins
alone will not be meaningful, additional information about the PPDU such
as Peer addr, BW, NSS, etc are extracted from multiple PPDU status TLVs
and passed on to userspace along with CFR data.

Host RX monitor status ring is configured during CFR enable and the host
subscribes to relevant PPDU TLVs that provides all necessary information
for CFR data correlation.

Change-Id: Ia8080fe96c330db42d371634ba4363eb36c05402
CRs-Fixed: 2593416
2020-01-09 10:34:29 +05:30
Prathyusha Guduri
d32c59edb5 qcacmn: Enable HAL_IS_DECAP_FORMAT_RAW for all profiles
HAL_IS_DECAP_FORMAT_RAW was only defined for low memory profiles. Enable
it on all profiles

Change-Id: I064109e6756b25252bedf96065f59ad6ed360bcc
2020-01-02 06:44:38 -08:00
aloksing
18f309c7f4 qcacmn: Add debug support for vdev/peer reference and release
Allocate node for new entry and add it to existing list of function or line
If function or line already present in list then increment count

Change-Id: I3d737dcd33862f133b52c6d694c89f6d6b1517a5
2020-01-02 05:18:15 -08:00
Srinivas Dasari
5567f874e7 qcacmn: Define QDF_MAX_CONCURRENCY_PERSONA based on WLAN_MAX_VDEVS
Currently, QDF_MAX_CONCURRENCY_PERSONA allows a maximum of 4
MAC addresses to be assigned to different interfaces. NAN
discovery interface is a new interface and it needs a MAC address
to be assigned. QDF_MAX_CONCURRENCY_PERSONA needs to be increased
to 5 to provide the same.
WLAN_MAX_VDEVS defined in Kbuild already takes care of the
maximum no.of vdevs(6) supported. QDF_MAX_CONCURRENCY_PERSONA can
be made dependent of WLAN_MAX_VDEVS which caters the same purpose.
Define QDF_MAX_CONCURRENCY_PERSONA accordingly.

Change-Id: If5085703ab9c0cc70ce4fc0d20bedc20f382b4bd
CRs-Fixed: 2592018
2020-01-02 03:48:16 -08:00
Srinivas Dasari
88f39efbd9 qcacmn: Get vdev_id from NAN enable response event
Firmware sends vdev id allocated for NAN vdev as part of
NAN enable response. Get the same and use it for further
operations

Change-Id: I2e1e0dbab160904e12efc53f83203e4e153d099d
CRs-Fixed: 2592017
2020-01-02 03:48:00 -08:00
Yu Ouyang
82e3fbda26 qcacmn: Support ROME SDIO
To support ROME SDIO card, change in HIF SDIO layer. Without CNSS or
CNSS2 module, it can bring up adapter successfully.

Output few logs in SDIO read and write thread, and optimize HIF
SDIO layer logging.

Change-Id: I96ba731a7fa572131aaaec8ab25d9cffc41ec0b2
CRs-Fixed: 2542051
2020-01-01 22:17:23 -08:00
Srinivas Dasari
9c6a4d5279 qcacmn: Get the firmware capability NAN_VDEV_SUPPORT
Firmware advertises service capability bit NAN_VDEV_SUPPORT for
separate NAN vdev creation. This capability can be used to create
separate interface for NAN discovery and process corresponding
commands from userspace.

Change-Id: I4f81b354433c34e8bfe264f69e4eeaf6670f2fac
CRs-Fixed: 2592016
2020-01-01 12:00:01 -08:00
Hariharan Basuthkar
f8f30ced97 qcacmn: Get opclass from freq and width given a country code
Add the API wlan_reg_get_opclass_from_freq_width, to give country_iso,
channel frequency, channel width and behaviour limit as input, and get
the operating class as output.

Change-Id: I96c39119ab855d10965b2603e8b15c21699daa68
CRs-Fixed: 2583789
2020-01-01 07:27:58 -08:00
Surya Prakash Raajen
141db5f642 qcacmn: Fix unknown symbol error in HIF_CE_DEBUG_DATA_BUF case
When HIF_CE_DEBUG_DATA_BUF is enabled for some apis when module is
inserted, it throws unknown symbol error, fix them by exporting the
required apis.

Change-Id: Icf6fc40f7df1c463ad7a6f9eff38adcbdf9276b7
CRs-Fixed: 2593859
2019-12-31 02:44:38 -08:00
Chaithanya Garrepalli
3583cfb2c9 qcacmn: always match vdev_id to search from peer from hash
In vdev to vdev roaming on HKv2 we can have dp peer on
different LMACs with same mac address. To get the right
peer on PDEV use id match while searching from hash table

Change-Id: I60b4d7018120c9bd6a56913822ce42f24598184a
2019-12-31 02:44:30 -08:00
Chaithanya Garrepalli
52511a17d1 qcacmn: check for vdev_id mismatch to deliver NBUFs to stack
Check for vdev_id mismatch to deliver NBUFs to stack to avoid
hold peer reference while giving nbuf list to stack

Change-Id: Ic475e00d5b1793ada7b26b7af3322ca2fa51836f
2019-12-31 01:24:43 -08:00
Aniruddha Paul
33fce952a9 qcacmn: Fix the next link descriptor read issue
Link descriptor were getting freed by the pointer
of the previous freed link descriptor. This patch
fixes by copying the address of the current in a
local descriptor info and using it to free the
current.

Change-Id: I95e137ba5b1f0ad21b0e6fb39f6671e1d5b65ba6
CRs-Fixed: 2577624
2019-12-30 05:53:14 -08:00
Yu Ouyang
efa9f5d2a9 qcacmn: Add FCC10_FCCA into arry g_reg_dmn_pairs[]
When enalbe DSRC feature, member reg_dmn_pair_id of struct
country_code_to_reg_domain g_all_countries[] may equal FCC10_FCCA.
However, FCC10_FCCA can't be found in array g_reg_dmn_pairs[].

So, add FCC10_FCCA into arry g_reg_dmn_pairs[].
And, fix one compile issue.

Change-Id: I6069c43505e15312d8bd9be48495998c31f1f8eb
CRs-Fixed: 2590094
2019-12-30 02:43:25 -08:00
Manoj Ekbote
a9d046c655 qcacmn: Export wlan_abort_scan API
Export wlan_abort_scan API so that scan abort can be done at
pdev level.

Change-Id: I1be18677fd186c6b80acaa87fa2b10258663788c
2019-12-28 15:50:33 -08:00
Gerrit - the friendly Code Review server
65a41056b3 Merge changes into wlan-cmn.driver.lnx.2.0 2019-12-28 00:28:30 -08:00
Adwait Nayak
e2ee56e574 qcacmn: CFR WMI implementation
CFR config is passed on to FW through WMI
CFR feature code is moved into feature specific WMI file.

Change-Id: I00b57ea2ef4ec5520eb565910ac2c0a6478170e3
CRs-Fixed: 2582846
2019-12-27 16:31:14 -08:00
Paul Zhang
c1b915da06 qcacmn: use debugfs to show ini configs
Create new interface ucfg_cfg_ini_config_print/cfg_ini_config_print
to save the ini configs to buffer.

Change-Id: I7bc80d56d3a806a53c299d1347d4a656a6856248
CRs-Fixed: 2579558
2019-12-27 03:26:11 -08:00
Vevek Venkatesan
27e7bb4d79 qcacmn: cdp: Converge cdp_cmn_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.

- txrx_peer_unmap_sync_cb_set
- txrx_fw_stats_get
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev

Change-Id: I4472dc0905edb7700acb4401b117c8876ba455f3
CRs-Fixed: 2541460
2019-12-27 03:25:49 -08:00
Pavankumar Nandeshwar
61392d0275 qcacmn: cmn_ops changes in umac, tgt_if for umac-dp decoupling
umac and tgt_if module changes due to umac-dp decoupling changes in
cmn_ops APIs.

Change-Id: If8a7bdb879660f1d15a067ce9c76f96e6dfb7140
2019-12-27 03:25:25 -08:00
Pavankumar Nandeshwar
a234716d1d qcacmn: cmn_ops changes in datapath for umac-dp decoupling
Change cmn_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: I5716a87cad56b1dfe8dd56f193bbb6ff923a6af1
2019-12-27 03:24:59 -08:00
Surya Prakash Raajen
a3baeee819 qcacmn: Memory optmization of Node/peer structure variables
Remove unused variables and reduce the memory by
the structure padding.

Change-Id: Ic49829ab463d75af6d7fc1ac36df16cabdf447e2
CRs-Fixed: 2587049
2019-12-27 01:40:40 -08:00
Surya Prakash Raajen
bf5195f2e6 qcacmn: Memory optmization of Node/peer structure variables
Remove unused variables and reduce the memory by
the structure padding.

Change-Id: I8feca8b6e3c340601a2097ccf6ce18d5840f29b9
CRs-Fixed: 2587049
2019-12-27 01:40:32 -08:00
Hariharan Basuthkar
da52df55d0 qcacmn: Add the operating classes 129 and 130
Add the operating classes 129 and 130 to the US, Europe, Japan,
and Global operating class tables in the regulatory component.

Change-Id: I930019c2b14451de57a92c069a77c27fb56d273b
CRs-Fixed: 2587094
2019-12-26 13:21:43 -08:00
Ashish Kumar Dhanotiya
89029e4d9e qcacmn: Send CTL info to firmware
In regulatory non-offloads feature, send conformance_test_limit_2G,
conformance_test_limit_5G, reg_domain, reg_domain_2G and reg_domain_5G
information to firmware using WMI_PDEV_SET_REGDOMAIN_CMDID.

If all these attributes are not populated then CTL power limit is
not applied by the firmware.

Change-Id: I1523ab447aec64ec0af42da32318136f90fd17ca
CRs-Fixed: 2518246
2019-12-26 11:38:36 -08:00
Uraj Sasan
e8b8de05c0 qcacmn: Adds support for scan_start_offset in TLV
Sends "scan_start_offset" via TLV path to FW.
The value is in milliseconds

Change-Id: I82a8a501d0551ee758fcade74ab26038566b2031
2019-12-26 03:40:59 -08:00
Rakesh Pillai
4863352e53 qcacmn: Unmap the htc connect buffer after connect failure
The htc connect message buffer is not unmapped,
if the firmware does not send wmi ready event to the
host.

Scenario:
- Host sends htc init command.
- The command is queued into the src ring.
- The firmware has crashed before the Copy Engine
  could copy the message to the destination ring
- Due to the above point, no copy completion
  interrupt is received.
- The host times out during its wait for the wmi
  ready event.
- Hence the htc init command buffer stays unmapped
  and unfreed.

As a part of the wma ready event missing cleanup,
the htc connect buffer is not unmapped. Fix this
to avoid missing to unmap the buffer.

To avoid a side effect of sending a completion for
HTC connect command, all the commands are freed in
the htc completion handler in case of SSR.

CRs-Fixed: 2512344
Change-Id: I05026b3cbb764197e6df85c41634002d271a50e5
2019-12-25 22:11:36 -08:00
Tiger Yu
dc29b1f9d7 qcacmn: Limit logging when handling tx comp status if vdev is NULL
Use dp_info_rl instead of QDF_TRACE when handling tx completion status to
avoid excessive logging when vdev is destroyed in the another thread.

Change-Id: I1044c6d747ba1c7036664fe0265ec4855b7b4c47
CRs-Fixed: 2591486
2019-12-25 01:51:21 -08:00
Alok Singh
192bbaa088 qcacmn: Add debug support for vdev reference and release
Add function name and line number while taking/releasing
references for vdev to trace Object Manager references

Change-Id: Ie8a7d77db2f3c7b58536ab267c665299cb67152e
2019-12-24 20:34:09 -08:00
Alok Singh
c5394665b2 qcacmn: Add debug support for peer reference and release
Add function name and line number while taking/releasing
references for peer to trace object manager references

Change-Id: I93c30d62ecaa979f8c2680eec68f723d2d3c4292
2019-12-24 20:33:55 -08:00
Ashish Kumar Dhanotiya
d02ac5aeb9 qcacmn: Add legacy code CTRY_JAPAN15 to regdb
Currently CTRY_JAPAN15 is not there in host regulatory
database and it is still in use. If CTRY_JAPAN15 is set
from BDF, driver load will fail as this country is not
present in host driver database.

To address this issue add CTRY_JAPAN15 to regdb.

Change-Id: I031b766ac34d57193ded4856b1396306cd5bb76d
CRs-Fixed: 2590635
2019-12-24 08:25:00 -08:00
Shashikala Prabhu
cccf40f12b qcacmn: Return correct RSSI value from util_scan_entry_rssi()
RSSI in the scan entry is a negative value. It was converted to positive
value and if the converted value is greater than WLAN_RSSI_DUMMY_MARKER
(has positive value 295), util_scan_entry_rssi() was returning 0 to the
caller.
util_scan_entry_rssi() is used for printing RSSI value. Since RSSI is saved
as a negative value and caller expects it as a negative value, return a
negative RSSI value from util_scan_entry_rssi().

Change-Id: Ifdeb88dfa42a6927ff29670429d846ff071e9c59
CRs-Fixed: 2576129
2019-12-24 03:47:08 -08:00
Daniel Kim
c20cb89340 qcacmn: Derive pdev_idx from pdev instead of target_pdev
Derive pdev_idex from pdev object, not from target_pdev, as
target_pdev's pdev_idx can change in run-time when dynamic
mode switch feature is enabled.

Change-Id: Iff1bf0370764ec462d66f145dddbd1868fae426c
2019-12-24 03:46:54 -08:00
Alan Chen
7253be1b4c qcacmn: Use save_stack_trace_tsk() to save task stack trace
qdf_print_thread_trace() currently uses stack_trace_save_tsk() to save
task stack strace into a storage array, but stack_trace_save_tsk() is
undefined because it is not exported. Switch to using
save_stack_trace_tsk() as originally was done.

Change-Id: Ie90cdd87233581718e9a40436128a92691fc9a17
CRs-Fixed: 2587454
2019-12-24 02:21:30 -08:00
Kai Chen
011b6c668b qcacmn: add block ack and ack frame for tx capture feature
Block ack and ack frame is composed and sent to up
layer after a unicast packet to AP is received for
tx capture feature.

Change-Id: I4b6bb35fa093432539d15d09a93f85a8ec700b34
2019-12-23 05:50:44 -08:00
Ruben Columbus
1bec34c1e4 qcacmn: add ppdu_desc to cdp_tx_indication_info
ppdu_desc contains more information that is relevant to radiotap.

Change-Id: Ie2d0d53027958edf0a1032b270b7a8339b849924
2019-12-23 01:20:33 -08:00
nobelj
0e00776f45 qcacmn: support flush tlv in tx capture
update ppdu desc member based on flush tlv field
to support tx capture feature.

Change-Id: I9c5bc3a1ccce935d6be63556c025997d01fb6d4b
2019-12-22 23:51:34 -08:00
nobelj
182938a5b0 qcacmn: Modify timestamp to support 64 bits
modify Tx timestamp to support 64 bits value

Change-Id: I1c032b2e07a5bae94ec3a58d33dd9340f95a622e
2019-12-22 23:51:19 -08:00
nobelj
cf57a9af2a qcacmn: support 64 bits timestamp in wmi mgmt completion
added support for 64 bits timestamp that come for each tx
wmi mgmt completion

Change-Id: I70d66bcbe04aebad507a872faa97df8ab9752657
2019-12-22 23:51:04 -08:00
Nandha Kishore Easwaran
ee037a0f89 qcacmn: Reduce number of CE to 6 for QCN9000
Reduce the number of CEs used in QCN9000 to 6 since it has only
one mac and requires only 6 CEs. CE7 and CE8 are reserved for FW
and not needed to be configured from host

Change-Id: I989ffdb0219e2628bac5536e25c4cb2dbba6b7fb
2019-12-22 22:14:41 -08:00
Nandha Kishore Easwaran
a4f6b8ecce qcacmn: Do not request irq if DISABLE_INTR is set
Do not request interrupt if DISABLE_INTR flag is set in CE flags.
This check is already present in hif_ahb_configure_irq but is missing in
MSI path.

Change-Id: Icabe68298737dc412949484f6d3fdcd8c05910d5
2019-12-22 22:14:22 -08:00
Venkata Sharath Chandra Manchala
87a56bc7b7 qcacmn: Increase the force wake timeout
Increase force wake timeout value to 500ms to
accommodate scheduler latencies.

Change-Id: Id3748539e4b4809530ff78bd810681cb2210ff31
CRs-Fixed: 2573863
2019-12-22 22:14:01 -08:00
Rhythm Patwa
5618b01716 qcacmn: Add peer assoc param for 6GHz Band Capabilities
Add peer assoc parameter for 6GHz Band Capabilities information
for the corresponding FW peer assoc parameter.

Change-Id: I3bc4361e449843cf73db8426d3bd97dbcd9903ed
2019-12-21 11:01:57 -08:00
Saket Jha
6ef034094f qcacmn: Initialize qdf_nbuf_t before use
Initialize qdf_nbuf_t variables before use.

Change-Id: I4922de4c9f31c98dc745802dbb23a0757795769d
CRs-Fixed: 2587451
2019-12-20 20:06:36 -08:00
bings
9ef3680be6 qcacmn: Modify dfs phyerror pulse dur to increase radar detection rate
When FCC type 4 radar is injected at +/-30MHz separation from center
frequency in VHT 80MHz mode, incorrect pulse duration is reported in the
radar summary reports and lead to decreased radar probablity detection.

Fix the issue by capturing pulses with such characteristics and
modify them to fit within the valid phyerror pulse duration range.

Change-Id: Ic6314a372d6909448fbe4eb694c41736d1719712
CRs-Fixed: 2573339
2019-12-19 15:34:22 -08:00