Commit Graph

1914 Commits

Author SHA1 Message Date
Huashan Qu
6a958dfc46 qcacld-3.0: Cleanup roc and notify tdls when user disconnects sta
Only do cleanup roc request and notify tdls sta disconnect
when sta disconnection operation is from osif or north bound.

Change-Id: I1d0aa4f1cd8a23baca890228485f22124eeabf78
CRs-Fixed: 2954772
2021-05-28 01:46:57 -07:00
Huashan Qu
1557129851 qcacld-3.0: Add host roam preauth handling code for connection manager
Add host roam preauth handling code for connection manager.

Change-Id: Id97d716a6c47ba08b2e8ef5e3ed675c5dcf88ed8
CRs-Fixed: 2954515
2021-05-28 01:46:52 -07:00
Pragaspathi Thilagaraj
3073bb1391 qcacld-3.0: Don't send roam init for P2P vdev
Roam offload init command should be sent to firmware only
for STA mode. For P2P vdev, if roam init command is sent,
it causes abnormal target behavior.

Don't send roam init command if the vdev opmode is not
Station.

Change-Id: I0bfc3c6b4bc2eef7459b092101bc4d72c68761e5
CRs-Fixed: 2924563
2021-05-27 13:41:21 -07:00
Srinivas Girigowda
bd0961f3db qcacld-3.0: Separate TWT enable command wrt req/res role
1. Currently, the same twt enable api hdd_send_twt_enable_cmd()
sends to firmware for both requestor and responder role.

2. When firmware receives enable command, it will be busy to
handle that command. If any back to back enable command, it can
lead to some issues.

As part of this change, decouple enable api based on requestor
and responder role as per below:
for requestor: hdd_send_twt_requestor_enable_cmd()
for responder: hdd_send_twt_responder_enable_cmd()

Synchronize twt enable command to avoid back to back command
issue.

Change-Id: I3d3840740fee7413d6123ece919c42558e9b35d1
CRs-Fixed: 2937540
2021-05-27 03:46:45 -07:00
Utkarsh Bhatnagar
045ed44dee qcacld-3.0: Move unused Lfr3 specific item under FEATURE_CM_ENABLE
Move unused Lfr3 specific item under ifndef FEATURE_CM_ENABLE.

Change-Id: I94d5f9d48f5cb853dc3ac9039f6140f23ab620cd
CRs-Fixed: 2953719
2021-05-27 03:46:29 -07:00
Srinivas Girigowda
5a04deba8b qcacld-3.0: Add support for SAP TWT teardown
Add support for SAP TWT teardown.

Change-Id: I108ea425e69e07ee8a3657ca5afcb436420b2626
CRs-Fixed: 2944872
2021-05-26 21:09:02 -07:00
Ashish Kumar Dhanotiya
cc3c67977d qcacld-3.0: Add ini support to enable NAN on indoor channels
Currently there is no  support to enable NAN on indoor channels,
as per the new requirement add an ini support to enable NAN on
indoor channels.

Change-Id: Ia3acbc133cab4865d8ad69992e893be91439f50f
CRs-Fixed: 2943668
2021-05-26 09:20:42 -07:00
sheenam monga
3ea09842f6 qcacld-3.0: Avoid comparison of two different enums
Currently, reg_wifi_band enum is compared with
enum band_info. different values may lead to
invalid chan mode.

Fix is to compare reg_wifi_band with reg_wifi_band
enum value only.

Change-Id: Ibbe83ab5a8a428528bbeb28c941552a6f412a844
CRs-Fixed: 2949501
2021-05-20 10:02:16 -07:00
Pragaspathi Thilagaraj
077006a020 qcacld-3.0: Add new roam scan type string
Add new roam_scan type string to indicate all the 5G+6G
channels are scanned.

Change-Id: I8f77b9b28d5b544d586612e177c86a3b730b0bd9
CRs-Fixed: 2947645
2021-05-19 14:37:43 -07:00
Utkarsh Bhatnagar
919f560858 qcacld-3.0: Fix HO fail handling when received without roam start
If HO fail/ roam abort is received without any roam start indication
the roam command will not be present in connection manager, so
continue with cleanup even when roam command is not present in these
cases.

