Commit Graph

15941 Commits

Author SHA1 Message Date
Ashish Kumar Dhanotiya
91dbd69b0e qcacmn: In restart case invoke regulatory callbacks only once
Currently driver invokes regulatory callbacks after pdev create
and from reg cc event processing. In case of restart of the
driver because of SSR or idle restart, driver ignores the default
country and sets the user set country which was there before SSR
or idle shutdown. Now driver continues restart and creates pdev.
During pdev creation it propagates reg rules from psoc to pdev
which was there in psoc before shutdown and after pdev creation
it invokes the regulatory callbacks, as part of this hdd dynamic
callback is invoked and it tries to schedule the regulatory work.
Since idle restart is a vdev operation so driver is not able to
schedule the work as it does not get the dsc op and it waits for
500 ms to reschedule the work. In this 500ms time driver gets the
response of the set country command which was sent to fw to set
user country. This command also invokes the hdd dynamic callback
and regulatory work gets scheduled and scan channel list command
is sent to fw.
Now if any scan is going on in the FW and after 500ms if first
work gets rescheduled, it again sends the scan channel list to fw
which cancels the ongoing scan.

To address issue, add a change to not invoke regulatory callbacks
from pdev creation if user country set is pending.

Change-Id: I5686163644409ef19507c19ae31f7f1e7892931f
CRs-Fixed: 3054603
2021-10-22 06:14:50 -07:00
Rakesh Pillai
c634e23cf7 qcacmn: Fix the parsing of current pn in REO error path
The current PN is a 128-bit field which was incorrectly
stored into a 64-bit variable, leading to stack corruption.

Fix this by increasing the size of the variable
for current PN to 128-bits.

Change-Id: Ib26cc0bb7d244360afb258a55d5b9a8ddd6aa4ca
CRs-Fixed: 3059345
2021-10-22 03:04:53 -07:00
Naga
3e3c3c8df3 qcacmn: Fix to disable full monitor mode
Fix to disable full monitor mode.

CRs-Fixed: 3057668
Change-Id: I43238db8bf29ab3c7c24d8e5bea537cbd28da896
2021-10-21 22:07:57 -07:00
Srinivas Dasari
35d6ddcb06 qcacld-3.0: Move nan pdev declaration to right place
pdev is declared in nan_enable_req after a variable-size array.
Place the pdev declaration before the array to avoid corruption
while copying contents to the buffer.

Change-Id: I92766c40909bcecaed5f1eb6e2f015447f3c8221
CRs-Fixed: 3060146
2021-10-21 15:49:02 -07:00
Krishna Rao
0d7d011c82 qcacmn: Move basic 802.11 definitions from crypto to common
Move basic IEEE 802.11 field definitions that are not specific to
cryptographic functionality, from a cryptography related header file
to a common header file for IEEE 802.11 definitions so that these can
be used by other 802.11 protocol processing modules. The crypto header
file already includes the common header file, so there is no effective
change in code visibility of the definitions for crypto code.

Change-Id: I439fe818a457cc7694fdb431f5d2c1a7552f2caa
CRs-Fixed: 3059572
2021-10-21 14:05:49 -07:00
aloksing
2674d65536 qcacmn: Add tx capture timer stop flag
Add stop timer flag to avoid resubmission of tx capture work queue timer
while del_tiimer_sync.

CRs-Fixed: 3056656
Change-Id: I72bfb6916f02297b15bb733359c0e4d7f91f0b73
2021-10-21 08:55:47 -07:00
Hariharan Basuthkar
ef0a6ab42b qcacmn: Trigger ACS only if AFC master chan list is non-empty
When the AFC response has a disjoint set of CFIs and frequency range,
the ACS trigger is called even though the AFC master channel list is
empty.

Due to this, ACS happens even though the AP's destination power
mode is LPI.

To fix this issue, call ACS trigger only if the AFC master channel list
is non-empty.

Change-Id: I217d23827b34ac577649b82b278a203bf01fa1f6
CRs-Fixed: 3052805
2021-10-21 07:31:07 -07:00
Pragaspathi Thilagaraj
589f8b8bff qcacld-3.0: Add support for BTM request logs in connection manager
As part of target if convergence, roam stats event handling
is moved to target if from wma. BTM request logs are not
sent in the new path.

Add support for BTM request logs in connection manager.

