Commit Graph

861 Commits

Author SHA1 Message Date
Surabhi Vishnoi
abba175dc5 qcacld-3.0: Add new scan filter if ACS scan is done partially
If the acs scan is optimized based on last scan ageout time,
it can lead to either skip ACS scan fully or scan partial
ACS frequency list. If ACS scan is skipped or partially
done, use a scan filter based on last scan ageout time to
retrieve the scan entries for ACS algorithm.

Change-Id: Id1d3a3d4364163686f92c380e9f6d6dada033ff5
CRs-Fixed: 3239389
2022-08-19 08:14:54 -07:00
Liangwei Dong
68da70f0d2 qcacld-3.0: Move GO to other band for SAP starting on 3vif conc
In GO+STA+SAP concurrency, if GO is MCC with STA, the new SAP
will not be allowed in same MAC. FW doesn't support MCC in same
MAC for 3 or more vdevs. Move GO to other band to avoid SAP
starting failed.

Change-Id: Ia19abd1b11f7416797af3e975ab8ffde9037c11f
CRs-Fixed: 3262185
2022-08-19 08:14:48 -07:00
Surabhi Vishnoi
ef08e7a4c4 qcacld-3.0: Select first clean channel for ACS to optimize SAP turn on time
Currently, ACS computation triggers when ACS scan complete event is
received after firmware has scanned all channels. This leads to
delay in selection on SAP channel.
As an optimization, this change selects the first clean channel
while scan is still in progress. The criteria for first clean channel
is that no beacon/probe response should be received on that channel.
If such channel is obtained while scan is in progress, then select this
channel as SAP channel and abort ongoing scan. Firmware sends
wma_chan_info_event per channel this change uses this event as an
indication that scan is completed on that channel.

To further increase the optimize the time to get clean channel, sort the
ACS frequency list in descending order in ACS SCAN request to
firmware. Firmware scans the channel in the order given by host
in scan request, as higher band channels are less occupied, the
probability of getting clean channel initially will increase, which
will lead to selecting the channel in less time and thereby reduce
the SAP turn on time.

Change-Id: I1a38556862b66943edea08783436f5e1e3a255f6
CRs-Fixed: 3245166
2022-08-19 01:53:49 -07:00
Surabhi Vishnoi
1981726d18 qcacld-3.0: Refactor code to store chan info status in cp_stats
Currently channel info stats are stored in LIM. Refactor
code to store channel info stats in cp stats component.

Change-Id: I2e7219c112e96916d3b73f974dd9803b9c2821c3
CRs-Fixed: 3265722
2022-08-19 01:53:43 -07:00
Surabhi Vishnoi
a6e1be96f5 qcacld-3.0: Trim ACS scan freq list based on last scan ageout time
If particular channel's last scan time is less than the last_scan_ageout
threshold, skip that channel from ACS scan frequency list.

This change optimises the ACS scan time by reducing the number of
channels in ACS scan request to firmware.

Change-Id: Id81815035a89039ef1f492a622c5d89cb4aa298e
CRs-Fixed: 3239387
2022-08-16 06:00:35 -07:00
Surabhi Vishnoi
4783a4c4f4 qcacld-3.0: Store new ACS vendor attribute in SAP ACS config
Parse and store new ACS vendor attribute
QCA_WLAN_VENDOR_ATTR_ACS_LAST_SCAN_AGEOUT_TIME in SAP ACS
config.

Change-Id: If50224780192ed7b587505e973a8dabeab3459b2
CRs-Fixed: 3239372
2022-08-11 12:43:01 -07:00
Balaji Pothunoori
0eb7674f1b qcacld-3.0: start sap if restriction mask is not set for unsafe channels
Currently sap is not starting if all channels configured as coex
unsafe and if restriction mask is not set.
This change is to select unsafe channel if restriction mask is
not set and start the sap.

Change-Id: I4ccf887655066da6d6b50715f631dde6edfda598
CRs-Fixed: 3260305
2022-08-11 09:46:58 -07:00
Liangwei Dong
f31505e491 qcacld-3.0: Fix 2.4 GHz SAP can't be started on 40 MHz
If SAP is initially started on 40 MHz bandwidth, keep using it.
But still keep the old logic 20 MHz for internal CSA for SAP.
This is to fix the SAP can't bring up on 2.4 GHz 40 MHz bw if SAP
OBSS scan disabled and configured as HT40 in hostapd conf.

