Add an API wlan_reg_get_opclass_details, to get the operating class
table details from the regulatory component. Also, add a new structure
regdmn_ap_cap_opclass_t in the regulatory component, to fill members
of the mapapcap_t structure.
Change-Id: I8b6a3867a766038663c10ce2f01a8b7d310c7375
CRs-Fixed: 2580505
The variables center_freq_seg0 and center_freq_seg1 in struct
ch_params are used to represent channel numbers. Their types
were wrongly changed to qdf_freq_t in change ID
e205befb82f643808973286ae578d7add7738eec. Change their type
back to uint8_t.
Change-Id: I13c629850bf207c6088b44c8695167e96dc33476
Add the API wlan_reg_get_opclass_from_freq_width, to give country_iso,
channel frequency, channel width and behaviour limit as input, and get
the operating class as output.
Change-Id: I96c39119ab855d10965b2603e8b15c21699daa68
CRs-Fixed: 2583789
In regulatory non-offloads feature, send conformance_test_limit_2G,
conformance_test_limit_5G, reg_domain, reg_domain_2G and reg_domain_5G
information to firmware using WMI_PDEV_SET_REGDOMAIN_CMDID.
If all these attributes are not populated then CTL power limit is
not applied by the firmware.
Change-Id: I1523ab447aec64ec0af42da32318136f90fd17ca
CRs-Fixed: 2518246
Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:
Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.
Advantage of a smaller size:
When the frequency range is not very large, a smaller size (e.g.
16bit integer) can be used. It saves a large amount of space especially
when many large arrays containing elements of this type/size are
defined in the driver.
Also, change the size of the IEEE channel variables to unsigned
8-bit integer.
Change-Id: Ie205befb82f643808973286ae578d7add7738eec
CRs-Fixed: 2586071
Update the regulatory database with the following changes:
1) Add full reg domain FCC15_FCCA, FCC16_FCCA and FCC17_FCCA.
2) Add associated 5G reg rules and channel bands for the new regdomains.
Change-Id: I2b6038d0f106555adf650c12ca48efcaacc69071
CRs-Fixed: 2582502
Introduce a new DFS domain MKKN that supports new w53 Japan RADAR
pattern only.
Initialize a new empty RADAR table dfs_mkkn_radars for MKKN DFS domain.
Map The 5G regdamain MKK17 to the new DFS domain MKKN to make sure that
the new w53 Radar pulses should be detected only by JP country or
MKK17 5G regdomain.
Change-Id: Ib0f6a7e98353c9930e90703ead2342b932e491e3
CRs-Fixed: 2575347
Remove the unused API wlan_reg_get_5g_bonded_channel_and_state in the
regulatory component
Change-Id: I45c9b083dfb6faf6c97293d54200ed4f15a7d289
CRs-Fixed: 2574154
1) Add the API wlan_reg_get_5g_bonded_channel_and_state_for_freq
that returns the state for a 5G or 6G channel frequency,
based on the channel width and and state of the bonded channels.
2) In the API target_if_calculate_center_freq, remove the instances
of IEEE channel number, and provide regulatory support, with the
channel frequency based structure - bonded_channel_freq and the API -
wlan_reg_get_5g_bonded_channel_and_state_for_freq.
3) Remove the usage of band_info and replace it with reg_wifi_band within
the target_if of the spectral module.
Change-Id: If5108b55097208d33fafb48968ea8b6dc83011fa
CRs-Fixed: 2571906
Move MACRO definition of TWOG_CHAN_6_IN_MHZ out of
ifdef CONFIG_CHAN_FREQ_API, move to public header file,
then other components can use it.
Change-Id: Ieb4b2b167c664246d39949ad4f8d53eda6b9d7de
CRs-Fixed: 2580207
Initialize channel_map to "us" at regulatory init.
Use NUM_6GHZ_CHANNELS to get 6Ghz channel numbers
instead of MAX_6GHZ_CHANNEL.
Change-Id: Ifed996c1a528c8a3c0a29d3959f17dff6d298193
CRs-Fixed: 2949971
Add regulatory APIs reg_get_unii_5g_bitmap and ucfg_reg_get_unii_5g_bitmap
to retrieve the value of "unii_5g_bitmap" stored in regulatory pdev
private object.
CRs-Fixed: 2574642
Change-Id: Iffb004b7fc9d9fbcf1972eb6f527529024e49c70
The 5G cellular RF band and wifi frequency band of UNII-1
(IEEE channels 36, 40, 44, 48) and UNII-2A band (52, 56,
60, 64) can coexist.
UNII-1 and UNII-2A are represented by bits 0x1 and 0x2 respectively in
this implementation. The user space command should set the bits by
applying the following algorithm:
1) To disable only the UNII-1 band channels, set the value as 0x1.
2) To disable only the UNII-2A band channels, set the value as 0x2.
3) To disable both the UNII-1 and UNII-2A band channels, set the
value as 0x3.
4) To restore both the UNII-1 and UNII-2A band channels, set the
value as 0x0.
Change-Id: I8ff747e53b079ee9e0dc762980aee0eea32b23a5
CRs-Fixed: 2571546
During pdev create callback, pdev reference cannot be taken. Hence,
channel change callbacks cannot be called during pdev create. So
call the callbacks during regulatory_pdev_open. Also dont check
if regulatory_pdev_open fails.
Change-Id: I9d444f952418be983e4ac2182581d03bba02b198
CRs-Fixed: 2572487
Regulatory module calls registered callbacks when channel list is changed.
But channel list may not have been received when path for callbacks is
reached. So keep a track if channel list has been received. If not, do
not call the callbacks.
Change-Id: I2e1a6e442b0d5c79e786806e00b1c50c9491dae0
CRs-Fixed: 2563759
Add an API wlan_reg_chan_opclass_to_freq, that takes IEEE Channel
number and opclass as input and gives the channel center frequency
as output.
Change-Id: I09733d9dc27beb8f16037aa8653acededf32b715
CRs-Fixed: 2555042
Add API to know whether 6ghz is supported. Also add API to know
whether an operating class is 6ghz operating class.
Change-Id: I75747502c0033e31d119e58a2254b220646bba10
CRs-Fixed: 2556998
Add starting frequency to each operating class. Further add behavior
limit to each operating class, if any. Behaviour limit is used for
80p80, 40 mhz low primary, etc operating class identification. Also
add 6-ghz operating classes 131-135 to the global operating class.
Also add APIs that are based on frequency instead of channel number.
Change-Id: Ic8756aada6c31ed2164f767ff1ae584b8bf055d2
CRs-Fixed: 2533419
A component can register callback with regulatory component before channel
list is available.Therefore initialize channel map at time of regulatory
init. Also, call callback when pdev current channel list
is computed, at time of nol channel update.
Change-Id: I551e0ea3391710538f694c50fa7dc6f795f3196c
CRs-Fixed: 2555403
Based on the ini "ignore_fw_reg_offload_ind" ignore regulatory
offload indicatin from fw.
Change-Id: Ia95b5bdda6ee1fcc2b07f28f997a7c80afcbc32b
CRs-Fixed: 2533001
Ensure that at a time only one Agile Spectral scan is
happening across all the 5G pdevs in SBS mode.
CRs-Fixed: 2517522
Change-Id: If31a4451b82ce1d7d8a46bc604ca91bf4b6dac29
Rectify three issues in the Regulatory APIs as follows:
1) Within the API reg_update_nol_ch_for_freq, replace the call of
reg_get_chan_enum with reg_get_chan_enum_for_freq, as
reg_update_nol_ch_for_freq is a frequency based API.
2) Change the return type of wlan_reg_get_channel_reg_power_for_freq
to uint8_t and change the datatype of its parameter, freq, from uint32_t
to uint16_t.
3) Place the API wlan_reg_chan_to_freq, under the macro
CONFIG_CHAN_NUM_API, as it uses IEEE channel number as a parameter.
Change-Id: I1bc1d767d34cd97ca971bd7e12b685a55fb9a494
CRs-Fixed: 2531183
Add new APIs that return minimum and maximum channel frequency,
supported by regulatory domain.
Change-Id: I878bd6f4ff8fdbe28661769033c37a000aebf582
CRs-Fixed: 2538143
Make band related changes given below:
1. Add the API wlan_reg_chan_band_to_freq, that takes IEEE Channel Number
and bands as input and returns the Channel center frequency.
2. Add the API wlan_reg_freq_to_band, that takes frequency as input and
returns the corresponding band.
Change-Id: I8554f6a9c24e7508e8a551c5f318b643741f13c8
CRs-Fixed: 2523257
Add conversion from frequency to channel, for frequency falling
within two consecutive supported channels. Use the master
channel list of the pdev for the same. Add new API
wlan_reg_legacy_chan_to_freq to convert legacy 2G and 5G channel
number to frequency. Existing API wlan_reg_chan_to_freq would be
slowly deprecated.
Change-Id: Id7e1939b9e05b78c17751d13bb0b02a891f999ad
CRs-Fixed: 2526886
Validate user provided agile center frequency and throw
an error if it is invalid.
CRs-Fixed: 2529280
Change-Id: Ibb43dda98d29d8bc8360d1a204c67b64ca987ca6
Add the API wlan_reg_get_band_channel_list, to get the channel list from
the current channel list based on the input bandmask provided.
The bandmask may have more than one bands as input.
Change-Id: I082a5dd6a9ddb449d64d13e636f42ad58d2de16b
CRs-Fixed: 2523254
The IEEE channel numbers in the 6GHz band overlap with the
IEEE channel numbers in 2.4GHz, 4.9GHz (e.g. Channel number 1) and 5GHz
(e.g. Channel number 149). Currently many APIs in the regulatory
component, have channel number as a parameter. This leads to the channel
number collision.
To overcome this, new APIs with channel center frequency ( in units of
megahertz or MHz) as a parameter are created, as a channel center center
frequency is unique for 2.4 GHz, 4.9 GHz, 5GHz, and 6GHz channels.
Each new API performs the same function as its old counterpart.
For example reg_set_5g_channel_params() and
reg_set_5g_channel_params_for_freq perform the same operation. The
difference in the latter, is that the channel center frequency is given
as an input parameter instead of IEEE channel number, and the function
body is modified to suit channel center frequency.
The new channel frequency based APIs are placed under the macro
"CONFIG_CHAN_FREQ_API" and the existing channel number based APIs are
placed under the macro "CONFIG_CHAN_NUM_API". The APIs under the macro
CONFIG_CHAN_NUM_API can be removed, when when all the references to
the APIs are removed.
Change-Id: I0347e8d31c25e2c3a406aafe1360c7c7b602fda2
CRs-Fixed: 2463009
Remove channel_map_old and and remove the instances of
CONFIG_LEGACY_CHAN_ENUM in the dfs and regulatory component.
Change-Id: I3e30dba72c28c9c356648595ad96720ab0cd789a
CRs-Fixed: 2463009
Add 6GHz channels to the channel maps and define an API
"wlan_reg_is_6ghz_chan_freq" within the regulatory component to return true
if a channel is a 6GHz channel.
Change-Id: Icf73f1300dd08ae78248465543a4c0a0b355bc79
CRs-Fixed: 2463009
Add regulatory API and a dispatcher function to compute current channel
list after dynamic HW Mode Switch. range_5g_low, range_5g_high and wireless
modes are extracted from wlan_psoc_host_mac_phy_caps based on the new
HW mode configured and are used to derive the current channel list.
Change-Id: I799712da8992ede0b5896dd2eb438cffea5fe048
CRs-Fixed: 2481535
The EN302_502 radar pattern is applicable in a predefined list of
regulatory domains (defined in DFS component). During radar table attach,
the current regulatory domain is checked if it is one of the
applicable regulatory domains.
The predefined EN302_502 applicable domains are:
ETSI11_WORLD
ETSI12_WORLD
ETSI13_WORLD
ETSI14_WORLD
Predefining these regulatory domain pair values in DFS component will
affect future regulatory updates that modify/add regulatory domains
to this list. Also, as per regulatory update #27, ETSI13_WORLD is not
EN302_502 applicable and ETSI15_WORLD is EN302_502 applicable.
Introduce a regulatory API(is_regdmn_en302502_applicable()) that finds if
the current regulatory domain pair is one of the EN302_502
applicable domains.
Modify the EN302_502 applicable regulatory domains as follows:
ETSI11_WORLD
ETSI12_WORLD
ETSI14_WORLD
ETSI15_WORLD
CRs-Fixed: 2390875
Change-Id: I78839a796eeb53a6b06b9fe66e8cae58de8838fa
Currently when an RRM scan is issued for beacon report request from the
connected AP, we use the current scan country code to get the op class
table for the country.
However, the AP can specify which table to use in the country IE's 3rd
byte of the country field which is not parsed and stored in the scan
country code.
For RRM Scan for beacon report request, use the 3rd byte to get the table
number from the connected AP's beacon and if no table number is present,
then use the op class table based on the country code.
Change-Id: I0911ac908d1c71676f7c1450ab260eaa732ddcb9
CRs-Fixed: 2432662
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within umac regulatory replace any such comparisons
with logical operations performed on the pointer itself.
Change-Id: If2fdfbf7b4d96a8af7f5eaf390e73f96ceff3dcf
CRs-Fixed: 2420152
The objective is to remove qcacld-3.0 redundant macros and
replace them with the converged enums exposed in
reg_services_public_struct.h
Change-Id: I3f106f7f9f8a533b1964d3ea256a2fef5e4bbd4f
CRs-Fixed: 2416532
Do not use MCL in the macro. Use feature name to define macro.
This is for CONFIG_MCL_REGDB cleanup.
Change-Id: I5a3f40da74e2c4476dbf2d4d4200502b9b9e9653
CRs-Fixed: 2411991
In the current implementation, reg rules stored in mas_chan_params of soc
for each phy id are reset in regulatory_pdev_obj_created_notification()
and in regulatory_psoc_close().
In WLAN restart sequence, regulatory_psoc_close() is invoked and processing
of WMI_REG_CHAN_LIST_CC_EVENTID is ignored, if the country code matches
with existing country code in soc reg private object. Since reg_rules
in mas_chan_params of soc are reset there are no reg_rules for pdev
resulting in no indication (regulatory_set_wiphy_regd()) to cfg80211.
To fix this, avoid reset of psoc reg rules.
Change-Id: I14973217319ffa84b979f0c92cb5405708a96d2f
CRs-Fixed: 2402007
Currently 11d offload functionality is in reg_host_11d.c and
reg_host_11d.h files and are getting controlled with a
feature flag HOST_11D_SCAN.
HOST_11D_SCAN flag is to enable host 11d scan and 11d offload
feature should not be controlled with this flag.
Move 11d offload functionality to separate files
reg_offload_11d_scan.c and reg_offload_11d_scan.h.
Change-Id: Ia56fe7009f2f5f9317da9e0e22f15040fe19a20d
CRs-Fixed: 2382486
Create below regdb files in core component and move the code from
reg_services.c file.
These files has the common code used by both WIN and MCL.
reg_common_services.c: this file has regdb common APIs used by both WIN and
MCL.
reg_build_chan_list.c: this file has APIs to build master and current
channel list.
reg_priv_objs.c: this file has the APIs to create regulatory private PSOC
and pdev objects.
Change-Id: I891b14fac7a4eddf2697d2ecdc0ac4a82046f532
CRs-Fixed: 2349173
After driver load and interface up, if user changes the country code
and performs the interface down, now if interface change timer expires,
stop modules is invoked. When user again tries to do interface up, as a
part of start modules, update channel list indication comes from FW
with default country info from BDF file which overwrites user specified
country information.
To resolve this issue, if current country is set by user and if
driver gets notification to update channel list from FW with
different country code during restart of wlan modules then ignore
master channel list and send the current user country to FW.
Change-Id: I0a0c57eda03827dc3fef59928569bf2f0bc32634
CRs-Fixed: 2340798
Set TDLS channel offset correctly when TDLSSECONDARYCHANNELOFFSET
command is sent with offset 20.
Change-Id: Ifac48da3fea0c83415f3d30caa2919a559f5c3c5
CRs-Fixed: 2341883
Export ucfg_reg_get_current_chan_list so that it can be called from
offload layer.
CRs-Fixed: 2339508
Change-Id: I808ccbab7d95d3e896def298bdf7f38f298d97fc
In case of STADFS feature, when STA vap detects the RADAR, it marks the
channel as RADAR and adds the RADAR found channel to both NOL and
NOL-HISTORY list.
After nol expiry, STA vap does the CAC before connecting to the RootAP if
the RootAP channel is present in the STA NOL-HISTORY.
Set nol_history_flag in regulatory component current channel list when STA
vap detects the RADAR.
Change-Id: Ic5d15d78409af15918185147fef8d5cbe87c1686
CRs-Fixed: 2337921