Commit Graph

9756 Commits

Author SHA1 Message Date
Amruta Kulkarni
93a4498eba qcacmn: Add missing parameters in connect scan req
Populate scan IE and scan type in connect scan req
for connection manager.

Change-Id: I6199312541339ffdf391dd4e3d8645abf6da456a
CRs-Fixed: 2809491
2020-11-03 11:16:19 -08:00
Jianmin Zhu
66fcfe0178 qcacmn: Select candidate by ETP when connect
If ini vendor_roam_score_algorithm=1, for initial connect, select
candidate by estimated throughput(ETP). Calculate ETP of all
bssid of ssid selected by high layer, and try to connect AP by
order of ETP, legacy algorithm with following Parameters/Weightage
becomes useless. ETP should be [1Mbps, 20000Mbps],matches score
range: [1, 20000].
Add 11ax support besides 11ac/11abgn.

Change-Id: I3f55d2ae37801128b8a66f6d5c2ac55cb11a56d0
CRs-Fixed: 2704154
2020-11-03 08:35:29 -08:00
Manikanta Pubbisetty
a51d70591e qcacmn: reset monitor filter before ring reap
In monitor mode, as part of VDEV delete, we are reaping
monitor rings to avoid backpressure from RXDMA2SW ring.
Looks like the ring continues to grow even after reaping,
reset the monitor filters before reaping to avoid
ring backpressure.

Change-Id: I0d9dde61b62648f8ce11c15ba23612fc8491fff2
CRs-Fixed: 2807482
2020-11-03 08:35:25 -08:00
Debasis Das
d5b64eab69 qcacmn: Add wrappers to abtsract OS API's
Add wrapper API's to abstract various OS API's
related to network-device.

Change-Id: I0c8bc9091d32965a90025b9e7738ab6cfdc39d14
2020-11-03 06:23:36 -08:00
hqu
fc4c9c5a86 qcacmn: Remove old rso path code [PART 1]
Since new rso ROAM_OFFLOAD_V1 path is enabled, remove
the old rso path code for wmi related files.

Change-Id: Ie519ca7fac2d721f87a4c9bd11507cd83ddfb504
CRs-Fixed: 2810241
2020-11-03 06:23:32 -08:00
Rakesh Pillai
c864a10bd8 qcacmn: Add flag to indicate not to aggregate FISA flow
Add the flag "is_exception", to indicate that the
packets belonging to this flow are not to be aggregated
by FISA.

Change-Id: I3c1e781d4a2ad251082dacc189f23ffab15ae002
CRs-Fixed: 2810360
2020-11-03 00:55:41 -08:00
Yeshwanth Sriram Guntuka
138d9d7dd7 qcacmn: Replenish buffers when reaping non-monitoring ring
Nbufs are reused on non-monitoring status ring, so stale
values will still be present in the status ring nbufs post
channel change. A possible scenario where after mon channel
is changed to 5G from 2G, MAC-0 status ring is processed and
buffer_done tlv tag could be read from the stale nbuf even
though HW does not set this for the latest packet. This could
result in un-map and free of the status_nbuf even before HW
updates the buffer_done tlv tag.

Fix is to replenish buffers instead of re-using the buffers
when reaping non-monitoring status ring.

Change-Id: I239ddae04a57ee1078a6b7399d659ae1295276b5
CRs-Fixed: 2806422
2020-11-03 00:55:38 -08:00
Min Liu
ffddaeaf60 qcacmn: Add user stats and callback of DCS
Add user stats and callback to indicate DCS stats to userspace.

Change-Id: If841f9cad72ce2303046316d4c16ebf7efd9c3ec
CRs-Fixed: 2773531
2020-11-02 20:46:23 -08:00
Liangwei Dong
cee83b8a96 qcacmn: Fix build error in reference count tracing
Fix below build error when feature WLAN_OBJMGR_REF_ID_TRACE
enabled:
1: "line_node" may be used without initialized in function
wlan_objmgr_trace_check_line. Fix by linking new
line node to link_head.
2: Use "peer_obj" to print trace info of peer object.
The "vdev_obj" is invalid when object type is WLAN_PEER_OP.

Change-Id: I067704976bb8d2dd11873af96fa4778adce7901b
CRs-Fixed: 2802642
2020-11-02 17:32:42 -08:00
Adil Saeed Musthafa
5c48559237 qcacmn: setup the target_pdev_id on mode switch
We need to set pdev->target_pdev_id after mode switch so that the
correct target_pdev_id will be used for monitor mode ring configurations