Change-Id: Ib01be7fe594130f1eee35e3bfb773b1e913ec9c1
CRs-Fixed: 3234564
2022-07-18 21:18:58 -07:00
Surya Prakash Sivaraj
3c1e1b799d qcacld-3.0: Do not allow 6 GHz SAP in non-WPA3
Reject the SAP if the frequency is 6 GHz and
the security is non-WPA3 AKM suite.

Also, use the ini "check_6ghz_security" to
allow the 6 GHz SAP to be operational on an
open security mode for test purposes.

Change-Id: Ifc57656a556ef5b6829ed56bb1ec360b5b84379e
CRs-Fixed: 3176629
2022-07-14 23:21:05 -07:00
Surabhi Vishnoi
83682dcf07 qcacld-3.0: Store chan info event results in STA mode also
Currently, channel info event results are stored only if it is
received as part of SAP ACS scan. Channel info is used in
ACS algorithm to select best channel. There is a requirement to
reuse the STA's scan results for SAP to reduce the SAP bringup
time. So store the channel info event results received as part
of STA scan if WLAN_FEATURE_SAP_ACS_OPTIMIZE is enabled.

Change-Id: I99d4e8c13a9e4171c74c63907d29c585f89ecf9e
CRs-Fixed: 3239383
2022-07-12 10:42:48 -07:00
Dundi Raviteja
a258f3cd42 qcacld-3.0: Clean up code under PRE_CAC_COMP flag
pre cac componentization is done, so clean up
code under PRE_CAC_COMP flag.

Change-Id: I6465bce9fc883797f42358aaeb8dabf70e449cde
CRs-Fixed: 3232820
2022-07-04 11:52:02 -07:00
chunquan
f3b0e58647 qcacld-3.0: Print all freqs info in ACS range
Print all freqs info log in ACS range.

Change-Id: Ic250ac8e2c41527db7683e1e8ef66f0bcfa306a5
CRs-Fixed: 3211309
2022-07-01 13:22:29 -07:00
David Oladunjoye
c730c2b970 qcacld-3.0: sap: Replace fallthrough comment with attribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: I34248b07875ea4b615be84aba26798f10e7773ec
CRs-Fixed: 3217419
2022-06-24 20:06:13 -07:00
Liangwei Dong
92806a4724 qcacld-3.0: Validate SAP acs freq_list
Add validation of ACS scan frequency list ptr from sap_get_freq_list.
If Null then return failure for sap_channel_sel API.

Change-Id: I46db7a956f8f83ba9eceaa8e9e06fe3b44d1a767
CRs-Fixed: 3219747
2022-06-24 00:28:12 -07:00
Wu Gao
c372883e10 qcacld-3.0: Fix compilation issue with openwrt
Remove unnecessary parentheses and avoid compilation error with openwrt.

Change-Id: I884ac75a66f5af44028bdc849d3cbfc36390d360
CRs-Fixed: 3225981
2022-06-23 22:46:24 -07:00
Liangwei Dong
ead788ac8c qcacld-3.0: Fix SAP stuck in CAC wait state
Driver checks all 160Mhz 5 GHz SAP as DFS channel SAP, but
it is not right for some regdomain which no DFS required for
some 160 Mhz channels.
Fix by check wlan_reg_get_bonded_channel_state_for_freq API
to set DFS flag.

Change-Id: I8cd402c285e858ef8d322fc8d7cfaa32ae4c2056
CRs-Fixed: 3208538
2022-06-02 01:30:44 -07:00
Ashish
e0b72bca28 qcacld-3.0: Start SAP on valid same band channel after country change
Currently if SAP is operating on 5GHz channel and if country change
happens to a world mode where SAP is not allowed on 5GHz channels so
SAP moves to a 2.4GHz channel and saves the current operating 5GHz
channel, now when again country change happens then SAP tries to
move to previous 5GHz channels, if SAP is not allowed on this 5GHz
channel in new country, SAP comes up on 2.4GHz channel.
Ideally SAP should come up on some other valid 5GHz channel instead
of 2.4GHz channel.
This scenario is possible for 6GHz channel as well.
To address above issue, add a fix to get first valid same band channel
if previous same band channel is not valid channel.