Change-Id: I0ff3307b4d4ba96cc3b0c413fd0a41be47e9c588
CRs-Fixed: 2948064
2021-05-18 12:41:55 -07:00
Deeksha Gupta
565e6a7d76 qcacld-3.0: Support for TWT SAP get_status query command
Add support for TWT get_status command in SAP

As part of this change, TWT get_status command is supported
if
1. If particular dialog_id and particular mac_addr are
   present
2. If dialog_id = 0 and particular mac_addr are present
3. If no parameter present

Change-Id: I5ce1719da7f9a3988ba6e1f04455a06faf9687c6
CRs-Fixed: 2937999
2021-05-18 08:29:11 -07:00
Utkarsh Bhatnagar
76866c0712 qcacld-3.0: Use cm_is_open_mode() API to check for open security
Use cm_is_open_mode() API to check for open security.

Change-Id: I4d960ee781ee63e73f19f0d5e223fd49c01ba728
CRs-Fixed: 2947818
2021-05-18 08:29:05 -07:00
Tiger Yu
91d2958518 qcacld-3.0: Reset iface_context to NULL if max IPA interfaces reached
Reset iface_context to NULL if max IPA interfaces reached to avoid to
cleanup the wrong interface context when setup IPA interface failure.

Change-Id: I2f19d62b9f76f826c2275a0d889b5f5a0a48a01f
CRs-Fixed: 2931966
2021-05-17 23:43:36 -07:00
Vulupala Shashank Reddy
fb5c7ba38a qcacld-3.0: Fill he and vht parameters for packet capture mode
Fill he and vht parameters in data tx and rx packets for packet
capture mode to update in radio tap header.

Change-Id: I229fc41657456b9ab5d8a2dfce1cdd039b624fcb
CRs-Fixed: 2942108
2021-05-16 20:50:28 -07:00
Vulupala Shashank Reddy
bccb16f916 qcacld-3.0: Fix Frequency for data rx packets in packet capture mode
Currently centre frequency filled in data rx packets for packet
capture mode. Need to fill base frequency so filling frequency
from connection policy manager.

Change-Id: I79abe4e8a27a853c156eff8618be2f280fc54e78
CRs-Fixed: 2942107
2021-05-16 20:50:24 -07:00
Lincoln Tran
2a0851b0ab qcacld-3.0: Use MLME channel list in connection manager
When updating the scan filter with valid channels, refer to the MLME
channel list instead of the policy manager list. The policy manager list
is used mainly for SAP related APIs.

Change-Id: I5530e5bcfd6b5c04063d7530fbc996ffca91df3f
CRs-fixed: 2946365
2021-05-15 10:50:37 -07:00
Lincoln Tran
8b2cd2c24d qcacld-3.0: Change SAP related APIs to use secondary channel list
In any start BSS or ACS related function, change the calls to regulatory
to access the secondary channel list instead. This list will hold the
VLP channels specifically for any beaconing modes. This allows a client
and an AP to operate simultaneously on different power modes.

Change-Id: Ic06b408ebcc78292d84f1f035c00bf39a23de3ca
CRs-fixed: 2944484
2021-05-14 12:54:21 -07:00
Liangwei Dong
edd0baca7d qcacld-3.0: Update ht cap max amsdu size
When vht cap indicates the vht max MPDU size >= 7991 supported,
ht cap A-MSDU length field should indicate 7935 octets
supported according to 80211 specification.
At present no WMI HT cap defined for ht cap A-MSDU length field
from target.
Fix the issue by override ht amsdu len to 1 if vht max mpdu
len >= 7991 supported by target.

Change-Id: I9d2b8c11e7a27e016f618c1a2c8a380d081a6ba7
CRs-Fixed: 2929148
2021-05-14 04:52:39 -07:00
Yu Ouyang
1a3b66cbdd qcacld-3.0: Add new ini to config suspend mode
Sometimes we need PDEV suspend mode, WMI_PDEV_SUSPEND_CMDID and
WMI_PDEV_RESUME_CMDID. But currently design, only support WoW
suspend or not support two choices. And, there are two confused
ini configuration, gDisableWow and gEnableWoW.

1. Add new ini gSuspendMode to set suspend mode. Default 2.
	0, does not support suspend
	1, legency pdev suspend mode
	2, WoW suspend mode
