커밋 그래프

8404 커밋

작성자 SHA1 메시지 날짜
Vivek
c27a6095e9 qcacmn: Provide valid range for gScanProbeRepeatTime INI
The default value provided for the INI item
gScanProbeRepeatTime for WIN is 50 which is
beyond the specified INI range 0 and 30.

Changing the max value to 50 to accommodate
the default value used by the INI and avoid
warning while parsing INI values.

CRs-Fixed: 2633733
Change-Id: I442d07de55813c930b77e7dfffcdebf5372c5c0e
2020-03-18 23:53:26 -07:00
Sravan Goud
e7eff14c56 qcacmn: Reduce excessive qdf update radiotap logs
For monitor mode update radiotap he flags logs are
flooding the driver logs as update of radio tap header
is done for each msdu. So rate limit the logs to reduce
excessive logging.

Change-Id: Ica75ccf98afc069b80fe6c75b3d9b04815c82ced
CRs-Fixed: 2644241
2020-03-18 23:53:12 -07:00
Vignesh Mohan
0bdf0bea6a qcacmn: Translate radar params for true 160Mhz devices
In chipsets that support true 160MHz (single synthesizer),
the radar parameters received from target are different from Hawkeye
based chipsets in which two synthesizers, each 80Mhz,
produce 160Mhz signal.

The segment ID received in true 160MHz chipsets is always 0 and the
frequency offset is with respect to the center of 160MHz; unlike in
Hawkeye where segment IDs can be 0 (primary) or 1 (secondary) and
the frequency offset received is with respect to the corresponding
frequency centers (of the segment ID received).

Hence, to be able to use the same radar found algorithm as used in
Hawkeye, add a translation/mapping API that will translate new
parameters to old equivalents.

CRs-Fixed: 2633062
Change-Id: I37ad1db4ca71231119cf547abb9a8a70577cc6a4
2020-03-18 15:38:58 -07:00
Vignesh Mohan
48c594436d qcacmn: Add API to identify true 160 and restricted 80p80 support
In a future product, 160MHz mode of operation is acheived through
a single detector, unlike Hawkeye and its variants where 160MHz mode
is acheived using two 80MHz detectors.

Because of this change, the maximum segment ID is 0 in the new chipset,
whereas 1 in Hawkeye and its variants. Also the Agile detector ID
is 1 in the new chipset, 2 in Hawkeye and its variants.

In light of these changes, to identify the true 160MHz capability,
add a new API that checks the target type and returns true 160MHz
capability based on the target type. Also introduce a new dfs
variable that maintains the agile detector ID (based on the
true 160MHz capability).

In the future product, there is a support of restricted-80p80MHz
(a.k.a 165Mhz) where channels 132,136,140,144,149,153,157,161 are
available for operation as an 80p80Mhz channel.
Add a DFS API to check if this support is enabled.

CRs-Fixed: 2623964
Change-Id: If813e9d6fc649ce99c7780c04fbcb61acbd1af86
2020-03-18 15:38:48 -07:00
Jingxiang Ge
84e83c24c0 qcacmn: Enhance log for usage_count mismatch debug
Add below change:
1 log level change from error to debug level in
  hif_pci_runtime_pm_warn.
2 Change warn_on to bug_on in hif_pci_runtime_pm_warn.
3 change pm_stats to atomic
4 record last 128 caller both for get/put

Change-Id: I2dae883dfaed22812445c5d50920fb363b9e0ea7
CRs-Fixed: 2638863
2020-03-17 16:09:28 -07:00
Alok Kumar
048c20096b qcacmn: Use platform driver APIs to enable/disable IRQ
Use pfrm_disable_irq_nosync/pfrm_enable_irq APIs inplace
of disable_irq_nosync/enable_irq to enable/disable IRQ.

