Commit Graph

7985 Commits

Author SHA1 Message Date
Pavankumar Nandeshwar
5f29f5f5c2 qcacmn: Update obj_mgr debug ids for ol_if_ops changes
Remove WLAN_TGT_IF_DP_PEER_REF_ID and add WLAN_PDEV_TARGET_IF_ID

Change-Id: I316d108c3e5bd27f6abc00b8d162a45284fffec6
2019-12-04 07:44:33 -08:00
Pavankumar Nandeshwar
715fdc32ec qcacmn: remove ctrl_peer handle from dp peer
Remove ctrl_peer handle from dp peer and instead
use peer's mac address

Change-Id: I9e24fa94248749f9b4859bce4a1d79d70f32507e
2019-12-04 07:44:21 -08:00
Venkata Sharath Chandra Manchala
fb323024ac qcacmn: Avoid freeing the lock
Avoid freeing flow_pool_array_lock when it is
not created. So free flow_pool_array_lock in 2
ways:
1. When dp_soc_cmn_setup fails free the flow_pool_array
   lock only if it is created and then close the dp
   soc handle.
2. As flow_pool_array_lock is created in dp_soc_cmn_setup
   as part of dp_pdev_attach_wifi3 init sequence free the
   lock only in the dp_soc_cmn_cleanup as part of the
   dp_pdev_detach_wifi3 deinit sequence.

Change-Id: Ie3e11da0bc0854fa550c5d417ca3c0bc9e2593b1
CRs-Fixed: 2565603
2019-12-04 03:37:28 -08:00
Amruta Kulkarni
88ec9b6865 qcacmn: Enhance logic for dwell time 2ghz
With this change, in concurrent mode
(SAP on 5ghz or 6ghz and peer connected + STA Scan ongoing),
active dwell time for 2ghz is not reset to 0.

Change-Id: I27bcd64579727e279095cf5386638dbd49567b3d
CRs-Fixed: 2575762
2019-12-04 00:10:28 -08:00
Shashikala Prabhu
2c2681c3d1 qcacmn: Fix compilation error by initializing num_channels to zero
To fix 'error: ‘num_channels’ may be used uninitialized in this
function' error, initialize num_channels to zero.

Change-Id: Ic35b606a6e075dd309844c5fca793f970a701f5e
CRs-Fixed: 2570055
2019-12-03 19:27:56 -08:00
Sourav Mohapatra
162b129a01 qcacmn: Add support to send config params in NAN request
Add support to send the config params as a part of NAN enable/req
command to the firmware. The config params contain information regarding
the enable/disable status of NAN RTT.

Change-Id: I9826d0cd2763fd70b8203cd03ca043b35d082820
CRs-Fixed: 2574051
2019-12-03 13:11:37 -08:00
Shwetha G K
7887593414 qcacmn: Log Spectral FFT timestamp WAR parametrs
Log Spectral FFT timestamp WAR related parameters

Change-Id: I11e3107f41049e9fb05c3f9f7960279b88392598
CRs-Fixed: 2556803
2019-12-03 04:52:57 -08:00
Shwetha G K
8b236c153f qcacmn: INI support to poison spectral buffers
Add INI support to enable the poisoning of spectral buffers during init

Change-Id: I599f7d85a4756a216d24144e1e8bf2a113a26abb
CRs-Fixed: 2554855
2019-12-03 03:26:44 -08:00
Shwetha G K
389eae6224 qcacmn: Check discrepancies in Spectral timestamps
If the timestamp field in the current Spectral report is equal to the
timestamp field in the previous report, assert the FW.

Change-Id: Idb32807f0cdd59a2eaab5dd6c1e62567fd5a45d0
CRs-Fixed: 2478593
2019-12-03 03:26:32 -08:00
Shwetha G K
8db4b4ac32 qcacmn: Control path support for Spectral DMA debug
All gen III chipsets use Direct-DMA mechanism to copy Spectral reports to
the Host for further processing. This mechanism involves ring and buffer
management in the Host, FW, and uCode, where improper/incomplete DMA and
improper tail update issues are seen. DBR framework provides support to
debug such issues. Add Spectral control path support to facilitate the
configuration of these debug options.

CRs-Fixed: 2478596 2478595
Change-Id: I094616c4137145389b6984ccab933e5ebd0aa1ab
2019-12-03 03:26:22 -08:00
Gururaj Pandurangi
85d32ab984 qcacmn: Rate limit logs in serialization API
Rate limit logs in wlan_serialization_peek_head_active_cmd_using_psoc
to prevent excessive logging