2. Clean gDisableWow. It is replaced by gSuspendMode=0.
   HDD suspend/resume function get the value by new API
   ucfg_pmo_get_suspend_mode().

Change-Id: Icbeef3df6879ca2054f64e0292e9b9469c4936d4
CRs-fixed: 2940788
2021-05-13 12:32:44 -07:00
Gururaj Pandurangi
5f68a0e898 qcacld-3.0: Enable Skip TPE consideration INI by default
The INI skip_tpe_consideration when set, skips power from AP's
TPE IE in TPC power calculation for 2.4G/5G case. Enable this
INI by default since APs advertise low TPE powers for IoT, thus
lowering overall TPC power.

Change-Id: I6c07bbd684579c2fa3617e49d76c75b5bf3f2815
CRs-Fixed: 2941630
2021-05-13 10:19:01 -07:00
Yeshwanth Sriram Guntuka
7c7aa33389 qcacld-3.0: Do not intrabss fwd EAPOL frames in IPA exc path
Do not intrabss forward EAPOL frames received in IPA
exception path.

Change-Id: I0be68ec2c186a7b64d4d2f1c3de7dbb20e49d860
CRs-Fixed: 2860225
2021-05-12 18:42:18 -07:00
Yeshwanth Sriram Guntuka
60703ed106 qcacld-3.0: Drop non-EAPOL/WAPI frames from unauthorized peer
Drop non-EAPOL/WAPI frames from unauthorized peer received
in the IPA exception path.

Change-Id: I0c0bc6e60efa193126ba1e3eca36c5e02f7f76a3
CRs-Fixed: 2860206
2021-05-12 12:30:53 -07:00
Jianmin Zhu
007e9b9449 qcacld-3.0: Avoid intra bss forwarding for adapter in sta mode
During DUT STA Rx over IPA, qdf_spin_unlock_bh is called as following.
__wlan_ipa_w2i_cb
->wlan_ipa_rx_intrabss_fwd
->cdp_ipa_rx_intrabss_fwd
->dp_ipa_rx_intrabss_fwd
->dp_vdev_get_ref_by_id
->qdf_spin_unlock_bh

netif_rx will raise NET_RX_SOFTIRQ in enqueue_to_backlog->
____napi_schedule even NAPI not enabled.
spin_unlock_bh will call do_softirq to execute NET_RX if NET_RX_SOFTIRQ
is raised.

If qdf_spin_unlock_bh is called in wlan_ipa_w2i_cb, once 1 skb received,
netif_rx is called, and NET_RX_SOFTIRQ and APP like iperf is scheduled,
too much context switch happens, CPU and power is wasted, Rx throughput
KPI failed on mdm platform which only has single 1.2G-1.5G CPU.

Fix it by avoiding intra bss forwarding for adapter in sta mode.

Change-Id: I264b14120b9998a56f6c1978f5a890615e6f837c
CRs-Fixed: 2915691
2021-05-11 10:13:39 -07:00
Karthik Kantamneni
e7f4cae651 qcacld-3.0: Set ep vote access states during suspend and resume
Set ep vote states during wlan suspend and resume opeartions

Change-Id: I5da5fb69ca99ac1d9ecd82cc61cc106eeba8eb47
CRs-Fixed: 2939902
2021-05-11 05:54:20 -07:00
Vulupala Shashank Reddy
13d111a33a qcacld-3.0: Fix compilation error because of unused variable
Fix compilation error due to unused variable tx_retry_cnt
in packet capture.

Change-Id: I9df7ae71723390fb6e1f58495efbb8bdfe42edf4
CRs-Fixed: 2942168
2021-05-10 17:56:37 -07:00
Abhishek Singh
39455350a3 qcacld-3.0: Add self reassoc and Hw mode change logic for LFR2
Add self reassoc and Hw mode change logic for LFR2.

Change-Id: I2c48f0d36d541df58b6d6c2448bfe526b60df142
CRs-Fixed: 2941794
2021-05-10 14:47:48 -07:00
Utkarsh Bhatnagar
c7e32c7021 qcacld-3.0: Enable TDLS 11AX only if supported by FW
Don't fill the 11ax capabilities if FW doesn't support
TDLS 11AX capability.

