Graf commitů

927 Commity

Autor SHA1 Zpráva Datum
Liangwei Dong
c5c0b9bbed qcacld-3.0: Update 6 GHz channel max weight
ACS will mark non ACS channel(filtered by PCL) to SAP_ACS_WEIGHT_MAX.
But the filtered channel still need a reasonable weight to
calculate the combined weight for ACS bw 40/80/160/320.
Assign weight value SAP_ACS_WEIGHT_ADJUSTABLE to such channels and
update it with reasonable after all channels weight are computed.

Change-Id: Iba6565a0f57cc3fe4997427733e922eefc917516
CRs-Fixed: 3537962
2023-07-03 05:29:28 -07:00
Surya Prakash Sivaraj
5e69b2f7f7 qcacld-3.0: Prevent CSA in middle of CAC
If precac interface is in the middle of CAC, do not
entertain any CSA request coming as part of userspace/
country change/unsafe channel handling. Processing the
Channel change request in middle of CAC leads to teardown
of the SAP as SAP is in SAP_STOPPED state.
This leads to pre-cac failure.

To fix this, prevent CSA while CAC and once CAC is finished,
check the sanity of the operating channel based on
unsafe/disable channel list and move it to a valid channel.

Change-Id: I2757753a2a13bdaef60f9b9a46fcd569ddb7306c
CRs-Fixed: 3505593
2023-07-03 01:47:47 -07:00
Vijay Raj
9ce4161627 qcacld-3.0: Introduce support to add vlan group key
In api wlan_hdd_add_key_vdev(), for multipass
sap usecase data traffic is dropped during
transition between multiple password due to
group key mismatch for VLAN.

Introduce support to maintain vlan_id_map
in order to facilate the management of group
key for multipass SAP.

Change-Id: I196a02dad2b979bae10d179e15c3187420bbd19f
CRs-Fixed: 3539185
2023-06-27 00:25:00 -07:00
Will Huang
2c8f0034ef qcacld-3.0: Remove certer frequency check when doing ACS at 320 MHz
320 MHz channel has overlap between adjacent bonding, so the certer
frequency is not unique, it will check fail if check certer frequency
differ and may not included as a valid bonding.

Remove certer frequency check when doing ACS at 320 MHz.
Fix static analyze error in this file.

Change-Id: Icf500e92ebe64071737161ac1e5a0d22f2a0e08d
CRs-Fixed: 3509363
2023-06-19 21:28:41 -07:00
Jianmin Zhu
fade300d71 qcacld-3.0: Set puncture cap
Set new puncture cap, clear old puncture cap.

For SAP with fixed freq instead of ACS mode, need support puncture too,
need use API sap_phymode_is_eht(sap_ctx->phyMode).

Change-Id: I4bbbd742c3c49111d1725137739557bce18588f9
CRs-Fixed: 3518498
2023-06-06 09:52:14 -07:00
Asutosh Mohapatra
7ebd1c2c35 qcacld-3.0: Don't disable connected 6 GHz channels
Currently host disables 6 GHz band when set_fcc_channel cmd
is received hence existing STA/P2P client 6 GHz connections
get disabled.
Add changes to keep existing STA/P2P client 6 GHz connections
intact and also keep SAP up on 6 GHz if STA+SAP SCC on 6 GHz
channel was present before receiving this command. Disable all
other 6 GHz operations.

Change-Id: I95c094e1b344d430a288b6f613842efe6e576e25
CRs-Fixed: 3495006
2023-05-26 20:21:49 -07:00
Jyoti Kumari
1aa66f5a46 qcacld-3.0: Avoid processing back to back ACS req within 500ms
Currently as part of LL_LT_SAP optimization, driver receives
do_acs command from below two path

1. LL_LT_SAP library to get the channel early and
2. Hostapd during SAP turn on

In the first request if driver finds the clean channel as part
of partial scan req then it directly sends that channel to
requested module. So in the second request, driver will exclude
the recently scanned channel from scan list. But there may be
possible that it may receive another clean channel during scan
which leads to two different back to back ACS frequency.

To avoid this, store the current acs frequency and if driver
receives the second acs req within 500ms then send the stored
acs result to requested module.