Change-Id: I25bc93754cf4fe5d56fdb67c15b79b72fcda9efd
CRs-Fixed: 2574786
2019-12-03 01:15:38 -08:00
Rachit Kankane
98ec4d132b qcacmn: use spinlock before iterating
Before iterating in pending list, use spinlock to avoid possible
race condition.
Remove function wlan_serialization_get_active_list_next_node_using_psoc
as it not being used and is part of legacy flow which is suppose to be
removed eventually.

Change-Id: I9e7cbd9db8b5a1c45915bf5291cd5011c276d0e2
CRs-Fixed: 2573425
2019-12-02 12:39:42 -08:00
hqu
e131d31b8b qcacmn: Refine chan_list to chan_freq_list
Refine chan_list to chan_freq_list for below functions:

ucfg_scan_filter_valid_channel
scm_filter_valid_channel
scm_filter_channels

Change-Id: Ia1e82c5ac4cea4e48844b925e30947e945c40ee4
CRs-Fixed: 2570954
2019-12-02 07:19:47 -08:00
Liangwei Dong
49472056b2 qcacmn: Enable Fils Discovery frame sending in 6GHz SAP
To enhance visibility of 6GHz AP, 6G only AP shall send
Fils Discovery frame periodically in one beacon interval.

Change-Id: I51487380fca10418d2260dc2612e2adcf6cbb93b
CRs-Fixed: 2562434
2019-12-02 05:22:42 -08:00
Shashikala Prabhu
9a8d2a2825 qcacmn: Cleanup direct attach specific scan code
Cleanup direct attach specific code from common files.

Change-Id: Ided7aa31c3d37ac71fdcf19de439a5e2ed739019
CRs-Fixed: 2571429
2019-12-02 02:09:14 -08:00
Shwetha G K
0c000df15e qcacmn: Add poisoning support for Spectral DDMA buffers
All gen III chipsets use DDMA method to copy the spectral reports to
the Host. It is possible that the buffers can be improper/incompletely
DMAed, which leads to wrong values being present in the Spectral report.
To detect improper DMA, the DBR framework has the support to poison the
buffers before handing them over to the target. This framework expects
the buffer owner modules to check for poison values in key fields.
So, validate the Spectral reports and assert the target upon failure.

Change-Id: I519bf8abd87cfc9758fe7d126a195f39656d8ecc
CRs-Fixed: 2478592
2019-12-02 00:43:04 -08:00
Shwetha G K
29121213c8 qcacmn: Add debugfs support for DBR ring debug
For each DBR ring, add debugfs entry to dump at real-time the ring
parameters like head, tail index, the timestamps at which a buffer is
received and replenished. Issues that are specific to tail index
movement from the target can be identified with this debugfs entry.

CRs-Fixed: 2466514
Change-Id: Iafbc61726264464212cb783a1cce46e16b8a48ff
2019-12-02 00:42:54 -08:00
Shwetha G K
215bac70f5 qcacmn: Add poisoning support for DBR buffers
Improper/incomplete DMA by the target affects the functionality of modules
that are using DBR framework. Add debug infrastructure to poison DBR
buffers with a given poison value before handing buffers over to
the target. Buffer owner modules can explicitly check for the poison
value in order to detect the improper DMA.
All modules that use DBR framework can use this debug infrastructure.

Change-Id: Ib3923c13202990e0f1198645b680c44a20736167
CRs-Fixed: 2466518
2019-12-02 00:42:41 -08:00
Shwetha G K
df696de7cc qcacmn: Add support to track DBR ring index movement
Add debug infrastructure to track the movement of head and tail pointers
of the DBR ring along with the time at which each buffer is received and
replenished. All modules that use DBR framework can use this
infrastructure. Issues that are specific to tail index movement from
the target can be identified with this debug infrastructure.

CRs-Fixed: 2439460
Change-Id: I6b486a73cf6a3174dfa297f8fb370fd298b46b67
2019-12-02 00:42:31 -08:00
Venkata Sharath Chandra Manchala
d62af87cc1 qcacmn: Increment/Decrement num_tx_outstanding
Increment pdev->num_tx_outstanding when
tx_desc is allocated and decrement tx_desc when tx_desc
is released. During runtime pm suspend, WOW PAUSE
is sent to firmware only if there are no
pending num_tx_outstanding descriptors.

Change-Id: I54aaa4d8a37b8cd47de1701a315bb0735c9739d2
CRs-Fixed: 2567689
2019-12-01 19:17:39 -08:00
Alan Chen
0a26d8d2c1 qcacmn: Add conditional macros for creating/destroying wakelocks
Kernel 5.4 and 5.1 have removed the functions wakeup_source_init()
and wakeup_source_trash() respectively. Add conditional preprocessor
directives to use wakeup_source_register() and wakeup_source_unregister()
for Kernels 5.4 and 5.1 respectively.

