Grafico dei commit

617 Commit

Autore SHA1 Messaggio Data
Divyajyothi Goparaju
28aa42540e qcacmn: Replace wlan_reg_set_channel_params_for_freq
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
2022-11-01 09:18:51 -07:00
Amith A
0f5cd03b90 qcacmn: Modify wlan_reg_get_eirp_pwr to get client EIRP
Modify wlan_reg_get_eirp_pwr and its sub functions to to get client
EIRP.

Change-Id: Icbc33833ac0fef1d150a491e5398b913e18f3fac
CRs-Fixed: 3316710
2022-11-01 03:39:59 -07:00
Amith A
60e23f8e3b qcacmn: Add an API to check if given 6 GHz freq is Tx-able
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
2022-10-31 23:18:46 -07:00
Priyadarshnee Srinivasan
f5324ff1ce qcacmn: Add best power mode changes for punctured channels
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
2022-10-26 01:16:52 -07:00
Priyadarshnee Srinivasan
7ef4c7a634 qcacmn: Add input puncture bitmap to channel search API
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
2022-10-26 01:16:27 -07:00
Priyadarshnee Srinivasan
571b7fcf35 qcacmn: Add a dispatcher API to fetch bonded chan entry
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
2022-10-25 22:09:07 -07:00
Priyadarshnee Srinivasan
cdd62624af qcacmn: Add an API to fetch the AFC freq range and psd limits
Add an API to fetch the freq range and PSD limits from AFC server
response

Change-Id: I583dfbd6f58e6293ba2d9df5d49763f236a2698c
CRs-Fixed: 3306932
2022-10-25 18:38:52 -07:00
Hariharan Basuthkar
1773c16687 qcacmn: Add Regulatory support for EIRP preference
Add regulatory support for giving preference to fill EIRP power
in the WMI_VDEV_SET_TPC_CMD_ID.

Change-Id: Iab28306b15d74109519629cb0b815cd110254d56
CRs-Fixed: 3307372
2022-10-22 19:48:42 -07:00
Divyajyothi Goparaju
f3372af250 qcacmn: Replace reg_get_channel_state_for_freq
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
2022-10-20 12:50:32 -07:00
Amith A
d64ebfde22 qcacmn: Default power mode setting of 6 GHz AP
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
2022-10-20 01:11:51 -07:00
Asutosh Mohapatra
db0def4e98 qcacmn: Add cosmetic changes for fcc rule specific functions
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
2022-10-20 01:11:37 -07:00
Jithender Miryala
aa2e2a2b81 qcacmn: Update the regulatory database which was missed in version 41
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
2022-10-18 07:13:49 -07:00
Gururaj Pandurangi
880d85269f qcacmn: Add reg APIs to update tx power on ctry code change
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
2022-10-17 19:59:39 -07:00
Amith A
c307d90397 qcacmn: Add default tx power values for VLP
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
2022-10-17 12:58:02 -07:00
Qun Zhang
a3e3334d61 qcacmn: Update AUTO US 5 GHz regulatory domain
Update AUTO US 5 GHz regulatory domain to FCC3 per
latest regdomain revision.

Change-Id: If20fdc94107b2aa52d1a2a51b3ed5164ebb87ec1
CRs-Fixed: 3286603
2022-10-10 21:25:03 -07:00
Jeff Johnson
bbc6f89c23 qcacmn: umac: regulatory: Fix misspellings
Fix misspellings in umac/regulatory/...

Change-Id: I9ede258627348c877cc824f80caae903fa0b21f2
CRs-Fixed: 3304700
2022-10-10 10:01:48 -07:00
Divyajyothi Goparaju
e308a57a37 qcacmn: Replace reg_get_320_bonded_channel_state
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
2022-10-09 13:02:00 -07:00
Divyajyothi Goparaju
09546389da qcacmn: Replace wlan_reg_get_channel_state_for_freq
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
2022-10-06 13:01:30 -07:00
Divyajyothi Goparaju
8cafea036b qcacmn: Peer sta connects in HE20 for SAP HE160
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
2022-10-01 19:39:08 -07:00
Divyajyothi Goparaju
7da3869958 qcacmn: Replace reg_is_disable_for_freq
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
2022-10-01 11:35:35 -07:00
Liangwei Dong
4639aa873c qcacmn: Check channel invalid for disabled channel
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
2022-10-01 08:10:58 -07:00
Asutosh Mohapatra
238555b44c qcacmn: Save fcc constraint flag in psoc_priv_obj
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
2022-09-29 14:28:44 -07:00
Jithender Miryala
c9587d7abf qcacmn: Update Regulatory Database to 41th version
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
2022-09-29 02:27:56 -07:00
Huashan Qu
75cc8cdf78 qcacmn: Update Automotive Regulatory Database to 40th version
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
2022-09-22 02:21:50 -07:00
Amith A
dbb1efa360 qcacmn: Disable SP channels in super chan list if AFC not done in indoor
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
2022-09-11 22:56:07 -07:00
Vijay Krishnan
056b6ae310 qcacmn: Fix compilation issue of QCA_DFS_BW_PUNCTURE
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
2022-09-08 07:47:32 -07:00
Vijay Krishnan
ef864278aa qcacmn: Validate the proposed bitmap and enable puncturing
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
2022-09-08 07:47:25 -07:00
Asutosh Mohapatra
c70f8eec91 qcacmn: Add support to store and use fcc rules sent by firmware
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
2022-09-05 21:33:04 -07:00
Paul Zhang
4cdffd25aa qcacmn: Replace ap reg rules with client reg rules
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
2022-09-03 06:21:59 -07:00
Gururaj Pandurangi
534715624f qcacmn: Update is_psd_power logic in reg get client pwr API
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
2022-09-02 19:14:42 -07:00
Amith A
9eefe85e1d qcacmn: Add rxops to display super channel list for all modes
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
2022-09-02 14:32:39 -07:00
Vinod Kumar Myadam
d93887d03f qcacmn: Optimize log prints in reg_copy_ch_params
In reg_copy_ch_params, logging all bandwidth except 320 MHz,
leads to excessive logging.