Change-Id: I9b083a64e996f6ada32ff5210a304aa66aa6ec3a
CRs-Fixed: 3498271
2023-05-25 01:35:26 -07:00
Chunquan Luo
b7bb2170bb qcacld-3.0: Check acs_cfg is Null
When AP mode is not initialized done, trigger AP scan manual maybe crash,
since acs_cfg maybe null.

Change-Id: I1b5f5eb301a10661a75557dcd9d4fc1fa1b9819b
CRs-Fixed: 3478487
2023-05-24 23:43:31 -07:00
Jianmin Zhu
377edefc12 qcacld-3.0: Fix wrong puncture bitmap issue
if local var of struct ch_params isn't initialized to 0, the value is
random, reg_punc_bitmap in it is random as following too.

notify: chan:2462 width:1 freq1:2462 freq2:0 punct 0x8880

Change-Id: I8b73aa57cc83181914abff2d3775d7bfb741601d
CRs-Fixed: 3506745
2023-05-24 12:42:11 -07:00
Will Huang
c7ececd18f qcacld-3.0: Get SAP best channel bandwidth for multi-SAP
For multi-SAP case, after get pcl channel list, also call
wlansap_select_chan_with_best_bandwidth() to get best bandwidth
channel so that don't shrink bandwidth after COEX happen.

For concurrency with STA/P2P mode, don't invoke above function and
take pcl channel as first priority.

Change-Id: Ie211f87728d445aad8d806a1025fb76b4c6dccf0
CRs-Fixed: 3491478
2023-05-22 22:36:14 -07:00
Jianmin Zhu
5d55617fb1 qcacld-3.0: Fix no puncture in chan change event when SAP start
When SAP start, channel change event is sent to upper layer before
vdev start, puncture bitmap isn't filled at that time.

To fix it, send channel change event to upper layer after SAP vdev
started.

Change-Id: If7a993c354ab456762cc7be068b12eece0d2893d
CRs-Fixed: 3495030
2023-05-20 12:54:19 -07:00
Pragaspathi Thilagaraj
282f018e47 qcacld-3.0: Handle TDLS concurrency during CSA
If CSA on SAP/P2P GO causes MCC with the current STA TDLS vdev,
then teardown the TDLS connections, disable off channel and send
disable TDLS to firmware.
If CSA causes MCC -> DBS or MCC -> SCC then allow TDLS and update
the peer off channel list to firmware
Disable TDLS off-channel before SAP/P2P GO vdev restart.
Once CSA is complete, TDLS off-channel will be re-enabled based
on the concurrency.

Add interface manager changes to notify STA channel switch.

Change-Id: I36b359a7e1cf570cfb2b2f0e6abedf148a8fd174
CRs-Fixed: 3445112
2023-04-12 12:53:47 -07:00
Liangwei Dong
3b174b7355 qcacld-3.0: Optimization of SAP bw selection in LTE coex event
Add optimization to select the max possible band width
when do SAP LTE channel avoidance channel change.

Change-Id: I82745d47c55ae42f59691a9634a34b0cff2b4e36
CRs-Fixed: 3440166
2023-04-10 20:48:46 -07:00
Surya Prakash Sivaraj
34ec96337f qcacld-3.0: Cleanup P2P GO support on indoor channel
Rename policy_mgr_is_sap_allowed_on_indoor() to
policy_mgr_is_sap_go_interface_allowed_on_indoor() since
it is common between SAP and GO. Cleanup the API as well.

Change-Id: I8380bd81c5050e9f12c00fff830455f14135c2b4
CRs-Fixed: 3423703
2023-04-06 20:05:37 -07:00
Gururaj Pandurangi
328c3811f4 qcacld-3.0: Add missing dot at the end of copyright header
Add the missing period at the end of the copyright header.

Change-Id: I9d11ab5e35ae8682340288b1f45a324b5d0dde21
CRs-Fixed: 3439213
2023-03-21 13:51:58 -07:00
Liangwei Dong
797ac8a6f9 qcacld-3.0: Fix no CAC on SAP disable and enable
Driver uses global value cac_state in mac_ctx->sap.SapDfsInfo
to record the CAC state of first SAP on DFS channel. If
first SAP CAC is completed, the second SAP can skip CAC
on the channel.
The problem is single SAP stop and restart the cac_state is
not updated and keep value of eSAP_DFS_SKIP_CAC. Then driver
skips the CAC for the SAP start.
Remove the global value cac_state in mac_ctx->sap.SapDfsInfo
and use API sap_plus_sap_cac_skip to check the other SAP's CAC
state dynamically.