Change-Id: I05597eb54b2988f7bc203b53427e17980a7473f9
CRs-Fixed: 2559016
2019-12-01 19:17:25 -08:00
Jinwei Chen
a9d46ad930 qcacmn: remove assert for invalid release source case
Remove host assert when receiving invalid release source entry from
WBM2SW0 ring.

Change-Id: Iae62ce3008024c55c1dde79e4dd0cd93d7e6f5a4
CRs-Fixed: 2571826
2019-12-01 19:17:10 -08:00
Kai Chen
a8cf59455e qcacmn: Add stats on OFDMA and MU-MIMO packet
Add MCS, NSS, MPDU FCS OK, MPDU FCS ERR stats
classified by SU, OFDMA and MU-MIMO.

Change-Id: I3ade03acc06bd924fdeb8dfcaf6b18fb01f01d68
2019-12-01 19:16:58 -08:00
Liangwei Dong
7ce41f14c1 qcacmn: Fix channel_map NULL
Initialize channel_map to "us" at regulatory init.
Use NUM_6GHZ_CHANNELS to get 6Ghz channel numbers
instead of MAX_6GHZ_CHANNEL.

Change-Id: Ifed996c1a528c8a3c0a29d3959f17dff6d298193
CRs-Fixed: 2949971
2019-12-01 19:16:45 -08:00
Mainak Sen
8bc9b42eb3 qcacmn: Loopback check for ucast frame after hmmc
Add a check to drop unicast frame being sent to same originating
VAP after hmmc conversion of IGMP control packets

Change-Id: Ic25812a7848af793075a0cb483100ebcf59d85b2
2019-12-01 19:16:31 -08:00
Hariharan Basuthkar
4050a850ac qcacmn: Rectify the API wlan_reg_is_6ghz_psc_chan_freq
While checking if a channel frequency is 6Ghz PSC frequency within
wlan_reg_is_6ghz_psc_chan_freq, check the remainder of the expression,
instead of quotient.

Change-Id: Ia40d7cd8485f9f8eb90222f9a3454d46e681681b
CRs-Fixed: 2572914
2019-12-01 17:43:32 -08:00
Nirav Shah
aa6ca443db qcacmn: Add logic to bundle packets for HL
Add logic to queue and bundle packets before
giving it to scheduler to ensure predictive HTC
bundling for improvement in TX throughput.

Change-Id: Iab5066a46235ce7e41fd29c44a2ce0cfb04b1505
CRs-Fixed: 2574530
2019-12-01 17:43:11 -08:00
Priyadarshnee S
399ef175ce qcacmn: Add regulatory APIs to retrieve "unii_5g_bitmap" mask
Add regulatory APIs reg_get_unii_5g_bitmap and ucfg_reg_get_unii_5g_bitmap
to retrieve the value of "unii_5g_bitmap" stored in regulatory pdev
private object.

CRs-Fixed: 2574642
Change-Id: Iffb004b7fc9d9fbcf1972eb6f527529024e49c70
2019-12-01 17:42:58 -08:00
Sandeep Puligilla
0ca3c59702 qcacmn: Don't update ACS scan channel list
Ini item 'scan_mode_6ghz' updates the scan channel list based
on the user configuration value that includes the ACS scan on
SAP mode.

This change restricts the ini item configuration for ACS scan request.

Change-Id: I0871fed8a8d1e551656e8a1ba06b504755074ca1
CRs-Fixed: 2574811
2019-12-01 17:42:46 -08:00
Shashikala Prabhu
6810d038e9 qcacmn: Fix issues in random channel selection algorithm
Remove dummy function dfs_remove_cur_ch_from_list(). This logic is already
implemented in dfs_apply_rules().

In dfs_apply_rules()/dfs_apply_rules_for_freq(), skip all the HT20 channels
of the curent channel when DFS_RANDOM_CH_FLAG_NO_CURR_OPE_CH flag is set.

In dfs_prepare_random_channel_for_freq(), allocate correct size of memory
for leakage_adjusted_lst array.

Use DFS_80_NUM_SUB_CHANNEL macro instead of DFS_80_NUM_SUB_CHANNEL_FREQ to
choose correct 80MHz channel.

Change-Id: Ie318d667ff1b0caef3032b7aa57f0ddfb7e1f1a7
CRs-Fixed: 2570055
2019-12-01 17:42:33 -08:00
tinlin
21f7286344 qcacmn: Add MIB statistics
Add new stats_id WMI_REQUEST_MIB_STATS &
WMI_REQUEST_MIB_EXTD_STATS in WMI_REQUEST_STATS_CMDID
to retrieve MIB statistics from fw.

