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
If STA is present on non-preferred channel i.e. 12, 13, 14 and SAP
ACS channel list is 1-11 then MCC is preferable as SAP don't want
to come up on non-preferable channel.
Change-Id: I82bd707c26258e0bf0b7cc14657185d11f56f757
CRs-Fixed: 2922824
At present check SAP on DFS is based on primary channel,
it doesn't work for 160M case. Use "sap_operating_on_dfs"
to do the check before deliver CAC Start event.
Change-Id: I3896dc2738da16b9bff0d54826191d0edcc251a4
CRs-Fixed: 2929729
Send correct channel frequency to sap_get_bonding_channels
to prevent ACS to fail for SAP.
Change-Id: I93ffd0e033cabb30d33d23ab26f656e0f0659d4f
CRs-Fixed: 2928495
As part of regulatory cleanup, wlan_freq_to_chan() is removed.
Use wlan_reg_freq_to_chan() instead of wlan_freq_to_chan()
Change-Id: I18d7996a0b117de90cd32f2208702d01655ceeb9
CRs-Fixed: 2926114
Use wlan_reg_chan_has_dfs_attribute_for_freq API to check DFS
attribute flag instead of unused wlan_reg_chan_has_dfs_attribute
API as part of regulatory clean-up effort.
Change-Id: I7ff75f56ebd641d500c365f756526b787986dcbe
CRs-Fixed: 2908159
Currently, DUT is able to detect the radar event
causing channel switch even if disable dfs channel
switch ini is set. Due to this, there is a chance
of unwanted CSA.
Adding check for disable dfs channel switch ini before
detecting the radar. If gDisableDFSChSwitch = 0 then
detect the radar event else ignore the radar event.
Change-Id: I977d93e47ee35026662d55a8e292c8790ddc7d31
CRs-Fixed: 2905871
API sap_indicate_radar needs to return sap current
frequency instead of channel.
Change-Id: I62a4aae0604b11587a14d17d4c641262b8019ab3
CRs-Fixed: 2900489
Channel number may be same for different bands due to which
non-dsrc channel may be treated as dsrc or vice-versa.
Fix is to find channel is dscrc or non-dsrc based on frequency.
Change-Id: I349172713dda6880771e14231aeb1b4419a86e01
CRs-Fixed: 2902986
Remove all of the conditional compilation for pmf since this
feature is mandatory for future scope from protocol point
of view.
Change-Id: Id3a2127e9ecb343ad2a0354dcbc331c22167d7fb
CRs-Fixed: 2852630
As chan num may be same for different bands, getting chan state
from channel number may provide incorrect chan state.
Fix is to get chan state from frequency instead of channel number.
Change-Id: Iaf379614d8e536dba2cde71b9294a5a4b018769a
CRs-Fixed: 2869828
To make it generic, rename the flag QCA_WIFI_NAPIER_EMULATION
as QCA_WIFI_EMULATION.
Change-Id: I8e654262a38a7a701a5a34e2bbd5394c8985c65a
CRs-Fixed: 2871313
When SAP operated in channel 36 with 160Mhz, the primary channel
36 is non-dfs and existing checking dfs will drop the radar event
if the radar detected on channel 52. Change policy mgr API to
check the dfs flags instead of primary channel state.
Change-Id: Ie2f242182b8df30e5d1875e278c5ebffa2e7cafd
CRs-Fixed: 2865173
When selecting channel for SAP to operate on, it searches,
calculates, and sorts the channels. Each of these steps produces a lot
of prints, so rate limit them to prevent a time out.
Change-Id: If78c7a4f840bf9353f42dd544134ee690637d22e
CRs-fixed: 2865639
Extend type of the variables for the number of MAC addresses
in ACL, from 255(uint8_t) to 65535(uint16_t).
With this change, it can support up to 65535 MAC addresses in
theory, after modifying the MACRO 'MAX_ACL_MAC_ADDRESS'.
Change-Id: I32288e46ea4590ebaaa143b2cdca7cefd14997c4
CRs-Fixed: 2856707
Use wlan_reg_legacy_chan_to_freq api for channel to
frequency conversion instead of wlan_reg_chan_to_freq.
Change-Id: I06a2638a1e402dc6a750c672ed803e8dbfa254fc
CRs-Fixed: 2853575
There are CSA IE/beacon template cmd with duplicate IE COUNT: 10.
And interval of 2nd IE COUNT: 10 and IE COUNT: 9 is much less than
100 ms.
Radar is triggered, tried to switch to channel 11, but set
target chan id 11 as frequency 11 wrongly, frequency 11 is illegal
and disabled, then switch to new freq: 2412 again.
Change-Id: Id2e5823795ae2f61e6d7cbbbc91c4f485ddeceb3
CRs-Fixed: 2838113
While pre cac is in progress and if the SAP is stopped from UI, It may
lead to dead-lock due to rtnl lock. This is because, stopping SAP will
trigger the stop_ap first and then hostapd_stop. Stop_ap will schedule
a work to handle pre_cac failure (Thread1). hostapd_stop will be
triggered in parallel (Thread2). This will result in a below dead-lock
scenario.
Thread1: Waiting to acquire rtnl_lock to unregister pre_cac adapter.
Thread2: Acquired the rtnl_lock and waiting for Thread1 to complete
To resolve this dead-lock, unregister pre_cac_adapter during
hostapd_stop without requesting for rtnl_lock.
Change-Id: I222df9ee0d75b16f79c28b7cdd86369c340a15c2
CRs-Fixed: 2832256
Allocate sap_ap_event instead of using stack variable
in function sap_signal_hdd_event.
Change-Id: I9716479ab35b0ba76844c6fae4886acb205902cc
CRs-Fixed: 2830469
At present when user trigger SAP move to unsafe channel,
driver doesn't reject the request since "strict = false"
and unsafe checking is skipped.
Fix by check SAP channel switch target channel safe or
unsafe with API policy_mgr_is_sap_freq_allowed before
perform channel switch.
Change-Id: I2950fb31346df8705c8fc608fd79e1a44f4d4947
CRs-Fixed: 2826619
Set chanlist=52-64 and channel=0 in hostapd.conf.
After ACS, SAP setup on channel 52, during CAC, Receive channel avoid
event with unsafe channel list 52-60.
Observed Results:
CAC completed, SAP brought up on channel 52.
Expected Results:
channel avoidance should happen, switch to safe channel, such as 36.
During CAC, SAP is not in SAP_STARTED state, so channel avoid event is
ignored.
Fix: After CAC completed and SAP started, check current channel,
if unsafe, will find safe channel from PCL and switch to it, dbs and scc
is preferred.
Change-Id: I54f9229825a74e1f4c03c156a8b194a321581b57
CRs-Fixed: 2773833
Add a check for passive channels when checking the restricted
bands on SAP. This change blocks SAP from restarting on a passive
channel.
Implement the function to filter out passive channels from the PCL.
Change-Id: I80a4b78c1af77f5bfa68be3163f9e9a78cc6425a
CRs-fixed: 2817589
Check the factors as below to decide whether the channel is
allowed or not:
* If the channel is in LTE coex channel avoidance list;
* If it's STA+SAP SCC;
* If STA+SAP SCC on LTE coex channel is allowed.
Replace policy_mgr_is_safe_channel() with this new function
for sap channel selection and acs channel filtering, to allow
unsafe channels when it's STA+SAP SCC and STA+SAP SCC on LTE
coex channel is allowed.
CRs-Fixed: 2743042
Change-Id: Ic5a84b2628200fe9decf6972f00706f190f04722