Change-Id: I39dc297846c838731a70cd01d696bcbd8a054970
CRs-Fixed: 3175740
2022-05-30 08:13:33 -07:00
Jia Ding
307406f111 qcacld-3.0: Properly check max supported EHT bandwidth
Per 11BE Spec, only 320 MHz support in 6 GHz is defined in EHT
PHY capabilities. Therefore when deciding max target supported
EHT bandwidth, 320 MHz support is first checked using target
advertised EHT phy caps. If 320 MHz is not supported, fall back
to VHT channel width supported, which includes 160 MHz and 80 MHz.

Change-Id: I26ddfa250db66d72ca55a3c9f966d71740cb0414
CRs-Fixed: 3190474
2022-05-30 03:55:56 -07:00
Dundi Raviteja
a52b682bcb qcacld-3.0: Move pre cac failure code to pre cac component
Move pre cac failure code to pre cac component.

Change-Id: Ie27c93737fff89a4f5f3c2ceaa51223bd246e43b
CRs-Fixed: 3199950
2022-05-29 22:51:57 -07:00
Dundi Raviteja
2bbdc1835e qcacld-3.0: Move pre cac success code to pre cac component
Move pre cac success code to pre cac component.

Change-Id: I9d4f6c52ada96905e185fecef6556c59e05ab284
CRs-Fixed: 3199947
2022-05-29 22:51:50 -07:00
Dundi Raviteja
71fc4f3fd4 qcacld-3.0: Move pre_cac start code to pre_cac component
Move pre_cac start code flow from hdd to pre_cac component.

Change-Id: Ia3bd7521bff9571dee18dbc20b28d08b76128944
CRs-Fixed: 3199948
2022-05-27 18:06:07 -07:00
Liangwei Dong
00c79e5785 qcacld-3.0: Add SAP P2P GO force SCC in same band
When SAP and GO home channels are in MCC in same band,
implement below requirement to avoid MCC:
1. SAP starts at first and GO starts later, then SAP will
  force SCC to GO's home channel after GO starts up.
2. GO starts at first and SAP starts later, then SAP will
  force SCC to GO's home channel during starting up.
3. SAP and GO SCC in same band, SAP changes channel to
  the other channel in same band, GO will follow SAP and
  move to SAP home channel.
4. SAP and GO SCC in same band, GO changes channel to the
  other channel in same band, SAP will follow GO and move
  to GO home channel.

And all the force SCC cases, if the target channel of force
SCC is not supported by the SAP or GO, then driver will
select other band's channel for the interface.

Change-Id: I7b24f3a972a401fd144a0c81dc19bd48ba224d85
CRs-Fixed: 3176087
2022-05-26 13:34:04 -07:00
Bing Sun
98cbab9a5a qcacld-3.0: Restart SAP after updating phymode requested from SON
EasyMesh agent fails to update the phymode requested by controller.

EasyMesh controller sends the channel selection request package to notify
EasyMesh agent to change phymode and channel. EasyMesh agent should change
them accordingly.

Update the phymode of the SAP, then restart the SAP.

Change-Id: Iab881b0bfbd1764072b48d426610adc8967111cd
CRs-Fixed: 3181195
2022-05-26 05:29:31 -07:00
Liangwei Dong
58ac0e7341 qcacld-3.0: Fix DFS channel weight factor issue
If normalize_acs_weight INI setting covers the DFS channel,
the existing DFS channel weight factor will be override.
Fix it by using the minimal weight factor for both setting.

Change-Id: Ie0fa3371bd99ee8d50c7abc81ddc8cd0eb84f9aa
CRs-Fixed: 3196688
2022-05-23 22:05:47 -07:00
Liangwei Dong
6977ac6da5 qcacld-3.0: Check and override strict flag for SAP user CSA
If force SCC enabled, user trigger SAP CSA and target channel
doesn't cause MCC with existing STA/CLI. Then overide strict flag to
true, so that driver can skip the overlap interference check and
allow the CSA go through. This is to allow SAP/GO force SCC in
same band.

