Since there are multiple power modes in 6 GHz, 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. Update regulatory APIs to use
super channel list.
Change-Id: I2e292125d6b667c2c28e4b1326f47f8ccc81e5a9
CRs-Fixed: 3159628
Instead of looping through the current channel list, which takes O(N),
use the existing formula to directly convert frequency to
IEEE channel number, which will take O(1). This will reduce the CPU load.
CRs-Fixed: 3230932
Change-Id: I38e3a67c6ef4295cea3a8a57f3a853651445f0b5
Add an API reg_is_supr_entry_mode_disabled to check if
REGULATORY_CHAN_AFC_NOT_DONE is cleared for a given frequency and
input power mode.
Change-Id: I6ca851bbe89e6003d8084856eb30b4796d01616e
CRs-Fixed: 3230917
Remove memcpy allocated to get maxbw.
Use the reg_get_min_max_bw_reg_chan_list function
to get directly from regulatory channel.
bonded_chan_ptr2 for channel width 40 removed since its redundantly
calculated in functions
reg_set_5g_channel_params_for_freq/reg_set_5g_channel_params_for_pwrmode.
This helps to reduce cpu overhead by 3% when scan for each beacon
processed.
Change-Id: I89e3c0970ea41c8b86320c2de5b4822dfb27e248
CRs-Fixed: 3229766
When CONFIG_BAND_6GHZ is undefined, it will report missing-prototypes
compile error for function wlan_reg_get_eirp_pwr().
Add 'static inline' for function wlan_reg_get_eirp_pwr() to fix
compile error.
CRs-Fixed: 3227164
Change-Id: I9db007fee3aa0061aa9a8e030e45738c0953f36a
Add a dispatcher API for reg_get_eirp_pwr().
Also export dispatcher APIs that are invoked by other modules.
CRs-Fixed: 3220143
Change-Id: I40459352046285a04142dc57e1f643b10ac59150
Add reg API to convert eirp to PSD power based on the
formula: psd = eirp - ten_log10(channel bw)
CRs-Fixed: 3210379
Change-Id: I93506f8262f3fd752e22326e0604d6c8ec5383c9
Fetch sub-channels of 320 MHz in reg_get_subchannels_for_opclass
API.
Change MAX_AFC_BW to 320 and REG_MAX_20M_SUB_CH to 16 in case of
11BE.
Add cen320 as an input to reg_get_best_pwr_mode to fetch the eirp
afc power for the corresponding cen320 from the afc response.
Add dispatcher API for reg_get_chan_state_for_320.
Add band_center_320 as an argument to reg_get_chan_state_for_320
to fetch the channel state for the input 320 MHz band center.
Add logic in reg_find_eirp_in_afc_eirp_obj to fetch the eirp power
for the given center freq.
CRs-Fixed: 3211744
Change-Id: Ic37bfe6790385836f81a156dd6ccc071245ea1bb
Add enum REG_AFC_EXPIRY_EVENT_STOP_TX, which is mapped to
WMI_AFC_EXPIRY_EVENT_STOP_TX, to reg_afc_expiry_event_subtype and handle
the event in the exact way as REG_AFC_EXPIRY_EVENT_SWITCH_TO_LPI event is
handled.
Change-Id: I5289ea1b51e0c2d7573e60a23ded69295252f8d6
CRs-Fixed: 3209048
Add API reg_is_sta_connect_allowed and it's wrapper function
wlan_reg_is_sta_connect_allowed to check if STA VAP connection is
allowed.
Change-Id: I7316545cf199deb6ceb64aa2bb30287fc9b8a34a
CRs-Fixed: 3195189
When either of the macros CONFIG_AFC_SUPPORT or CONFIG_BAND_6GHZ are not
defined, the function wlan_reg_is_afc_done returned false by default.
As a result, the upper layer set all the 6GHz channels to NO_IR and the
vap was unable to come up.
Fix this by returning true from wlan_reg_is_afc_done when either of those
macros are not defined.
Change-Id: I4acb564023d2a2b318ba1497fd858a02987c117a
CRs-Fixed: 3214096
Puncture bitmap is binding with channel bandwidth. If the STA can't
support bandwidth as AP broadcasts, STA need extract puncture bitmap
based on the negotiated bandwidth.
Add API to extract puncture bitmap based on new bandwidth.
Change-Id: I089d010c6b327ba20e21aec0b8110323108cbda3
CRs-Fixed: 3207683
Add API reg_is_afc_done and it's wrapper wlan_reg_is_afc_done to check
if AFC response enables a given frequency.
Change-Id: I953139762fd5c06ce19edc1d807edf41126f6f2b
CRs-Fixed: 3195189
To add AFC outdoor device deployment support,set the AP power type as
REG_STANDARD_POWER_AP during the creation of regulatory pdev private
object. Update the flag REGULATORY_CHAN_AFC_NOT_DONE in super channel
list based on the AFC_POWER_EVENT. On receiving the SWITCH_TO_LPI event,
if no LPI channels are present return an error. If LPI channels are
present move to LPI mode and update the channel list both in presence and
absence of ACS.
Change-Id: Ib4653a83d4c7ea2ec5212f9ba4d517c0e7e5027a
CRs-Fixed: 3195189
Add the variable sta_sap_scc_on_indoor_channel in
psoc and pdev reg objmgr, to access the INI value of
sta_sap_scc_on_indoor_chan
Change-Id: Ie0c41d75d0f617274743f5196e65dab93414b7eb
CRs-Fixed: 3191788
Add AFC regulatory target interface to support AFC device
deployment indoor or outdoor type in init sequence between
FW and host
Change-Id: I3caed77e943fdcaa947cb7e514c88b68604f55a3
CRs-Fixed: 3190262
Add AFC device deployment type support in regulatory pdev
private object and add API to return the deployment type
Change-Id: I45e44766b25b21ce3024d73f4ed7a4daf3ecb026
CRs-Fixed: 3190240
Add an API wlan_reg_get_best_pwr_mode, to get the best_power_mode
based on AP's primary channel center frequency and AP's operating
bandwidth. The best power mode that has the maximum EIRP power
allowed for operation among the 3 AP types, i.e, LPI, SP and VLP is
chosen as the best power mode.
For example:
If primary channel center frequency = 6115 MHz and AP's operating bandwidth
is 80 dbm. If,
LPI EIRP = 30 dbm
SP EIRP = 33 dbm,
VLP EIRP = 27 dbm,
then the best power mode returned is SP.
Also, remove the static declaration of reg_get_subchannels_for_opclass
so that it can be called by wlan_reg_get_best_pwr_mode.
Change-Id: I89b6bc35b5c15a49e2d49265c8685f9d291fb48e
CRs-Fixed: 3163714
The datatype of resp_id in
wmi_afc_power_event_param is 32 bit.
Change the datatype of resp_id from
uint8_t to uint32_t
in the structure reg_fw_afc_power_event,
to write
QCA_WLAN_VENDOR_ATTR_AFC_POWER_EVT_RESP_ID
in the
QCA_WLAN_VENDOR_AFC_POWER_UPDATE_COMPLETE_EVENT
Change-Id: I910921908ddc24290e2b89732fa223a16aeb9981
CRs-Fixed: 3159542
Iterate through the opclass table and fetch the opclass
details for the channel widths supported by the current
hardware mode.
CRs-Fixed: 3168892
Change-Id: I9b418999e3745529e3db5bae3a46569e0d1bdc02
Puncture is one of 11be feature. Even 11be compile macro is defined,
Dut can start AP with non-11be mode. Regulatory component has no idea
whether it should consider puncture or not. Puncture should be a
configurable parameter from caller.
When updating channel state, puncture should be considered for 11BE
AP. is_create_punc_bitmap should be set in struct ch_params and pass
it to reg_get_5g_bonded_channel_state_for_pwrmode.
Change-Id: I96fb131f2df201a827ab7d98ca099a38b008e0d3
CRs-Fixed: 3160259
The API reg_get_ch_state_based_on_nol_flag() is a common API and in its
definition it calls the API
wlan_reg_get_5g_bonded_channel_state_for_pwrmode() which is defined for
the 6G specific macro CONFIG_REG_6G_PWRMODE. For non-6G callers, this
function is not defined and will lead to implicit declaration compilation
error.
Add a non-6G version of the API
wlan_reg_get_5g_bonded_channel_state_for_pwrmode() so that, it can be
called in reg_get_ch_state_based_on_nol_flag() even for non-6G PFs.
Change-Id: I810af65c7580f9a5dbfb2df25530dd95261e2a80
CRs-Fixed: 3161629
Rename is_treat_nol_as_disabled and is_treat_nol_as_dis to
treat_nol_chan_as_disabled in the regulatory component.
Change-Id: I3f372ee1707b40e2bdcd5ca53b77e6b8f76c456b
CRs-Fixed: 3157756
Get the channel list for 6G band for a given power mode. When the power
mode is REG_BEST_PWR_MODE the 6G channels will contain all the channels
supported by the reg domain irrespective of the power mode.
Change-Id: Ia1a3757685d477a2a2565eb89422fc039ca3b5dd
CRs-Fixed: 3141999
Fix build issue on kernel5.10.
error: implicit conversion from enumeration type 'enum reg_6g_ap_type'
to different enumeration type 'enum supported_6g_pwr_types'
[-Werror,-Wenum-conversion].
Change-Id: Ib15ed20036f2472b567acee2e4d24d3e6bfe1956
CRs-Fixed: 3154541
By default, the regulatory module considers NOL channels as disabled
and these channels are excluded in channel search algorithm.
However, there are use cases where a search for NOL channel
is done and regulatory module fails to fetch the channel param.
Hence create an infrastructure to consider NOL channels
as "enabled" / "disabled" as per user's choice during channel search.
Setting "is_treat_nol_chan_as_disabled" flag to true considers
NOL channels as disabled and punctured.
The callers of reg_fill_channel_list() and
reg_set_channel_params_for_freq() APIs should set the flag
"is_treat_nol_chan_as_disabled" as per the desired use case.
CRs-Fixed: 3134870
Change-Id: Iae7cea18ecfd5e9972ea8e6934828898a6cd1e74
If a Radio supports 6G band channels, the ACS is expected to give
priority to a set of channels that are above a certain (threshold)
frequency.
Store the extracted threshold frequency from WMI into regulatory
component.
Add a new API reg_get_thresh_priority_freq to get the threshold
frequency received from the target.
CRs-Fixed: 3143318
Change-Id: I8676ce56e68b5a4eb4e4b64415dc293e086472f0
Currently definition of wlan_reg_get_power_string is
present for 6G only which may cause compilation issue
when 6G is disabled.
Fix is to add definition of wlan_reg_get_power_string
for both 6g enable and disable case to avoid any compilation
issue.
Change-Id: Iaad8f16543306e6ac09e76546062fae554124c1e
CRs-Fixed: 3150997
For platforms which CONFIG_BAND_6GHZ undefined, build failed for
implicit declaration of function
reg_convert_supported_6g_pwr_type_to_ap_pwr_type.
Change-Id: Iefaef8ea64f76f07e040403ada145c99c29db19a
CRs-Fixed: 3147319
Add the supported 6g power types dispatcher APIs to
i) get the best 6g power for a given frequency.
ii) convert input 6g ap power type to supported 6g power type enum.
iii) get the 6g ap power type from supported 6g power type enum.
Change-Id: I4b8bce5f23c7c0b95f9192ff20d90a908b3e0bd7
CRs-Fixed: 3110989
Add new reg API to check if frequency is active (non-passive)
or not from the secondary channel list.
The API checks the channel state against CHANNEL_STATE_ENABLE.
Change-Id: If41850563e680659ea815f09207ec0b854a2f040
CRs-Fixed: 3136785
Use CONFIG_REG_ 6G_PWR_MODE for the new API.
Use "_for_pwrmode" as suffix for the new functions.
Change-Id: I9b84944a59062277b76bc48877c47ea5afada0ec
CRs-Fixed: 3133023
The consumers of the current channel list may want to search through 6G
channels that are not part of current channel list and belong to channel
list of different power mode.
Therefore, replace the regulatory current channel list with that of 6G
power based channel list.
Change-Id: Ie2ff8bbfb50a5f95f584b134b18246cb28b1c406
CRs-Fixed: 3110987
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
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
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
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 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
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
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