Change-Id: If9d9f8e65c4c0d58fb570d8e6cccc7a7ebd5ec26
CRs-Fixed: 3277099
2022-08-28 23:16:18 -07:00
Vignesh U
6efe5cf271 qcacmn: Redefine the regulatory constant INVALID_CHANNEL
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
2022-08-17 19:58:12 -07:00
Sheenam Monga
7ca62390e7 qcacmn: Avoid incrementing usable channel count for 0 freq
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
2022-08-09 21:07:49 -07:00
Sheenam Monga
21c6766062 qcacmn: Update Regulatory version
Currently Regulatory DB is updated to 40th version
but in comment 38th version is added.

Change-Id: I65ea330e6c06965255bd84b8831c738bf18eee45
CRs-Fixed: 3253391
2022-07-29 09:20:51 -07:00
Divya R
f464dd0f89 qcacmn: Remove function reg_is_offload_enabled
Remove function reg_is_offload_enabled as its redundant function of
reg_is_regdb_offloaded.

Change-Id: Ib526a9a3fecbd9edee3fa4cebc04c2fd06a54033
CRs-Fixed: 3242777
2022-07-25 08:22:11 -07:00
Paul Zhang
e6eb58971d qcacmn: set pdev id to 0xFF when set country code
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
2022-07-19 08:46:57 -07:00
Hariharan Basuthkar
f8cd3e0110 Revert "qcacmn: Check if opclass is supported by country"
This reverts change-id I3be0e0aa7dc2a41f987a6725bc74444311408e51.

Change-Id: I89b373e1445b62c0eb00850ad6bf969045a42f7a
CRs-Fixed: 3246260
2022-07-18 23:36:31 -07:00
Qun Zhang
c9493c28ee qcacmn: Align secondary_cur_chan_list/cur_chan_list channel state
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
2022-07-17 19:45:48 -07:00
Ashish Kumar Dhanotiya
ad57ba6d68 qcacmn: Use super channel list instead of current channel list
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
2022-07-15 22:26:20 -07:00
Ashish Kumar Dhanotiya
498761949d qcacmn: Update regulatory APIs to use super channel list
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
2022-07-15 22:26:13 -07:00
Jianmin Zhu
a8990e0bab qcacmn: Peer sta connects in HE20 for SAP HE160
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
2022-07-15 19:07:06 -07:00
Vignesh Mohan
93eaeb9799 qcacmn: Modify the get chan enum API to binary search
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
2022-07-13 00:22:20 -07:00
Vignesh Mohan
216322b1de qcacmn: Use formula to get IEEE from frequency
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
2022-07-13 00:22:13 -07:00
Amith A
d298ea09cd qcacmn: Restrict LPI channels in mas chan list in outdoor deployment
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
2022-07-12 08:56:55 -07:00
Hariharan Basuthkar
967441ed46 qcacmn: Check if opclass is supported by country
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
2022-07-12 07:01:04 -07:00
Vignesh U
65ae278074 qcacmn: Add the regdomain definition for ETSI15_ETSIC
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
2022-07-12 07:00:50 -07:00
Sheenam Monga
162ab8974a qcacmn: Remove multiple definitions of regulatory enums
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
2022-07-11 03:59:30 -07:00
Amith A
5bb1139116 qcacmn: Add API reg_is_supr_entry_mode_disabled to check AFC_NOT_DONE flag
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
2022-07-09 09:59:36 -07:00
Hariharan Basuthkar
261715db9e qcacmn: Modify max_bw for 240 MHz channels after copying to psoc
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
2022-07-08 01:21:01 -07:00