Change-Id: I4002a0c8efddac7211ab0c7e8b92356b0c7bc7bf
CRs-Fixed: 2636512
2020-03-17 09:16:17 -07:00
Abhishek Singh
5cf1392709 qcacmn: Populate RNR info during scan req
Populate RNR info during scan req instead of beacon
add/delete to avoid loop while holding scan db spin lock.
With loop spin lock can take more than 5ms, which can results
in asserts.

Change-Id: I4ba346b8dcbaf7da844f97195dbdd3003bdb234b
CRs-Fixed: 2640889
2020-03-17 07:19:22 -07:00
Chaithanya Garrepalli
f9eb64de02 qcacmn: handle decrypt error on in case of peer invalid
In case of decrypt de-auth need to be sent in case of
invalid. In valid peer case no action needed

Change-Id: I355093734c20a113fc1df0306b426eeb4f92ac88
2020-03-17 05:15:09 -07:00
Arun Kumar Khandavalli
c36e48e3bc qcacmn: Set the default value of vdev rsp_timer_inuse to 1
In the qdf infrastructure the default value used during
the atomic variable initialization is 0, during the flushing
of the vdev response timer during the SSR vdev rsp_timer_inuse
is read to understand whether the timer is initialized or not.
Since the default value is 0 the vdev response timer is not
flushed resulting in different memory leaks.

To resolve this issue, increment the rsp_timer_inuse value
to 1 during the vdev response time initialization.

Change-Id: Ibe47d1175f19b4c62cd5a18cda8b56370b58128a
CRs-Fixed: 2642476
2020-03-17 05:14:52 -07:00
Pavankumar Nandeshwar
9b0c1271ed qcacmn: Initialized pdev id with default value 0xFF
pdev_id is being initialized with 0. Since 0 is valid pdev_id, though
pdev is not present for that id, it is being accessed.

Initialized pdev_id to 0xFF by default. Added checks on API to
detect valid pdev_id value corresponding to lmac_id

Change-Id: I2b2a38783615494ccc08e265702815f7e562214b
2020-03-17 03:11:13 -07:00
Amruta Kulkarni
2eb8560c88 qcacmn: Set default active dwell 2g time to 40ms for SAP
For SAP related scan (ACS,OBSS), set the active dwell time in 2G to 40 ms.

Change-Id: I5a34fc207ac281f5616e6071c66594f61451a512
CRs-Fixed: 2636152
2020-03-17 03:10:52 -07:00
Pavankumar Nandeshwar
9afaef18bf qcacmn: Assign soc to dp_pdev soon after allocation
Assign soc to dp_pdev soon after allocation, since the
soc pointer is required during deinit if pdev attach fails.

Change-Id: I87789deb82efe9f554b3310a904dd340c5eb9f7a
CRs-fixed: 2638378
2020-03-17 01:06:23 -07:00
Saket Jha
42f305e423 qcacmn: Avoid accessing invalid cookie rx_descriptor
Remove debug dump call to dp_rx_desc_dump() as cookie rx_descriptor is
invalid.

Change-Id: I106ebc2f872e43079abd6e6e493c90022fd09c3b
CRs-Fixed: 2638059
2020-03-16 19:55:12 -07:00
Mohit Khanna
c58bf56dae qcacmn: Use QDF_MODULE_ID_HAL for HAL tracing APIs
Currently hal_info, hal_err etc are using QDF_MODULE_ID_TXRX to print.
Since HAL is a separte module, use QDF_MODULE_ID_HAL.

Change-Id: I2345e1b333ef1f7a4808f5417657ac58da071475
CRs-Fixed: 2636911
2020-03-16 17:23:59 -07:00
Rhythm Patwa
78ddddb141 qcacmn: Add WMI support to enable injector frame cmd
Add corresponding WMI host param for enabling the
injector frame on the AP.

CRs-fixed: 2640751
Change-Id: I00a634375e0eafbacfd505aa39dce9c8d90804c6
2020-03-16 13:52:34 -07:00
Chaithanya Garrepalli
1da6b755af qcacmn: drop nbufs in WBM error with sa_idx out of range
In some cases we are seeing sa as valid and sa_idx out of
range. Drop nbufs in this case

