Commit Graph

946 Commits

Author SHA1 Message Date
Liangwei Dong
84250fda26 qcacld-3.0: Disable force SCC check for link switch disconnection
If disconnection event is for link switch, do not trigger SAP
force SCC check. And if link switch is in progress, skip
the force SCC workqueue.
And if link is in middle of switching, do not run link force logic.

Change-Id: I4a8bf59ff16dca2caf560eb36e1bc58f7d6a919b
CRs-Fixed: 3590814
2023-09-01 21:01:00 -07:00
Liangwei Dong
0084ccba11 qcacld-3.0: Fix SAP not move back to 6 GHz after STA disconnected
The API wlansap_get_valid_freq was used to get new SAP channel
when country code changed from world mode to non world mode.
In STA+SAP concurrency case, SAP may be force SCC to STA channel
or the other band's channel. And If STA is disconnected, normally
the SAP should move back to original channel frequency on 5 GHz or
6 GHz. But in current code the API wlansap_get_valid_freq will
still be invoked to get new SAP channel based on PCL after STA
is disconnected. It is not expected.

Fix by add new master_ch_list_updated flag to indicate
the master channel list has been changed from 2.4 GHz only to
2.4 GHz + 5/6 GHz and based on the flag to invoke
wlansap_get_valid_freq to get new SAP channel.
The move back to original channel has been handled by
policy_mgr_is_sap_restart_required_after_sta_disconnect.

Change-Id: I33b7a4cda3b45221b45e2aec85069477d0999d4e
CRs-Fixed: 3596546
2023-08-31 11:00:01 -07:00
Will Huang
3375882129 qcacld-3.0: Check if need restart SAP when CAC END
Currently if CAC in progress, it prevent SAP restart happen, if there
is some event like set band command come during CAC wait time, it is
not possible to restart SAP even after CAC END.

Change I54663bdd887e3d591d7fd9ee7ce76572b1ef21f7 moved
check_concurrent_intf to SAP interface manager, which will not invoke
when CAC END, so add policy_mgr_check_concurrent_intf_and_restart_sap
in sap_cac_end_notify().

Change-Id: Ida370804d0c7145b750c9dad5c169b74f9c37cd6
CRs-Fixed: 3586509
2023-08-31 10:59:32 -07:00
Ashish Kumar Dhanotiya
62bd1008e4 qcacld-3.0: Remove duplicate API wlan_get_opmode_vdev_id
There are two APIs wlan_get_opmode_vdev_id and
wlan_get_opmode_from_vdev_id present in the host driver for the
same task.
With this change, remove the duplicate API wlan_get_opmode_vdev_id
from the host driver code.

Change-Id: I7ff45610ff18da9c002e22c5be06f1414d3835bc
CRs-Fixed: 3593560
2023-08-28 21:11:44 -07:00
Ashish Kumar Dhanotiya
fe6d7d0625 qcacld-3.0: Add support for LL_LT_SAP_MODE in policy mgr
Currently PM_LL_LT_SAP_MODE is not handled in policy manager.
With this change add support for PM_LL_LT_SAP_MODE in the policy
manager.

Change-Id: Icfbb3a95dc65225fc7dad5df7dca9306a5029402
CRs-Fixed: 3536491
2023-08-17 21:01:21 -07:00
Jyoti Kumari
28576e40fc qcacld-3.0: Modify sap_select_channel() api
Separate sap_select_channel() into sap_sort_channel() and
sap_select_channel()

Change-Id: I1535b1e7d74fdb0c88f39bede822a7bac1acd05d
CRs-Fixed: 3561190
2023-08-17 09:42:44 -07:00
Jyoti Kumari
4f6b354391 qcacld-3.0: Move tSapChSelSpectInfo structure to mlme component
Move tSapChSelSpectInfo structure from sap component to mlme
component so that it can be use by LL_SAP as well

