Whether the firmware supports 6ghz channels, needs to be known
before pdev is created. Therefore move the check for 6ghz wmi
service support to psoc..
Change-Id: Iad7717225c49f6c95988f5ac81c7ee405b7c2c9e
CRs-Fixed: 2658111
As per IEEE 802.11 2016 specification Annex E Table E-5, add a new
operating class table for China.
Change-Id: I60d610d637c64df497c7c363a893b8f7efdc8a6c
CRs-Fixed: 2656789
Add the macros BW_5_MHZ, BW_10_MHZ, BW_20_MHZ, BW_25_MHZ, BW_40_MHZ
to denote channel width and define them as 5, 10, 20, 25 and 40
respectively.
Also rename the API wlan_reg_country_opclass_freq_check to
wlan_reg_is_freq_in_country_opclass.
Change-Id: I6838bd87a9b8d0754909cea414ada4b09ed01643
CRs-Fixed: 2646416
Currently whenever host gets an indication for the cc event
list, it starts 11d machine and inside 11d state machine,
it decides that whether host needs to send start 11d scan
command to fw or stop 11d scan command to fw, based on that it
updates the enable_11d_supp variable of regulatory psoc private
object and posts the message to scheduler.
FW expects that host should not send back to back 11d start
scan command, there should be one 11d stop scan command before
next 11d start scan command is sent if already one 11d start
scan command is sent.
Host 11d state machine takes care of the above sequence
of 11d scan command by using enable_11d_supp. 11d state machine
sets enable_11d_supp whenever 11d scan start command needs to
be sent and resets enable_11d_supp whenever 11d scan stop
command needs to be sent and posts the message in the scheduler.
There is a case where if host receives the 11d cc event from FW
it sends the set country command to FW and at the same time if
user command comes to set the country, host again sends the set
country command to FW. FW processes both of these commands and
sends the cc list event to host. when host receives cc events
it starts the 11d machine. For the first cc event which is for
11d country which is processed as user country because of
incorrect logic in reg process master channel list where it is
assumed that at a time only one type of country set command can
be pending and first priority is given to the user country pending,
host resets enable_11d_supp and post the command to scheduler.
When host receives the cc list event for the user country it is
processed as 11d country and inside 11d state machine it sets
enable_11d_supp and posts the command to scheduler.
Now if scheduler schedules these commands it treats both the
commands as start 11d scan commands as enable_11d_supp is set
and sends start 11d scan command back to back.
To avoid above issue, add enable_11d_supp also as part of
the scheduler msg body pointer along with the psoc, in she
scheduler callback use this local variable to decide whether
11d start scan needs to be sent or 11d stop scan needs to be
sent.
Change-Id: I60150da1475251a1c22778a0f924bdfbe1bb1140
CRs-Fixed: 2641803
When the operating class 82 is given as an input to the function
reg_get_band_cap_from_op_class, it is not found due to an
incorrect conditional logic that checks the starting frequency of a
band.
To address this problem, add a function
reg_get_band_cap_from_chan_set and call it within the function
reg_get_band_cap_from_op_class, to check if a channel in the channel
set, is within the frequency range of the band.
Change-Id: I7cbd8decf3c19f80e60a3153529b622b144feac9
CRs-Fixed: 2636367
For 6G band, only valid opclass_table is the global_op_class
as per the current specification. Therefore, if the band is 6G
set the opclass to global_op_class instead of the default class.
Change-Id: I43d1be8266aa80b11c446d84bc3d027cde8bebea
Add the API wlan_reg_get_band_cap_from_op_class to get the supported
band capability from an list of operating class as input.
Change-Id: I58dc0bbe7c5436b889c12ac2d68bd769a3c702cf
CRs-fixed: 2617526
Add wlan regulatory API reg_country_chan_opclass_to_freq
to calculate channel frequency given country, opclass and channel
number. The API gets channel frequency from country's operating
class table by opclass and channel number pair. If the driver
can not find the pair, then try to find the frequency (MHz) by
channel number only.
Change-Id: I6a23a53e2e53e0b7c81b36f9f5c7794e9749c734
CRs-Fixed: 2605920
For the 6G band, the only valid opclass_table is the global_op_class
as per the current specification. Therefore, if the band is 6G set the
opclass to global_op_class instead of the default us_op_class.
As per specification for chan width 40 MHz, there is no behav limit
for both Low Primary and High Primary channels. Hence, set behav limit
as BIT(BEHAV_NONE) if channel width is 40 MHz.
Change-Id: I534f5b898e10cf21042a117aa71e824a85d73fb3
CRs-Fixed: 2608059
Given country from country IE and operating class, check
whether a channel frequency belongs to that pair.
Change-Id: I9bf711b2c52ad230a3066113a5aa7b8959219754
CRs-Fixed: 2620767
In a SON WFA testcase, the QCA AP advertises the channel set in
operating class 128 as individual IEEE channel number (for eg. 36, 40,
44, 48 etc.) instead of center channel (for eg. 42, 58, 106 etc.) to
the third party AP.
As a result, the third party AP creates Front Haul VAPs in High Band
radio when the QCA AP is configured to Low Band, due to incorrect
channel set advertised to it.
To fix this issue, add an API reg_get_chan_or_chan_center to
calculate the center channel number for a 80MHz, 80_80 MHz and 160
MHz bandwidth channel, and use it to calculate the center channel
number within the channel set for a particular operating class in the
operating class table.
Change-Id: Idf7df70c8d01ed79b43d0ba21db7b07189f3f710
CRs-Fixed: 2612258
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
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
Based on the ini "ignore_fw_reg_offload_ind" ignore regulatory
offload indicatin from fw.
Change-Id: Ia95b5bdda6ee1fcc2b07f28f997a7c80afcbc32b
CRs-Fixed: 2533001
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
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
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