Change-Id: I7844f7329b922456594cad1402a0d2ac0d0927c5
CRs-Fixed: 3178725
2022-05-23 20:25:56 -07:00
Bing Sun
5561932e60 qcacld-3.0: Enable puncture for 11be SAP when getting chan param
When getting chan param for SAP, the bandwidth is downgraded if some
channel in the bandwidth is disabled if puncture flag is not set in
chan param.

Check phymode in sap_ctx, if it is 11be, enable puncture when getting
chan param.

Change-Id: Id80a76c3fc8bb96e714b1b70159637ece876488f
CRs-Fixed: 3201043
2022-05-20 19:55:20 -07:00
Surya Prakash Sivaraj
a0b6b2c739 qcacld-3.0: Add STA+SAP indoor channel scc support
Based on the ini "sta_sap_scc_on_indoor_chan" the behavior of
STA+SAP in scc is as follows:
1. STA is on 2.4 GHz & SAP is on 2.4 GHz and SAP user configured
initial channel was on 5 GHz, then move SAP to 5 GHz initially
started channel

2. When STA + SAP are doing SCC on indoor only channel and
  a) STA moves to 2.4 GHz -> then SAP moves to initialy started
channel
  b) STA moves to another indoor only channel -> SAP follows
STA channel
  c) STA moves to non-indoor, non-dfs channel -> SAP follows
STA channel.
  d) STA moves to DFS channel -> SAP moves to 2.4 GHz channel
  e) STA disconnects -> Move SAP to initially started channel

3. STA is on 2.4 GHz & SAP is on 5 GHz non-indoor, non-dfs channel
and STA moves to 5 GHz channel, then SAP should follow STA to 5 GHz
if SAP was initially started on 5 GHz channel. Else SAP restart
is not required and SAP will remain on the 2.4 GHz channel

Change-Id: I655dffff026d8147e13599dddc024980ba157be5
CRs-Fixed: 3186965
2022-05-13 04:20:29 -07:00
Abhishek Singh
810795a323 qcacld-3.0: Use wlan_scan_* API instead of ucfg_scan_* API from umac
Use wlan_scan_* API instead of ucfg_scan_* API for scan calles from
umac.

Change-Id: Ib48ee01443ca9ff9ec66a931a95c152376c5027e
CRs-Fixed: 3192125
2022-05-13 01:08:07 -07:00
Liangwei Dong
a1a79f9566 qcacld-3.0: Filter non-PSC 6 GHz ACS channels
In SAP ACS, 6 GHz non-PSC channels will increase the SAP ACS
scan time, and 6 GHz non-PSC channels are not favorite channels
for standalone AP, so skip non-PSC channels in ACS SCAN.

Change-Id: I5ac69c81c29feba9b75fcef36d6e205f3716afdf
CRs-Fixed: 3189215
2022-05-09 22:18:28 -07:00
Deeksha Gupta
ef47feb37d qcacld-3.0: Add debug print in wlansap_get_chan_band_restrict
Add chan_freq_before_switch_band debug print in
wlansap_get_chan_band_restrict().

Change-Id: Ib7d981780cfd2f9dfb6aed0640c5220969eb04f8
CRs-Fixed: 3189546
2022-05-09 05:30:10 -07:00
Aravind Kishore Sukla
8282e8af3c qcacld-3.0: Replace kmsg logs to debug logs
Change kernel log level to debug level

Change-Id: I1efa9a0498acd81f2a9a12d5712299609eb5bd06
CRs-Fixed: 3182121
2022-05-06 09:49:38 -07:00
Bing Sun
37569c2ee1 qcacld-3.0: Fix puncture support in 11be mode without MLO
Make puncture work for 11be. Puncture is in EHT operation IE. It should
be supported for 11be mode without MLO IE.

Change-Id: I4406e81895a53d2975aaf5049c8e98a879522888
CRs-Fixed: 3184867
2022-05-04 08:34:44 -07:00
chunquan
2e87d35525 qcacld-3.0: Remove WLAN_FEATURE_11BE_MLO from middle of function
Remove all WLAN_FEATURE_11BE_MLO from middle of function.

Change-Id: I17cbaf90ae9b6f428c785413723a5dfb3619de0c
CRs-Fixed: 3175450
2022-04-25 08:57:56 -07:00
Dundi Raviteja
990e73237e qcacld-3.0: Featurize pre cac code
Featurize pre cac code under PRE_CAC_SUPPORT macro.