Change-Id: I0c79d0e69f8d28f8a7c8823a1010baf317571c20
CRs-Fixed: 2803005
2020-11-02 13:05:34 -08:00
Balaganapathy Palanisamy
1ba65c35d7 qcacmn: Move the resource config command before init command
Move the resource configuration command after initializing
pdev wmi handle and just before wmi init command.

CRs-Fixed: 2801602
Change-Id: I3a476cbbccd5874c79cfa08f1252c728ebc9a5c6
2020-11-02 08:03:41 -08:00
Aditya Sathish
309120eac2 qcacmn: Acquire spinlock before taking ref for scan_db entry
Locks must be taken before accessing scan_db nodes to ensure
reference counts are not changed while changing entries within
the node or while freeing the node.

Ensure that a spinlock is used before increasing the reference
count to make sure that there is no other execution context
accessing the scan_db.

CRs-Fixed: 2791279
Change-Id: I4402ff15de7c8d4fc31009f7307ba262b4df6702
2020-11-02 03:54:25 -08:00
aloksing
b5692dc64c qcacmn: Replace WMI_LOGD() with wmi_debug()
Replace WMI_LOGD() with wmi_debug().

Change-Id: Ia5f00e0b54de30e2251e3313b46badbde7a90b40
CRs-Fixed: 2807905
2020-11-02 03:54:22 -08:00
Vignesh Mohan
46be7cdcbd qcacmn: Use 80MHz as next BW after radar during 80p80MHz
With bandwidth reduction enabled, when radar is detected during
80p80MHz operation, if the primary segment is unaffected, the
next expected BW for the device is 80MHz. However, the API
reg_set_channel_params has the following bw precedence list:
80P80 -> 160 -> 80 -> 40 -> 20 MHz.

This is valid in normal channel change cases but when used for
the bandwidth reduction feature, 80P80MHz should be considered
same as 160MHz and the next bandwidth (to be checked) should be
80MHz.

Update the channel width in the channel params to 80MHz if
the current channel is 80P80MHz and call the regulatory API
to check channel availability with the updated params.

CRs-Fixed: 2805939
Change-Id: I4337a3a797d1c4b0ef19e47d0933d4dd292733b5
2020-11-02 01:47:11 -08:00
Yu Tian
76fdb54e96 qcacmn: add an ini field to control rx frame pending check
Add a ini control field to control rx frame pending check
logic in WoW case. In some cases, power consumption is more
important than rx frame ping loss, so add a control flag

Change-Id: I8c4d3725edddb82a0f06dc70c22a8dd5243209f2
CRs-Fixed: 2806786
2020-11-02 01:47:07 -08:00
Jinwei Chen
56f94da675 qcacmn: Add reo destination indication info to skb
Get reo destination indication from REO2SW ring descriptor,
store it to qdf_nbuf_cb of skb.

Change-Id: I5a4c504b2550229a77a435b1f5ddb78c4abe51aa
CRs-Fixed: 2809080
2020-11-01 23:14:06 -08:00
Rajeev Kumar
c3f4e5678d qcacmn: Change QDF per packet proto log level to debug
QDF per packet proto logging is leading to excessive console
logging and hence change QDF per packet proto logging to
debug log level and avoid spamming precious kernel dmesg
log  buffer.

Change-Id: Iae562a8541c81e7708caa822a0ce293e7d6e47f3
CRs-Fixed: 2808600
2020-10-31 07:17:14 -07:00
Gururaj Pandurangi
a30081e58e qcacmn: Add a feature flag for 4.9 GHz channels
Condition 4.9 GHz channels under a macro CONFIG_49GHZ_CHAN
since only WIN uses these channels and not MCC.
This reduces kmalloc memory allocation in regulatory
component.

Change-Id: Ie9241dd68909f68fa70012b664c7bc7cf050c1a5
CRs-Fixed: 2766046
2020-10-30 22:16:14 -07:00
Arun Kumar Khandavalli
c05a963017 qcacmn: Add additional vendor specific hang reason codes
Add additional hang reason codes in enum qca_wlan_vendor_hang_reason to
address potential internal failure cases.

Change-Id: I4bf154805d3e06241e9fdd799f1e6ffc4c046fca
CRs-Fixed: 2803747
2020-10-30 17:07:39 -07:00
Kai Liu
4be28ba641 qcacmn: Enhance hang info feature
Add bus related info in hif layer in order to get bus status
when hang issue happened.