Change-Id: Id486a6e605d08845f03b38450a2c021f76ae23f6
CRs-Fixed: 3426671
2023-03-20 04:48:55 -07:00
Rachit Kankane
e0b7095e74 qcacld-3.0: Update to change CSA count
Add variables and APIs in SAP and SME to change CSA count
for SAP / GO.
Currently the default CSA count is 10, this API allows
to reduce the CSA count if required as per the requirements

Change-Id: I17c101cd0c809f49d57d2aaf87fc37d90b92ea1f
CRs-Fixed: 3431384
2023-03-15 09:31:04 -07:00
Gangadhar Kavalastramath
1bbd5a953a qcacld-3.0: Remove dfs cac dependency on pre cac feature flag
Remove dfs cac dependency on pre cac feature flag.

Change-Id: If91e3fb4cc94b669e79aa8877e7102b0cb6ef8b6
CRs-Fixed: 3424238
2023-03-09 12:58:12 -08:00
Liangwei Dong
393f3f3d9a qcacld-3.0: Fix standalone SAP ACS HT 40 failure
After ACS completed, wlan_sap_get_concurrent_bw will
override ACS BW based on concurrency interfaces, but
it will hard code 2.4 GHz to 20 MHz BW. Fix it by
return BW from ACS result to avoid ACS request 40 MHz
failure.

Change-Id: Ibb763c275234c7974ba34c4e2d95f1ed4238908d
CRs-Fixed: 3422900
2023-03-08 23:00:55 -08:00
Vinod Kumar Myadam
b57c697e7f qcacld-3.0: Fix for twt responder after SSR
TWT responder will come from the OEM while start SAP, after SSR
this value is not present. TWT is not enabled after SSR, if this
value is set in the SAP start.

To solve this scenario, cache the twt responder value in
sap_config to use this after SSR.

Change-Id: Iba4c198d6f3d92584c2b6af27d2fbe688c781f7d
CRs-Fixed: 3408653
2023-03-01 00:53:12 -08:00
Surya Prakash Sivaraj
534c627cea qcacld-3.0: Support P2P GO on indoor channels
Add a new ini "p2p_go_in_indoor_chan" to enable support
for p2p go operation on indoor channels.

Do not allow standalone SAP on indoor channels if the
SAP indoor channel support is not enabled.

Change-Id: I2e6220ebcefe09b4ad5de496c36879ef048cb5b8
CRs-Fixed: 3405597
2023-02-28 20:00:35 -08:00
Liangwei Dong
cd92f3902a qcacld-3.0: Do not ACS optimize on DFS channel
DFS channel always has lowest preference when do ACS
channel selection.

Change-Id: Ia551cbca90629f0fefc79d4e4647f6a4d070e3de
CRs-Fixed: 3415611
2023-02-28 16:56:56 -08:00
Bing Sun
63c4c052ea qcacld-3.0: Add new ACL command type to not deauth STA
When EasyMesh controller steers client from AP in EasyMesh controller
to AP in EasyMesh agent, EasyMesh controller will add this client to
blacklist ACL of its AP, then send BTM request to this client. When
client is added to ACL, deauth is not expected since EasyMesh controller
would like client to do roaming with BTM request.

Add new ACL command for EasyMesh. Do not deauth station when add station
to ACL or delete station from ACL.

Change-Id: I499c69108259799a9f0742d1371a666f2b3bbed1
CRs-Fixed: 3408175
2023-02-22 01:54:25 -08:00
Sheenam Monga
672e0a7766 qcacld-3.0: Check previous N freq based on BW to select Best channel
As per current logic previous N-1 frequencies are passed by caller
to validate considering the current frequency as Nth freq. But
instead of comparing previous_n_freq - 1, index - min_index
is compared with previous_n_freq . Due to this current frequency
will not be selected as best frequency even if previous 3 or 4
freq depending on BW are free.

Fix is to pass previous N frequencies based on BW instead of N-1 and
compare index - min_index < prev_n_freq.