Change-Id: I267ccaa439bb3cf17d27493172b4f324d112724b
CRs-Fixed: 2925250
2021-05-10 09:02:55 -07:00
Liangwei Dong
1ad0172d7e qcacld-3.0: Fix LTE unsafe channel switching failure of SAP
At present LTE unsafe channel switch and DCS is using
hdd_switch_sap_channel to switch channel of SAP.
hdd_switch_sap_channel has no bw setting parameters and just
use the original bw of SAP - ch_width_orig. The ch_width_orig
(80Mhz) may not be applicable if SAP is channel switching from
5G 80Mhz to 2G. Use the new API wlan_get_ap_prefer_conc_ch_params
to override the bw to appropriate value for the new channel.

Change-Id: I9ab6c92a0534517c524bd56b0c3087d7f75f6368
CRs-Fixed: 2939654
2021-05-10 02:05:23 -07:00
Surabhi Vishnoi
63465be34e qcacld-3.0: Reset the value of static rssi_comb to zero
Reset the value of static variable rssi_comb to zero when
last mpdu of ppdu is received in packet capture mode.

Change-Id: Ida76dfb9c98a8e2718844f890e0303802db5bbed
CRs-Fixed: 2940871
2021-05-10 02:05:18 -07:00
Surabhi Vishnoi
3f6f415064 qcacld-3.0: Add support for TSO frames in packet capture mode
Currently, TSO frames are not handled in packet capture mode.
Add support to handle TSO frames.

Change-Id: Ib901defcd369b01a33c87ca888ad80fe5fd086c7
CRs-Fixed: 2932138
2021-05-10 02:05:13 -07:00
Surabhi Vishnoi
911ffbd52f qcacld-3.0: Register for mgmt control frames in pkt capture mode
Register for management control frames with the mgmt txrx
component in packet capture mode.

Change-Id: Ibaa20e00753cdeb6a15a79bd458166b47652cdb5
CRs-Fixed: 2932144
2021-05-07 07:17:56 -07:00
Utkarsh Bhatnagar
e649bde5af qcacld-3.0: Add ini to configure BLE scan policy
Add gConfigBleScanCoexPolicy which can be used to
control performance of ble scan case.
’0’ to place more emphasis on BLE Scan results
‘1’ to place more emphasis on WLAN performance

Change-Id: I46c735d8695523d14f6372bc5e47d1d1f51589ae
CRs-Fixed: 2935051
2021-05-07 05:05:01 -07:00
Lincoln Tran
5ccffc5260 qcacld-3.0: Send 6G HE caps to userspace
New checks have been added in userspace to verify the 6GHz HE
capabilities before allowing the connection. These capabilities
are not currently being shared by host. Add logic to send the
6GHz HE capabilities to userspace.
Also, add APIs to get capabilities from MLME component.

Change-Id: I3d2bbe0d87be6094b6fc74ce01d0e418873cbc6f
CRs-fixed: 2931130
2021-05-06 20:53:00 -07:00
Amruta Kulkarni
7c43640fdc qcacld-3.0: Allocate separate memory for set pmksa
In roam sync handling, pmksa memory is freed right after
set pmka entry is updated in crypto priv params instead
allocate separate buffer for crypto.

Change-Id: I337efcb29d2233b016f93cae7f4f23d3203786a6
CRs-Fixed: 2931162
2021-05-06 16:56:35 -07:00
Utkarsh Bhatnagar
cd22a0f327 qcacld-3.0: Add Reassoc req handling code for connection manager
Add Reassoc req handling code for connection manager.

Change-Id: I2735642df3132738993e801acdb6c9dcba1ac80f
CRs-Fixed: 2939872
2021-05-06 13:49:44 -07:00
Yu Tian
99ded622dc qcacld-3.0: Set HIF PM link state on in RTPM suspend failure flow
HIF PM link state is used to indicate bus is alive or not. This
indicates RING HP/TP updating directly or using async method.In
RTPM suspend failure flow, CLD reject RTPM suspent request, but
state is not resumed correctly.

Change-Id: I3b96dc1fb34e2810d721e1fcb4db609a3d1d684d
CRs-Fixed: 2919930
2021-05-06 10:44:05 -07:00
Surabhi Vishnoi
113d7c1019 qcacld-3.0: Set retry flag in frame ctrl in tx data pkts
If the retry count is more than zero then set the retry flag in
frame control of tx data packets in packet capture mode.

