When CONFIG_BAND_6GHZ is disabled, compilation error is observed
due to the absence of the declaration of reg_convert_enum_to_6g_idx
and reg_get_reg_maschan_lst_frm_6g_pwr_mode.
To fix this issue, add static declarations for
reg_convert_enum_to_6g_idx and reg_get_reg_maschan_lst_frm_6g_pwr_mode
when CONFIG_BAND_6GHZ is disabled.
Change-Id: I616de6cd2630be1897da6cd87a29569e51bf058e
CRs-Fixed: 3131119
During mode switch no new service ready happens. However,
a mode switch function re-inits the regulatory channel list
with appropriate chip ranges.
After driver insmod and during device creation the chip
ranges (2g+5g) are initialized. However, if a sequence of wifi down
and ini mode change and wifi up happens, the chip ranges for pdev
are not updated (as it happens for dynamic mode switch command)
and we continue to use the old device object and the old chip ranges.
Since the mode has changed we also need to change the ranges in
the device object. Since the country code event comes for every
wifi up and down, Update the 2G and 5G frequency ranges supported by
the pdev in the regulatory pdev private object from the service
ready values for every country set to make sure that changes in
HW mode are also handled during wifi down and up.
Change-Id: Id1f486e73d792f77c591e39e216556e512a8b59f
CRs-Fixed: 3088128
1. Add reg_get_min_chwidth to return the max chanwidth supported by
regulatory given the primary frequency and the pdev.
2. Add reg_get_max_chwidth to return the max chanwidth supported by
regulatory given the primary frequency and the pdev.
3. Add dispatcher functions for both
Change-Id: Ia21198fe778d32b1673e5dd30c8cd621cded2c45
CRs-Fixed: 3098311
The API reg_compute_chan_to_freq() computes frequencies only for channels
present in master channel list. A 6G channel may not belong to the current
(current power type's) master channel but be present in different 6g power
type's master channel list.
So if a 6G channel is not found in the current (current power type's)
master channel list, then search for the channel in all the 6g power's
master channel list to compute the frequency.
Change-Id: I7ccdaeb1f9de8d9baabe59ad673d445ed36a6a2d
If coex_unsafe_chan_nb_user_prefer ini is not set then
avoid_freq_ind becoming NULL for "wmi_wlan_freq_avoid_event_id"
which results in sending regulatory update event to user space
and reduces PNO scan timeline.
This change is to update ch_avoid_ind for
wmi_wlan_freq_avoid_event_id.
Fixes regression : 7192d90810 ("qcacmn: update unsafe channel
list for SAP for freq extcmd")
Change-Id: I57ff334e9cf47468c30bc6884a9ead0a65a92b23
CRs-Fixed: 3119140
The structure members of regulatory pdev private object,
is_6g_channel_list_populated and super_chan_list are 6G specific but are
used outside the 6G macro 'CONFIG_BAND_6GHZ'. It is used in get channel
list API reg_get_pwrmode_chan_list(), that is commonly called for all the
bands.
Move the 6G portion of get channel list API to a separate API
reg_get_6g_pwrmode_chan_list() that is empty for non-6G platforms.
Change-Id: If9aeedbf157536d10912f4ee1d92f42146b19759
Wireless mode is of datatype uint64_t but in some places, it is used
as uint32_t.
In this change, replaced 'uint32_t wireless_modes' with
'uint64_t wireless_modes'.
Change-Id: I13b5781ddb14fc0131668e1710df19ae75eb1e34
CRs-Fixed: 3119562
Refine reg_get_5g_bonded_channel_state_for_freq with static puncturing.
Update channel state as CHANNEL_STATE_DFS or CHANNEL_STATE_ENABLE if
its puncture bitmap is valid with given bandwidth.
Change-Id: I3503c8bcf6094b9c98056809f1c304747ba97667
CRs-Fixed: 3106240
Add reg_get_pwrmode_chan_list() which will take an input 6G power mode
and will use super channel list to build the 6G power mode based channel
list.
The 2G and 5G portion of this channel list will be same as the current
channel list and if the input power mode is REG_CURRENT_PWR_MODE, then
also the current channel list is copied to the given buffer.
If the input 6G power mode is REG_BEST_PWR_MODE then all the 6G frequencies
supported by the current country will be present and will indicate the
power values of the best power mode possible for that entry.
For other 6G power types only the 6G portion of the channel list is
modified as per the input 6g power mode.
Change-Id: Ib22399ac950af87ee64ecdb78089bb2ff5221f69
The API reg_get_superchan_entry() is defined under macro CONFIG_BAND_6GHZ,
but used outside it in the API reg_is_freq_idx_enabled_on_given_pwr_mode().
Place reg_is_freq_idx_enabled_on_given_pwr_mode() under the macro
CONFIG_BAND_6GHZ since it is applicable only for 6G and call the API
reg_is_freq_idx_enabled_on_cur_chan_list() for non-6G.
Change-Id: Ieb3efd946f19515dab3fc0c8086e1c508c9f75ad
Add the new sets of APIs that checks if given freq is enabled on given
power mode's channel list.
Also, remove reg_is_chan_disabled() and replace the callers with
reg_is_chan_disabled_and_not_nol().
Change-Id: I65ee6b8dde629b0e31b050b478300a8ba5ae5b4a
Add an API to register a callback function that will be called when
the AFC power event is received from the AFC server. The second parameter
of the callback function is 'reg_fw_afc_power_event' structure which
holds the entire power event so that callback function can process the
part or whole of the power event.
Change-Id: I2d6247e54f92c02e9b4ec98bec678e662f1009f4
CRs-Fixed: 3114593
Modify 6GHz edge channels ch2 (5935MHz) and ch233 (7115MHz)
for SAP and other beaconing entities.
Add new wrapper API that calls original API
reg_modify_chan_list_for_6g_edge_channels by passing secondary
channel list. This API enables/disables these channels in sec
current chan list based on service bits
WMI_SERVICE_ENABLE_LOWER_6G_EDGE_CH_SUPP and
WMI_SERVICE_DISABLE_UPPER_6G_EDGE_CH_SUPP.
Change-Id: I545bd752c98244a6327c1bdb4ee80a1625c4944f
CRs-Fixed: 3117774
Firmware sends the following reg rule to build 5G 240MHZ channels
240MHZ reg rule:
start: 5490, end: 5730, max_bw: 240.
However, 240MHZ is not one of the standard IEEE channel width.
Hence the channel finding APIs will fail to find a channel of 240MHZ BW.
240MHZ is considered as a punctured 320MHZ channel (320 - 80).
Hence convert the max bw of 240MHZ reg rule to 320MHZ within the host
so that channel can be built.
Also, change the 5G 240MHZ bonded pair's end freq to 5720. Since there is a
5MHZ bandwidth gap between channel 144 and 149, the bonded pair is
restricted to 5720MHZ on 5G.
Change-Id: Iee8dad0317f7ecb95843faa3d0779b854b8f48fa
CRs-Fixed: 3106866
This change is to update restriction mask to uint32_t from uint8_t
as per QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFACES_BITMASK.
Change-Id: If5a6748425502b1f27654a2e6bfa0e5c2b8556de
CRs-Fixed: 3118988
Puncture bitmap is different from Puncture pattern.
A bit in the puncture bitmap is set to 1 to indicate the corresponding
20 MHz subchannel is punctured and set to 0 to indicate the
corresponding 20 MHz subchannel is not punctured. Puncture pattern
is the reverse of puncture bitmap.
From the use of reg_punc_pattern, it should be puncture bitmap.
Rename reg_punc_pattern to reg_punc_bitmap.
Change-Id: I1c7fc1b689ba724862761dc10f72a543679bb85e
CRs-Fixed: 3108165
Add reg_is_chan_disabled that is used to check if channel
is disabled or not in given channel list.
Rename the API to reg_is_chan_disabled_and_not_nol.
Change-Id: I2b05b0cea0472fc924634ae921e77842f0608a11
Add the 6G config flag so that super channel list functions are not
compiled on devices that do not support 6G.
Change-Id: I95a13c6cc8dd6ee36aed5fdb1df4555a08adc058
CRs-fixed: 3118310
Add an API wlan_reg_get_superchan_entry to get a super channel list
entry for a given input channel index.
Change-Id: Ia231669872c15998549aff6262d66766b8cec5c2
CRs-Fixed: 3098998
Add an API reg_translate_6g_chan_enum to translate an index between
MIN_6GHZ_CHANNEL and MAX_6GHZ_CHANNEL, to an index between 0 and
NUM_6GHZ_CHANNELS.
Change-Id: I5eaacf36403252a56293b8fadc797ac2aacd751d
CRs-Fixed: 3099080
Since there are multiple power modes in 6G, the current channel list
alone is not enough to represent the capability of the chip or
device. Given a channel, in many cases it may be required to know all
the power modes that are supported by this channel.
To represent this information per channel, the concept of a super
channel list is introduced. This super channel list is essentially a
mapping between a channel and supported power modes, and
their associated attributes, such as power values, Indoor/Outdoor etc.
The 6G super channel list is stored in the regulatory pdev private
object.
Change-Id: I8657fed17823929c87110aa7a6cf24fe898bb78f
CRs-Fixed: 3098998
The channel finding APIs invokes regulatory API reg_fill_channel_list
to fetch the channel params for a given freq. However,
reg_fill_channel_list considers NOL channels as disabled
Hence if the input freq is in NOL, channel finding fails.
Hence in reg_fill_pre320mhz_channel(),
(a) : For MCC, invoke reg_set_channel_params_for_freq()
which considers NOL channels as disabled.
(b) : For WIN, invoke wlan_reg_get_channel_params()
which considers NOL channels as enabled.
Change-Id: Ib184aee665525a9eff57d0d9214925a919e5269f
CRs-Fixed: 3089609
Currently unsafe channel list updated from firmware using
"wmi_wlan_freq_avoid_event_id".
This change is to update unsafe channel list for vendor
QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY_EXT which we receive from
userspace.
Change-Id: I57ff334e9cf47468c30bc6884a9ead0a65a92eab
CRs-Fixed: 3103275
0 in puncture bitmap indicates subchannel not punctured
and 1 in puncture_bitmap indicates that the subchannel is
punctured.
Hence, change the puncture bitmap predefined macros
accordingly
Change-Id: Ibb52c838eecf266f5492b38c939d0f56f2420324
For a 6G radio, the API reg_get_channels_from_opclassmap currently
returns the 20 MHz IEEE channel numbers for the 40MHz 6G operating class
(132). As per the IEEE802.11 specification it should return the channel
center frequency index for the operating class 132.
To fix this issue, modify reg_get_chan_or_chan_center to return channel
center frequency index for 6G 40 MHz operating class 132.
For non-6G 40MHz channels the primary channel frequency is returned
as center. For 6G, however, the center of the entire 40Mhz band is
returned. Therefore, handle opclass 132 ( 6G band 40MHz channels)
as a special case for 40Mhz bandwidth.
Change-Id: I02f2fce418519a3e020d9b87d5ec401a73ad5ce8
CRs-Fixed: 3101303
Currently driver prepares client channel list based on indoor ap
power type and this list is given to kernel. There are couple of
issues with this approach as mentioned below:
1. Based on this list kernel sends the scan requests because of
which there is a possibility that driver does not scan channels
which are not part of LPI channel list but are part of SP channel
list or VLP channel list.
2. Kernel sends start AP as well based on this channel list, since
all LPI channel are marked as NO_IR from driver and because of
which kernel dont send start AP on these chanels which leads to
SAP start failure even if there are VLP channels available.
Change-Id: I90174920df158c8b370e541034307a9a58448c29
CRs-Fixed: 3054543
Drop the log level to debug from error for the prints indicating
input or output channel number is invalid.
Change-Id: Ief2f609f1c95c223c97cded6d81460e52a34c729
CRs-Fixed: 3100105
Optimize the checks in reg_get_6g_power_type_for_ctry API to
reduce logging. Logs will appear only during initial connection
and not after parsing each beacon.
Change-Id: I4c4904c4825cd822d119e4ee9b2c69e96612be31
CRs-Fixed: 3094366
The existing logic is if STA and AP have different ctry code,
and STA is in ETSI, then it operates in VLP mode irrespective
of AP ctry.
New logic would be if AP ctry is US and if it advertises LPI
power type in HE ops IE via beacon, then STA can advance to
LPI mode.
Change-Id: Ifbee7052854277c3d21ccd21b65b79edb5e89f46
CRs-Fixed: 3084589
Currently api wlan_reg_get_6g_ap_master_chan_list is declared
and defined under CONFIG_AFC_SUPPORT feature flag, since this is
a generic API and can be used by other functionalities as well.
With this change move wlan_reg_get_6g_ap_master_chan_list api
out of CONFIG_AFC_SUPPORT feature flag.
Change-Id: Ifa7b27895b4660bbf248fc2827472ba50c9df9a4
CRs-Fixed: 3090281
The sub-channel array size was maximum of 8 sub-channels corresponding
to a maximum channel width of 160MHz. But with the introduction of 11be
higher channel width of 320MHz is possible.
Expand the size of sub-channel array to 16 to accommodate the sub-channels
of 320MHz in case of 11be chipsets.
Change-Id: I7ffd1a7c0f05085edff74b92e47ab5a0dab42ef0
CRs-Fixed: 3068405
Currently driver does not consider gindoor_channel_support ini
when it decides the ap power type and because of that it always
decides ap power type as VLP. Driver should consider this ini
value as well because this INI says that indoor channels are
allowed so driver should set ap power mode as LPI to allow
LPI power mode.
Change-ID: Id7ad546ba23ce210497002e3083a22f1edc87185
CRs-Fixed: 3085997
Add below changes as part of 38th Reg DB version
a.) Add superdomain FCC2_6G_010, APL4_6G_11 and APL5_6G_12.
b.) Add sub 6G domain APL25, APL26 and APL27 reg rules for new domain.
c.) Add APL25, APL26 and APL27 RD for 5G.
c.) Add 6G support for BELGIUM, BRAZIL, CANADA and COSTA_RICA.
d.) Change reg domain pair id for AUSTRALIA, CHILE,
MOROCCO, HONG_KONG & MEXICO.
e.) Add CHNA 2g reg domain.
Change-Id: I80be14ccc2845261a0816e9e7d7931b40e5d0927
CRs-Fixed: 3083299
Currently if AP and STA have different ctry codes, STA should
operate in VLP mode. And if STA ctry code is US, then scan and
connection are not allowed as US VLP is not supported yet.
However, if RF test mode or Wi-Fi Safe Mode is enabled, allow
scan and connection on this AP and STA can operate in LPI mode.
Change-Id: I513657b8e274ef07eb9e9b5fc265722cb01525de
CRs-Fixed: 3079537
The reg_get_psoc_obj() may return NULL for invalid psoc object.
The wlan_regulatory_psoc_priv_obj becomes NULL in case of NULL psoc object.
This scenario is not considered in reg_get_reg_rules_for_pdev() and its
callers. Handle the NULL regulatory_psoc_priv_obj scenarios.
Change-Id: I5b039d362a76985995e0d4d4a95cd1a00b1f0991
CRs-Fixed: 3040335
If a channel is disabled when changing the band settings, a subsequent
function such as modifying for indoor channels can override this state.
Add a check in the indoor channel modification to make sure channel is
not disabled first, before proceeding.
Change-Id: Ic47391ca2ceaee7dc0909e0c81b06b81d49d3893
CRs-fixed: 3071801
Add below changes as part of 37th Reg DB version
a.) Add superdomain FCC1_6G_09 for US AFC Testing
b.) Add sub 6G domain FCC1_6G_09 reg rules for new domain.
c.) Add 6G support for GERMANY, ICELAND, PERU and NORWAY.
d.) Change reg domain pair id for TANZANIA and SOUTH_AFRICA.
Change-Id: I7af2778954c65f85b727453a0a0527e2d4d09089
CRs-Fixed: 3064525
Add below changes as part of 36th Reg DB version
a.) Update FCC1_CLI_LPI_REGULAR_6G to FCC1_CLI_LPI_DEFAULT_6G.
b.) Add sub 6g domains APL3_AP_VLP_6G and APL3_AP_LPI_6G and
reg rules for new domains.
c.) Add superdomain FCC1_6G_07 and APL3_6G_08 for Brazil and UAE
Change-Id: I2d379762f9d5953c47c88e08511fe227ea25ce85
CRs-Fixed: 3057765
Currently driver invokes regulatory callbacks after pdev create
and from reg cc event processing. In case of restart of the
driver because of SSR or idle restart, driver ignores the default
country and sets the user set country which was there before SSR
or idle shutdown. Now driver continues restart and creates pdev.
During pdev creation it propagates reg rules from psoc to pdev
which was there in psoc before shutdown and after pdev creation
it invokes the regulatory callbacks, as part of this hdd dynamic
callback is invoked and it tries to schedule the regulatory work.
Since idle restart is a vdev operation so driver is not able to
schedule the work as it does not get the dsc op and it waits for
500 ms to reschedule the work. In this 500ms time driver gets the
response of the set country command which was sent to fw to set
user country. This command also invokes the hdd dynamic callback
and regulatory work gets scheduled and scan channel list command
is sent to fw.
Now if any scan is going on in the FW and after 500ms if first
work gets rescheduled, it again sends the scan channel list to fw
which cancels the ongoing scan.
To address issue, add a change to not invoke regulatory callbacks
from pdev creation if user country set is pending.
Change-Id: I5686163644409ef19507c19ae31f7f1e7892931f
CRs-Fixed: 3054603
When the AFC response has a disjoint set of CFIs and frequency range,
the ACS trigger is called even though the AFC master channel list is
empty.
Due to this, ACS happens even though the AP's destination power
mode is LPI.
To fix this issue, call ACS trigger only if the AFC master channel list
is non-empty.
Change-Id: I217d23827b34ac577649b82b278a203bf01fa1f6
CRs-Fixed: 3052805
In reg_set_channel_params for 2G, if the input mode is HT40,
the primary channel is <= channel 8 (2447) and the secondary frequency
is not provided, add an API to fetch the secondary frequency,
giving preference to HT40+ over HT40- mode.
Change-Id: If1538e14f9ab427c9f9a12ee2eb0d9e28bbf8b86
CRs-Fixed: 3050678
The API that takes in the input 6G AP power type and updates current
channel list, allows setting the same power type which is not needed and
is a costly operation.
Change-Id: Ia690f40a6796a0db243f0abd15f2eebc8340d1d9
CRs-Fixed: 3051502
The power event received status is set when AFC power event is received
and is reset unconditionally when AFC expiry event received.
Reset AFC power event received status only on receiving AFC expiry event
with sub-type AFC_EXPIRY_EVENT_SWITCH_TO_LPI.
Change-Id: Ib7c1d12cbc2797ddbb19d73fd38d82d100adf3d3