Change-Id: Icc66c5dc608260f2a0f75c5d1a85c799195f9f3e
CRs-Fixed: 3054987
2021-10-21 06:02:45 -07:00
Sai Rupesh Chevuru
ba3f9c04c8 qcacmn: Update TID value in skb priority from the MPDU buffer
Update TID value in skb priority from the MPDU buffer.

Change-Id: I707190f0c3095b4c47bd4b3cffd4a94f5952939c
CRs-Fixed: 3037067
2021-10-21 02:33:44 -07:00
Santosh Anbu
5479ef4492 qcacmn: Add API to update mlo params in start request
Remove ifdef macro inside a function and move the mlo param
update to separate function.

Change-Id: I2037519fda00c17efcec3bab34340f27d58324c0
CRs-Fixed: 3058432
2021-10-21 01:11:55 -07:00
Edayilliam Jayadev
f1527f6374 qcacmn: Handle overflow of management rx reorder list
Deliver the oldest management frames to upper layers if
the management rx reorder list grows beyond the maximum
configured size.

Change-Id: Id0199849e26804310dd502051b8e14f56f0df795
CRs-Fixed: 3051431
2021-10-20 00:32:56 -07:00
sheenam monga
728d7cf617 qcacld-3.0: pcl code clean up
In current implementation, validation code of
SCC, MCC, DBS or SBS is repetitive for all
combinations.

Remove repetitive validation code and make
common apis for scc, mcc and dbs validation.

Change-Id: Ic88f01dd9bbcc3d5dcc3453b2c6fef030cfe0305
CRs-Fixed: 3052959
2021-10-19 16:25:21 -07:00
Srinivas Dasari
6fb15f3572 qcacld-3.0: Abort any ongoing p2p scans while enabling NAN
Framework disables p2p before enabling NAN as P2P+NAN concurrency
is not supported. NAN operations happens through wifihal and p2p
operations happen through wpa_supplicant which are two different
userspace components. Wifihal call to enable NAN may come to host
driver before disabling p2p through wpa_supplicant. There are high
chances for p2p scan to be in running state while NAN enable is
received. Firmware NAN state machine goes to inconsistent state
and disables NAN as p2p scan is running in such cases.
So, stop the ongoing p2p scan before enabling NAN as P2P+NAN
concurrency is not supported currently.
Also, forward the pdev to NAN component inorder to iterate through
all P2P vdevs.

Change-Id: Ibe30a5ebe90514aee4f6721cdc5476570524cad8
CRs-Fixed: 3054576
2021-10-19 16:25:15 -07:00
Krishna Rao
7c24c73fd8 qcacmn: Add size definitions for subfields in Basic ML Common Info
Add definitions for size in octets for the following subfields in the
Common Info field of Basic variant Multi-Link element: BSS Parameters
Change Count, Medium Synchronization Delay Information, EML
Capabilities, and MLD Capabilities. These definitions are as per
IEEE802.11be D1.0 (but also happen to apply as of IEEE802.11be D1.2).

Change-Id: I36725292f29da1f03caed6baa5d25c02a06c2c4f
CRs-Fixed: 3057853
2021-10-19 14:06:08 -07:00
Himanshu Batra
2100a410a5 qcacmn: Add APIs to modify connect_req/connected vdevs bmap for ML STA
Add APIs to modify connect_req/connected vdevs bmap for ML STA

Change-Id: I3c68f2f7a87db49eb72ddf0d9e85ae7387974c85
2021-10-19 09:49:48 -07:00
Zhaoyang Liu
08e7ee70fe qcacmn: clear pcie low power interrupt register after suspend
For specific QCA6174 device, need clear LOW_POWER_INT_MASK register
bit3/4 to disable pcie low power interrupt after suspend, bit3 is for
INTR_L1SS and bit4 is for INTR_CLKPM, this is to fix issue that PMIC
VREG_L30A don't turn off when XO is in shutdown state.

Change-Id: I4833e4143c48a3bf734745a5e772a7a76a94d63c
CRs-Fixed: 3028269
2021-10-19 05:35:16 -07:00
Himanshu Batra
d0ac79827e qcacmn: Clear vdev MLO Cap as part of updating vdev mlme address
The MLO cap is getting reset as part of getting valid candidate, this is
leading to reset of MLO cap for supplicant selected ML candidat as well.
Add fix to Clear vdev MLO Cap as part of updating vdev mlme address

Change-Id: I19ce9711011173505a829dc5b308e8890b8ffe6c
2021-10-18 20:56:19 -07:00
Arun Kumar Khandavalli
666ab22622 qcacmn: fix the memory leak in the connect failure path
There is a memory leak in the mlo connect failure the connect req
and the connect, ies are not getting freed because of the mlo is vdev
check. During the allocation there is no condition as such, so remove
the same during the connect failure path to resolve the memory leak.