Change-Id: Ic3c2919054326aca3530071df27d425bb78a699a
CRs-Fixed: 3561182
2023-08-16 13:35:37 -07:00
Will Huang
4428d4840a qcacld-3.0: Allow DFS channel if band restriction restore
Currently if SAP start on DFS channel and band restrict to 2 GHz, it
will move to 2 GHz channel and when band restore it can not move back
to original DFS channel, it may lead to concurrency fail in some 4 SAP
scenario.

Because wlan_reg_is_enable_in_secondary_list_for_freq() only check
channel ENABLE state and ignore DFS state, replace it to
!wlan_reg_is_disable_in_secondary_list_for_freq() so that original
DFS channel can be selected.

Change-Id: Ie39564c51a4a54e76a5df6e639961f82f30d9e16
CRs-Fixed: 3586421
2023-08-16 13:35:15 -07:00
Will Huang
a7b05b29c4 qcacld-3.0: Populate API for SAP to help check unsafe channel
Populate policy_mgr_restrict_sap_on_unsafe_chan() to check whether need
check coex unsafe channel when SAP start on fixed channel, only
restriction_mask from user space configure set SAP bit requires to check
unsafe channel when SAP start on fixed channel. If ACS enable, SAP should
check unsafe channel unless above restriction_mask from user space
configure not set SAP bit.

This change is to change back behavior which changed by Change-Id
I4ccf887655066da6d6b50715f631dde6edfda598, and adjust Change-Id
Ie3947058d8854823a718b833ec788c5c8a14b903 after this change.

Change-Id: If8d26fa7cfdd4ffa44dd2009b4d6939f3d4c49b2
CRs-Fixed: 3525515
2023-08-01 20:28:15 -07:00
Asutosh Mohapatra
4a58eb1c4f qcacld-3.0: Do SAP CSA if bonded channels are disabled
Currently if STA+SAP SCC on a 6 GHz channel is present and
host received SET_FCC_CHANNEL 0 command then host disables
all 6 GHz channels except for STA connected channel. If
SAP's bandwidth is greater than 20 MHz then kernel sends
stop_ap as SAP bonded channels are disabled.

To address this issue, do CSA to a non 6 GHz frequency.

Change-Id: I89edf3c862c5b02f0eb5865428bdbb0d43d07f85
CRs-Fixed: 3563476
2023-07-27 22:24:14 -07:00
Vijay Raj
b02c135bd7 qcacld-3.0: Add key index check for Multi password SAP
In the api wlan_hdd_add_vlan(), key index value check
is not present which can cause buffer overflow.

Add keyindex check in the api wlan_hdd_vlan_sap()
in order to prevent the buffer overflow.

Change-Id: I87c606eed6b4e169d6e059cd5d06342c2bc0adaf
CRs-Fixed: 3560531
2023-07-25 15:21:40 -07:00
Aasir Rasheed
3086b00b54 qcacld-3.0: Add 11be BW 320 in GETSTAINFO
Implement changes to support 11be mode
and bandwidth 320 required for EHT.
Change-Id: I0b5e82e4d5fa0c2f1c8c8921d2b13a111582184c
CRs-Fixed: 3554106
2023-07-25 00:18:57 -07:00
Sheenam Monga
136e98f779 qcacld-3.0: Update master channel list from set wifi config
Initially, if hotspot starts in world mode, it can come up in
2.4 GHz only. Later, the correct regulatory domain gets configured
in the host driver.
Even if this new reg domain supports higher bands and better channels,
the SAP will not be able to move since the ACS list configured
initially is for world mode(only 2.4 GHz channels).

To fix this, after the initial ACS userspace will configure the
ACS channels as per the band preference. Upon new country change,
the host driver will use this updated list to switch to a higher/
better band.

Change-Id: I60524e60798df656b86cbd883a31b00ccd210bc6
CRs-Fixed: 3453679
2023-07-21 01:15:57 -07:00
Abhishek Singh
2f4d5c28be qcacld-3.0: Fix SAP start on DFS freq due to invalid sap fsm state
SAP FSM state is not moved to STARTING from STARTED for DFS freq,
thus CAC complete is not handled in STARTED state and VDEV does
not move to UP state.

