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
In regulatory non-offloads, when a user is trying to set the country code,
if the country code is not present in the driver regulatory database then
restore to WORLD domain.
Change-Id: I7de523f734920baaf5a7c690873a69c346d55a64
CRs-Fixed: 2495799
Current regulatory non-offloads has following issues:
1) In "iw reg get" output "00" can not be shown when trying to
set country code to "00".
2) In BDF file, if only reg domain is specified then
"iw reg get" output should contain alpha2 code of country which
first matches with BDF reg domain.
To fix these issues in reg_get_reginfo_form_regdmn_pair(),
populate reg_info->alpha2 with:
(a) "00" for WORLD domain and
(b) alpha2 code of first country matching with non WORLD domain.
Change-Id: I5cf87587a1a0f648700cffdc7ff60f05f043f723
CRs-Fixed: 2494516
It is easier to just compare return value of reg_freq_to_chan/
reg_chan_to_freq with 0 to check whether the channel is valid.
Change-Id: I4124cc090d31687774d8d71fee4efc822e0a6b38
CRs-Fixed: 2496010
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
As a part of regulatory update #29,MKK17 should support channels
until 5730MHz(including channel 144). But, it was missed in
regulatory update #29 and MKK17 supports channels only until
5710MHz(until channel 140).
Add channel 144 to MKK17.
Change-Id: Ic4b4c162f03a033b697764d65f4733b49e00c9c8
CRs-Fixed: 2489544
Update regdb with QCA regulatory database version 29 with following
changes:
1) Create new full RD Def: APL9_MKKC and change Korea Country mapping to
APL9_MKKC.
2) Change APL9 to CTL Region MKK.
3) Change APL9 power to 23 for all 5GHz subbands.
4) Create new 2GHz RD Def: KRRA and Full RD Def: APL9_KRRA.
5) Create new MKK17_MKKC for Japan: Same as MKK5 but with added
channel 144 (Japan country code remains mapped to MKK5_MKKC for now).
6) Change Japan MKK5 lower bands to "indoor".
7) Change Canada in LA country table to FCC6_FCCA.
8) Change Georgia to ETSI1_World.
9) Change Dominican Republic to FCC3_FCCA.
10) Change Kenya to ETSI13_WORLD.
11) Change Kazakhstan to MKK5_MKKC.
12) New Countries added Aland Islands, Andorra, Antigua and Barbuda,
Cameroon, Cook Islands, Falkland Islands, Faroe Islands, French
Southern Territories, Georgia, Guernsey, Heard Island, Holy See, Isle
of Man, Jersey, Montserrat, New Caledonia, Niue, Norfolk Island, Saint
Helena, San Marino, Sao Tome, Sint Maarten, Svalbard, United States
Minor Outlying Islands and Virgin Islands (British).
Change-Id: Ic64ac96fa3e0828f628fecced66297ce176b3d3a
CRs-Fixed: 2475613 2454185
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
In function reg_dmn_print_channels_in_opclass,
check for NULL pointer of the variable class
before dereferencing.
Change-Id: I6a17bf85b0a3dfbe1af9434583f31c96c268cc98
CRs-Fixed: 2470338
CH_AVOID_RULE_DO_NOT_RESTART has existed, can be used to support
channel avoid event ignore feature by ini
restart_beaconing_on_chan_avoid_event.
In automobile special requirement, LTE co-ex event needs to be
ignored to avoid mcc.
Change-Id: If24c9132c0098f3c463d3eefc6e957335ddedef1
CRs-Fixed: 2476111
Regulatory channel state is mistaken as chan_flags.
Set regulatory channel state to CHANNEL_STATE_DISABLE.
Change-Id: I72dd40bb3a7690e0156f72008ad29d209e93ce29
CRs-Fixed: 2461403
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
In regulatory component, currently, default vdev id for 11d scan is
not reset after last sta vdev delete.
When SAP is stopped/started after last sta destroy, above behavior can
lead to invocation of WMI command to start/stop 11d scan for destroyed
vdev. Sometimes, this leads to firmware assert.
To address this, reset vdev_id_for_11d_scan to INVALID_VDEV_ID (0xFF)
after the last sta vdev destroy.
Change-Id: Ic8abaf6ac680b22fa9218c058a34cbf3c3b5bf1f
CRs-Fixed: 2415462
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
According to regulatory master sheet, update ETSI1 and ETSI13 countries
with REGULATORY_CHAN_INDOOR_ONLY flag for frequency ranges:
(5170 - 5250) and (5250 - 5330).
Change-Id: I8fece78155ae7513ceb49da214e2d64accf53f3b
CRs-Fixed: 2401828
Update regdb with QCA regulatory database version 28 with
following changes:
1) Change ETSI10, ETSI11, ETSI12 lower 5G channels to "Indoor-Only"
2) Add 40MHz 5835 channel to India APL19
3) Remove HT/VHT20 Ch 5825 and Add HT/VHT20 Ch. 5720 (straddle) channel
to ETSI15 for Saudi Arabia
Change-Id: Id3075d22ec4403685ce3eaf00f0070b6ecab1fdf
CRs-Fixed: 2396234
Move reg_enable_dfs_channels() outside of MCL specific macro as
it is also used by WIN.
Change-Id: I8fecf365a695524ad7a97b66eca5c6657aedb264
CRs-Fixed: 2398789
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
Add changes to ETSI15 to use EN 302 502 in upper 5GHz as a part of
updating regdb with regulatory database version 27
Change-Id: I8ba58990808607febcaea81ae934fb287bc5f972
CRs-Fixed: 2383301
Create below regdb file in core component and move the code from
reg_services.c file.
These files has only MCL specific code.
reg_db_lte.c: this file has LTE feature code.
reg_host_11d.c: this file has 11d feature code.
reg_opclass.c: this file has opclass related code.
reg_getset.c: this file has the functions related to setting and getting
regdb related variables.
reg_callbacks.c: this file has regdb callbacks/notificatoion functions.
Change-Id: Ie43acc03a5c35200f3e43bc978b792d5047eeb77
CRs-Fixed: 2349173
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
Currently host does not process the country code if CC
is not found in the firmware. Firmware supposedly set world
mode if CC is not found. Set the world mode in such a case.
Change-Id: I87dde58c70ce12358583c704d1959e0467f9b186
CRs-Fixed: 2368293
Currently the logic present for disabling the indoor channels during SAP
start is not complete. The way of using the two ini deviates the driver
from the expected behavior.
Mark the indoor channels correctly during SAP start and SAP stop as per
the expected behavior.
Change-Id: Ia136dcbc4f20ad72812f096531863aeb5fbe66fb
CRs-Fixed: 2368218
When regulatory offload is enabled, firmware sends 11d new country code
event. Now, to get master channel list for this new country send
SET_CURRENT_COUNTRY command to firmware.
Change-Id: Iac4d38ed488984ad2b3739ec8052813b7cc945c1
CRs-Fixed: 2367335
The following changes are made on APL9 regdomain:
* Include channel 149 in the supported channel list.
* Change the regulatory tx power for 5150-5250 frequency range to 23dBm.
Change-Id: I2bb01acbf60d814a2bc2c35a86f7f2c30583aad9
CRs-Fixed: 2366774
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
Update regdb with QCA regulatory database version 27.
Modify APL19 with new channels, power and radar pattern.
Change country IN to APL19_ETSIC.
Create new reg-domain ETSI15.
Create new reg-domain pair ETSI15_WORLD.
Move CTRY_SAUDI_ARABIA to ETSI15_WORLD.
Add new country CTRY_MYANMAR.
Change CTRY_CHILE to FCC13_WORLD.
Change CTL value for reg-domain APL8 to 'FCC'.
Enable all bandwidths for country CTRY_COSTA_RICA.
Add new reg-domain pair ETSI10_FCCA.
Move country CTRY_UNITED_STATES to FCC3_FCCA for mobile.
Update regdb version field.
Fix alignments.
Change-Id: I23a7ce98010e15eab606d4910df87bec15abc5ea
CRs-Fixed: 2353872
Channel number can be valid when finding out the enumeration for the
channel. Rate limit the messages for the same.
Change-Id: Id8755cffa9030054698f9e5e65c7c30c3155ad1e
CRs-Fixed: 2359311
Regulatory rules bandwidth should be constrained by difference of lower and
upper bandwidth of the rule. Fix the rules that do not conform to that.
Change-Id: I01ceca977ca02dcf757c8afbb597bd1ae9659660
CRs-Fixed: 2354371
Regdb SW needs to be versioned so that implementation
can be mapped to published QCA regulatory database.
Change-Id: I925f9953f410507417747793381fd2f4b196f759
CRs-Fixed: 2354364
When x_psoc_create_handle return failed, need free all resources
before return, x_psoc_destroy_handler has no chance to be called
any more.
Change-Id: I63fd3743dd4ef4c9cc35c9ae8464c2b728447818
CRs-Fixed: 2353795
Set TDLS channel offset correctly when TDLSSECONDARYCHANNELOFFSET
command is sent with offset 20.
Change-Id: Ifac48da3fea0c83415f3d30caa2919a559f5c3c5
CRs-Fixed: 2341883
Firmware could send same channel list for each pdev. Since SOURCE DRIVER
is default, it would be set for the second event. Avoid that. Remember the
source of the first event itself.
Change-Id: Ib9db58da1fa27673b04a4c62e10f2a05702348ad
CRs-Fixed: 2352151
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
Currently center_freq_seg1 value is not getting reset for
non 160, 80+80 width and 2.4 GHz channel which are stored in
sap context, in case of SSR on SAP restart, this old value
can be used which might be some junk value and can lead to
stop bss as a result of invalid values.
To resolve this issue reset the center_freq_seg1 to 0 for
non 160, 80+80 width and 2.4 GHz.
Change-Id: Ie4bffb1c2424024fab32d30d7d790f99d54ad58c
CRs-Fixed: 2326392
During SSR, target country code is reset to default, may not same as
current country code, need restore it.
Change-Id: Ib8f51755f442d73ad6e11bbfb18fb22a60f724ba
CRs-Fixed: 2318283
reg_enable_dfs_channels() fills the regualtory channel list with the
updated channels (enabling/disabling dfs channels). Added changes to
update the legacy channel list from the master channel list.
Change-Id: I2ddbeede5bd7ee248654c29de8781ed570f9dfee
CRs-Fixed: 2328894
DFS chan "state" will be set to CHANNEL_STATE_DISABLE
if the dfs chan is added to NOL.
Add the new API wlan_reg_chan_has_dfs_attribute
to get the attribute from "chan_flag" which keeps
the chan's initial dfs attribute.
Change-Id: I5149d958c0dcb1e5909e02bd5be9acdf9fca7f2f
CRs-Fixed: 2324648