Change-Id: I17bccc2673d1a2ce035db04d8426bab49db80790
CRs-Fixed: 2548165
2019-12-01 17:42:21 -08:00
Rakesh Pillai
74368919c5 qcacmn: Ratelimit the tso descriptor alloc failure
In cases were all the tso tx descriptors are outstanding,
the alloc for any subsequent tso packet will fail.
This failure to get a tso tx descriptor floods the
console with failure logs.

Ratelimit the tso descriptor allocation failure and
increment the alloc failure in stats to get the exact
number of times the allocation failed.

CRs-Fixed: 2572580
Change-Id: I789788b917421be99df5435ad858d715ef0f5c8e
2019-12-01 17:42:07 -08:00
Priyadarshnee S
27f9726c24 qcacmn: Add an enum to configure UNII-1 and UNII-2A band coexistance
Add an enum that enables/disables coexistance of UNII-1 and
UNII-2A band channels.

CRs-Fixed: 2570364
Change-Id: I30cdda555675e4772aff59ebbbacfdd79f699af5
2019-12-01 17:41:51 -08:00
Hariharan Basuthkar
52ccb5e615 qcacmn: Disable coex channels in the current_chan_list
The 5G cellular RF band and wifi frequency band of UNII-1
(IEEE channels 36, 40, 44, 48) and UNII-2A band (52, 56,
60, 64) can coexist.

UNII-1 and UNII-2A are represented by bits 0x1 and 0x2 respectively in
this implementation. The user space command should set the bits by
applying the following algorithm:

1) To disable only the UNII-1 band channels, set the value as 0x1.
2) To disable only the UNII-2A band channels, set the value as 0x2.
3) To disable both the UNII-1 and UNII-2A band channels, set the
   value as 0x3.
4) To restore both the UNII-1 and UNII-2A band channels, set the
   value as 0x0.

Change-Id: I8ff747e53b079ee9e0dc762980aee0eea32b23a5
CRs-Fixed: 2571546
2019-12-01 17:41:36 -08:00
Jinwei Chen
a718c757b3 qcacmn: check register writing result for IPA case
When SAP do connection with first Ref-STA or dis-connection with
last Ref_STA, wlan host need to re-configure REO Dst ring control
register. one of the register offset is 0xA38004, host need to write
remap window register (offset 0x310C) with value 0x14 first, but
sometimes this remap window writing not work, so just use the remap
window value 0x3F left by last writing, final Dst register offset will
be 0x1FB8004 which is out of valid range.
  Find that if we read back the remap window after writing is done,
remap window writing failure issue is gone. as a WAR, check register
writing result for this specific register REO_R0_DST_RING_CTRL_IX_0
always before root caused.

Change-Id: I8d385a0f974ff37bdd867d2ec946f2f46f6eff32
CRs-Fixed: 2570728
2019-12-01 13:11:45 -08:00
Sravan Goud
ba1d5aa876 qcacmn: Record last 32 dp ipa reo remap register writes
For debug purpose of issues related to IPA NOC errors and
register writes not going through, record last 32 dp ipa
reo remap register writes which are outside of non shadow
region registers.

Change-Id: If2dfe7250bb2a6bbe0e180df137c92b43a150b2c
CRs-Fixed: 2571608
2019-12-01 13:11:32 -08:00
Linux Build Service Account
a42e04b272 Merge "qcacmn: Add conditional macros for tasklet_hrtimer struct" 2019-11-29 07:07:27 -08:00
Karunakar Dasineni
6342933715 qcacmn: Support SW retries in Tx capture
Changes to include SW retries in Tx capture.

Change-Id: I2bee277107356a6dca6f8a6cc52cded73aca6c7a
2019-11-27 09:15:45 -08:00
Karunakar Dasineni
8e25a3077a qcacmn: Add qdf API to find last set bit
Add qdf wrapper for Linux fls() to find last set bit.

Change-Id: I089fee397d619515c768521bda1f4d4c35526fe0
2019-11-27 09:15:30 -08:00
Karunakar Dasineni
91da9dce36 qcacmn: QDF API for skb_copy_expand
Add QDF wrappers for skb_copy_expand

Change-Id: I401241259c87a067ed4773bee9fdfc7ee3cdcc23
2019-11-27 09:15:15 -08:00
Priyadarshnee S
8e626ee720 qcacmn: Fix memory corruption in DFS Random Channel Selection
With the introduction of 6GHZ and replacement of IEEE channel numbers
by frequency in DFS, "leakage_adjusted_lst" is now a pointer of type
uint16_t. Change the allocation size to take care of size of the new type.