Change-Id: Ie1ecfc30c30946d97c92ee2612c825f8d3539f25
CRs-Fixed: 2932130
2021-05-06 08:32:48 -07:00
Liangwei Dong
9a7ab6fe1d qcacld-3.0: Refine SAP force SCC target channel bandwdith selection
Merge the bandwidth selection of the two API
wlansap_get_csa_chanwidth_from_phymode &
wlan_sap_get_concurrent.
Update 5G Force SCC target Max BW selection for dbs hw:
1. Max BW 80Mhz if sta_sap_scc_on_dfs_chan = 1 and Single SAP
2. Max BW 80Mhz if sta_sap_scc_on_dfs_chan = 0 and STA+SAP SCC
3. other case use User configured BW

The above Max BW value will be limited by SAP user configured
BW at the end.

Change-Id: I1b165d1411288ca6845f90103adbf8bbfc34f67d
CRs-Fixed: 2925750
2021-05-06 08:32:44 -07:00
Surabhi Vishnoi
5b633bab5e qcacld-3.0: Fix retry count in tx data packets in packet capture mode
Transmit count received in tx completion status includes the success
transmission also, so retry count will be one less than transmit
count.

Change-Id: I81a06d4800b2f1015e618938229b7d7abfe5ed2e
CRs-Fixed: 2932141
2021-05-06 08:32:39 -07:00
Ananya Gupta
64cfae78e5 qcacld-3.0: Enable IPA when loaded as module
Currently, module 'm' is converted to 'y' in QGKI when
compiling. In Waipio, GKI2 is present in which 'm'
is not being converted and hence IPA_OFFLOAD is not enabled.
To fix this, checking if CONFIG_IPA3 is either set to y or m
and then enabling CONFIG_IPA_OFFLOAD.
From Kernel 5.10, few IPA functions are depreciated for which
putting the depreciated functions under kernel check condition.

Change-Id: Iba3735692267130b76a8eaaaeeb53c263f8f0ddf
CRs-Fixed: 2921600
2021-05-06 06:23:38 -07:00
Surabhi Vishnoi
577903520f qcacld-3.0: Fix nss value in rx data packets in packet capture mode
Currently, the value of the nss is filled wrong in radiotap
header of rx data packets received in packet capture mode.
Fix the nss value in rx status in packet capture mode.

Change-Id: I15ceb16869aa15a2191f25feb3ef56625435fe4c
CRs-Fixed: 2932135
2021-05-06 06:23:22 -07:00
lihual
5a8e94dad0 qcacld-3.0: Restart roam for LFR2 when there is no candidate
When the AP channel is changed, fw reports a suitable AP.
But it's skipped by host as it has same bssid as the one
currently associated. The same process repeats continually,
which result in fail to reconnect with the AP. To avoid this,
send BMISS indication to upper layer and restart roam.

Change-Id: Idfcb69f81ce72a4ab7ef0c105f3af40cb92c53d5
CRs-Fixed: 2913663
2021-05-06 03:31:00 -07:00
Jia Ding
ac3d677573 qcacld-3.0: Add 320MHz support in policy_mgr
As part of 320MHz bandwidth support for 11BE, add 320MHz
bandwidth conversion used internally in policy manager.

Change-Id: I25cf3e171249ae6c45988d3d9cdd5225a2000178
CRs-Fixed: 2934783
2021-05-06 03:30:51 -07:00
Lincoln Tran
3dc6bd54f5 qcacld-3.0: Add INI to not consider TPE IE
Sometimes, the AP sends low values in the TPE IE resulting in low TX
power. This causes DUT to have throughput/connection issues. Add an INI
to skip over TPE IE only in 2g/5g case. TPE IE will always be considered
in 6G band.

Change-Id: Ia0750195bb0aabf304743e1ad89c8f6d0c9ef1a3
CRs-fixed: 2936492
2021-05-04 13:03:36 -07:00
Surabhi Vishnoi
93267fe03e qcacld-3.0: Fill the rssi for rx data packets in packet capture mode
All msdus which are received as part of single ppdu will have same
ppdu_start. Firmware fills the ppdu_start tlv of only first mpdu.
So copy the rssi_comb from first mpdu's ppdu_start to all mpdus
which are part of single ppdu in rx desc of data packets.