Change-Id: If922e0892e0f65de778b9696bbc56fc63c25c169
CRs-Fixed: 2801350
2020-10-30 13:03:35 -07:00
Amir
43b866f124 qcacmn: Free buffers if MPDU restitch fails
In case of monitor mode, if MPDU restitch fails,
Free all rxdma buffers from head msdu to tail msdu

Change-Id: I852b6095638578a48c07a6fb5d221ead40c5ffde
CRs-Fixed: 2657983
2020-10-30 11:01:53 -07:00
Jianmin Zhu
6ce6be5c32 qcacmn: Add MACRO qdf_ceil
Add MACRO qdf_ceil(x, y) as DIV_ROUND_UP(x, y)

Change-Id: I92ecffbaf29c43809712e2b950a8064890e98136
CRs-Fixed: 2807611
2020-10-29 23:35:39 -07:00
gaurank kathpalia
b8b58d8d12 qcacmn: Move disconnect wait logic from osif to connection mgr
Move disconnect wait logic from osif to connection mgr, so that
MLO/IF manager can use the wait logic for disconnect
during vdev delete.

Change-Id: Ied2bbcfd6a532209f8008499424f94acc41efc0e
CRs-Fixed: 2800990
2020-10-29 17:51:00 -07:00
gaurank kathpalia
abb7d72f97 qcacmn: Fix params passed in vdev connect req
Fix params passed in vdev connect req and fix compilation issues.

Change-Id: I8d19c92f6768d1b2c0cdfd7997ba509a8ab87794
CRs-Fixed: 2806867
2020-10-29 15:41:51 -07:00
gaurank kathpalia
55929f5239 qcacmn: Avoid moving the SM to INIT state if disconnect is pending
If a connect req fails before serialization, with a disconnect req
Already queued. Indicating the failed connect req and moving
the SM to INIT state will lead to a invalid disconnected state
Even when, disconnect is in progress.

Thus in this case wait for disconnect to complete before indicating
connect failure and moving SM to INIT state.

Change-Id: Ib25ed43276410cd3e1bb717f64742d691bb17568
CRs-Fixed: 2802137
2020-10-29 15:41:47 -07:00
Srikanth Marepalli
4ded73bfcf qcacmn: Update the PMK crypto cache based on MDID in FT roam
In FT roam when STA connects to AP1 then PMK1 gets cached. And
then STA disconnects from AP1 and connects to AP2 then PMK2
gets cached. Now if STA roams to AP1 then FW uses PMK2 from mlme
session to create the PMKID. But the corresponding RSO command
from driver sends the PMK1 to FW and the same gets updated in
mlme session of FW. This results in failure of next roams, as the
invalid PMKID gets created using PMK1.
This fix helps in deleting the old/stale PMK cache entries for
the same mobility domain as of the newly added entry.
Also the FT-SuiteB AKM is enabled in crypto using this change.

Change-Id: Id147ec40b8e0deacc4c427d396ec973cec483904
CRs-Fixed: 2796105
2020-10-29 13:36:08 -07:00
hqu
7602376b88 qcacmn: Don't disable DCS firmware event indication
Always enable DCS firmware wmi_dcs_interference_event_id event
indication as CCA feature requires, for below scenario, will
ignore dcs event data and won't do interference detection
algorithm calculation:
a: Current SAP channel isn't on 5G band
b: In the process of ACS
c: In the process of dcs disabling dcs_restart_delay time duration

Change-Id: Ic3d0e5c7ffd7ffc2009e2d86480ea9a6c95b59b3
CRs-Fixed: 2804273
2020-10-29 07:00:49 -07:00
Jinwei Chen
f0bab119c2 qcacmn: drop duplicated EAP frames from REO exception path
For REO error 7 OOR frame, if they are retry frame under BA
session, then they are likely SN duplicated frame. if deliver
EAPOL to stack in this case, sometimes it will fail to connect
AP as duplicated TX EAP response is seen.
Drop duplicated EAP frames in this case.

Change-Id: Iec0ba37548f2a83fe749f83ec904ec9bfdb306af
CRs-Fixed: 2796226
2020-10-29 07:00:45 -07:00
Liangwei Dong
ab7df35e80 qcacmn: Create more reference count dbg id for OS IF layer
At present more than hundred places to get/put reference
with WLAN_OSIF_ID dbg ID. To help debug reference count
issue, split OS_IF to more sub ids based on functionality.
It will help narrow down to small area if ref count leak
issue happens.