CRS-Fixed: 2569329
Change-Id: I595bc77970a2758fd6ca66e53de6c0dbfe8843bc
2019-11-27 07:05:44 -08:00
Shashikala Prabhu
ae9e6c3f4e qcacmn: Add per chain NF variable to chan info event structure
Add per_chain_noise_floor variable to wmi_host_chan_info_event structure.

Change-Id: Iea594078aaa6d011f288bc970efcc143d6e99626
CRs-Fixed: 2561975
2019-11-27 07:05:27 -08:00
Chaithanya Garrepalli
b7796edd5b Revert "qcacmn: corrected the print statement"
This reverts commit I37a7c98eef6a8ad0b27541584927505ffc447cb2.

Reverting because below change address the compilation error
I4bb7bb14a2e521645be6e2677a44a78fa79fcb0b

Change-Id: Ib38276ab9974cf22486631f10ec345a629637b82
2019-11-27 07:05:15 -08:00
Uraj Sasan
4e893b176b qcacmn: Support WIN WLAN Single module
QCA_SINGLE_WIFI_3_0 directive is used to build
single wifi module, it is disabled by default.
This is intended for used in whunt case,the default
driver still uses separate spectral modules.

Change-Id: I6d0d66ade3784f7f4c0a3f322db2e79cbc246d56
2019-11-26 23:19:53 -08:00
Pragaspathi Thilagaraj
120b2490ec qcacmn: Add support for RSNX IE
SAE key derivation requires use of a secret element, PWE. This
element is deterministically discovered by repeatedly hashing
the password with some additional information until the
resulting hash is the abscissa of a point on the elliptic curve
(for ECC) or by exponentiating the hash digest to a constant to
produce an element (for FFC). This "hunting-and-pecking" loop
method is prone to side channel attacks.

To avoid this, a direct hashing to element technique in SAE is
introduced in IEEE P802.11-REVmd/D3.0. Support new RSNX IEEE
as part of the hash to element PWE derivation. The user space
sends the RSNX IE in the connect request.

Add support for new RSNX IE with element ID 244.

Change-Id: I61a40ff14e15612735c3f3750e2c47d764feeb62
CRs-Fixed: 2569600
2019-11-26 07:10:53 -08:00
Sourav Mohapatra
328db7c79c qcacmn: Add support to send/receive ani level command
Currently the driver doesnot support the sending and receiving of the
ani level from the firmware.

Add WMI and driver framework support to fetch the ani level.

Change-Id: Ib8271a2b7f62bafb22429113fbfb405cc81379ed
CRs-Fixed: 2554677
2019-11-26 05:31:17 -08:00
Alan Chen
337cb1cb88 qcacmn: Create set_desc_flags() to set desc->flags conditionally
Kernel 5.2 onward has removed the flags variable from the shash_desc
struct. Create a new function set_desc_flags() to set the desc->flags
variable conditionally for kernel versions older than 5.2.

Change-Id: I2c9b9b00147beff8600fbc9149594c11bb403a66
CRs-Fixed: 2559017
2019-11-26 05:31:02 -08:00
Alan Chen
2a25844f08 qcacmn: Add conditional macro for tracing threads
Kernel 5.2 has removed the stack_trace struct and replaced
print_stack_trace() and save_stack_trace_tsk() with stack_trace_print()
and stack_trace_save_tsk() respectively. Add a conditional preprocessor
directive to use save_trace_print() and stack_trace_save_tsk() and call
them with the appropriate updated parameters.

Change-Id: I99643e1b93251de7453f511d13f5a4a39c56f99c
CRs-Fixed: 2559033
2019-11-26 05:30:56 -08:00
Surya Prakash Raajen
507b75ac5c qcacmn: Fix replenish size for monitor buffers during attach
Head_pointer == Tail_pointer is treated as ring empty and
Tail_pointer + 1 == head_pointer is treated as ring full,
hence replenish count should be num_entries-1 to avoid
buffer ring treated as empty or full.

Change-Id: I157834a86380bcd2f03679510357ad3ca5550374
CRs-Fixed: 2569491
2019-11-26 04:03:33 -08:00
nobelj
1063ea0420 qcacmn: Fix nss, ru size and initialize ofdma info valid bit for UL OFDMA
add 1 to nss value received from software response reference pointer.
ofdma_info_valid bit need to set zero.
populate ru_size from software response reference pointer.

Change-Id: Iea2019211902a468d8fd180423b3dedb4c04ce41
2019-11-26 02:16:36 -08:00