Fix this by moving state to STARTING from STARTED for DFS Freq.
Also add vdev id in all FSM logs.

Change-Id: Id8f178d8d7838bdeacdeea50b41dbb19146108c2
CRs-Fixed: 3556248
2023-07-14 01:11:18 -07:00
Liangwei Dong
fa9f2fa5c0 qcacld-3.0: Fix ACS downgrade BW issue
If the all of valid channels in ACS (filtered by PCL) don’t support
320 MHz, sap_sort_chl_weight_320_mhz should return failure code and then
sap_sort_chl_weight_all will downgrade BW to lower one.
But current code doesn't update valid_chans based on channel "valid"
or not in sap_sort_chl_weight_320_mhz, which causes the API
return QDF_STATUS_SUCCESS if some channels (not "valid") support
320 MHz.
"valid" means the channel is in ACS list(filtered by PCL).

Fix by check channel "valid" or not before update valid_chans.

Change-Id: Ia634f28e09f5446a0ca53aebef8af5c003b38002
CRs-Fixed: 3552093
2023-07-12 02:26:38 -07:00
Will Huang
57604f153e qcacld-3.0: Store and delete other SAP connection information if SCC
Currently only store and delete self SAP connection information when
get PCL for mode SAP, if there is other SAP doing SCC with it, the PCL
list may only have SCC channels, but if the SCC channel has unsafe
channel within bandwidth, it cannot move to other safe channel which
has bigger bandwidth.

For example, AP1+AP2 on channel 5240(BW 80 MHz) and AP3 is on channel
2462, COEX AVOID event come and both 5180 and 2462 become unsafe, when
AP1 is going to switch channel it will get PCL list only have 5240, so
it cannot move home channel but just shrink bandwidth to avoid unsafe
channels.

Fix it by also store and delete other SAP connection information SCC
with current SAP if get PCL from get safe SAP channel path:
wlansap_get_safe_channel_from_pcl_and_acs_range().

Change-Id: Ia52c6ac221293036f65173f38cf4b8436629492a
CRs-Fixed: 3534131
2023-07-09 20:07:34 -07:00
Liangwei Dong
414707e48b qcacld-3.0: Fix SAP CSA with invalid BW
If SAP is configured with non 802.11 BE phymode, don't
return 320 MHz BW in wlansap_get_max_bw_by_phymode.
Otherwise, CSA will fail because of invalid BW.

Change-Id: I6fdda48f464bb40b0b88484da4e89f9f91f547e8
CRs-Fixed: 3545596
2023-07-08 11:10:33 -07:00
Deeksha Gupta
5dcc252bb3 qcacld-3.0: Call eSAP_DFS_CHANNEL_CAC_START event from SAP_STARTING state
Currently, In case of SAP CSA, there is a race condition
driver handles the eSAP_DFS_CHANNEL_CAC_START event
from "SAP_INIT" state and move SAP state to "SAP_STARTING"
in schedular thread. Parallelly, if SAP state is used in
hostapd context to handle the event without being updated
which may lead to a assert.

To fix it, handles the eSAP_DFS_CHANNEL_CAC_START event in
"SAP_STARTING".

Change-Id: I01a535c6f86cdf0eff5bb91be870ab33604fb849
CRs-Fixed: 3541842
2023-07-06 04:27:17 -07:00
Surya Prakash Sivaraj
27ea06d358 qcacld-3.0: Retain BW during CSA due to gDisableDFSChSwitch
If "gDisableDFSChSwitch" ini is set, SAP do not change the
channel even if radar is detected. Instead, the SAP is
expected to do a CSA to the same channel. However, during
this CSA, the bandwidth is downgraded to 20 MHz.

To fix this, retain the current SAP operating channel width
in CSA similar to the channel.

Change-Id: I7fa65765ce5f5d249ec65904749af589679dfe3e
CRs-Fixed: 3538115
2023-07-04 15:41:04 -07:00
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