Change-Id: Icca465cbe91a55b4abe0d74bb3de131615bbc6bb
CRs-Fixed: 2802974
2020-10-29 04:54:02 -07:00
Abhishek Ambure
58c169c64c qcacmn: Add proprietary status codes for disconnection
Host adds internal status code in enum wlan_status_code.

Change-Id: I17cdcee9f0df1e34cc13425a4f06985a418d5a8a
CRs-Fixed: 2799197
2020-10-28 15:33:28 -07:00
gaurank kathpalia
c5798d9910 qcacmn: Save and set the WEP key on connection completion
Save and set the WEP key on connection completion in connection
manager.

Change-Id: I78cd778d371accdf7888e418bcad9a4f8ce9f71a
CRs-Fixed: 2805751
2020-10-28 13:27:16 -07:00
gaurank kathpalia
ae7ee6c65e qcacmn: Save and set the FILS key on connection completion
Save and set the FILS key on connection completion in connection
manager.

Change-Id: I7c092ae3d4e866766cdee7e56641b488627199de
CRs-Fixed: 2805749
2020-10-28 13:27:13 -07:00
Bapiraju Alla
47c0d5465e qcacmn: Validate NDP app info length before accessing NDP app info
Currently, NDP app info length is not being validated with max NDP
app info length. This may result in buffer oveflow wile accessing
NDP app info received from the firmware.

To address this, validate NDP app info length before accessing NDP
app info

Change-Id: Ifddf1afca7ecf2585e8eb450864d9ba127238f6e
CRs-Fixed: 2795961
2020-10-28 13:27:10 -07:00
Adwait Nayak
b081974d4d qcacmn: Change return type to QDF_STATUS
Maintain harmony in return type as "QDF_STATUS"
for CFR related APIs.

CRs-Fixed: 2767660
Change-Id: Ie35c104d32452d01d3c05b5059ee1b1bfe535a58
2020-10-28 11:30:14 -07:00
Gururaj Pandurangi
00d6ce30a3 qcacmn: Add action OUI to disable TWT
Add a new action OUI to disable TWT for certain APs.

Change-Id: I10fe6218d03f45c132268a120bdeb19d58696d9d
CRs-Fixed: 2793128
2020-10-28 09:21:49 -07:00
Tiger Yu
eff1069f87 qcacmn: Assertion when detecting rx desc nbuf sanity check failure
Assertion when detecting rx desc nbuf sanity check failure to get more
info in the RX refill buffer ring for default version.

Change-Id: I8d0255e2f13e2b993f5651b788f895ea06187bf9
CRs-Fixed: 2800602
2020-10-28 09:21:45 -07:00
Ananya Gupta
c8a732e132 qcacmn: Check tx completions pending before disabling pipes
wlan Tx completions doorbell is rung after IPA pipes are disabled
To fix this, Check if tx completions are pending before disable IPA
pipes.

Change-Id: I1903e593cd6a546a277979073f0a9ba62b681644
CRs-Fixed: 2796989
2020-10-28 09:21:42 -07:00
Debasis Das
a420fc8730 qcacmn: Dont unmap cloned ME buf's before freeing
For ME, cloned nbuf's are not mapped.Hence,these
should not be unmapped before freeing.

Change-Id: I998cd4924781944754a81df7d3675c0a34dc10a0
2020-10-28 05:05:35 -07:00
Ashish Kumar Dhanotiya
047a93da86 qcacmn: Use correct api to get the country info
currently connection manager is using incorrect api to
get the country info which gives compilation error for WIN.

Use correct api to get the country to avoid any compilation
issue.

Change-Id: I647b171ad2ee4a2b70f6803869435074643aa677
CRs-Fixed: 2801991
2020-10-27 13:02:33 -07:00
Abhishek Ambure
749c39466e qcacmn: Add test config attr to start/stop transmitting FD frames
Define QCA vendor attribute
QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_FILS_DISCOVERY_FRAMES_TX to
dynamically start/stop transmitting FILS discovery frames.

Change-Id: If0b07567c8b9c1278b9a6fd7b2f2d574d7f233bc
CRs-fixed: 2800970
2020-10-27 10:53:24 -07:00
Abhishek Ambure
4bf92518ab qcacmn: Add reason codes to report various connect fail
The connection process fails for several reasons and the status codes
defined in IEEE802.11 specification doesn't cover the locally generated
reason codes. Add an attribute to QCA_NL80211_VENDOR_SUBCMD_GET_STA_INFO
vendor sub command which can be used by driver/firmware to report various
additional reason codes for connection failures.

