In reg_set_ap_pwr_and_update_chan_list, before setting the AP power type
check the number of reg_rules present for the input AP power type.
Change-Id: I3af82cf8b7ff6ed7525b5284390361a618da4140
CRs-Fixed: 3030223
Fix a compilation error in ucfg_reg_get_partial_afc_req_info, when
CONFIG_AFC_SUPPORT is enabled.
Change-Id: I9834170b08bd72ee4201284c22211e3b1e5fc560
CRs-Fixed: 3029969
When the host driver is insmod-ed, and first time the pdev object
is created, the AP power mode starts with LPI. When the FW sends the AFC
power values, the Host switches to SP mode.
If 'wifi down and wifi up' happens, all the VAPs are deleted but
pdev object is retained in the memory. Since, during 'wifi down and
wifi up' the FW is reloaded again, the FW starts with LPI always.
However, since pdev object already exists the AP power mode variable
in the regulatory private object has the same old power mode.
To fix the problem described above, update the power mode whenever
the WMI_REG_CHAN_LIST_CC_EXT_EVENT is received from the target.
Change-Id: I7a349e4defcd50cd46117d8ee55bbe8c7c8f7e80
CRs-Fixed: 3028659
ACS needs the intersection of SP channel and the channel list in the AFC
response.
Create intersected AFC channel before calling ACS.
Change-Id: I9443edfc4d8b31edf5ae7e040c0743de9a0851b3
CRs-Fixed: 3023930
The function reg_get_partial_afc_req_info() declaration is different from
its definition prototype.
Change-Id: Idd36e1343dd2af1d5ecaf3b8dcbaf7dc6839d560
CRs-Fixed: 3023862
When 6G IEEE channel 2 (5935 MHz) is enabled in the master channel list,
and if the channel 1 (5955 MHz) is the input to the API
reg_compute_chan_to_freq, the API returns 0 as the output channel
frequency.
Since the IEEE number 2 is greater than 1 (but in terms of frequency it
is a lesser value), the break condition in the for-loop gets
satisfied, and since the enum of channel 2 is equal to MIN_6GHZ_CHANNEL,
the API returns 0.
To fix this issue, in reg_chan_band_to_freq, handle 6G channel 2 as a
special case by directly returning its frequency, and also
skip it from the search space of reg_compute_chan_to_freq.
Change-Id: Ief79ee2d93f4d547688e10113a8105a763c767f8
CRs-Fixed: 3013255
While appending one of the 6g_master_channel lists (based on power
type) to the master channel list, if the power type is standard power,
intersect the standard power list with the afc power list and append
the intersected list to the master channel list if the afc power
list is available.
Change-Id: I606e765a4abd5cd71cf35a13ac799fdec8e87ffd
CRs-Fixed: 3023853
Add a regulatory dispatcher API to fetch the value of AFC action
from the ini config.
Change-Id: I053262f98991a656d1919817ce37227202a46bc3
CRs-Fixed: 2997899
Currently the AFC request buffer is being freed twice in
reg_free_expiry_afc_info and tgt_afc_event_handler.
Make changes to free the AFC req buffer only once.
Change-Id: I6d0f5c783a124da40eae6166132f7d7132cf76e4
Add regulatory functions to handle the WMI_AFC_EVENTID. This
includes processing the AFC power information received from the FW,
and constructing the AFC channel list in the regulatory component.
Change-Id: I5da8fc7faae847476f88ff35b20e6444115af7f1
CRs-Fixed: 3023789
The body of the two following functions:
1)reg_get_num_sp_freq_ranges,
2)reg_cp_freq_ranges
have much in common.
Move the common part into a single function in order to optimize code size.
Change-Id: Ice9e925ef0e64baa41f867a92a3c3d2902374d74
CRs-Fixed: 3019338
The regulatory rules contain the frequency ranges that are supported
by the current regulatory domain. Also every radio has a chip range
which indicates the range of frequencies supported by the radio. To
find the list of frequencies for the AFC request, add each regulatory
frequency range that are within the chip range to the AFC list of
frequency ranges. If a regulatory range has a partial overlap with the
chip range add only the overlapping part of the range to the AFC list
of frequency ranges.
Change-Id: Ida3e2217783db82fef2825c6a6603e79ef65951b
CRs-Fixed: 3019336
1) Add an ucfg dispatcher for reg_afc_start.
2) Add an API wlan_reg_get_afc_req_id, to fetch AFC request id.
3) Add an API wlan_reg_is_afc_expiry_event_received, to check if the AFC
expiry event is received from the target.
Change-Id: I45841706c500e74632b60546d945cde4d634a5d2
CRs-Fixed: 3011675
Export regulatory API wlan_reg_get_next_lower_bandwidth to
get next lower bandwidth of given channel bandwidth.
Change-Id: Id86d83c1bf738061d325b23d3f46b77d45eaeca5
CRs-Fixed: 3021976
Add an API wlan_reg_is_afc_power_event_received, to check if AFC power
event is received.
Add an API wlan_reg_get_6g_afc_mas_chan_list. to get the AFC master
channel list.
Export wlan_reg_get_6g_afc_chan_list so that it can be used by
APIs outside the UMAC module.
Change-Id: I09338a41f38e4db03f00ef2c15e9a0b7805f649e
CRs-Fixed: 2991293
Create a new struct afc_regulatory_info to store the parameters
received in the WMI_AFC_EVENTID.
Also add the following members to the wlan_regulatory_pdev_priv_obj:
1) bool is_6g_afc_power_event_received
2) bool is_6g_afc_expiry_event_received
3) struct regulatory_channel afc_chan_list[NUM_6GHZ_CHANNELS]
4) struct regulatory_channel mas_chan_list_6g_afc[NUM_6GHZ_CHANNELS]
Change-Id: I27ae8545e28bc2ca1c7004d2d2adcc539dc9a8f9
CRs-Fixed: 3017210
If two channel avoid event reported by FW back to back, flag
psoc_priv_obj->ch_avoid_ind of 2nd event set by
reg_process_ch_avoid_event may be modified when processing
1st event in reg_call_chan_change_cbks, from
scheduler_thread context.
Copy chan avoid info to message post to scheduler to avoid
such timing issue.
Change-Id: I8fd5e7e8f2d9b2117a5c6a54fd8b64659e10f7d6
CRs-Fixed: 3012331
Instead of using a fixed sized array of cfis for every operating class row,
which occupies a large amount of unused memory for many operating class
rows, use a pointer to an array and the length of the array so that each
row uses only the right amount of the memory required.
Change-Id: Ifc9974b7dc7c71b2e51b2a93a8d5c08f4fa89dfc
CRs-Fixed: 3009346
Change Ia0676c03cef9c7b010762326e535477beefe36ac added a few extra space.
Remove them.
Change-Id: I5780e3a377c0f4272d6b377015ec80449cfc4f5a
CRs-Fixed: 3005569
In change Ia98b97f4cfe47dcd94bfa54f3dd7be13c8696532, the function
'reg_psd_2_eirp' is defined twice:
1)when WLAN_FEATURE_11BE defined
2)when WLAN_FEATURE_11BE is not defined.
However, both the functions are same except that (2) has the following
statement of 3 lines(marked by lines beginning with '>>'):
>>case BW_320_MHZ:
>>ten_log_bw = 25; /* 10* 2.50514 = 25.0514 */
>>break;
and (1) does not have the 3 lines.
Both the functions require identical updates for their the common part.
However, it is very likely to miss updating one function and update
the other function. Or do different updates for the common part.
Similarly for the non-common part, the function that does not need the
non-common part also may get updated. Therefore, having multiple
identical function bodies for the same function under conditional
compilation is not a good design choice.
Convert the mapping (psd+bw -> eirp) done through 'switch case' into a
linear search through a lookup table. Refactor the code so that there
is only one function body and the non-common part moves to the lookup
table under the conditional compilation.
Change-Id: Ic2c6e7dff5a2fed9d1c6624b042d2be023cafcfc
CRs-Fixed: 3005569
With the current implementation, the 5.9 GHz channels are disabled in
reg_modify_chan_list_for_5dot9_ghz_channels if the chipset is not a
FO chipset.
Put the check for FO under the macro CONFIG_REG_CLIENT which is enabled
only for STA target, as for AP target we need the 5.9GHz channels to be
enabled in the legacy chipsets (non Lithium) if the bdf bit is enabled.
Change-Id: I97c8b4f5140ecf635f1203bf43b29c294cd8a751
CRs-Fixed: 3001808
Update the invalid freq print with the actual frequency value for easier
debug.
Change-Id: I4e5bafaf902e19f4d070a7b140a2317a0988abf6
CRs-fixed: 3001345
The max-bw of a reg channel is not updated properly when the regulatory
channel list changes via cmds like setch144. Channel 144 (set via setCh144)
in Japan supports a maximum width of 80 though the reg rules read
160 (CHAN_5490_5730_6). Reducing the maximum bandwidth to 80
is done in reg_modify_chan_list_for_max_chwidth() API which does not
get invoked when setCH144 cmd gets invoked.
reg_modify_chan_list_for_max_chwidth API must be invoked
whenever regulatory channel list is modified. Hence invoke this API from
reg_compute_pdev_current_chan_list.
(Revert ChangeID: I36fb19f727c62bc86d61d81494ca1791a33cf99e)
CRs-Fixed: 2993289
Change-Id: Ic4c372cea0185366fbec387dbf2316cecb288fce
In reg_get_5g_bonded_chan_array_for_freq, check if bonded channel
pointer is valid before dereferencing. This will help prevent potential
crash when the pointer is invalid. Also, add debug prints to allow
easier detection of issue.
Change-Id: I2891204101cd3b256ecc90d44f76c6fbb6d450b7
CRs-fixed: 2992744
The AFC server sends an AFC response after processing the AFC request.
The AFC Request has a set of request objects: Location,Request ID,
Frequency ranges, Global operating classes, Minimum desired power etc.
The Request ID is generated by FW/target and is sent to HOST
regulatory via the AFC START/RENEW WMI event. On receiving the event,
the HOST creates a partial AFC request by filling frequency ranges,
Global operating classes and minimum desired power. The partial
request is then sent to MLME and finally to AFC application.
The request is called partial because the Device Description and
Location Information are not known to regulatory and not filled in by
the regulatory. They are filled in to create the final AFC request by
the AFC application.
Change-Id: Ia0676c03cef9c7b010762326e535477beefe36ac
CRs-Fixed: 2997956
The log output will be too verbose when the following scenario
is hit:
1) hostapd is started on chan 149 with cc=US
2) ref-sta connects to sap
3) ping -i 0.01 to ref-sta from dut
4) set cc=JP on dut
and the verbose log output will result in a wlan scheduler
watchdog bite on some platforms.
Use rate limited versions of log outputting api to avoid the
instabilities brought by this.
Change-Id: Id87d81070334aab145bae6909857fd5d2851008a
CRs-Fixed: 2868738
Convert PSD+BW to EIRP using the following formula
EIRP = PSD + 10 * log10(BW)
Since all the variables are integers, there are some
roundoff/truncation errors.
Change-Id: Ia98b97f4cfe47dcd94bfa54f3dd7be13c8696532
CRs-Fixed: 2995322
For various channel power calculations and comparisons,
the AP masters channels and afc channellists are needed.
Add APIs to get them.
Change-Id: Iff89c8aa402e786f5a1502c0e5b0b948e9a5d33c
CRs-Fixed: 2995322
Currently host is populating secondary channel list from master
channel list based on ap power type. In case fw doesn't support
extd cc event then secondary channel list will not have 6g freq,
which may break legacy 6g handling.
Fix is to add validation check for ext cc event support, copy
secondary channel list from ap power type in case ext cc event
is supported by fw else copy secondary channel list from reg
current channel list.
Change-Id: I2e13be2936b624ccbee5e8e426987355076a0062
CRs-Fixed: 2987951
Cleanup reg_cache_channel_state and the
related code with it.
Also, changed the logic so as to compare
channel freq instead of channel number in
reg_modify_chan_list_for_cached_channels()
Change-Id: I424b6886ed18f73bae0d2b36e36a9ddc1819688b
CRs-Fixed: 2908016
Add regulatory API to support updating extended avoid
frequency list from HDD to regulatory component. Then
populate the new final current channel list and secondary
channel list.
Change-Id: Icda683c30bd7f8e51a5fd930712658ce35eff418
CRs-Fixed: 2975136
Export the API wlan_reg_set_ap_pwr_and_update_chan_list so that it can
be used by APIs outside the UMAC module.
Change-Id: I5205f22bb9d6c4e28688c2db03478d46e6a3d200
CRs-Fixed: 2984261
Export the ucfg API ucfg_reg_get_cur_6g_ap_pwr_type, so that it can be
used by the APIs outside the UMAC module.
Change-Id: I46a23f2d3a2545dcc07373f664b419c125f557e1
CRs-Fixed: 2981562
Currently reg_get_5g_bonded_channel_state_for_freq,
reg_get_bonded_chan_entry and reg_get_bw_value apis don't
have support for 320MHz BW.
With this change add support for 320 MHz in above APIs.
Change-Id: I9a5563464a8969d19315a10013fd21f805dae184
CRs-Fixed: 2975464
For operating class 128 and 130, a new center channel was added to list.
Update the table to reflect the new channels.
Change-Id: I6157f02089f7b4f16231a6bb35d829343bbc968f
CRs-fixed: 2975890
Add a new API reg_get_6g_power_type_for_ctry to update ap
power type when STA roams in/out of 6GHz channel. It is
invoked during initial connection and sch beacon process
during roaming.
Change-Id: I994d912da79597cf71477fc632c8e678008271a5
CRs-Fixed: 2968243
For 2G and 5G, the secondary channel list is coming from
master channel list which is not filtered by NOL.
Fix by using cur_chan_list to fill the secondary channel
list for 2G and 5G part.
Change-Id: I5e9ede6e39a66ad1a2f0e6c32c151ef175be6dab
CRs-Fixed: 2976916
As per regulatory update #35, increase the max_bw to 320 MHz for the
6G regdomains and reg_rules, in the host regulatory database.
Change-Id: I2443ad4557881207c62d96411c6f4ec17c0fd314
CRs-Fixed: 2905331
Currently the 6G edge channel feature is MCC specific.
Make the 6G edge channel feature common for WIN and MCC.
Change-Id: I723b6db1d74dca5a911eede4ec6e6167f6b3e6bc
CRs-Fixed: 2976871
Currently, when appending the 6G reg rules to the reg rules list, the
index is decided by the current AP power type. However, the reg rules
sent to user space should not be influenced by what mode the SAP is
operating in. Update the logic to always use LPI reg rules.
Change-Id: Iac4cddb2dc1d73ce35bdbe6365ea14af26656bbf
CRs-fixed: 2969456
As part of regulatory cleanup, Cleanup code under
CONFIG_CHAN_NUM_API feature flag.
Change-Id: I3add81605ea939b3631396154ed3f07f59493f24
CRs-Fixed: 2953646
Update the max bandwidth value of a channel in the regulatory
channel current channel list only during the country change and not
during every current channel list update. This is to avoid updating
the max bandwidth value of a channel that has been disabled by NOL
temporarily.
Change-Id: I36fb19f727c62bc86d61d81494ca1791a33cf99e
Update the Host regdb with QCA regulatory database version 35:
1) Create FCC17_FCCA, FCC17_World, FCC17_ETSIC (identical to FCC3
without UNII-4 channels). Change ~50 countries to FCC17 for 5G.
2) Create FCC18_ETSIC (identical to FCC8 without UNII-4 channels).
3) Change Brazil to FCC18_ETSIC.
4) Add new 2 countries: Congo and Congo Democratic Republic.
5) Add FCC UNII-4 Frequencies To World SKUs (0X69, 0X6A, 0X6C).
6) Add Indoor Flag to FCC3/8/15/16 RD's for U-NII4 band.
7) Change Bolivia and Brunei from FCC8 to FCC17_World.
8) Add 11ax support for Russia & Ukraine.
9) Change Azerbaijan to ETSI8_World.
10) Change ETSI12 Power values inline with ETSI1.
11) Change Morocco to ETSI14.
12) Change Armenia to APL4_World.
13) Change Guatemala 2/5GHz to APL19_ETSIC.
Change-Id: I66ac03e343b8c4b38ac891e14476f3b441d25744
CRs-fixed: 2957816
Currently, reg curr channel list contains dfs channels
but sap and p2p go can't enable on dfs channels if
dfs_master_mode ini is disabled. So, usable channel list
may contain some invalid channels in case of p2p go and sap.
Fix is to check dfs_master_mode ini and include/exculde sap and
p2p go channels based on dfs_master_mode.
Change-Id: If82d2feda78315ab53c5c7ed75f743c14186da98
CRs-Fixed: 2961435
1) Add a 6G superdomain APL2_6G_06 and map Guatemala to it.
2) Map the following countries to FCC1_6G_01:
a) AMERICAN_SAMOA
b) GUAM
c) NORTHERN_MARIANA_ISLANDS
d) PUERTO_RICO
e) UNITED_STATES_MINOR_OUTLYING_ISLANDS
f) VIRGIN ISLANDS (US)
Change-Id: Ifae2c2813d3c5bbf9641d573c25142a626f3f4ab
CRs-Fixed: 2957879