Change-Id: I17c4ff41817a77f0eb8fcdf77fa17d4d3197f97b
2020-03-16 08:05:48 -07:00
Edayilliam Jayadev
49de9e2d3c qcacmn: Handle 80p80 and 160 MHz separately
Currently 160 and 80+80 MHz modes are handled together in
Spectral module. Differentiate between 160 and 80+80 MHz
to support new features like restricted 80+80
which are applicable only with 80+80 MHz.

CRs-Fixed: 2630729
Change-Id: I3e9fdd0e2d22a0bca7d37445df7fb1f1bab023c8
2020-03-16 08:05:34 -07:00
Vignesh Mohan
1d4f7736d3 qcacmn: Use frequency ranges for copying NOL after mode switch
Current NOL conversion for dynamic mode switch is in such a way
that the NOL data is copied to the pdev ID entry for the targeted
mode. That is, the NOL data is split/merged before mode switch and
copied to a temporary structure before mode switch command is
sent to FW.
At this point, the target pdev's frequency range are still the old
values because of which, certain entries of the NOL data are missed.
Also in case of FW failures, the NOL entry cannot be added back
because they have been merged/split already.

To avoid the above, rearchitecture deinit and reinit NOL for
mode switch in such a way that the NOL data, as-it-is, is copied
before mode switch and is only split/merged after the frequency range
of the pdevs are properly mapped and the FW response is a success.

Change-Id: I4a073d1327ba182c40ced6089aa46d8f5f241d33
CRs-Fixed: 2632582
2020-03-16 06:08:43 -07:00
Rakesh Pillai
f2e0f22bf7 qcacmn: Fix stack frame overflow for dp_rx_process
dp_rx_process stack frame has grown to exceed the
stack frame size of 4096. dp_rx_deliver_to_stack_no_peer
is a big function which should not be inline. Calling it
in other function increases the stack size consumed by the
caller function a lot.

Since dp_rx_deliver_to_stack_no_peer is not called very
frequently from dp_rx_process, changing its type to non-inline
function does not hit the core rx datapath much. Hence
change dp_rx_deliver_to_stack_no_peer to a non-inline
function.

Change-Id: Ib042f74c1f5a9cbe5fd947a24f004bb2fecf1fb1
CRs-Fixed: 2636365
2020-03-16 03:47:48 -07:00
Amir
252b67e048 qcacmn: Add HAL layer changes for full monitor mode
Add HAL layer changes for full monitor mode.

Define HAL API and Data structures to read sw_monitor_ring
descriptor.

CRs-Fixed: 2630982
Change-Id: I015fa106d9da74222bef092d50e96fc70a117a4a
2020-03-15 23:45:58 -07:00
Edayilliam Jayadev
4e5b760643 qcacmn: Enable 160 MHz Spectral scan in QCN9000
Till IPQ8074/IPQ8074_V2 each Spectral detector was capable of
doing scan up to 80 MHz. But in QCN9000 each Spectral detector
is capable of doing scan up to 160 MHz. As a result there will
be only one Spectral report in 160/80p80 MHz. Modify Spectral
Rx path to support single Spectral report in 160 MHz.

Change-Id: I9639cdc6adc6ad80e2769571b06d2a2021d699bc
CRs-Fixed: 2619544
2020-03-14 18:16:25 -07:00
Abhishek Singh
171ac51c1a qcacmn: Fix uninitialized RNR list and OOB memory access
Fix the case where RNR list can be used uninitialized and
fixed the OOB memory write access in 6Ghz BSSID and SSID hints
in scan req.

Change-Id: Ifc6a5f65876cd3ace744031bf59a3640409b63da
CRs-Fixed: 2637039
2020-03-14 12:45:45 -07:00
Lincoln Tran
a329901cca qcacmn: Add regulatory API to get country code
Implement function to allow regulatory code to get country code and source