Change-Id: Ibab4696fba34f7a18fb8b5f8601e90c5dfcba89e
CRs-Fixed: 2799153
2020-10-27 06:56:04 -07:00
Naga
8701ff62fd qcacmn: Avoid peer free notification for self peer
Change logic to identify self peer from pointer
comparison to mac comparison, as there is a chance
self peer can be null and peer free notification
will be issued to self peer.

CRs-Fixed: 2790058
Change-Id: Id0615bbfbe871a47477db7474027216619ca34f0
2020-10-27 06:56:01 -07:00
Kai Chen
f71662bc1a qcacmn: Not able to enable pktlog when monitor mode is enabled
This change enables pktlog when monitor mode is enabled.

Change-Id: Ia471c2a5ff92ad590c8c61bc1527b2760d4ba51c
CRs-Fixed: 2799509
2020-10-27 04:56:55 -07:00
Rakshith Suresh Patkar
4b8e53fb7a qcacmn: Remove QCN9100 from application of fft bin size adjust
fft bin size adjust parameter is no longer applicable for
QCN9100. Remove QCN9100 in the check for setting this paramenter.

Change-Id: Ibff3d2d618e20563add79e65e31a442d8d36ba61
CRs-Fixed: 2804120
2020-10-26 23:37:55 -07:00
Pavankumar Nandeshwar
403a1b89cd qcacmn: Add target type checks in spectral for QCN9100
Add target type checks in spectral for QCN9100
at required places

Change-Id: I21c6c2f3e33245540e754e018098dca9c1fc353f
2020-10-26 23:37:51 -07:00
Christopher Chopp
36627ac5e9 qcacmn: Add WMI Handler for TSF Event
Add handling for WMI TSF Event, including registration,
sending event and extracting response.

Change-Id: Icccf9b5eb7e46bd87caf7a644be903747eac025c
2020-10-26 18:56:43 -07:00
Jingxiang Ge
d03233cb19 qcacmn: Support link rate for mcs12/13
This is part of feature which enables link rate
he mcs12/13 for 4k QAM.

Change-Id: Ifade156afca0bf9498383455843b9a7020b53298
CRs-Fixed: 2803008
2020-10-26 16:55:27 -07:00
Vignesh U
b32ef7cdb0 qcacmn: Add ADFS compile-time macros
For a 16-MB profile, while insmoding "umac.ko" unknown symbol error for
function "dfs_translate_radar_params_for_agile_chan" is seen.

The actual definition of function
"dfs_translate_radar_params_for_agile_chan" is present in the
dfs_zero_cac.c which is not compiled for a 16-MB profile. Therefore,
the unknown symbol error is seen.

Add ADFS compile-time macros
QCA_SUPPORT_AGILE_DFS and QCA_SUPPORT_ADFS_RCAC to the declaration of the
ADFS specific function dfs_translate_radar_params_for_agile_chan().
As the macros are not present in 16-MB profile, the function becomes an
empty function in the zero_cac.h and definition of
dfs_translate_radar_params_for_agile_chan() is present (though empty)
in the umac.ko.

Change-Id: I2e28090ef99a76dad9f814f739c207f5bf0f2320
CRs-Fixed: 2802734
2020-10-25 03:36:20 -07:00
Yeshwanth Sriram Guntuka
7e9e7e4bcd qcacmn: Use the appropriate desc pool for mon status ring
In dp_mon_status_srng_drop_for_mac, the rx_desc pool
used for status ring is dest ring desc pool which is
not the appropriate one.

Fix is to use the appropriate desc pool for mon status
ring.

Change-Id: I6f178354789212b375a7a541366bef590a925568
CRs-Fixed: 2800658
2020-10-24 15:45:50 -07:00
Ashish Kumar Dhanotiya
6a2457fc27 qcacmn: Add conversion of all auth type for big data
Currently host does not convert all internal auth types
to qca auth types which results in invalid auth type
indication for big data logging even for some of the
valid auth types.
For example in current scenario connection hapens in SAE
auth type but driver indicates invalid AKM type.
To address above issue add missing auth type and send
proper auth type to user space as part of the big data
logging.

Change-Id: I2612a081385c2bc888afb032cf6fd2a44d886e40
CRs-Fixed: 2803348
2020-10-23 14:50:22 -07:00