Change-Id: Ib78a6774f8d33b264fa2941255f043ea76c6e08b
CRs-Fixed: 3409806
2023-02-22 01:54:11 -08:00
Sheenam Monga
b4697fabd2 qcacld-3.0: Restrict Low Latency SAP frequency list
Don't allow ll SAP to turn on  frequency that can be shared
with 2 GHz MAC. To avoid the scenario introduce a check to validate
whether MIN 2 GHz frequency is shared with selected frequency, if
yes then indicate to the caller that frequency is not suitable
for SAP start.

Change-Id: I9a72549cd8c565d15f550d27151a7a0f172b292a
CRs-Fixed: 3403457
2023-02-16 11:10:22 -08:00
Sheenam Monga
d8093c7ab4 qcacld-3.0: Select Best/Clean channel for SAP
Currently, For CH_WIDTH 20 first clean channel is selected
to start the SAP but logic was not applicable to other band
wdiths because FW can start scan in parallel and for bandwidth
> 20 MHz multiple continuous channels may require to scan and
data was not maintained in host that which channel is scanned
and which is pending.
To Extend logic for bandwidth > 20 MHz, introduce bool array
to maintain data which channel is scanned and found clean. For next
Channel scan same array can be used to check if previous channels
are clean and SAP can be started on current frequency or not.

Change-Id: I9993c0b26885210b4173946e780833dc87830daf
CRs-Fixed: 3403455
2023-02-16 11:10:16 -08:00
Aasir Rasheed
2d7f52ebe0 qcacld-3.0: Add check to avoid 160 MHz for SAP
Currently, while STA is connected to any channel other than 5 GHz
and SAP is coming up on 5 GHz channels, SAP will only check for
5 GHz concurrent channels.

In some cases when STA is on 2 GHz channel and SAP is coming up on
5 GHz channel, With current logic we will only check for concurrent
channel i.e 5 GHz and it will not consider already existing STA.

To fix this issue now SAP will even check for others channels and if
STA is present it will allow for MAX of 80 MHz channel width even
if the requested channel width is 160 MHz.

Change-Id: Ib5a917f9aa649517e8842a0bbad87981b61d6312
CRs-Fixed: 3392109
2023-02-14 00:40:38 -08:00
Sheenam Monga
1d4e456306 qcacld-3.0: Handle DCS event data for 6 GHz freq also
Currently, Host process DCS event data for 5 GHz frequency
only and discards event data for 6 GHz frequency.

Add support to handle DCS event data in case SAP is turned on
on 6 GHz frequency.

Change-Id: I7ad351fcf3c6909602d7ffd53bc79991cf2f0f7a
CRs-Fixed: 3402658
2023-02-13 17:24:24 -08:00
Liangwei Dong
15691e1d7c qcacld-3.0: Assign combined ACS weight to 6 GHz PSC channel
For bw higher than 20 MHz ACS request, such as 160 MHz,
weight calculation will combine the neighbor channel's
weight which maybe Non PSC channel, the previous setting of
combined weight to channel of lowest weight of neighbor channel.
That maybe Non PSC channel, that causes the final ACS result
is Non PSC channel, which is unexpected for standalone SAP.

Fix by set combined weight to PSC channel, so that PSC
channel will have a valid weight in final sorting with 5 GHz
or 2 GHz list.

Change-Id: Ic37d005af524f5ff2c8cb2c86647f02ced7c32d7
CRs-Fixed: 3394384
2023-02-11 02:23:20 -08:00
Jianmin Zhu
589a32f847 qcacld-3.0: Enable dynamic puncture for DFS radar
Once the radar is found, identify the affected sub 20 MHz channels in the
current channel. From the  position(s) of the sub 20 MHz subchannels, find
the nearest valid puncturing pattern.
If a valid puncturing pattern is found, find the corresponding reduced
bandwidth new channel for the legacy ( <= 11AX) devices and send CSA. At
the end of CSA, do a vdev restart so that the 11BE devices see a new
puncturing pattern.
And If not found, then fallback to the default behavior of changing channel
using Random channel selection.

Change-Id: I41e6206f310722bc3dacc9ce8d024f679ff1af3e
CRs-Fixed: 3386022
2023-02-07 11:32:10 -08:00
Vinod Kumar Myadam
94b9aa8de3 qcacld-3.0: Replace callers of wlan_reg_get_bonded_channel_state_for_freq
The current channel list alone is not enough to represent the
capability of the chip or device. Given a channel, in many
cases it may be required to know all the power modes that are
supported by this channel.