Change-Id: I2713913ba212509e778229b3041363a32ca6049e
CRs-fixed: 2634077
2020-03-14 12:45:29 -07:00
Liangwei Dong
86dd484d69 qcacmn: Radar event process based on concurrency policy
Per requirement, if STA+SAP is working on same 5G DFS
channel and INI g_sta_sap_scc_on_dfs_chan = 2, the
SAP DFS master is temporarily disabled to skip radar event,
and it will follow STA's channel movement. So, skip the
radar event processing based on STA+SAP concurrency policy,
otherwise the SAP would be stopped by kernel because the
current home channel is marked "disabled" by regulatory
during processing of radar event.

Change-Id: I3f851fe694c0e127665732894306e20f5d1c93f4
CRs-Fixed: 2636200
2020-03-14 09:15:37 -07:00
Sumedh Baikady
c673777be4 qcacmn: Add WMI event support for dynamic Muedca
Add support for WMI event to host to process
dynamically selected Muedca values and update
the mgmt frames with the new set of values.

Extract the params and store in Muedca_param
struct from control path, to be used for
updating mgmt frames.

Change-Id: I6cc7756d1a246ff994edef195f6191d280bc5c47
2020-03-14 09:15:20 -07:00
Alan Chen
5320ccb4d6 qcacmn: Remove static from nla_policy btc_chain_mode_policy
Remove static from nla_policy btc_chain_mode_policy in correspondence to
the change to add policy attribute to BTC_CHAIN_MODE vendor subcommand.

Change-Id: Ie33542199d27f6b9d8ea5e0a1a063b71ecb7fd94
CRs-Fixed: 2635059
2020-03-14 09:15:03 -07:00
Alan Chen
31f4e86ecb qcacmn: Remove static from nla_policy spectral_scan_policy
Remove static from nla_policy spectral_scan_policy in correspondence to
the change to add policy attribute to SPECTRAL_SCAN vendor subcommand.

Change-Id: I764a51f5c1355cb0c3dd2096e6dc7ee332b2f3d6
CRs-Fixed: 2634075
2020-03-14 03:25:12 -07:00
Guisen Yang
b1d228b9aa qcacmn: Change print format for pointer and timer
Build failure happen when use the incorrect print format for
pointer. The timer type should not be used for time difference.
Use %pK for pointer format, and change the variable type to
uint64_t for delta_us.

Change-Id: I7da553ee2a770e4498a23f16d5187dec74357635
CRs-Fixed: 2639868
2020-03-13 23:50:54 -07:00
Jianmin Zhu
2ba2d3eda3 qcacmn: Mixed error code and tx power
When channel invalid, error code is treated as
tx power value by the caller.

Change-Id: Ie37c7f04734be46b6237acffe02eed3f31923012
CRs-Fixed: 2636772
2020-03-13 17:29:15 -07:00
Paul Zhang
063ee32509 qcacmn: Initialize num_phy in reg_program_default_cc
When regdb is non offload, it invokes ucfg_reg_program_default_cc
to initialize the default country code. Because the num_phy is not
initialized and the country code source cannot not initialize
properly in function reg_process_master_chan_list, 11d cannot be
triggered.

Solve the problem mentioned above by initializing num_phy in
reg_program_default_cc. Since it is non-offload, initialize
num_phy to 1.

CRs-Fixed: 2584347
Change-Id: Idaed2badc908c74bcbb9312368fed8cbb71ac69c
2020-03-13 15:32:33 -07:00
Sourav Mohapatra
918e46deec qcacmn: Add policy attribute to QCA_NL80211_VENDOR_SUBCMD_ABORT_SCAN
According to new changes in kernel 5.2 version onwards, driver has to
provide the policy for a NL command to be verified against while
registering wiphy to the kernel.

To accommodate these changes, add policy to the following vendor
command that is being registered in the driver.

	QCA_NL80211_VENDOR_SUBCMD_ABORT_SCAN