Change-Id: I9076761cd3b918435af9929fcf888996d2129e98
CRs-Fixed: 3057979
2021-10-18 18:47:00 -07:00
Yu Tian
dc20d398e8 qcacmn: Add TX pending indication when sending wake up to FW
FW may experience HWDTIM mode enter and exit, if HOST can't queue
frames fast enough, this will bring 10ms latency for TX under WoW.
This change adds an indication bit to notify FW whether a TX happens
after WoW wakeup, then FW can discard HWDITM and reduce TX latency.

Change-Id: Ib695a0e5d032af4be27fef59f3c5123a35428d7d
CRs-Fixed: 3046987
2021-10-18 14:51:51 -07:00
Yu Tian
07b34c28fc qcacld-3.0: Add TX pending indication when sending wake up to FW
FW may experience HWDTIM mode enter and exit, if HOST can't queue
frames fast enough, this will bring 10ms latency for TX under WoW.
This change adds an indication bit to notify FW whether a TX happens
after WoW wakeup, then FW can discard HWDITM and reduce TX latency.
Change-Id: I74f7311fc0639186ee0bca711160bb8c0d5d9fb3
CRs-Fixed: 3055501
2021-10-18 14:51:37 -07:00
Sai Rupesh Chevuru
ffb9ec5cae qcacmn: use appropriate MOD_ID while updating primary VDEV for a peer
In the case of MLO updating the mod id param,
where initial link is not the primary link.

Change-Id: I2fe21ffb2ebf3a081da7f07a4828d41f1bcea98e
2021-10-18 11:54:49 -07:00
Vignesh U
d5285ebf3e qcacmn: Calculate bonding frequencies instead of hardcoding
The bonding channel array is calculated by adding center frequency to
hardcoded offsets.

Since, they can be calculated by Artihmatic Progression, replace the
hardcode assignments.

Change-Id: I4f145ac05f8266a69a6787783cb627200f52563e
2021-10-18 09:43:38 -07:00
Vignesh U
601ecd6da2 qcacmn: Find radar affected sub-channels for 240/320MHz channel
With the introduction of 240/320MHz channels with 11be, sub-channel
marking has to enhanced.

Find the sub-channels of the 240MHz/320MHz channel that got affected by
radar.

Change-Id: I0b0d057b533ad4e6c4d1627c878e3823d1c75979
2021-10-18 09:43:34 -07:00
Vignesh U
dd76700b7d qcacmn: Update dfs channel punc pattern from mlme
With the introduction of 11BE, channel puncturing becomes possible.
Hence, the DFS channel structure should be updated with channel puncturing
information.

Change-Id: Ia1bccd55e7fadde2a49fb08bd30ff6b5b2cc6ba1
2021-10-18 09:43:29 -07:00
Vignesh U
1bc1af8b6c qcacmn: Add dfs channel flags and channel check macros
Add the following DFS channel flags for 11BE:
1) WLAN_CHAN_320MHZ
2) WLAN_CHAN_EHTCAP
3) WLAN_CHAN_EHT20
4) WLAN_CHAN_EHT40PLUS
5) WLAN_CHAN_EHT40MINUS
6) WLAN_CHAN_EHT80
7) WLAN_CHAN_EHT160
8) WLAN_CHAN_EHT320

Add the following checks for both 5G channels and 6G channels:
1) WLAN_IS_CHAN_11BE_EHT20
2) WLAN_IS_CHAN_11BE_EHT40
3) WLAN_IS_CHAN_11BE_EHT80
4) WLAN_IS_CHAN_11BE_EHT160
5) WLAN_IS_CHAN_11BE_EHT320

Update the WLAN_IS_CHAN_DFS check to include 11BE modes.

Change-Id: I2bd9e877aa0b4fca8f93bf2b72247f8fc29ae833
2021-10-18 09:43:24 -07:00
Vignesh Mohan
862db46074 qcacmn: Add preference to HT40+ over HT40- in 2G channels till 8
In reg_set_channel_params for 2G, if the input mode is HT40,
the primary channel is <= channel 8 (2447) and the secondary frequency
is not provided, add an API to fetch the secondary frequency,
giving preference to HT40+ over HT40- mode.