Change-Id: I4379e667d4e0ddd3c4d91b5d624fc2325f87022e
CRs-Fixed: 3172393
2022-04-14 03:54:42 -07:00
Bing Sun
6df47a0d95 qcacld-3.0: Add API to get max mcs index
Add a new field max_mcs_index in mlme_legacy_priv to save max mcs
index of current vdev.
Add a new field max_real_mcs_idx in hdd_station_info to save max
mcs index of the connected station.

Change-Id: I28908515cbe5c18c79f14f8645defd5c82e3a6f0
CRs-Fixed: 3065838
2022-04-12 06:31:07 -07:00
Wu Gao
17fc92fd16 qcacld-3.0: Correct CSA reason for N79 case
When N79 enabled and disable 5G and 6G band, 5G SAP will swith to 2G
band with CSA. CSA reason should be CSA_REASON_BAND_RESTRICTED.

Change-Id: Icd6cf62ee1f58834a97663f784b50f925782a3ef
CRs-Fixed: 3165067
2022-04-08 01:57:08 -07:00
Liangwei Dong
641ff5696e qcacld-3.0: Avoid SAP channel change if target freq and bw same
Move the channel frequency and bandwidth check after
wlansap_get_csa_chanwidth_from_phymode API call. The API
may change the target channel bw if SAP works in concurrency
with STA on same channel.

Change-Id: I717c58e4a9e7eb6ea66b0eb56933b5508d4d83c0
CRs-Fixed: 3161386
2022-04-05 01:24:59 -07:00
Surya Prakash Sivaraj
edc56c445f qcacld-3.0: Remove the old SAP/CSR flow
Remove the old SAP-CSR flow for start bss, stop bss and
channel change req processing which is disabled currently
under the SAP_CP_CLEANUP macro.

Cleanup the redundant checks in the deauth, disassoc
response processing in CSR.

Change-Id: I5a360fc267688b51ca645551108b65646a3c8c1a
CRs-Fixed: 3164259
2022-04-03 17:55:50 -07:00
Bing Sun
0413c79b44 qcacld-3.0: Only check primary channel in NOL or not for 11be AP
There is no need to check channel state based on AP bandwidth because
even subchannel is invalid, it is OK for 11be AP to start.
Check channel bandwidth with puncture in lim_pre_vdev_start.

Change-Id: Idad8f96164e979c5139b2ffa7d2be9c1764fbb0f
CRs-Fixed: 3159137
2022-03-31 05:46:22 -07:00
Surya Prakash Sivaraj
cd92b53903 qcacld-3.0: Redesign the Stop BSS request/response flow
Remove the redundant structures and operations in CSR module
for the stop bss request/response processing to/from SAP/NDI
modules.

Change-Id: I0db36caa509699fe5e0e9709d3e3689e551aad4f
CRs-Fixed: 3148791
2022-03-25 15:44:30 -07:00
Surya Prakash Sivaraj
8bd8150c7c qcacld-3.0: Redesign the channel change request flow
Remove the usage of redundant legacy structures in CSR/SAP
modules and simplify the channel change request flow from
the SAP module to LIM.

Similarly change the channel change flow for monitor mode.

Change-Id: Ib91f65307d456919f68892f45f3aa9b4fed0f0d3
CRs-Fixed: 3148761
2022-03-25 15:44:25 -07:00
Surya Prakash Sivaraj
3d8ad3801b qcacld-3.0: Cleanup the start bss request flow
Remove redundant structures and operations in SME/CSR.

Currently, start bss request is prepared in CSR module using
csr_roam_profile, which is built from sap context.

To remove redundencies, prepare the start bss request in SAP
module and serialize the start bss request.

Change-Id: Icd468fe2a48d5324c1485d83b05e27400c9dbd9a
CRs-Fixed: 3142912
2022-03-25 15:44:13 -07:00
chunquan
f07969a044 qcacld-3.0: Replace blacklist/whitelist for denylist/allowlist
Replace blacklist/whitelist with denylist/allowlist in
qcacld3.0. and replace blm with dlm.