Change-Id: I7cd4e6c50a48580a124e36c32b9cbebe557c04bf
CRs-Fixed: 2621311
2020-03-13 08:39:43 -07:00
Padma Raghunathan
9946d36d19 qcacmn: Add CFR feature support
Add CFR feature support for WIN and MCL.

Change-Id: I135409c00df953ad7ae4e570418403b11ebc1bc7
CRs-Fixed: 2639069
2020-03-13 06:47:56 -07:00
Chaoli Zhou
2e0fb4fd50 qcacmn: Change copy engine 8 entry numbers
From Genoa firmware request, in order to improve
the IPA througput, increasing the number of copy
engine 8 entries and other nbytes values.

Change-Id: Ib1ae170c3b3f5af61d03ad8a60bc616b7a58a725
2020-03-13 06:47:45 -07:00
Krishna Rao
857b254f72 qcacmn: Add attribute for dwell time in QCA vendor scan
Add an attribute QCA_WLAN_VENDOR_ATTR_SCAN_DWELL_TIME for specifying
dwell time in the QCA vendor scan command. This is a common value
which applies across all frequencies requested in the scan.

Additionally, update the existing definitions in enum
qca_wlan_vendor_attr_scan to the exact code upstreamed.

CRs-Fixed: 2633010
Change-Id: I09feccc99fb8e53538d495345eda9744e36fc5b4
2020-03-11 08:11:01 -07:00
Bapiraju Alla
bdcc78d3ea qcacmn: Remove dummy NLA parsing in driver for kernel >= 5.2
Existing dummy NLA parsers are triggering illegal memory access
with kernel versions 5.2 or later.

To resolve this, revert the change
Iea1fdcac3000ede2f8b9398cb85443e545cdd3f0 (Add dummy NLA parsing
in driver for kernel >= 5.2).

Change-Id: I8804d5aefefec248a1b82d1ca92ffaab56aa539f
CRs-Fixed: 2638303
2020-03-11 06:50:49 -07:00
hqu
a3dc09cce3 qcacmn: Define pointer p_dcs_im_stats instead of dcs_im_stats
Both im_intfr_cnt and im_samp_cnt need to store for following
dcs event process, dcs_im_stats is a local variable, so both
im_intfr_cnt and im_samp_cnt value will be missing when function
wlan_dcs_wlan_interference_process return.

Fix is to define pointer p_dcs_im_stats for use.

Change-Id: I39622fbf0153271f27a03387ace4a270a912b6ff
CRs-Fixed: 2638316
2020-03-11 03:49:50 -07:00
Kai Chen
b1a940fa76 qcacmn: Fix issue on block ACK on response to BAR
Fix the issue on block ACK on response to BAR frame.
Parse BAR frame received from monitor destination ring and
generate block ack frame from BAR frame and previous block
ACK frame.

Change-Id: Ifc242b3850630aa25827b003a1e2078a9228358a
2020-03-11 01:47:02 -07:00
Abhiram Jogadenu
928035a1a4 qcacmn: Use global opclass for 6GHz channel lookup
For 6G band, only valid opclass_table is the global_op_class
as per the current specification. Therefore, if the band is 6G
set the opclass to global_op_class instead of the default class.

Change-Id: I43d1be8266aa80b11c446d84bc3d027cde8bebea
2020-03-10 03:53:14 -07:00
Nisha Menon
af7af90906 qcacmn: SMMU fault as iova to phy address is invalid
IPA pipes are not disconnected successfully when the last
client disconnects and despite that smmu mappings given
to IPA for the buffers are released.
Assert instead of releasing the smmu buffer mappings as
IPA has stalled and is in a non-recoverable state.

Change-Id: I9a9a35a4019726421d7435b62defe8da4907d4e0
CRs-Fixed: 2627889
2020-03-09 20:58:50 -07:00
Mohit Khanna
ace98f847f qcacmn: HIF APIs to prevent/allow low power states
Add HIF APIs to prevent or allow link to go into low power states. The
current implementation uses PLD APIs to make the needed configuration.