Change-Id: If1538e14f9ab427c9f9a12ee2eb0d9e28bbf8b86
CRs-Fixed: 3050678
2021-10-18 09:43:19 -07:00
Li Feng
c6b98401cc qcacld-3.0: Configure magic pattern in line with ini setting
The ini gEnableWoW was designed to enable or disable both magic
pattern match and pattern byte match, but now host ignore the
magic pattern setting from the ini, always enable the magic
pattern instead.

configure magic pattern in line with ini gEnableWoW setting.

Change-Id: I309aff03de9bdbd36fe391784ba54cbfa0cad67b
CRs-Fixed: 3047199
2021-10-18 09:43:05 -07:00
Huashan Qu
280cf5022e qcacld-3.0: Set hs_20_ap in cm_connect_start_ind()
When connect with assoc_ie has HS20_OUI_TYPE ie, hs_20_ap should
be set to true for using afterwards.

Change-Id: Id3003290473bdfa0adb0fc6471ae052e7944ab3d
CRs-Fixed: 3056979
2021-10-18 09:43:00 -07:00
Vevek Venkatesan
7a2c2fd90f qcacmn: cleanup FEATURE_HAL_DELAYED_REG_WRITE_V2 support
This FEATURE_HAL_DELAYED_REG_WRITE_V2 was added to fix the
Audio jank issue, but it could not resolve it completely,
so that was later fixed by existing delayed reg write
support with the help of SMP2P messages to communicate
with FW regarding PCIe link status. This code is not being
used, so removing it and cleaning up the redundant code.

Change-Id: Iada088e72a76b4c071c8a80ee945f36ac959670e
CRs-Fixed: 3056475
2021-10-18 06:13:49 -07:00
Shwetha G K
682ebee7e9 qcacmn: Fetch gain table idx from cfr event
Fetch agc gain table index from peer capture event
so that it can be populated to CFR metadata

Change-Id: Ic5e86d3947433be4218958badfdb8fc07acded89
2021-10-18 06:13:34 -07:00
Shwetha G K
a731de3964 qcacmn: Report agc tain table index as metadata
Changes to report agc gain table index as part of
CFR meta data to the userspace.

Change-Id: I318c3db2eff7be8b63ce6aaa544f75fe065fb230
2021-10-18 06:13:29 -07:00
Shwetha G K
1d2aaa5602 qcacmn: Report per chain AGC gain table index
Report the per chain AGC gain table index used as
part of cfr_meta_data. Add new fields in metadata
accordingly.

Change-Id: I40673f856b1a1ebb0a4a69bf44d4e0817db9cd6f
2021-10-18 06:13:25 -07:00
Jingxiang Ge
37bf2d6b08 qcacmn: record cpu_id for hal_reg_write_work
Record cpu_id in hal_reg_write_work for easily debugging
work latency issue.

Change-Id: I819b9fe0977e9e982240c090f76a69532f149e86
CRs-Fixed: 3055639
2021-10-18 06:13:20 -07:00
Linux Build Service Account
cbd1859dd0 Merge "qcacmn: fix compilation issue for WCN7850" 2021-10-15 20:06:27 -07:00
Chaithanya Garrepalli
4c9b9c0ab0 qcacmn: fix compilation issue for WCN7850
Fix compilation issue for WCN7850

Change-Id: Iaf5bb6d320a2b639b20c7bc8edb0aa9c4c55a985
2021-10-15 17:54:22 -07:00
Linux Build Service Account
3dc9f48b2a Merge "qcacmn: Set MLO cap bit for subsequent links" 2021-10-15 17:06:41 -07:00
Linux Build Service Account
6cd6250991 Merge "qcacmn: Check function pointer to avoid NULL point dereference" 2021-10-15 17:06:41 -07:00
Gerrit - the friendly Code Review server
e47cf880db Merge changes into wlan-cmn.driver.lnx.2.0 2021-10-15 16:41:12 -07:00
Lincoln Tran
3cbefea6d0 qcacmn: Set MLO cap bit for subsequent links
When sending the connect for subsequent links in MLO, make sure to set
the capability bit, otherwise it will be marked as assoc link.

Change-Id: Ic0145b40e84ea440ea389200356d1f916a1ba530
CRs-fixed: 3055892
2021-10-15 15:32:14 -07:00
Wu Gao
9fba485d3c qcacmn: Check function pointer to avoid NULL point dereference
It calls spectral_process_phyerr of spectral operations without any
check. Which cause null point dereference potentially. So, check this
pointer before calling.