Update caller APIs to use super channel list.
Removed wlan_reg_get_bonded_channel_state_for_freq and
wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode to use the
super channel API wlan_reg_get_bonded_channel_state_for_pwrmode
and wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode

Change-Id: I797ecaf0d01d47c5369f9e334805d855841566df
CRs-Fixed: 3144692
2023-01-30 06:27:14 -08:00
Jeff Johnson
8f75b57260 qcacld-3.0: Rename sap_check_and_process_go_force_ssc()
The function sap_check_and_process_go_force_ssc() deals with single
channel concurrency (SCC), so rename the function to match the usage.

Change-Id: I21af5d1b245ab979e5d6888966b843c7830f3735
CRs-Fixed: 3388966
2023-01-27 12:56:01 -08:00
Jeff Johnson
9094a9d708 qcacld-3.0: Remove unused sap_ch_select.h macros
There are unused macros in sap_ch_select.h, so remove them.

Change-Id: I7f53a1d0966d1a7d260d8a63016d9a099ad21e8a
CRs-Fixed: 3388965
2023-01-27 12:55:55 -08:00
Srinivas Dasari
45ebbef48c qcacld-3.0: Allow fixed channel CSA even if it's unsafe channel
Currently, CSA on an unsafe channel is not allowed.
Allow CSA even if it's unsafe channel when user tries to set
a fixed channel (i.e. reason = CSA_REASON_USER_INITIATED)
and firmware supports the capability
WMI_COEX_FIX_CHANNEL_CAPABILITIES.

Change-Id: I5ba26faabe05fbf1a79dc92360400ec2c6d71b2d
CRs-Fixed: 3381395
2023-01-19 23:33:03 -08:00
Srinivas Dasari
b8db5ef04a qcacld-3.0: Handle SAP restart case in fixed chan SAP
Currently, unsafe channels are avoided when SAP restart happens.
If WMI_COEX_FIX_CHANNEL_CAPABILITIES is advertised by firmware
and if the SAP is started in a fixed channel, don't restart even
if the current operating channel is unsafe.

Change-Id: I5f7d632bcc00a1b5351dad64aca0ce16f1057537
CRs-Fixed: 3381394
2023-01-19 23:32:58 -08:00
Srinivas Dasari
cdf374387b qcacld-3.0: Don't check if a channel is safe if it's coex fixed chan SAP
Currently, SAP start is aborted if the channel is marked as unsafe
due to COEX, irrespective of it's an ACS/fixed channel SAP.
There is a requirement to allow the SAP in a fixed channel even
if the channel is marked as unsafe. Firmware advertises
WMI_COEX_FIX_CHANNEL_CAPABILITIES in such targets.
Check for this capability and allow the SAP in fixed channel even
it it's unsafe.

Change-Id: Ie3947058d8854823a718b833ec788c5c8a14b903
CRs-Fixed: 3375254
2023-01-19 16:41:45 -08:00
Liangwei Dong
32b0fee858 qcacld-3.0: Check STA present for SAP unsafe channel CSA
ML STA connected on 2437 MHz and 5825 MHz (unsafe channel), GO started
on 5180 MHz. SAP was started on 5825 MHz for SCC with ML STA, but SAP
channel was changed from 5825 MHz to 5240 MHz after CSA.
At present after SAP start or CSA channel changed, the api
sap_fsm_handle_check_safe_channel will check the unsafe flag
for SAP operation channel. But it doesn't check the STA present
on the channel, SAP is allowed SCC with STA on unsafe channel
when g_sta_sap_scc_on_lte_coex_chan = 1.
Fix by use policy_mgr_is_sap_freq_allowed to check SAP channel unsafe
and wlansap_set_channel_change_with_csa to do more validation on
target channel.

Change-Id: I8ce56195c804156bd7c2a54c60144402636f5b06
CRs-Fixed: 3371880
2023-01-17 07:33:41 -08:00
Bing Sun
8080b13968 qcacld-3.0: Do not change home channel when update phymode from SON
When updating the phymode of SAP required from SON, do not change current
home channel. Currently hdd_restart_sap uses the channel information
from sap_config to do SAP restart. For SON, we need override the
sap_config channel information with desired channel information in vdev.

