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
In outdoor deployment, if there are VLP rules present, set the default
power mode as VLP, else set it as SP.
In indoor deployment, if there are LP rules present, set the default
power mode as LP, else if VLP rules are present, set it as VLP, else set
it as LP.
In reg_propagate_mas_chan_list_to_pdev, make the call to
reg_save_reg_rules_to_pdev before reg_init_pdev_mas_chan_list as
reg_set_ap_pwr_type which is called in its path requires reg rules.
Change-Id: I773c54b18aceb8db9666d16b08e841216124aaff
CRs-Fixed: 3311810
Place extract_ext_fcc_rules_from_wmi function near its
caller and modify function definiton of empty function
reg_set_pdev_fcc_rules.
Change-Id: I6918addbe81bb410355616023e0c6dac534700b6
CRs-Fixed: 3286479
1. Update "6 GHz max bw support" for KUWAIT country.
2. Do not map "FCC1_AP_SP_6G" to super ID 01(FCC1_6G_01) which is not
allowed.
Change-Id: I61cc359a34257aeb00b8e3449398e0b73bb49590
CRs-Fixed: 3303138
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
The default PSD and EIRP tx-powers are filled only for LPI power mode.
Since VLP support is added, add default PSD and EIRP tx-powers for VLP
power mode.
Change-Id: Ida8eebaf37a6bf6c663a24f832b4e89baf2d8659
CRs-Fixed: 3311795
Replace all occurrences of
reg_get_320_bonded_channel_state function with new
function reg_get_320_bonded_channel_state_for_pwrmode
and use extra parameter as REG_CURRENT_PWR_MODE.
Change-Id: Iaaf553eed582f03b2d4a5842baa031607b69414f
CRs-Fixed: 3145724
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
SAP secondary channel offset of HT info in beacon is set wrongly.
When STA connects it, channel bonding mode check fails, falls back to
20 MHz width.
SAP secondary channel offset of HT info in beacon is decided by checking
40 MHz bonded frequency list. If primary frequency is start frequency of a
bonded frequency, then secondary channel is above the primary channel,
secondary channel offset should be set to 1, else set to 3.
For example, if SAP primary frequency is 5220 MHz, {5220, 5240} is 40 MHz
bonded frequency, secondary channel offset only can be 1, can't be 3.
Change-Id: Ife56e3d039f3fcf1912bedf696b1703a0e8f194f
CRs-Fixed: 3302759
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
If the requested power mode is not supported, the API
reg_get_chan_state_on_given_pwr_mode may return
CHANNEL_STATE_INVALID flag. Besides check
CHANNEL_STATE_DISABLE for disabled channel, add check
CHANNEL_STATE_INVALID also.
If partner link frequency is not supported by regdomain,
do not enable the partner entry.
Change-Id: Ic7adfdcc4e535d6303fa0f4253d1499d369bc222
CRs-Fixed: 3302241
Currently only pdev_priv_obj has fcc constraint flag and
it's value gets modified according to the SET_FCC_CHANNEL
command. As a result after getting SET_FCC_CHANNEL command
if wifi turned off and turned on or during SSR sequence
its value is reset to false as pdev is deleted and recreated,
hence the tx_power values of fcc frequencies aren't decreased.
To address this issue, store the fcc constraint flag in
psoc_priv_obj and copy its value to fcc constraint
flag in pdev_priv_obj during pdev creation.
Change-Id: Ic2f5450fd763abf04ad89fe4e5148d03f3b5d69a
CRs-Fixed: 3292446
1. Change (or) Add the following country mapping to Regdomain for 6 GHz.
i) Map Full 6 GHz Reg domain HEX CODE 0x0C to FIJI
ii) Map Full 6 GHz Reg domain Hex code 02 to KENYA, MAURITIUS and MONGOLIA.
iii) Create new Full 6 GHz Reg domain Hex code 0x0D and map to ISRAEL and
KUWAIT.
iv) Create new Full 6 GHz Reg domain Hex code 0x0E and map to NEW ZEALAND,
NIUE, COOK ISLANDS
v) Map Full 6 GHz Reg domain HEX CODE 01 to ANTIGUA AND BARBUDA, ARUBA,
BAHAMAS, CAYMAN ISLANDS, DOMINICAN REPUBLIC, EL SALVADOR, JAMAICA and
VENEZUELA.
vi) Map Full 6 GHz Regdomain Hex code 0x0B to Japan.
2. Add the following regulatory database for 2.4/5 GHz and 5 GHz.
i) Create new 5 GHz Regdomain APL28 (Hex 0x1233) and Full 2 & 5 GHz
Regdomain APL28_ETSIC (0x76)
ii) Update PAKISTAN from APL1_ETSIC to APL28_ETSIC.
3. Add the following regulatory database 2.4/5 GHz and 5 GHz for Auto only
i) Create new 5 GHz Regdomain ETSI19 (Hex 0x0E45) and Full 2 & 5 GHz
Regdomain ETSI19_WORLD (0x7B)
ii) Update ISRAEL from ETSI17_WORLD to ETSI19_WORLD.
Change-Id: I8de892abdc8f446e17ccb6a039ae90ab092b6c0d
CRs-Fixed: 3287062
Update Automotive Regulatory Database to 40th version, sync with
change 'Change-Id: I7fa7f1e9f3e6fcd6aa6ecd5aa21bd4e82aeb19a0'
Replicate 'Country Mapping for Linux Android' table for 'AUTO'.
Change-Id: I8dcee18ae3bb687f5724f18ece0cff9e2144b558
CRs-Fixed: 3293159
In reg_update_sup_ch_entry_for_mode function, mas_chan_list_6g_ap is
copied to super chan list when AFC power event is not received.
mas_chan_list_6g_ap would have SP channels enabled based on the regulatory
rules and this is propagated to super channel list. In outdoor deployment,
the SP channels can be marked enabled when AFC power event is not received
as there is REGULATORY_CHAN_AFC_NOT_DONE flag set for such channels. But
in indoor deployment, as this flag is not applicable, SP channels should
not be marked enabled.
To fix this, return from reg_update_sup_ch_entry_for_mode function before
enabling the SP channels if the deployment type is not outdoor.
Change-Id: I3c5ccdc4826c33002bf1bb33f686404fa0ffcc65
CRs-Fixed: 3270672
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, there is no ap reg rules from the regdomain for
some countries. But function reg_append_mas_chan_list_for_6g_lpi
and reg_append_mas_chan_list_for_6g_vlp get the master chan per
the ap reg rules number. It casues it can't get the master chan
list for 6 GHz even it has client reg rules.
To resolve this issue, using num_of_6g_client_reg_rules instead of
num_of_6g_ap_reg_rules.
Change-Id: If2dc6510edc61531cb1a3b8002e43a1bd69311e0
CRs-Fixed: 3278250
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
Currently if both filters are added to get usable channels
i.e FILTER_CELLULAR_COEX and FILTER_WLAN_CONCURRENCY (3) then
all channels for required band are added first and then response
is updated based on cellular coex filter and invalid and avoided
channel frequencies are removed based on provided mode but for
FILTER_WLAN_CONCURRENCY pcl list is added, if frequency is not
present in response channel list and count is incremented. As
invalid frequencies are already removed from response before concurrency
check , so some pcl frequencies will not be present in the list and
count may be updated more than valid count.
Fix is to add frequencies based on concurrency filter first and then
remove invalid frequencies based on celluar coex filter to avoid
any invalid increment of channel list count.
Change-Id: I72b13c9c1f1bdfe3616d44fe893ce306634b022e
CRs-Fixed: 3262059
Currently Regulatory DB is updated to 40th version
but in comment 38th version is added.
Change-Id: I65ea330e6c06965255bd84b8831c738bf18eee45
CRs-Fixed: 3253391
Remove function reg_is_offload_enabled as its redundant function of
reg_is_regdb_offloaded.
Change-Id: Ib526a9a3fecbd9edee3fa4cebc04c2fd06a54033
CRs-Fixed: 3242777
From firmware perspective, host only sets 5 GHz regdomain hence 2 GHz
uses default setting and firmware does not update channel list event
for all phys according to the new country code.
Therefore sets pdev_id to 0xFF in function reg_set_country and it is
mapping to WMI_PDEV_ID_SOC when issue wmi command
WMI_SET_CURRENT_COUNTRY_CMDID as firmware required.
Change-Id: I0eb84db9f6d77c0473161cc4ffc0dcebd31c3d45
CRs-Fixed: 3239644
Currently the channel state of HST secondary_cur_chan_list/cur_chan_list
is out of sync and beacon IE is populated from secondary_cur_chan_list,
which causes the actual supported channel lists and country IE channel
lists are unmatched for non-6 GHz case. So let secondary_cur_chan_list
align with cur_chan_list.
Change-Id: Ie3914ac48dc05d61ac2deb78a2892986efe238dd
CRs-Fixed: 3239390
Currently regulatory is using current channel list to indicate
the available channels to all the interested components.
With the addition of 6 GHz channels which has different power
types, super channel list is introduced.
With this change, use super channel list to indicate available
channels to other components.
Change-Id: I1a99643d83f090937a667e528b0359b27311e40c
CRs-Fixed: 3160500
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
SAP secondary channel offset of HT info in beacon is set wrongly.
When STA connects it, channel bonding mode check fails, falls back to
20 MHz width.
SAP secondary channel offset of HT info in beacon is decided by checking
40 MHz bonded frequency list. If primary frequency is start frequency of a
bonded frequency, then secondary channel is above the primary channel,
secondary channel offset should be set to 1, else set to 3.
For example, if SAP primary frequency is 5220 MHz, {5220, 5240} is 40 MHz
bonded frequency, secondary channel offset only can be 1, can't be 3.
Change-Id: I491c2351c4c89d6344adf40a46150dc7577ee783
CRs-Fixed: 3241004
Modify the get API that fetches the channel index given a frequency,
from a linear search to a binary search to improve the search time.
CRs-Fixed: 3230932
Change-Id: Id6a1a20d80989a797505772954fb913c4f57d227
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
When the deployment is outdoor, there will be only SP rules for AP and no
LPI rules. But there can be LPI rules for client and when this happens,
master chan list is filled with the LPI rules for client modes. It is
then propagated to super chan list when super chan list is computed.
In AFC, when power/expiry event is received, ol_ath_trigger_acs_for_afc
iscalled. In the path of ol_ath_trigger_acs_for_afc, channels are marked
with IEEE80211_CHAN_NO_IR based on availability using super chan list.
This check is failing as there are LPI client entries in super chan list
with enabled state.
In order to fix this issue, LPI rules must be restricted when filling
master chan list.
Change-Id: I7085c376f78f65c2ff3e2c9ec98d4047b5bff896
CRs-Fixed: 3234395
When operating class 137 (320 MHz width) is filled in the AFC partial
request on a radio that supports upto 160 MHz bandwidth, there is a
crash observed.
The 160 MHz platform on which the issue is reported does not have
enough memory to accommodate a 320 MHz AFC response. Therefore, the
crash happens.
To fix this issue, fill the operating class in the AFC partial request
based on the max_5g_bw sent in the WMI_REG_CHAN_LIST_CC_EXT_EVENT.
Change-Id: I3be0e0aa7dc2a41f987a6725bc74444311408e51
CRs-Fixed: 3238405
The full regdomain pair ETSI15_ETSIC is not split into 5 GHz regdomain
and 2 GHz regdomain. So the corresponding country configuration (country
alpha 'LK') and the regdomain configuration (regdomain id '0x7A')fails.
Add the 5 GHz and 2 GHz regdomain definition for the regdomain pair
ETSI15_ETSIC .
Change-Id: Ia54516cd15d081c315f988bb3c1ecb258b352f05
CRs-Fixed: 3236859
Currently, separate reg_domain and country_code are defined for
qcacmn and qcacld and add correct enum values for 5 GHz & 2 GHz domains.
Define reg_domain and country_code in reg_db.h and include
reg_db.h to avoid multiple definitions.
Change-Id: Icd1da48a51a107a7b8ba04570d01c44d504492c4
CRs-Fixed: 3206927
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
A kernel warning is observed when the reg_rules are sent to the cfg80211
module on a 320mhz supported radio.
On a 320mhz supported radio, for the 5 GHz reg_rule of the 5490-5730 band,
the max_bw initially comes from the target as 240 MHz. Since
reg_modify_max_bw_for_240mhz_5g_chans is called before copying
the reg_rules to psoc, the max_bw is set to 320 MHz. There is a warning
condition the cfg80211 module to check if the max bandwidth is greater
start and end frequency difference. This check causes the warning.
To fix this issue, call reg_modify_max_bw_for_240mhz_5g_chans after
copying the reg_rules to the psoc.
Change-Id: I385971a2f6c849f7cdd17903ff33646f0fa9d47e
CRs-Fixed: 3236069