Fix filling of the SBS range, in current freq range.
And Add is current mode SBS in required APIs.
Change-Id: Ief334aa236ad18512ac5d8cf80b3a2d13d77529a
CRs-Fixed: 3093159
"sap_radar_found_status" is used to check Radar event detected
or not in CAC wait state. Clear "sap_radar_found_status" before
SAP starts to avoid the stale value saved in previous sap start or
CSA. This can happen when the SAP is restart state and get
"stop ap" request from userspace. The invalid value will
cause the wlansap_start_beacon_req retrun without deliver start
beacon msg and cause the no beacon in OTA.
Change-Id: I6336510881333e2775c29dcc167a77d5d745ace9
CRs-Fixed: 3085312
Currently, SAP state machine is moved to INIT state when SAP
start is aborted due to timeout or SSR. SAP is not cleaned up
in such cases as eWNI_SME_STOP_BSS_REQ (which further issues
vdev down and cleanup the peers properly) is not sent to
below layers(firmware).
Replace qdf_wait_for_event_completion to
wait_for_completion_timeout in start_bss which will wait
till the normal operation execute irrespective of firmware
state/SSR.
Change-Id: Ifff2ca9658769cb1145f1c5cb278cd7551cb8c00
CRs-Fixed: 3058550
If p2p go+go concurrency exist and g_enable_go_force_scc ini sets
to 2(liberal mode) then 1st p2p go channel should move to 2nd
p2p go channel after set key. Again, when user initiates CSA to
one p2p go then the force SCC doesn't happen to other p2p go.
But the expectation is all p2p go should move to same channel
which is initiated by user.
As part of fix, move all p2p go to same channel when user
initiates.
Change-Id: I1664e5a7d545d29c32b94e8e4831c71a9cc0ae23
CRs-Fixed: 3064245
At present, we select max possible band width for SAP in concurrent of
STA+SAP. If STA is working on 160Mhz, the SAP will follow the same
BW as STA. But customer doesn't want to move SAP to 160Mhz
if the original SAP starting BW is 80Mhz since the 160Mhz SAP will
have DFS limitations.
This change avoid 160Mhz selection for 5G SAP force SCC if
1. the channel switch request is not user initiated and
2. the original BW setting is not 160Mhz
Change-Id: I25a7c2ba6679eab8e3884e5b2332d7ed163de12e
CRs-Fixed: 3068284
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
It may break the vdev MLME SM and lead to unexpected
behavior, if handling a new Radar event when the previous
one is still under processing.
To avoid that, ignore the new Radar event for SAP if it's
already in CSA restart state.
Change-Id: I98a77bb62133e8af660648583b0a2abda57121ab
CRs-Fixed: 3069540
Currently "is_forcescc_restart_required" flag is updated
for first go when any new go comes up. Force scc is
done as part of set key and it is expected that when CLI
joins second GO, first GO moves to new GO's channel but in
case of AUTO GO when no client is connected to first GO
and second GO comes up then "is_forcescc_restart_required"
is set for existing GO but when any client joins first GO
then as part of set key CSA is triggered for same target and
current frequency because "is_forcescc_restart_required" is true
for first AUTO GO. As target and current frequencies are same,
CSA fails and "is_forcescc_restart_required" sets to false. When
CLI joins second GO then CSA for first GO doesn't happen as
"is_forcescc_restart_required" is already changed to false as
part of first CSA attempt.
Fix is to trigger CSA only if current and target session ids are
different.
Change-Id: Ib875cdd93e08f4edc912589b867b733a1d57bdf3
CRs-Fixed: 3067847
Along with 11BE feature macro, check for Kernel 11be macro to avoid
compilation issues when kernel doesn't support 11be.
Change-Id: I9fb84b6263cbdca4cde93e3a581acdbfe0fe2b34
CRs-Fixed: 3066175
In current scenario, SAP is unable to switch from 2.4GHz to
5Ghz if previous CSA happens with reason CSA_REASON_CHAN_PASSIVE.
For instance, SAP starts on 5Ghz with Country US, and later it
changes to country 00 after MCC. Since in country 00, all 5Ghz
channels are passive, so SAP switches to 2.4Ghz with reason
CSA_REASON_CHAN_PASSIVE. Again if MCC happens to country US then
SAP is unable to switch from 2.4Ghz to 5Ghz. This is because
chan_freq_before_switch_band and chan_width_before_switch_band
are not filled in CSA_REASON_CHAN_PASSIVE case.
As part of fix, in wlansap_get_chan_band_restrict(), update the
chan_freq_before_switch_band and chan_width_before_switch_band
incase channel switch reason is CSA_REASON_CHAN_PASSIVE.
Change-Id: I9610b17cff3f6e0e5257270d2fccd5586c9913f9
CRs-Fixed: 3055017
If ini gDisableDFSChSwitch=1 is set to setup dfs test mode,
should disable dfs nol function regardless sap operation
channel dfs or not, because sap's bonded channels may have
dfs channels if bandwidth is 160M.
Fix it by invoke wlan_mlme_check_chan_param_has_dfs().
Change-Id: If42c85a3dd1b83e495d7e6a556a6769c3e9e28b6
CRs-Fixed: 3038252
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
Currently in liberal mode STA+GO and CLI+GO scenario is not
handled, so when sta is there and Go tries to come up then
GO should follow STA or CLI's channel in case of force scc
but as handling is not there so Go doesn't consider scc
channel.
Fix is to add handling of STA+GO and CLI+GO for liberal mode.
Change-Id: I227fb0661c5c3a41b296fd0c954ac87675f28ed6
CRs-Fixed: 3048501
Currently driver switches to a random channel when radar is detected.
Easymesh expects ap switching to a given channel.
Add API to set/get given channel. AP should switch to given channel
when radar is detected.
The given channel will be cleared after a radar detection.
Change-Id: I29b97e247583be768842c128e6a3e5d5bfd859f7
CRs-Fixed: 3034735
Channel selection for changing SAP operating channel fails if the ACS
channel list is empty in SAP context. This leads to SAP operating on
disabled channel after country code change. Modified to return successfully
without filtering the pcl in empty acs channel list cases.
Change-Id: If252e9dc4dad300892848d2add85bf121d52ae21
CRs-Fixed: 3042093
if g_sta_sap_scc_on_dfs_chan is 1, SAP can't start on DFS channel except
there is STA/P2P client on it.
When SAP start alone, when select SAP channel after ACS, need remove DFS
channel correctly by valid check.
Change-Id: Ie500816bb0aeae3efd18767e64901bf19bedd6fc
CRs-Fixed: 3036095
INI g_enable_go_force_scc states the force MCC to SCC mode.
Mode 1-strict: Implement force scc strictly as part of start bss
Mode 2-liberal: Turn on p2p go on provided channel and move
first p2p go to the new p2p go channel after set key.
Currently for p2p-GO forceSCC, support is present where no matter
what is the GO negotiated channel in start_bss, driver will force
the other GO/STA/GC channel (on the same band) to the current GO
channel. This is force SCC strict mode where value 1 is used for
g_enable_go_force_scc ini. In this mode GC will have to do full
scan as the GO channel may be different from actual negotiated
channel. DUT may see some issues if GC dosent do full scan in
this mode.
As part of this change, add support for value 2(Liberal mode)
in g_enable_go_force_scc ini. As part of this liberal mode,
driver will allow the GO to start in MCC mode and after set key,
it will check any other concurrent GO and will do forceSCC for
that GO to the newly formed GO channel.
Change-Id: Ifc7beb06335616c51dc064f48a78b825dbdbda25
CRs-Fixed: 2992098
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
When concurrent STA is present and DBS is capable:
If the concurrent channel is DFS channel, make sure
the maximum SAP BW is equal or less than BW of STA;
If it's NOT, and the maximum SAP BW to be set is 160MHz,
reduce it to 80MHz.
Change-Id: Id2460b9d316bf7b91175611687bada0da11d5a93
CRs-Fixed: 3032225
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
Sap is started on freq 5640Mhz with BW 160Mhz and radar event
generated, and then SAP moves to freq 5680Mhz.
But before the move done, the regdomain update (because of Radar
detection) will trigger the wlansap_get_chan_band_restrict to run
and further move to SAP to freq 5180Mhz.
The client side still get old CSA event with 5680Mhz, and switch to
5680Mhz and get Bmiss finally because actually SAP is moved to 5180Mhz.
The band restrict logic should not handle radar disabled channel.
The radar detected channel (in NOL) should be handled by SAP radar
channel switch logic only.
Fix by skip the band strict check if disabled channel is in NOL
list, let the SAP radar logic to handle channel switch.
Change-Id: Ic284cf48653d7ebf8bc37a33d6caf1a5e673b78e
CRs-Fixed: 3019950
When AGO starts ACS with 160Mhz, and driver selects 5660Mhz based on
channel weight because no 160mhz channel available at the time.
But ch freq 5660Mhz is not in PCL for AGO, driver selects 5825Mhz
based on channel weight. 5825Mhz only supports 20Mhz in current
regdomain and it's not preferred channel bw.
Fix by try fallback to lower bandwidth channel if request bw channel
unavailable.
Change-Id: I5646aefc5fbd48acb1396edf0e182616391e027c
CRs-Fixed: 3018731
AGO started on 5220Mhz with BW 160Mhz, later Radar detected and
switch to 80Mhz by sap_indicate_radar API.
Sap_indicate_radar will overwrite sap_ctx->ch_params.ch_width to 80Mhz.
After commit I26ff00286b8e0cec33d3a63098f93d4000684df0,
sap_operating_on_dfs API will use sap_ctx->ch_params to check SAP
on DFS or not to decide channel switch for current ap.
This case sap_operating_on_dfs will return "false" for current
SAP (160Mhz), and then the Radar channel switch is not processed
by driver.
Fix by using the mlme API to get current SAP channel and dfs flags.
Change-Id: I1bbcc185c13cf6e40b9f5415cbdceb7ff3527470
CRs-Fixed: 3016683
Remove the usage of csrPersona from csr_roam_profile
and the unused wlan_sap_get_roam_profile function.
Change-Id: Ic7621c5e178a141b7e6e9d820d71fadfbff071ed
CRs-Fixed: 2998988
from csr_roam_profile
In the SAP module, remove the usage of ch_params and
op_freq from csr_roam_profile. Instead, the SAP module
uses ch_params and chan_freq from sap_ctx.
Change-Id: I26ff00286b8e0cec33d3a63098f93d4000684df0
CRs-Fixed: 2998985
In the SAP module, remove the usage of phyMode from
csr_roam_profile. The SAP module uses phyMode from
the sap_ctx directly.
Change-Id: I6ca484901f29dfa35405dcdcb88e25cc09f498d6
CRs-Fixed: 2998982
In sap standalone on 5G channel, when LTE unsafe event
shows the SAP working on unsafe channel, SAP moves to
2G channel because the current logic will select
safe channel from ACS list.
The preference is 5G safe channel if available.
This change will select safe channel in same band firstly
from the list.
Change-Id: Ibc45a05845692b0dd8a02fd98aef2f7b15d00729
CRs-Fixed: 2996401
For ETSI, CAC duration is different between DFS and weather channel.
Update cac_duration_ms and dfs_regdomain in sap_ctx before
switch to new channel, to avoid DFS CAC duration used for
weather channel, or vice versa.
Change-Id: Ie83779b9948bdd3bd212994c2438257793a9e347
CRs-Fixed: 2995526
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
In sap_goto_starting(), update phymode and channel width
correctly incase there is mismatch between phymode
and operating channel frequency.
For instance, in case when operating frequency is in
5 Ghz band, phymode 11g is incorrect and should be
changed to 11a. Also, if phymode is 11a for 2.4 ghz
band, it should be changed to 11g.
Also, if phymode is of legacy type such as 11a or 11g,
channel width should be restricted to 20 Mhz.
In case of 11n, channel width should be restricted to
40 Mhz, if it is more than that.
Also, update the width from vdev as if not updated
there can be a case where there are different bw
in vdev and sap context.
Change-Id: I3df06c0f5bb0f4eb5ffc77317efbeaa88d998427
CRs-Fixed: 2976056
In wlansap_get_csa_chanwidth_from_phymode(), update the
channel width correctly incase when SAP starts on 2.4GHz
and channel switch happens on 5GHz channel with BW 80 MHz.
Currently host modify the BW according to the original BW
20MHz is incorrect, it should be changed to 80MHz.
Update the BW correctly, it should not be limited to orig BW.
Change-Id: I9baf89d89eeb6407c7cda931b332bced38cc2154
CRs-Fixed: 2974565
CSR/SME use connect/disconnect API as these were common between
STA/SAP/NDI, but as connection manager removed the STA related code
from SME/CSR, rename the functions to represent NDI/SAP start/stop.
Change-Id: I7875e163f1976627e521308813ad3e1ed279a906
CRs-Fixed: 2981040
Host creates a precac adapter and uses it for all the precac
request instances from userspace. To avoid cac state impact
of previous instance on current precac request, reset the
cac_state before starting a prepcac adapter.
Change-Id: I8bb7a2d10350eeeafaac9bea60947a52a1e8686e
CRs-Fixed: 2970505
As part of regulatory cleanup, remove utils_dfs_mark_leaking_ch()
Use utils_dfs_mark_leaking_chan_for_freq() instead of
utils_dfs_mark_leaking_ch()
Change-Id: I796de0abb50fdbdf9d61768a190553e031a7989e
CRs-Fixed: 2972007
Add support for QCA_NL80211_VENDOR_SUBCMD_GET_RADAR_HISTORY vendor
command. This command will return the current NOL list in driver
and the last Radar detection result in previous SAP active state
(includes CAC state).
Change-Id: I719630c39b89c1813ca05c4356dce627d72d82e2
CRs-Fixed: 2966501
Without this change, wlansap_set_channel_change_with_csa() only allows
parameters with new frequency. Enhance it to support width only change.
Change-Id: I5855db5d43cbb8bc63ff70f2bd792b447cd88809
CRs-Fixed: 2960232
Assign the sap_ctx->ch_params from the whole struct of
config->ch_params. This is to fix some fields missing
in sap_ctx->ch_params, such as "mhz_freq_seg0".
Change-Id: Id6e6be50635001faf45c84d136976cc27f41c7d5
CRs-Fixed: 2962952
Add sanity check mac context before using it in API
wlansap_get_csa_chanwidth_from_phymode.
Change-Id: I8df501e850b606615c899321fc23636ad985ab23
CRs-Fixed: 2955278
Currently driver does not consider secondary channel list
for ACS which needs to be used for SAP related operations and
because of that in sap get freq list driver is selecting some
frequencies which are not valid for SAP operation and from
frequencies driver selects ACS frequency and gives to upper
layer resulting in an invalid ACS frequency to user space.
Now when user space tries to start ap on this frequency, SAP
doesn't come up on this frequecy as this is invalid frequency
for SAP.
To address above issue consider secondary channel list for ACS
in sap get freq list so that only valid frequencies for SAP
are selected for ACS.
Change-Id: Ic7f1cb8134615a9195884d55bfb8111898ff74cb
CRs-Fixed: 2955162
As part of 11BE 320MHz bandwidth support, add 320MHz support for
SAP module, including 320MHz ACS support.
Change-Id: If26d9e62b16bbecbb1ea10c70f42e9a8464a70c7
CRs-Fixed: 2935873
Merge the bandwidth selection of the two API
wlansap_get_csa_chanwidth_from_phymode &
wlan_sap_get_concurrent.
Update 5G Force SCC target Max BW selection for dbs hw:
1. Max BW 80Mhz if sta_sap_scc_on_dfs_chan = 1 and Single SAP
2. Max BW 80Mhz if sta_sap_scc_on_dfs_chan = 0 and STA+SAP SCC
3. other case use User configured BW
The above Max BW value will be limited by SAP user configured
BW at the end.
Change-Id: I1b165d1411288ca6845f90103adbf8bbfc34f67d
CRs-Fixed: 2925750
DFS region MKKN was added to JP, add MKKN checking to
enable the SAP preferred location INI setting.
Change-Id: Ied1e961bd4067946dda131c923e8590f8fe79ae5
CRs-Fixed: 2927114