Change-Id: I43465f072b653cd49f823b54d43f64b2a7afd11f
CRs-Fixed: 2895155
2021-05-04 06:53:16 -07:00
abhinav kumar
17a2fc170b qcacld-3.0: Update pmk cache entry for roamed AP
Consider two APs: AP1, AP2

Both APs configured with EAP 802.1x security mode
and OKC is enabled in both APs by default. Initially
DUT successfully associated with AP1, and generated
PMK1 by performing full EAP and added an entry for AP1
in pmk table. At this stage, pmk table has only one
entry for PMK1 (1. AP1-->PMK1).

Now DUT roams to AP2 using PMK1 (as OKC is enabled)
but session timeout happens on AP2 just before 4 way
handshake completion in FW. At this point of time DUT not
in authenticated state. Due to this DUT performs full EAP
with AP2 and generates PMK2. As there is no previous
entry of AP2 (AP2-->PMK1) in pmk table. When host gets
pmk delete command for BSSID of AP2, the BSSID match
fails. Hence host will not delete pmk entry of AP1 as well.

At this point of time, the PMK table has two entry
1. AP1-->PMK1 and 2. AP2 --> PMK2.

Ideally, if OKC is enabled then whenever timeout occurs in
a mobility domain, then the driver should clear all APs
cache entries related to that domain but as the BSSID
doesn't exist yet in the driver cache there is no way of
clearing the cache entries, without disturbing the legacy
roaming. Now security profile for both APs changed to FT-RSN.
DUT first disassociate with AP2 and successfully associated
with AP2 and perform full EAP and generates PMK3. DUT first
deletes PMK entry for AP2 and then adds a new entry for AP2.

At this point of time pmk table has two entry AP2--> PMK3
and AP1-->PMK1. Now DUT roamed to AP1 using
PMK3 but sends stale entry of AP1 (PMK1) to fw via RSO
command. This override PMK for both APs with PMK1
(as FW uses mlme session PMK for both APs in case of FT
roaming) and next time when FW try to roam to AP2 using
PMK1, AP2 rejects PMK1 (As AP2 is expecting PMK3) and
initiates full EAP with AP2, which is wrong.

Fix is to update pmk table entry for roamed AP1 with PMK3 value
comes to host via roam sync indication event.. By this host
override stale entry (if any) with the latest valid pmk for
that AP at a point of time.

Also add new api to get the sae single pmk ini value and
update the bss desc of single_pmk cap after intersecting the ini
value.

Change-Id: I12fecbae69d0d2a11f2a39eee6be960752d831bd
CRs-Fixed: 2889847
2021-05-03 15:03:10 -07:00
Lincoln Tran
efcc67259e qcacld-3.0: Set AP power mode back to LPI
When starting SAP, the AP power type is decided based on certain
conditions. After turning off the SAP, the power type is no longer
valid, so reset it back to default.

Change-Id: I472da2e02b58017dab4855fc83cd4e15b24b7b08
CRs-fixed: 2934622
2021-05-03 12:52:56 -07:00
Nirav Shah
1932ac5950 qcacld-3.0: Add ini to enable/disable TSF sync feature
Add ini to enable/disable TSF sync feature.

Change-Id: I84139f14ac7d01fb2cc52e84a9a817e644a05c77
CRs-Fixed: 2932588
2021-04-30 14:46:50 -07:00
abhinav kumar
a20ff6027f qcacld-3.0: Allow STA+STA to connect in MCC mode
In case of STA + STA or STA + P2P CLIENT concurrency
in MCC, no need to update the beacon interval while
processing connection on the second interface.

Currently, the driver only bypass beacon interval
validation for P2P CLIENT connection in case of
STA + P2P CLIENT concurrency in MCC.

Fix is to bypass beacon interval validation for the
second sta connection so that connection can happen
in MCC for STA + STA.

Change-Id: I4c3f8b1ed0b22f809a291eb88dfd95255cebe5e2
CRs-Fixed: 2934503
2021-04-29 17:40:25 -07:00
Utkarsh Bhatnagar
8ce3d59fb0 qcacld-3.0: Move LFR2 FT logic to vdev mlme
Move LFR2 FT logic to vdev mlme.

Change-Id: I77435ec78a6eeacf47b26aec214d08ad056ebabe
CRs-Fixed: 2935076
2021-04-29 11:36:25 -07:00