Change-Id: Ie01a5dc9c3cd6bbae1bbe246e6f17a329189be50
CRs-Fixed: 3371361
2023-01-13 16:37:41 -08:00
Will Huang
1556ac57f3 qcacld-3.0: Change center_freq_diff from int8 to int32 to avoid overflow
center_freq_diff may overflow int8 when channel width is 320 MHz.
Also clear acs_ch_params before pass it to regulatory API to avoid set
mhz_freq_seg1 which is uninitialized value.

Change-Id: I497ae02c7b53458537e706f2231c0ffef2439961
CRs-Fixed: 3371957
2023-01-06 07:44:41 -08:00
abhinav kumar
bb899849e1 qcacld-3.0: Update logic to get proper channel width for SAP
While processing START SAP req, Host calls wlan_sap_get_concurrent_bw
to calculate SAP BW based on the concurrent channel & STA DFS channel.
The below issues are present due to current logic to calculate SAP BW
in this API:
1. In the case of standalone SAP, this API returns SAP bandwidth as
   80 MHz always, this results in standalone SAP will never come up in
   other BWs.
2. In the case of non-DBS HW, the host is not considering the value of
   INI "g_sta_sap_scc_on_dfs_chan", the value is defined by the enum
   PM_AP_DFS_MASTER_MODE.

By considering the value of STA DFS channel, HW mode, and INI
g_sta_sap_scc_on_dfs_chan, modify the logic to calculate concurrent
as well as standalone SAP BW in API wlan_sap_get_concurrent_bw.

Change-Id: Id521893feb9b6173efc2704f37dfa59f405655e2
CRs-Fixed: 3363394
2023-01-04 11:38:19 +05:30
Liangwei Dong
8b74f67a1b qcacld-3.0: Allow SAP STA SCC on unsafe channel
When g_sta_sap_scc_on_lte_coex_chan = 1, SAP is allowed SCC with
STA on unsafe channel.
Use API policy_mgr_is_sap_freq_allowed to check such condition
in wlansap_get_chan_band_restrict.

Change-Id: I62b3ad83ccdfc80b5e72cad733618326e4fed936
CRs-Fixed: 3368195
2022-12-28 08:11:28 -08:00
Jianmin Zhu
c7369d8419 qcacld-3.0: Fix DFS issue when puncture enabled
If some 20M sub channels are disabled for puncture, bonded freq state will
become CHANNEL_STATE_DISABLE, while CHANNEL_STATE_DFS is expected if
DFS freq is included to pass CHAN_DFS_CFREQ2 to F/W by vdev start wmi cmd.
the check also happens in several other places.

To fix it, use API wlan_reg_get_5g_bonded_channel_state_for_pwrmode to
replace wlan_reg_get_5g_bonded_channel_state_for_freq and
wlan_reg_get_bonded_channel_state_for_freq.
set is_create_punc_bitmap of ch param as true, then bonded freq
state will become CHANNEL_STATE_DFS after
reg_update_5g_bonded_channel_state_punc_for_pwrmode called.

Change-Id: I3e5214e9e09ac2a959f6fa7d641173a80a3980a7
CRs-Fixed: 3360820
2022-12-20 14:18:45 -08:00
Utkarsh Bhatnagar
377a632f72 qcacld-3.0: Change sap Channel if unsafe during cac
While doing CAC for moving SAP to DFS channel, channel
avoid event can be received. While in CAC is going on,
the current sap channel is not updated and remains the
channel on which sap was before CAC. It is only updated
after CSA. So, when channel avoid event is received,
it is checked against the previous frequency and hence,
no action is taken as the previous frequency is part of
safe channel. This results in sap starting and remaining
in Unsafe channel.
As, a fix when sap starts after CSA, check for unsafe
channel and if the sap frequency is unsafe then restart
it to another channel.

Change-Id: I910b80fe87fc149f25e84383b128a5e5c9d269e4
CRs-Fixed: 3287239
2022-12-09 01:06:30 -08:00
Will Huang
1ad545d3d7 qcacld-3.0: Add SAP channel auto selection DCS callbacks with AFC
Add channel tx max power factor to existing ACS channel weight logic,
so if AFC available can automatically select Standard Power channel
which has higher 6 GHz tx power and better performance.

Add SAP best channel selection callback when AFC triggered DCS,
DCS module will invoke this callback and dynamic switch to best
channel/bandwidth if possible.

