When we receive a negative EIRP value from AFC APP with UINT, we treat it
as a positive value. See the following reasons why EIRP power value
was changed when we received it as a UINT.
1. In the reg_find_eirp_in_afc_eirp_obj function, the afc 'eirp_power'
(16-bit) value is in units of 0.01, and it is an unsigned integer. For
example, if the negative value is "-1400" then it becomes "64136". With
this value, when we try to get the original EIRP value using division
(eirp_obj->eirp_power / EIRP_PWR_SCALE(100)), it returns "641", but the
expected EIRP value is -14.
2. In the reg_get_sp_eirp function, both the variables 'afc_eirp_pwr'
(8-bit) and 'reg_sp_eirp_pwr'(16-bit) are declared as unsigned integers.
For example, when "-14," is assigned to "afc_eirp_pwr", it becomes "242".
And assuming 'reg_sp_eirp_pwr' is "36", the minimum of the two variables,
using QDF_MIN(afc_eirp_pwr, reg_sp_eirp_pwr), becomes "36", but the
expected minimum is "-14 or 242".
Process the positive or negative EIRP values that are received from AFC
application. Receive it as an int instead of an unint and typecast it to
int when we check for minimum value from afc power and standard power.
Change-Id: I255225e1f68ab897d36f3d4fbd5e5815a862460b
CRs-Fixed: 3398501
Export wlan_reg_get_freq_range() and wlan_reg_get_freq_range() APIs
to be invoked by other modules.
Change-Id: I2de7acf395011bdcc20100fc5980ab69f2b9fbeb
CRs-Fixed: 3459316
wlan_reg_recompute_current_chan_list() is defined for MCC only.
Make this wlan_reg_recompute_current_chan_list() common for both WIN
and MCC.
CRs-Fixed: 3451996
Change-Id: Ifcead79a68d0ed04ac1e4b78063f36b91e4d6fd8
During initial AFC development it was assumed that AFC object would travel
till an application endpoint outside the driver, presumably till an
application of a different machine anything in the internet and therefore,
a packed and well formatted structure was propped for the AFC object.
However, when the AFC object leaves the driver, it is converted to an
object that has NL80211 TLVs to represent it. Therefore, the packed
AFC-request object is no longer a necessity. Moreover, since an unpacked
structure (or structures) is speed/time optimized, modify the packed
structures into unpacked structures.
Change-Id: I08db1911a355b6eebffa0e13def547c98ddf38d3
CRs-Fixed: 3431997
Add support for WMI_CSA_IE_RECEIVED_EVENTID as:
1. Register the handler
2. Handler to extract the event
Change-Id: I9f476c7fbc51d9686d05fbdb5f46dec3bcd3c29e
CRs-Fixed: 3431363
The kernel-doc script identified some documentation issues in
the doc of reg_get_min_max_bw_on_cur_chan_list, so fix those
issues.
Change-Id: I5f720706b8c744f39d4ad6f6dbd6e722c3d53096
CRs-Fixed: 3409405
Replace all callers of reg_set_channel_params_for_freq
with new api reg_set_chan_params_for_pwrmode
Change-Id: Ifefb8e0a2e9dc2dde5360f90b6c129573dfaddc1
CRs-Fixed: 3144601
Do not mark REGULATORY_CHAN_NO_IR channel flag for
the 5 GHz indoor channels if p2p go support is enabled
on indoor channels.
Change-Id: I7fbae71766260513aa9946446b7e8bf8507df53b
CRs-Fixed: 3411708
Add API reg_process_r2p_table_update_response to handle the event received
from target in response to rate2power table update cmd. Make a call to
end_r2p_table_update_wait from this API to end the wait timer triggered
for the update cmd. Add end_r2p_table_update_wait to
wlan_lmac_if_reg_tx_ops. Add a dispatcher
tgt_reg_process_r2p_table_update_response for this API and register it as
a rx_ops.
Add register and unregister APIs of rate2power table update response
handler to wlan_lmac_if_reg_tx_ops. Call the register API in
regulatory_psoc_open and unregister in regulatory_psoc_close. Define
struct r2p_table_update_status_obj and its members to receive the
response of rate2power table update cmd from target.
Change-Id: I6909e37620b94dc7fdcd3c7c0915a3fad8fa1cda
CRs-Fixed: 3405417
The kernel-doc script identified some documentation issues in the
umac/regulatory/dispatcher folder, so fix them.
Change-Id: I2d38ec243bba2f48f522e2b80ac097eec0e06a3c
CRs-Fixed: 3402138
Add support to get min and max band width of provided
channel enum, so that configured bandwidth can be validated
whether it lies in the range of bandwidth or not.
Change-Id: I765b4e8013d021eaca41b37789d1ef3f1d57fa7d
CRs-Fixed: 3402928
Add an API ucfg_reg_enable_disable_opclass_chans where given the
operating class, disable/enable the channels listed in the input
channel list.
The input channel list and operating class should be of 2 GHz or
5 GHz band.
Change-Id: Ie9dbbadbe28e5b5fdc2ec9c60c284da9c9e2286f
CRs-Fixed: 3301654
1. Enable sub chan DFS type if QCA_DFS_BW_PUNCTURE defined, or all bonded
operation freq will be affected and disabled for nol, puncture can't work,
always need to switch freq.
2. Find nearest puncture pattern for a bitmap.
For example, SAP started with channel width 320 MHz, if only 20 MHz freq
affected by radar, 320 + 20 puncture pattern is invalid, but puncture
pattern 320 + 40 can be used.
3. Fix build issue when QCA_DFS_BW_PUNCTURE defined as following.
error: incompatible pointer types passing 'qdf_freq_t[16]' (aka
'unsigned int[16]') to parameter of type 'uint16_t *' (aka 'unsigned
short *')
Change-Id: I374ed76c6a13ef5fac1a78073f1b8974b0a9bb30
CRs-Fixed: 3386020
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.
Replace the references of "reg_get_5g_bonded_channel_for_freq"
with "reg_get_5g_bonded_channel_for_pwrmode".
Change-Id: I4c978c7f938b14d79d0eadf4251a86a9165f496e
CRs-Fixed: 3147900
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.
Update callers of reg_is_chan_supported with super channel list.
reg_is_chan_supported to use the super channel list API
reg_is_chan_supported_for_pwrmode.
Change-Id: I5d33f7bb0bee6012c28d35e6138f5a03525c33ca
CRs-Fixed: 3357157
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.
Update caller APIs to use super channel list. Removed
wlan_reg_get_bonded_channel_state_for_freq and
wlan_reg_get_5g_bonded_channel_and_state_for_freq to use the
super channel API wlan_reg_get_bonded_channel_state_for_pwrmode
and wlan_reg_get_5g_bonded_channel_and_state_for_pwrmode
respectively
Change-Id: If51bd130892cd712f5a218067a5d321e874e134a
CRs-Fixed: 3357153
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.
Remove reg_get_5g_bonded_channel_state_for_freq,
wlan_reg_get_5g_bonded_channel_state_for_freq and
reg_update_5g_bonded_channel_state_punc_for_freq APIs to use the
super channel APIs reg_get_5g_bonded_channel_state_for_pwrmode,
wlan_reg_get_5g_bonded_channel_state_for_pwrmode and
reg_update_5g_bonded_channel_state_punc_for_pwrmode.
Change-Id: I895d70d3a07e239500f97b9ab7884d7723de5080
CRs-Fixed: 3144661
Add API reg_set_power_event_received_flag to set
is_6g_afc_power_event_received flag with a given value.
Change-Id: I322c3724f23c611d1a0d65248b777501c742000e
CRs-Fixed: 3260971
Add dispatcher for function reg_get_num_rules_of_ap_pwr_type
to get the number of rules supported for given power mode
Change-Id: I084cc4e47ed16a71c1a8a7db4a6f046a0007a9d7
CRs-Fixed: 3378907
If country code for AP and STA are same and if STA does not
support VLP mode for a particular channel and if AP power
type is misconfigured to VLP mode, do not allow connection
to that AP as per regulatory guidelines.
Change-Id: Ie3bb980df25a15c4d9d7e566663e28950414f733
CRs-Fixed: 3362142
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.
Remove wlan_reg_fill_channel_list to use the super channel API
wlan_reg_fill_channel_list_for_pwrmode.
Change-Id: I9645caff236af786b6376608be2aa56a28fe689c
CRs-Fixed: 3357161
Driver receive NL80211_CMD_START_AP to get fixed freq, width and
apply puncture_bitmap from EHT ie, disable punctured 20 MHz sub channels
in regulatory component, and send to F/W by vdev start, update eht op/he
op/vht op in beacon template.
When start ap, apply puncture to regulatory, set is_static_punctured flag
for all 20 MHz sub channels of current bonded channel in master channel
list of pdev, and disable 20 MHz sub channel in current channel list if
is_static_punctured is set.
When stop ap, remove puncture to regulatory, clear is_static_punctured flag
for all 20 MHz sub channels in master channel list of pdev, and don't
disable 20 MHz sub channel in current channel list if is_static_punctured
is not set.
change-Id: Ia97e7a4fa56a66f343bd648b62216347787ba6d0
CRs-Fixed: 3356755
For “Subordinate” clients in SP or VLP mode, FW does not send any
regulatory rules as currently no country supports subordinate in SP and
VLP. When the rules are not present, SP/VLP clients are connected to the
root ap in 0dBm tx power, which results in low throughput. Connecting to
the root ap using 0dBm tx power is not the correct behavior. If the rules
for any power mode is not available, clients should not connect in that
mode. Therefore, "Subordinate" clients cannot connect to the SP/VLP APs.
To resolve this issue, the device client type should be changed to
"Default" client type when it is connected to the root AP in SP or VLP
mode. Once it gets disconnected or when the root AP moves to LP mode,
its mode should be reset back to "Subordinate" client type.
Add a variable reg_target_client_type to wlan_regulatory_pdev_priv_obj
structure and in reg_propagate_6g_mas_channel_list, store the client
type received from target in it.
Add API reg_set_cur_6ghz_client_type to set the current client type to a
given value.
Add API reg_set_6ghz_client_type_from_target to set the current client
type to the value received from target.
Change-Id: Ie7d9e8b45cd831018c0058d65880a3659457b499
CRs-Fixed: 3349767
In current design of sta+sap scc on indoor channels, the NO_IR
flag of all the indoor channels are removed during init.
Then, based on the operations on the SAP interface, the
SAP concurrency will be decided in host driver.
However, some userspace p2p applications, do not query the
pcl list from driver, therefore standalone P2P GO are sometimes
brought up in indoor channels.
To fix this:
1. Upon STA connect: Remove the NO_IR flags only from the
indoor channels to which the STA is connected.
2. Upon STA disconnect: Add the NO_IR flag back to the
disconnected channel.
3. Upon STA roam/csa:
a) Add the NO_IR to the new channel if it is indoor.
b) Remove the NO_IR of the previously connected channel
once the SAP/GO(if present) moves out of the indoor channel.
4. The NO_IR flags should be removed for all the bonded channels
on which the STA is active.
5. In indoor concurrency cases, add logic in the SAP start to
limit the channel width with the STA interface bandwidth. Since,
only the bonded channels are active channels.
Change-Id: I0e200a1ef306909398644aecbfbca27622bb9d48
CRs-Fixed: 3337071
Export wlan_reg_get_cur_6g_client_type, so that it can be used
by APIs in other modules outside UMAC.
Change-Id: I010c58b85e43603b96a1281318ac59f368635aee
CRs-Fixed: 3343537
secondary_cur_chan_list channel list is for mobile device SAP, which
by default cannot enable on LPI channels, and cannot enable on SP
channel until AFC server response received.
Populate 6 GHz channels to secondary_cur_chan_list based on 6 GHz
regulatory rules of current country, LPI channel will not be added
in because it is not allowed for mobile SAP. And update 6 GHz SP
channel attributions if received AFC response.
Also add APIs to populate power attributions of secondary_cur_chan_list
and decide proper 6 GHz power attributions if 6 GHz channel frequency
and bandwidth being selected.
Change-Id: I6aa0228f18f7e31fc3cdd63a98483d02afb0579a
CRs-Fixed: 3204156
Add common code to configure target AFC flags:
enable_6ghz_sp_pwrmode_supp, afc_disable_timer_check,
afc_disable_request_id_check.
Remove cfg_get set is_afc_reg_noaction code, add it to psoc regulatory
private data.
Add APIs to set and get these AFC configures.
Change-Id: Idf74b245113eee18b071a7fbb92bb151cd535ce8
CRs-Fixed: 3154185
Replace all occurrences of
wlan_reg_set_channel_params_for_freq API with new API
wlan_reg_set_channel_params_for_pwrmode.
Change-Id: Id751558b32f2b61bd356e1ebce3238598fbd16c1
CRs-Fixed: 3144794
Add an API to check if the given input 6 GHz frequency is Tx-able
in the given power mode.
Change-Id: I9e94c1c3ec7c4c31d18bde6e88905a9239636f00
CRs-Fixed: 3305006
AFC request or response does not consider punctured channels/BW as an
input. Hence the SP EIRP/PSD power for punctured channels cannot be
derived directly from AFC response data.
Add punc_pattern as an input to the APIs reg_get_best_pwr_mode() and
reg_get_eirp_pwr() (and its dispatchers).
Compute SP EIRP for the punctured channels in
reg_get_sp_eirp_for_punc_chans() using the following formula:
MIN_PSD + 10log10 (Non-punctured BW)
Fetch min_psd from the AFC server response data for the input freq
and BW combination.
Use the total BW and puncture pattern to fetch the
non-punctured BW.
CRs-Fixed: 3306932
Change-Id: Id5c4c404a3155474a01a0dacb3bcf289e92e65ac
Add input_punc_bitmap to struct ch_params.
Add input puncture bitmap to regualtory channel search APIs.
The non-SP channels will be punctured by ACS module so that AP
can come up in highest possible BW in Standard Power mode
with the given primary frequency. These punctured channels are not
validated (whether supported in the given power mode of operation) by
the regulatory.
CRs-Fixed: 3278013
Change-Id: I56b0495be902fd92fc6da26e1007d60f930ba687
Add a dispatcher API wlan_reg_get_bonded_chan_entry to fetch
the bonded channel entry given freq, bandwidth and center of 320 MHz
channel.
CRs-Fixed: 3278013
Change-Id: I9449b3b4d72266fd7f2b6a0ea78b661fbfa5c6a9
Add regulatory support for giving preference to fill EIRP power
in the WMI_VDEV_SET_TPC_CMD_ID.
Change-Id: Iab28306b15d74109519629cb0b815cd110254d56
CRs-Fixed: 3307372
As part of upgrading legacy code with 6 GHz power APIs,
replace reg_get_channel_state_for_freq api with new api
reg_get_channel_state_for_pwrmode
Change-Id: I3e577148f0ee78f6ec8f96feef42be9ac920467d
CRs-Fixed: 3144822
Add a new regulatory callback registration API and a
regulatory API to update tx power whenever the country code
changes without change in operating channel OR if fcc
constraint is set. This MCC-specific regulatory API is
called from HDD and invokes the TPC calculation logic via a
callback during the above-mentioned cases.
Change-Id: I7d3db83129d169b7e0421c20c061de356f32cfa2
CRs-Fixed: 3311432
Replace all occurrences of
wlan_reg_get_channel_state_for_freq with
wlan_reg_get_channel_state_for_pwrmode and
use extra parameter as REG_CURRENT_PWR_MODE
Change-Id: Idfd0b095867a5e75e795d6297f998725e62f7300
CRs-Fixed: 3145012
As part of upgrading legacy code
with 6 GHz power APIs,
replace reg_is_disable_for_freq,
wlan_reg_is_disable_for_freq and
reg_set_5g_channel_params_for_freq APIs
with reg_is_disable_for_pwrmode,
wlan_reg_is_disable_for_pwrmode and
reg_set_5g_channel_params_for_pwrmode APIs
respectively.
Change-Id: I70089b02fd3698dcd83d5418993f7ca238ad0e0b
CRs-Fixed: 3145785
The macro QCA_DFS_BW_PUNCTURE depends on the macro
WLAN_FEATURE_11BE. This creates compilation issue and fix
is introduced in this patch.
CRs-Fixed: 3282072
Change-Id: I680670e58bd57d104bc69f2b4e7a56010b7584a5
When radar is found in any DFS channel, a radar bitmap is
generated based on the radar infected channels. For example,
if operating channel is 100 HT160 and radar found in 112,
then the generated bitmap is B0000_0010. This proposed bitmap
is compared with the valid puncturing patterns. In this case,
the proposed bitmap is valid puncturing pattern.
In case of a valid puncturing pattern, send the final
bitmap to DFS module and the module updates the DFS channel
puncturing pattern. If an invalid puncturing pattern is
found, return value zero and do not update DFS channel
puncturing pattern.
CRs-Fixed: 3273800
Change-Id: Iee23ac267bfea1b4815a72c2728555f96bed6466
When set_fcc_channel is set, host driver sets tx_power info about
channels 12, 13 to hardcoded values. Now firmware sends information
about channels 12, 13 to host driver and currently there is no
support to extract and store this information and use it to
modify tx_power of channels 12, 13 in host driver.
Add support to store the tx_power of channels 12, 13 received
from firmware and use this to modify tx_power of fcc channels.
Change-Id: Ie7b20a75bb09956a70b7b133ce7ce9beb8db138b
CRs-Fixed: 3270676
Currently, the reg_get_client_power_for_connecting_ap() API
populates is_psd_power flag within the function and uses it
as a check to further populate EIRP power. The is_psd_power
flag is derived from current channel list chan flag which
returns true if corresponding channel supports PSD power.
Normally, all 6 GHz channels support PSD, so this flag is
usually set to 1. But, AP can transmit EIRP power in TPE IE
for 6 GHz channels, thus for MCC specific cases, derive this
flag based on tx_power interpretation field in TPE IE for
accurate value. WIN Host can still use reg_is_6g_psd_power()
to retrieve the flag in the caller APIs.
Hence, derive is_psd_power flag from TPE IE interpretation
value beforehand and pass it as an argument to
reg_get_client_power_for_connecting_ap() API.
Change-Id: Iabbcbd003f441151643a087ad4908bcdaed753a5
CRs-Fixed: 3268118
Add rxops reg_display_super_chan_list, its core and dispatcher functions to
display super channel list for all modes.
Change-Id: I2b094d407d318ad84ac79ea3a4bc1127606c0fa2
CRs-Fixed: 3212642
Currently the INVALID_CHANNEL assumes the value 0xBAD. When a channel list
array is indexed, there is an array out of bound error when the channel
list array is indexed using INVALID_CHANNEL or when the index is greater
than equal to NUM_CHANNELS. So a check for an invalid channel enum is
likely to be, (ch_enum == INVALID_CHANNEL) && (ch_enum >= NUM_CHANNEL).
Redefine INVALID_CHANNEL enum constant with NUM_CHANNELS constant so that,
the validity checks for channel enum is compressed as,
(ch_enum >= INVALID_CHANNEL).
Change-Id: I5be588fe6011ac85031325f56eff208f2aa7a1e5
CRs-Fixed: 3238386
Remove function reg_is_offload_enabled as its redundant function of
reg_is_regdb_offloaded.
Change-Id: Ib526a9a3fecbd9edee3fa4cebc04c2fd06a54033
CRs-Fixed: 3242777
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