After CSA to 5180 (unsafe), the sap_fsm_validate_and_change_channel
will call wlansap_set_channel_change_with_csa API to do a new CSA
to safe channel. But wlansap_set_channel_change_with_csa will not
set ch_switch_in_progress flag. Instead, we should use parent API
hdd_softap_set_channel_change to trigger CSA, which will set
ch_switch_in_progress flag. The existing code will do
unsafe check after CSA done in hdd_hostapd_check_channel_post_csa,
so combine the sap_fsm_validate_and_change_channel work into it.
The ch_switch_in_progress missing during CSA will cause another CSA
request being executed while the first CSA is still in-progress. This
is not supported.
Change-Id: I17c9181a32ffc4f35f647db1f957a05b00306bee
CRs-Fixed: 3683289
In LA by default, the max supported SAP interface number -
QDF_MAX_NO_OF_SAP_MODE is 2. In third party framework or using
command line to add SAP interface, the active number of SAP
interface may exceed the number of QDF_MAX_NO_OF_SAP_MODE.
To avoid running into unexpected scenario, add check the active
SAP interface number with configuration of macro QDF_MAX_NO_OF_SAP_MODE
when adding virtual interface.
And in MDM we support 4 SAP, so make the QDF_MAX_NO_OF_SAP_MODE
configurable by Kbuild.
Change-Id: I7b64ae8f580d2b11ab5bd46c9346567f4ceabc39
CRs-Fixed: 3673518
The current host driver maintains a singular global mac session
for the timer. In situations where the SAP timer runs in one context
and P2P operates in another, the P2P GO context might unintentionally
halt the timer in global mac context for SAP.
Scenario:-
Initially host driver created SAP at index zero, After that it created
another P2P GO at index one before calling start bss api host driver
was trying to stop the interface and dfs timer offload was running for
SAP at index zero, As host driver never initialized cac offload for
P2P GO and dfc timer is running on global mac ctx and it was trying to
destroy the timer during hostapd deinit without even calling timer init.
This is due to absence of checks to validate whether P2P initiated
the timer.
This modification ensures that the timer initiates only when not running
in any session and halts only when the mac ctx and SAP context share the
same vdev id.
Change-Id: I77e14f660b946e8d1a815030f11ad36c14fc8bc4
CRs-Fixed: 3615156
Currently if SAP channel switch fail, SAP will be stopped by function
wlansap_stop_bss(), but this function will not clear connection info
in policy manager, it lead to some concurrency check failure, and SAP
stopped event will not notify user space.
Add SAP channel change response status to SAP channel change response
event, and check if status fail schedule worker to stop SAP completely,
so that can notify policy manager and user space about this SAP stopped
event. And do not have to indicate new channel to kernel if channel
change failed. If CSA procedure interrupt by SAP stop, clear channel
switch in progress flag after SAP stopped.
Change-Id: I802404a4ed4948d072525d6e3676866c382eb442
CRs-Fixed: 3586579
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
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
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
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
Add optimization to select the max possible band width
when do SAP LTE channel avoidance channel change.
Change-Id: I82745d47c55ae42f59691a9634a34b0cff2b4e36
CRs-Fixed: 3440166
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
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
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
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
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
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
When driver receive auth request frame with FT algorithm,
offload it to hostapd.
When driver receive (re)assoc request whith FT-PSK in RSN IE.
offload it to hostapd.
Filter FT related IE from hostapd, and append it to the end
of the (re)assoc response frame
Change-Id: Id11cce6898615bb6b0cb361ea7b23ea2014f0bae
CRs-Fixed: 4202696
To reduce the ACS time, there is an implementation wherein one
user space process creates sap interface and queues ACS request to driver,
meantime framework initializes various config and starts hostapd
to queue same ACS request to driver. In this scenario, there is a
race condition that hostapd tries to queue ACS request while there is
already one ACS request is in progress. With current implementation,
driver will reject second ACS request and return error to hostapd
leading to sap turn on failure.
This change allows subsequent ACS request if all the attributes
of do_acs vendor command matches with the ongoing ACS request and returns
success to userspace. There is no another ACS scan queued as part of
second ACS request which is same as ongoing ACS request because the result
of ongoing ACS request will act as result of second ACS request as well.
Change-Id: I67d10b09be922745e7ffb46192e00135dbdb9de4
CRs-Fixed: 3295786
If ACS scan is skipped, then ACS request is completed and vendor
event is sent to userspace in same context, so there is no need to set
acs_in_progress when ACS scan is skipped.
Change-Id: Id3d1235e405832ce66a1b8837dc04e94bb3c6b64
CRs-Fixed: 3296939
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
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
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
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
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
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
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
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
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
Replace blacklist/whitelist with denylist/allowlist in
qcacld3.0. and replace blm with dlm.
Change-Id: I9ba61dde3b3ea008ca3777448d1f8dab83d33ec1
CRs-Fixed: 3091211
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
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
Remove unwanted parameters from start_bss_req and use
the parameters from vdev instead.
Change-Id: Ifea96bf7908b0dae66807b7a346684fe46fdcd4e
CRs-Fixed: 3105488
CAC duration of new channel should be able to get before CSA. During
CSA, CAC duration of new channel is used to populate max channel
switch IE.
Change-Id: I25d430d3eb663c90555ebad7a214b0789ea8c1ce
CRs-Fixed: 3102581
In 3rd party platform, CNSS driver will provide
LTE avoidance channel frequency ranges by API
cnss_utils_get_wlan_unsafe_channel_sap.
Based on requirement, in single SAP case or SAP+SAP
case, ACS channel list should be filtered out based
on vendor unsafe channel frequency ranges.
Change-Id: I583c1bb2583c783858c54e8643fbe1af69d492b1
CRs-Fixed: 3061043
Need save mlo link id and mlo link number information when starting bss.
During reinit, restore mlo link id and mlo link number information.
Change-Id: Ib188cab76d25eae6bb332b3a2ce3deb07825495b
CRs-Fixed: 3039138
If SAE/H2E required by hostapd configure, it must populate in
supported rate or extended support rate set, add host driver support
to check this flag and populate it in extended support rate set.
Change-Id: Id75b5743e93a1a0f1d13150d5436d256e2ca117c
CRs-Fixed: 3016492
ARP response dropped at OSIF due to non-availability
of sta entry with MLD address.
Added sta entry in OSIF/HDD context with MLD address.
Change-Id: Iff70197ca5707b88ea80b42a60a2b1fb383f00a9
CRs-Fixed: 3017249
Remove the usage of csrPersona from csr_roam_profile
and the unused wlan_sap_get_roam_profile function.
Change-Id: Ic7621c5e178a141b7e6e9d820d71fadfbff071ed
CRs-Fixed: 2998988
At present the pre CAC is done based on original SAP's BW,
but usually the original SAP is on 2G and BW <= 40Mhz. The
requirement from user is to have higher BW on 5G. Hence, select
higher BW supported by SAP phymode to do pre CAC and move 2G
SAP to 5G pre CAC channel when pre CAC done successfully.
Also set the default MAX bw pre CAC to 80Mhz based on current user
request.
Change-Id: I3115da8eb649238da50b223c2587db96125ec813
CRs-Fixed: 2984084