Change-Id: I22efb4bcf902f9aff674ed1872f4f23bef508aae
CRs-Fixed: 2602029
2020-03-09 20:58:34 -07:00
Mohit Khanna
b4429e8278 qcacmn: Add delayed register write support in HAL
In case the bus is in low power mode, the register writes (followed by a
memory barrier) may take a long time (~4ms). This can cause the caller
to block till the PCIe write is completed. Thus, even though PCI
writes are posted, it can still block the caller.

Hence, in case the bus is in low power mode (not in M0), or not in high
throughput scenarios, queue the register write in a workqueue. The
register write will happen in the delayed work context. In other cases,
i.e ,when the bus is not in low power mode or in high thoughput
scenarios, do the register writes in caller context.

Change-Id: Idf218e4581545bc6ac67b91d0f70d495387ca90e
CRs-Fixed: 2602029
2020-03-09 20:58:23 -07:00
Amir Patel
d5a7a4ca89 qcacmn: Revert "qcacmn: Replenish last entry in monitor status ring"
This reverts commit I7da6cd6006243cbca2151da22a31a6f5ed0015f3

Change-Id: I04ceeeeabb5f94bfcd81e10280dcd017da537c81
2020-03-09 14:52:57 -07:00
Ankit Kumar
673a66042b qcacmn: Retrieve peer from mac based search
Use mac based search to avoid use after free Peer.

Change-Id: Ie6c3e82f3bb95cdf4c6504e95704e821bbd19e24
2020-03-09 08:24:21 -07:00
Yeshwanth Sriram Guntuka
06c7cbb878 qcacmn: Modify pkt string for logging to console
Modify the qdf_get_pkt_type_string API to return
the packet type in case the packet does not fall
under the tracked packet subtypes and also increase
the rate limit values for EAPOL and DHCP packets.

Change-Id: Ie9681be64572346a09529043ef38dd57338700bb
CRs-Fixed: 2636540
2020-03-09 03:12:01 -07:00
nobelj
7b76263659 qcacmn: QDF API for skb_clone_fraglist along with copy expand
Add API wrapper function for skb_clone_fraglist along
with skb_copy_expand.

Change-Id: Ib03e16566368d75a7a547fea6fd863e6411f98ef
2020-03-08 00:05:27 -08:00
Paul Zhang
09849da4ce qcacmn: ignore WMI_REG_CHAN_LIST_CC_EVENTID
If reg offload is disabled, then ignore the processing of
WMI_REG_CHAN_LIST_CC_EVENTID in regulatory module.

Change-Id: I5da0cdf2c80357d03199fa367137cc236f4c3307
CRs-Fixed: 2625784
2020-03-07 14:33:48 -08:00
Saket Jha
d364435727 qcacmn: Validate rx return_buffer_manager
Host rx return_buffer_manager should always be 4 or 6. Add check for
invalid return_buffer_manager value in ring descriptor.

Change-Id: I509dd58ddd89e6a0ce1bffa509dcfabbd0fbc975
CRs-Fixed: 2632372
2020-03-06 18:52:30 -08:00
Chaithanya Garrepalli
9668aeef28 qcacmn: Fix SG target assert issue
In SG mode use correct QDF apis to populate
the extension descriptor

Change-Id: I828d11481b013facb07f22a119ab9b3f35912f22
2020-03-06 08:37:20 -08:00
Naga
5e9b98b42c qcacmn: Reset rsp_timer_inuse only for delete
Reset rsp_timer_inuse field only for vdev
delete target_if timer expiry case.

Change-Id: I6e286914f8954d568b8125031954621043945661
CRs-Fixed: 2635483
2020-03-06 07:05:05 -08:00
Abhishek Singh
d9e7ba7cc6 qcacmn: Optimize logging in crypto module
Optimize logging in crypto module.

Change-Id: I4da7dfcaae81f9a6511bce5b422b5e81faa189ef
CRs-Fixed: 2635263
2020-03-05 14:02:14 -08:00