Change-Id: Iae246f847dd41e62b628223652a9527a65b43799
CRs-Fixed: 3055246
2021-10-15 15:32:08 -07:00
Bapiraju Alla
eadfb45b23 qcacmn: Fix MLO connection issues
Add minor fixes to allow MLO connection.

Change-Id: Ic9e464b6e5c948676d5ad0e2519c096a9e1b1964
CRs-fixed: 3021328
2021-10-15 15:32:04 -07:00
Pragaspathi Thilagaraj
183e4c007f qcacld-3.0: Add correct attribute for reason codes in logging event
For deauth/disassassociation RX/TX, the connectivity logging event
is sent. In this event the QCA_WLAN_VENDOR_ATTR_DIAG_STATUS_CODE,
is used to send the frame reason code. But userspace expects
QCA_WLAN_VENDOR_ATTR_DIAG_REASON_CODE attribute.

Fill QCA_WLAN_VENDOR_ATTR_DIAG_REASON_CODE instead of
QCA_WLAN_VENDOR_ATTR_DIAG_STATUS_CODE.

Change-Id: I90d58f251f0e2d4647cbde3c76d4a22779c97290
CRs-Fixed: 3054797
2021-10-15 15:31:48 -07:00
Rakesh Pillai
57e2c01e5e qcacmn: Peer id parsing changes for beryllium
Take care of the MLO peer bit indication to be
concatenated with peer_id to access the peer map
object.

Change-Id: Ia603a728101e83829a8906d1b847f42389e78ca6
CRs-Fixed: 3039326
2021-10-15 13:13:27 -07:00
Rakesh Pillai
2069fa6cdd qcacmn: Handle htt peer map/unmap v3
Add the handler for processing the htt
peer map/unamp v3 and MLO peer map/unmap msgs.

Change-Id: Ie2ab0b76e7aee566ca3b9637b83fd7a14718ab01
CRs-Fixed: 3039326
2021-10-15 13:13:22 -07:00
Rakesh Pillai
32046ad850 qcacmn: Vdev attach changes for MLO
Add mld mac address info during datapath
vdev attach.

Change-Id: I0ea22025d19be82be0c56809871e8513c3ce7962
CRs-Fixed: 3039326
2021-10-15 13:13:17 -07:00
Jinwei Chen
5c85cfb5a0 qcacmn: cdp/dp peer change for MLO
cdp/dp peer change for MLO

Change-Id: I9b8eb741317a0dc7337aff7e773148892e531ba2
CRs-Fixed: 3031166
2021-10-15 13:13:12 -07:00
Utkarsh Bhatnagar
116184c0d6 qcacld-3.0: Add support for Lower and Upper share
For SBS Frequency range, the frequency range can
be of Either Lower 5Ghz Frequency shared with
2.4Ghz Frequency or Upper 5Ghz Frequency shared
with 2.4ghz phy.
Add support for both the shares.

Change-Id: Ibf17cf155e52534e029bd596f70349faf8cc03ee
CRs-Fixed: 3056464
2021-10-14 19:23:52 -07:00
Pragaspathi Thilagaraj
c760896697 qcacld-3.0: Fix race between dequeue logs and deinit connectivity logging
As part of stop modules, the deinit connectivity logging happens and
the queue, all the pointers are deinitialized. But while
initializing the write pointer the write pointer spinlock is not
acquired. This results in null pointer dereference of write_ptr
from other context.

Protect the access to the write pointer before setting it to
NULL in wlan_connectivity_logging_stop().

Change-Id: I69dc57b9e661004203f58754824496953105726f
CRs-Fixed: 3054306
2021-10-14 19:23:48 -07:00
Lincoln Tran
82ee197386 qcacmn: Store original connect req in connection types
When performing an MLO connection, the subsequent links need data
from the original connection request. There is no easy way to
determine if the connection is MLO or not at this point, so
store the original connect request regardless of the connection
type. Also make sure all instances are freed properly.

Change-Id: Iccce376ba36a8c49127b177fc4a1bac54aafb315
CRs-fixed: 3051842
2021-10-14 17:11:06 -07:00
Utkarsh Bhatnagar
b0a42646b8 qcacld-3.0: STA SBS concurrency changes
In if_mgr_validate_candidate() adds SBS
check to allow a STA connection on SBS
channel when MCC is not allowed .

Change-Id: Ia8007a4beabf546ff293986124f4ef985ccaeacc
CRs-Fixed: 3052797
2021-10-14 10:16:12 -07:00