Change-Id: I300057c2b11d0b818f4e20ba51d6ab9b82f6a3ff
CRs-Fixed: 3204199
2022-12-08 07:40:20 -08:00
Paul Zhang
64e62fbb3d qcacld-3.0: Fix about extended supported rate wrong
After starting SAP on channel 6, then issuing setChanChange
command. Per the sniffer log, the rate list of extended
supported rate is wrong in the beacon and probe response.

It is happens because in wlansap_fill_channel_change_request,
when it copies the extended supported rate list, it uses
parameter sizeof(dot11_cfg.ext_rates.numRates) instead of
dot11_cfg.ext_rates.numRates, so it only copies the first rate.

Change-Id: I7f23254fbd6ce56be69dbea634d9d99f3b611448
CRs-Fixed: 3345554
2022-12-02 12:28:59 -08:00
Surya Prakash Sivaraj
9387f3974b qcacld-3.0: Update NO_IR flag of indoor channel dynamically
In current design of sta+sap scc on indoor channels, the NO_IR
flag of all the indoor channels are removed during init.
Then, based on the operations on the SAP interface, the
SAP concurrency will be decided in host driver.

However, some userspace p2p applications, do not query the
pcl list from driver, therefore standalone P2P GO are sometimes
brought up in indoor channels.

To fix this:
1. Upon STA connect: Remove the NO_IR flags only from the
indoor channels to which the STA is connected.
2. Upon STA disconnect: Add the NO_IR flag back to the
disconnected channel.
3. Upon STA roam/csa:
    a) Add the NO_IR to the new channel if it is indoor.
    b) Remove the NO_IR of the previously connected channel
       once the SAP/GO(if present) moves out of the indoor channel.
4. The NO_IR flags should be removed for all the bonded channels
on which the STA is active.
5. In indoor concurrency cases, add logic in the SAP start to
limit the channel width with the STA interface bandwidth. Since,
only the bonded channels are active channels.

Change-Id: Ib0b30e1f17d0eb944c72b26bb679bf7447b9032f
CRs-Fixed: 3296208
2022-11-26 19:23:34 -08:00
Jeff Johnson
00c4713e4d qcacld-3.0: Fix sap_channel_sel() prototype
Fix sap_channel_sel() prototype so that it matches the documentation
as well as the implementation.

Change-Id: I99ef2ff6e867b2124bb534bb12ba0f5818f8e0a4
CRs-Fixed: 3330730
2022-11-14 11:11:26 -08:00
Divyajyothi Goparaju
dc01aca04d qcacld-3.0: Replace wlan_reg_set_channel_params_for_freq
Replace all occurrences of
wlan_reg_set_channel_params_for_freq  API with new API
wlan_reg_set_channel_params_for_pwrmode.

Change-Id: I7ae94a7004803a96caeb7a77d03065096afe5f0e
CRs-Fixed: 3144793
2022-11-01 09:17:39 -07:00
Paul Zhang
bc894a28b6 qcacld-3.0: remove duplicate code logic and race condition
Currently, there is duplicate logic in function
wlansap_roam_process_ch_change_success to invoke
function wlansap_start_beacon_req.
  a\ wlansap_roam_process_ch_change_success ->
	wlansap_start_beacon_req(sap_ctx)
  b\ wlansap_roam_process_ch_change_success ->
	sap_fsm -> sap_fsm_state_starting ->
	wlansap_start_beacon_req(sap_ctx)
This causes fw crash since it sends vdev up twice.

Also in SAP + SAP scenario, there is a race in updating global
variable mac_ctx->sap.SapDfsInfo.sap_radar_found_status. Move the
variable to sap_ctx per vdev to avoid such race.

Change-Id: Iaac9e5a649ea5fd6a8378f6da47c51112fbe8d18
CRs-Fixed: 3310317
2022-10-26 17:18:08 -07:00
Liangwei Dong
be5cc24258 qcacld-3.0: Fix unsafe check failure for SAP
With MACRO FEATURE_WLAN_CH_AVOID_EXT enabled,
"restriction_mask" can only be checked if
coex_unsafe_chan_nb_user_prefer = 1. If the INI
coex_unsafe_chan_nb_user_prefer = 0, do not need to check
"restriction_mask". It will remain uninitialized 0.

Change-Id: If7bd1223ee3779b72fadb40e622f682db03f4ea5
CRs-Fixed: 3287634
2022-10-25 10:11:13 +08:00