Change-Id: I9ba61dde3b3ea008ca3777448d1f8dab83d33ec1
CRs-Fixed: 3091211
2022-03-05 07:10:49 -08:00
Deeksha Gupta
11a20da787 qcacld-3.0: Add check in wlansap_get_chan_band_restrict()
Add check if sap_ctx->chan_freq_before_switch_band is valid
active channel for that country. If yes, the chan_freq_before_switch_band
channel can be used for new CC, otherwise host should skip the
chan_freq_before_switch_band.

Change-Id: I4ac2fee1dd584abba0708c2b7ef0826f384acb2d
CRs-Fixed: 3136454
2022-03-02 16:15:06 -08:00
Liangwei Dong
0660132171 qcacld-3.0: Fix 5G DFS SAP failed to open
If STA is active on 5G DFS channel, SAP CAC duration will
be set to zero during starting. This causes the FW indicates
CAC completion event very shortly after vdev start request.
That is before SAP fsm processes BSS start success event.
SAP fsm is still in SAP_STARTING state. In this state,
the sap_cac_end_notify will only indicate the CAC end event
to hostapd. hostapd will be pending on CAC start event from
driver.
Fix by skip the CAC end event if CAC duration time is zero,
then the sap fsm will indicate CAC start/end event when
BSS start event comes up later.

Change-Id: Ib4c2ada8754bd08c0567ce9009ebec2349098b75
CRs-Fixed: 3138466
2022-02-28 17:43:47 -08:00
Balaji Pothunoori
be88a7597e qcacld-3.0: select min bw during csa if channel bonding disabled
During CSA max bw is selected for SAP in STA + SAP concurrency
for non-dfs channel and SAP is tear down after 60 sec of operation
due to STA is in 20Mhz and SAP is in 40Mhz with
IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag disabled.

This change is to select 20Mhz BW during CSA if channel bonding is
disabled.

Change-Id: If4ed3d9a080ed976a0f4be6704848ae4494c7bbc
CRs-Fixed: 3126074
2022-02-24 10:42:24 -08:00
Surya Prakash Sivaraj
08bdec292e qcacld-3.0: Cleanup SAP flow in CSR
Remove redundant structures in CSR for SAP functionality
and add a new flow to post SAP requests from SAP module to
LIM.

Change-Id: If3339cf138140ea148bbd263960907fb3a01de43
CRs-Fixed: 3123072
2022-02-23 08:36:37 -08:00
Liangwei Dong
4fc0500019 qcacld-3.0: Fix SAP DFS channel switch failure
If the SAP is moved to DFS channel on 5G by Pre-CAC SAP interface,
Pre-CAC interface will be stopped but not deleted. Then the
driver will have two sap context objects. When the Radar event
comes to SAP interface, the existing APIs
(like sap_is_conc_sap_doing_scc_dfs) will still check Pre-CAC SAP
context to get concurrency status without checking Pre-CAC SAP's
status even though the Pre-CAC SAP is inactive. It will get wrong
result and finally cause the current SAP stuck in Radar detected
DFS channel.
Fix by check sap_context state active or not in sap concurrency
check API.

Change-Id: I5adf9e6a3ac7b45983fb627c99d9d92fe5815751
CRs-Fixed: 3127425
2022-02-13 22:01:44 -08:00
Jayachandran Sreekumaran
0293422ff8 qcacld-3.0: Convert channel width from NL to internal type
Channel width is getting updated in 2 different types, NL type
in some places and rest of the places in internal type.
As the enum types are different between NL type and internal
driver type, SAP channel width changes in the SAP config
during beacon updates. Due to this SAP restarts with
different channel width during SSR.

Hence updated to use only the internal channel width enum type.

Change-Id: Ifd595c079ed7c33692cb96d2514fd1259210e67d
CRs-Fixed: 3124721
2022-02-08 15:05:23 -08:00
Bing Sun
820530515c qcacld-3.0: Refine ACS with static puncturing
If EHT is enabled and channel width is bigger than 80 MHZ, static
puncturing is applicable to this SAP.
Consider punctured channel as valid candidate channel with weight
as max ACS weight for the SAP supporting static puncturing.
Indicate puncture bitmap to hostapd. Hostapd need puncture bitmap
when generating EHT operation IE.

Change-Id: I157878cc405c83114cd82f5fac63375c02e48cab
CRs-Fixed: 3101970
2022-02-07 20:21:51 -08:00