Limit num_channels to be less than NUM_CHANNELS to fix potential
out of memory access when calling add_sbs_chlist_to_pcl in the
policy_mgr_get_channel_list.
Change-Id: I58fdbc67b7692c7d1dff5aca6cbd6dc67115a65c
CRs-Fixed: 3416540
Rename policy_mgr_is_ll_sap_present() into
policy_mgr_is_vdev_ll_sap(). As this api mainly checks
whether the given vdev is ll sap or not
Change-Id: I7f87aceeb0ed6ac5bb7014db1fd6213e62e6305e
CRs-Fixed: 3413644
Handle link removal for ML STA vdev:
Send force link command to target if MLO STA link number > 1.
Select other inactive link to active if possible.
Change-Id: I40567364ad240399caf6be6683b96d17f6a4aab0
CRs-Fixed: 3352849
Currently, while fetching pcl for some vdev id, host driver retrieves
the number of ML connection and provide as max index value for vdev list
and info array. This max index can't be more than
MAX_NUMBER_OF_CONC_CONNECTIONS from functionality perspective.
But static analyzer tool complains that there are chances for out of
bound access of the given arrays while filling the indexes.
So, to fix this, add checks to avoid any such possible out bound access.
Change-Id: I09261e23620df5fc73887c9e5633b408afa66796
CRs-Fixed: 3412348
Currently, if there is a legacy connection and a new STA
connection comes up with EMLSR capability, Host does not
advertise EML caps in assoc request. But there is no support
to enable EMLSR mode if the legacy connection goes away.
Thus, add support to handle this concurrency scenario as
follows
1) Host should advertise EML support capability in assoc
request.
2) After association is complete, force disable one of the
EMLSR links.
3) Once the legacy connection goes down, re-enable the
disabled link.
Change-Id: I5d9f37827e2a9f0571fa9733b4779668bd987f92
CRs-Fixed: 3363115
For low latency SAP, scan is not allowed on same MAC on which
SAP is up. So, consider HOST_CONCURRENT_AP_POLICY_XR when scan
list is required to be updated for low latency ap profile.
Change-Id: I6e25cd67298c16dee211edf6526be101054bd787
CRs-Fixed: 3404641
Add support to force enable/disable MLO links in MLSR mode
based on link mac address. The input will be an array of
active link mac addresses. Force enable the links associated
with all the mentioned link addresses and force disable the
links associated with mac addresses that are not given in
the input.
Change-Id: I14660f14ba6381da04460b641f971734c03aa9a7
CRs-Fixed: 3391992
In multilink ML STA, if one link is removed by AP, and no other
active link, trigger roam by roaming invoke command.
Change-Id: I61d9413e2102315b258f946af2193f7cfb7b91aa
CRs-Fixed: 3352870
Add new parameters to specify link inactive vdev list to
support new MLO_LINK_FORCE_MODE_ACTIVE_INACTIVE mode.
Change-Id: Ia51d2c77680b207bb5fb1bb5fbd91f2fd0ad5fd9
CRs-Fixed: 3352809
In SAP+NDI DBS case, SAP channel is changed for channel avoid event,
policy_mgr_update_indoor_concurrency is called, and country_change_work is
scheduled, but blocked for channel switch is already in progress,
both SAP and NDI adapter hold ref NET_DEV_HOLD_COUNTRY_CHANGE_UPDATE_SAP.
At same time, NDI interface is destroyed, assert when found ref leaked.
To fix it, for 2nd CSA req (found CSA in progress already), don't
block, just log and return.
When channel change finished, policy_mgr_check_sap_go_force_scc is called
to check whether new channel change required.
Change-Id: I0bb3b35265f77d949b3c2916ee1ba95a8239c61c
CRs-Fixed: 3396079
Current code will force SAP restart on other channel when SAP/STA scc
on indoor channel and STA get disconnected. If indoor channel support
is enabled, SAP shall be able to start on indoor channel alone. So add
indoor channel support check before making SAP restart decision.
Change-Id: I3666f11cda75984636bdda9160bb8232d64615d6
CRs-Fixed: 3379903
In STA+SAP / GO concurrency, SCC is enforced by moving SAP / GO
to STA's operating channel. STA side, if there is a CSA
then SCC will be enforced only after STA moves to new channel.
In usecase of STA + GO SCC on DFS channel, CSA is sent with no-TX
and STA's movement will only happen once CSA count becomes 0.
This will block data transmission till then, which will have bad
user experience in case of XR where, it needs to have periodic data
transmission in every 1 second with GO interface.
This new INI is added to handle this scenario where SAP / GO will
move first followed by STA.
Change-Id: Id642872da4f3403a5168a2fad58b4c971cd88288
CRs-Fixed: 3380861
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 API to use supper channel list. Replaced
wlan_reg_get_5g_bonded_channel_state_for_freq API to use the
super channel API wlan_reg_get_5g_bonded_channel_state_for_pwrmode
Change-Id: If5d40a704efa3130da63ba20f163aa2e0e027be4
CRs-Fixed: 3143058
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
Introduce diag logging support for Neighbor report and
beacon report via event id EVENT_WLAN_NBR_RPT and
EVENT_WLAN_BCN_RPT.
For Neighbor report token, ssid, report number, frequency
list and frequency is sent. For Beacon report token, mode,
operating class, channel, duration, request_mode and report
number is sent.
Change-Id: I7ef407fa729e608ad0a7036f024acbf8b5180181
CRs-Fixed: 3370758
1. If CSA failed for last CSA in progress, can't stop SAP, SAP stop and
SAP CSA concurrency may lead to assert.
2. When access global var like pm_conc_connection_list, always need add
lock protection.
3. During CSA in progress, NAN CSA don't block current thread, just
return.
4. When SAP CSA completed, need check whether need CSA again for NAN
started during CSA.
Change-Id: I076ecad7395a265bbe83aaf97617a9a8b6c8b41a
CRs-Fixed: 3357265
Currently some channel list modifications for SAP and P2P GO mode
are present in policy_mgr_get_channel_list, whereas separate APIs for
SAP and P2P GO specific channel list modification are present, hence
keep all the mode specific channel list modifications in respective
APIs.
Change-Id: I393fbad12f29c761c1158fc5eb4ba0ebd6a660b6
CRs-Fixed: 3321108
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
When vdev_mac_entry is NULL, update the hw mode index as well
to avoid mismatch between host and target.
Change-Id: I67bd91af8c72dcc468c128e266e7074308de04c0
CRs-Fixed: 3342565
Host driver tries to fetch info of disabled ML links from
pm_disabled_ml_links by passing arrays to fill vdev_id_list,
freq_list and ml_idx list. Disabled + enabled links together can't be
more than MAX_NUMBER_OF_CONC_CONNECTIONS from functionality perspective.
But static analyzer tool complains that there are chances for out of
bound access of the given arrays while filling the indexes. Add checks to
avoid any such possible out bound access.
Change-Id: Icff77f9700c782f05e10c1d0aee8e1f238b0cc94
CRs-Fixed: 3344532
Clean up code for sme_get_valid_channels() and
sme_get_roam_intra_band() apis and
replace it with ucfg api.
Change-Id: Ic2f07e2193186d1e1ac81f6e5909417c10ab9c89
CRs-Fixed: 3335898
If sta connect to an AP at 5 GHz DFS channel, P2P-GO open and would
scc on the same channel. We don't expect filter out the DFS channel
from PCL list.
Change-Id: Idd8707d7aea908d17d720b54c0228a131cf17fcd
CRs-Fixed: 3345700
The mandatory channel policy was created for STA + SAP 2 vdev concurrency
case. For MLO STA (2+5/6) + SAP 3 vdev concurrency case, use general
force SCC logic until the requirement is updated in this case.
Change-Id: Ifca16824d53f272adc5b6ff763c1b4cc08af6a2f
CRs-Fixed: 3347722
When dual sta connected as SBS mode instead of dbs mode, driver didn't set
pcl per vdev, so dual sta had same PCL in firmware, MCC may happened after
roaming.
Fix:
1. Host pass roaming MCC disallow flag to F/W by checking primary vdev id.
2. For platform SBS supported, when doing dbs or sbs, send PCL from table
to F/W directly, allow SCC and SBS<->DBS roaming, don't limit to intra
band, only avoid mcc case if no primary vdev.
3. Use policy_mgr_concurrent_sta_on_different_mac to replace
policy_mgr_concurrent_sta_doing_dbs, add logic to consider SBS when set
PCL to F/W.
4. Change dual sta PCL table to remove mcc channels.
5. When STA channel switch, also update PCL to F/W.
6. For roaming case, do vdev level PCL update for all sta after connection
update in policy mgr, or wrong PCL is got.
Change-Id: I631c84c96da2bba4011b69e4c076db174205c874
CRs-Fixed: 3336768
While SAP doing CSA, NAN enabled, SAP tries to do CSA to force SCC with
NAN in scheduler thread, since last CSA in progress, scheduler thread is
blocked to wait last CSA finished, CSA timer can't be handled in scheduler
thread any more, last CSA can't finish, deadlock happens until timeout.
To fix it, let SAP force scc with NAN logic run in work thread instead of
scheduler thread.
Change-Id: Icb774ffcfc70f279ba3b18b3c5cd4a169180e99b
CRs-Fixed: 3344905
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
Pcl len is always 0 if existing interface is not LL SAP.
As part of fix, return original pcl len if LL SAP is not present.
Change-Id: I51b308483364f40da03f6f9f4daea1a1f3b72019
CRs-Fixed: 3342540
Currently probe request is sent every 200ms during join timeout
this can lead to 16+ probe req, send during join time.
Change logic to send max 5 probe req during join time,
if candidate freq can lead to MCC concurrency scenario.
Change-Id: I7956771e2cf6724754f59c6db5b07fb45426ae41
CRs-Fixed: 3338329
In 11be capable configuration, for connection attempt
to MLO AP from non-MLO type vdev, downgrade to 11ax
mode association for that vdev.
User can still connect in ML mode from MLO type vdev.
Change-Id: I1e7cf940a778a20f2f4d5d24283ffb6aae52781b
CRs-Fixed: 3312163
In policy_mgr_get_index_for_ml_sta_sap_hwmode_sbs,
if SBS supported, at least one share type should be
supported.
Fix the missing check of Low share SBS.
Change-Id: I9ab848bab9ae8eb5c9d4bb85022b83be92e4c1e9
CRs-Fixed: 3338956
In SBS disabled, STA connects to MLO AP, then start P2P GO on 2.4 GHz.
The non SBS 3rd connection PCL table doesn't support such combination
and P2P GO start is failed.
Fix by add P2P GC/GO valid PCL type for PM_STA_STA_DBS_2x2
Change-Id: I8d36a11ca0005a25d17187100124e355fcb945ca
CRs-Fixed: 3334208
Kernel doc mismatch in policy_mgr_are_sbs_chan(). Correct it
by adding proper argument.
Change-Id: Ic72659df96bac1f98323ec7a9d339d0a975434a0
CRs-Fixed: 3336165
Policy manager restricts concurrent ML SAP and ML STA
operation in existing rules.
Allow atmost one ML SAP to exist and disallow any secondary
ML SAP start BSS.
Allow ML STA even if ML SAP is present, as only one ML SAP
is allowed, remove the code check for is ML SAP while checking
concurrency rules for ML STA.
Change-Id: Icced604c1685eaf00452b240d816fdd8bc2a97d2
CRs-Fixed: 3331402
If ml sta is not "connected" state, no need to do link state handling.
After disconnected, target will clear the force active/inactive state
and host will remove the connection entry finally.
After roaming done, active/inactive will be re-calculated.
Change-Id: Ic9ba3e3ef704b3dcdd8185e9b0864a9cbac000c7
CRs-Fixed: 3322063
With 11be mlo, the number of open station interfaces is 3.
Modify the check in policy manager api for the same.
CRs-Fixed: 3320739
Change-Id: I89166ebdf1559cde6f77f5a5c535e5f2e81eefc5
Currently, roaming is disabled with requestor "RSO_CONNECT_START"
on the STA when concurrent P2P-client is connected .
It's re-enabled once the P2P-client is disconnected but with
requestor RSO_INVALID_REQUESTOR. Roaming module still doesn't
re-enable roaming as it expects roam-enable command from the
requestors(i.e. RSO_CONNECT_START in this case) which disabled
roaming.
Pass right requestor to re-enable roaming.
Change-Id: Icb3deeed788ca248391b4b84288229aea2bdb8c2
CRs-Fixed: 3330219
For MLO STA+SAP case, mlo link maybe in inactive state after
connected and the hw mode maybe not updated, check MCC/SCC by
policy_mgr_are_2_freq_on_same_mac may not match MCC/SCC state
after the link is activated by target later. So to check frequency
match or not to decide SAP do force SCC or not if MLO STA 2 links
are present.
Change-Id: I614e6879cf4f9614b979fc3c78f87b76fc6c7c16
CRs-Fixed: 3313043
If existing STA+STA is MLO STA, the current HW mode is not
reliable because the STA link maybe inactive. HW mode may
change if MLO STA becomes active.
Add special handling to this case by checking MAC frequency
range to decide DBS or SBS.
Change-Id: I4d3728965d2f687805535abb0716bb1b58e1c51d
CRs-Fixed: 3328517
In concurrency case: GO on 5180 MHz, SAP on 5765 MHz,
MLO STA vdev 0 5180 MHz, MLO STA vdev 1 2462 MHz.
When the MLO STA is up and driver does force SCC on
SAP, the get PCL is failed because the GO vdev,
MLO STA vdev 0 and vdev 1 are all non-SBS channels
between each other. Driver doesn't handle the case in
policy_mgr_get_index_for_ml_sta_sap_sbs if current
hw mode is SBS. This case can happen the mlo sta link
vdev is inactive after get connected.
To fix it add new API:
policy_mgr_get_index_for_ml_sta_sap_hwmode_sbs to
handle it. It will return the correct PCL index
to avoid 3 home channels on same mac.
Change-Id: Ia16f8a391b34fc15287a93590b2c119d58250e20
CRs-Fixed: 3326358
Don't allow ML links to form MCC, if second
ML link is trying to form MCC then send disable
to FW and FW will decide which link to be disabled
to avoid MCC. Similarly if any SAP/P2P link disables
then ML STA link shouldn't enable back if it can cause
MCC with existing ML link.
Change-Id: I9bd8e257ad3fc3ee54d9e9d79c66962469b0b827
CRs-Fixed: 3313944
For eMLSR mode, the lower 27 bits of hw_mode_config_type
are HW mode and higher 5 bits are MLO Cap flag.
To update MAC frequency info correctly, get hw mode type
for eMLSR by macro WMI_BECAP_PHY_GET_HW_MODE_CFG().
Change-Id: I18a0afb26985b6ccda091fa1564713af0260353f
CRs-Fixed: 3314401
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
Currently CH_WIDTH_MAX is set as default BW when sap do restart,
then apply some checking rules to get the final BW. It's possible
the final BW is greater than sap original BW. But a greater BW
isn't expected in some use cases where greater BW may introduce
some unexpected issues.
Add INI to configure sap original BW as default BW when do sap
restart as required.
Change-Id: Ie274a3eea73c2af9424a8b9ce21bee34eeaaef2e
CRs-Fixed: 3315486