Add below changes as part of 38th Reg DB version
a.) Add superdomain FCC2_6G_010, APL4_6G_11 and APL5_6G_12.
b.) Add sub 6G domain APL25, APL26 and APL27 reg rules for new domain.
c.) Add APL25, APL26 and APL27 RD for 5G.
c.) Add 6G support for BELGIUM, BRAZIL, CANADA and COSTA_RICA.
d.) Change reg domain pair id for AUSTRALIA, CHILE,
MOROCCO, HONG_KONG & MEXICO.
e.) Add CHNA 2g reg domain.
Change-Id: I80be14ccc2845261a0816e9e7d7931b40e5d0927
CRs-Fixed: 3083299
Currently if AP and STA have different ctry codes, STA should
operate in VLP mode. And if STA ctry code is US, then scan and
connection are not allowed as US VLP is not supported yet.
However, if RF test mode or Wi-Fi Safe Mode is enabled, allow
scan and connection on this AP and STA can operate in LPI mode.
Change-Id: I513657b8e274ef07eb9e9b5fc265722cb01525de
CRs-Fixed: 3079537
The reg_get_psoc_obj() may return NULL for invalid psoc object.
The wlan_regulatory_psoc_priv_obj becomes NULL in case of NULL psoc object.
This scenario is not considered in reg_get_reg_rules_for_pdev() and its
callers. Handle the NULL regulatory_psoc_priv_obj scenarios.
Change-Id: I5b039d362a76985995e0d4d4a95cd1a00b1f0991
CRs-Fixed: 3040335
If a channel is disabled when changing the band settings, a subsequent
function such as modifying for indoor channels can override this state.
Add a check in the indoor channel modification to make sure channel is
not disabled first, before proceeding.
Change-Id: Ic47391ca2ceaee7dc0909e0c81b06b81d49d3893
CRs-fixed: 3071801
Add below changes as part of 37th Reg DB version
a.) Add superdomain FCC1_6G_09 for US AFC Testing
b.) Add sub 6G domain FCC1_6G_09 reg rules for new domain.
c.) Add 6G support for GERMANY, ICELAND, PERU and NORWAY.
d.) Change reg domain pair id for TANZANIA and SOUTH_AFRICA.
Change-Id: I7af2778954c65f85b727453a0a0527e2d4d09089
CRs-Fixed: 3064525
Add below changes as part of 36th Reg DB version
a.) Update FCC1_CLI_LPI_REGULAR_6G to FCC1_CLI_LPI_DEFAULT_6G.
b.) Add sub 6g domains APL3_AP_VLP_6G and APL3_AP_LPI_6G and
reg rules for new domains.
c.) Add superdomain FCC1_6G_07 and APL3_6G_08 for Brazil and UAE
Change-Id: I2d379762f9d5953c47c88e08511fe227ea25ce85
CRs-Fixed: 3057765
Currently driver invokes regulatory callbacks after pdev create
and from reg cc event processing. In case of restart of the
driver because of SSR or idle restart, driver ignores the default
country and sets the user set country which was there before SSR
or idle shutdown. Now driver continues restart and creates pdev.
During pdev creation it propagates reg rules from psoc to pdev
which was there in psoc before shutdown and after pdev creation
it invokes the regulatory callbacks, as part of this hdd dynamic
callback is invoked and it tries to schedule the regulatory work.
Since idle restart is a vdev operation so driver is not able to
schedule the work as it does not get the dsc op and it waits for
500 ms to reschedule the work. In this 500ms time driver gets the
response of the set country command which was sent to fw to set
user country. This command also invokes the hdd dynamic callback
and regulatory work gets scheduled and scan channel list command
is sent to fw.
Now if any scan is going on in the FW and after 500ms if first
work gets rescheduled, it again sends the scan channel list to fw
which cancels the ongoing scan.
To address issue, add a change to not invoke regulatory callbacks
from pdev creation if user country set is pending.
Change-Id: I5686163644409ef19507c19ae31f7f1e7892931f
CRs-Fixed: 3054603
When the AFC response has a disjoint set of CFIs and frequency range,
the ACS trigger is called even though the AFC master channel list is
empty.
Due to this, ACS happens even though the AP's destination power
mode is LPI.
To fix this issue, call ACS trigger only if the AFC master channel list
is non-empty.
Change-Id: I217d23827b34ac577649b82b278a203bf01fa1f6
CRs-Fixed: 3052805
In reg_set_channel_params for 2G, if the input mode is HT40,
the primary channel is <= channel 8 (2447) and the secondary frequency
is not provided, add an API to fetch the secondary frequency,
giving preference to HT40+ over HT40- mode.
Change-Id: If1538e14f9ab427c9f9a12ee2eb0d9e28bbf8b86
CRs-Fixed: 3050678
The API that takes in the input 6G AP power type and updates current
channel list, allows setting the same power type which is not needed and
is a costly operation.
Change-Id: Ia690f40a6796a0db243f0abd15f2eebc8340d1d9
CRs-Fixed: 3051502
The power event received status is set when AFC power event is received
and is reset unconditionally when AFC expiry event received.
Reset AFC power event received status only on receiving AFC expiry event
with sub-type AFC_EXPIRY_EVENT_SWITCH_TO_LPI.
Change-Id: Ib7c1d12cbc2797ddbb19d73fd38d82d100adf3d3
When the frequency ranges and channel frequency indices in the AFC
server response are not the same, the current channel list has
channels enabled, that are absent in the CFIs.
This is because the AFC master channel list is built by intersecting
the frequency ranges in the AFC frequency object and state of the
channels in the SP AP master channel list.
To fix this issue, build the AFC master channel list by intersecting
the frequency ranges in the AFC frequency object and state of the
channels along with the CFIs received in the AFC channel objects from
the target.
Change-Id: I12cc54f90b75b9a7be491e7dd2e9c101be6dd1f6
CRs-Fixed: 3042040
When the AFC dummy server sends the frequency range with only the
UNII-6 channels, the AP still moves to SP and comes up on the
UNII-6 channel.
In reg_fill_max_psd_in_afc_chan_list, the channels are enabled in the
AFC master channel list only based on the frequency ranges present
in the AFC frequency object. There is no condition present to check
if the channels are supported by the reg_rules sent by the target
in the WMI_REG_CHAN_LIST_CC_EXT_EVENT.
To fix this issue, before enabling the channel in AFC master channel
list, check if the channel is also enabled in the SP AP master channel
list.
Change-Id: I2cbe69acf13bff57662f77eeab70e3f3a3240196
CRs-Fixed: 3042428
Following are the changes:
1. Add macros relevant to the addition of the 320 MHz root to the preCAC
tree.
2. Adding 320MHz bandwidth in switch case and separating
'case CH_WIDTH_320MHZ' using a compile time macro ( 11BE), forces us
to use the macro inside the function, which is not allowed by the
coding guideline.
Convert the "switch case" mapping (which is generally a binary search)
into a linear search of a mapping (BW -> bonded pair) array , thereby
using the macro WLAN_FEATURE_11BE to separate the 320MHz bandwidth
in the data structure space instead of doing the separation inside
the function space.
Change-Id: Iaab2328deef1cb7b2ff82bafe5d3cd2ea137e725
Add an API to check if a given channel width is supported on a given pdev
by looking at its wireless modes.
CRs-Fixed: 3042932
Change-Id: I7194412b147147eba00dbe860875e46dac602b5b
There is a requirement to use REGDMN and wireless modes in UMAC layer of
the cmndev component. As the WMI_HOST_REGDMN modes currently are defined in
WMI layer, we can't use them directly in the UMAC layer. Hence move them
to the reg_services_public_struct.h and rename them as HOST_REGDMN modes.
Replace all WMI_HOST_REGDMN instances with HOST_REGDMN. Wireless modes are
currently defined in WIN component, use them to cmndev component.
CRs-Fixed: 3044590
Change-Id: Iee5fa1745a1a44b834334746b10bdbb6f6563a0a
In IEEE80211 spec, US Opclass is not supporting the 5.9Ghz
channels, therefore whenever 5.9Ghz channels are enabled,
while adding channel switch IE element, if there is no Opclass
available for the destination frequency, then check the Global
Opclass table for the destination frequency and select the
appropriate Opclass number.
Change-Id: I495576555db7dbb6fb5d5a77a3b17ec5b83cf286
CRs-Fixed: 3020692
When the 6G AP comes up on a SP mode, the current channel list has
channel 97 (6435 MHz center frequency) enabled, even though the
BDF reg_rule and AFC frequency object has the range 5925-6425 MHz.
When 6425 is given as the input to reg_find_chan_enum_for_6g, it also
returns the enum corresponding to 6435, which is incorrect.
To fix this issue, add two new functions
reg_find_low_limit_chan_enum_for_6g and
reg_find_high_limit_chan_enum_for_6g to find the lower channel enum and
upper channel enum respectively. In reg_fill_max_psd_in_afc_chan_list,
call reg_find_low_limit_chan_enum_for_6g instead of
reg_find_chan_enum_for_6g to find the lower channel enum, and
call reg_find_high_limit_chan_enum_for_6g to find the right upper
channel enum.
Change-Id: Ib5738242b453e1abf641034240ce019865e46377
CRs-Fixed: 3033667
When SWITCH_TO_LPI event subtype or WMI_AFC_EVENT_ID is received,
disable the intersected channels in the AFC channel list.
Change-Id: Iee79b26953299d332c6f8925c8f21651fbd1f00c
CRs-Fixed: 3034456
If a country does not support 6G, then the 6G channel list is not
appended to the master channel list. Due to this, 6G center frequency
in the master channel list is zero. This leads to the problem in the
intersection of channels and chip range in the 5G Radio.
When the target sends the WMI_REG_CHAN_LIST_CC_EXT_EVENT, do not set
the is_6g_channel_list_populated flag based on the presence of a 6G
subdomain code. The flag should be set to true whenever the event is
received.
Change-Id: Ice714c961512fc1d86f8553b9870ab7385bbe9d5
CRs-Fixed: 3007334
In reg_search_afc_power_info_for_freq, break from the loop when EIRP
power is filled.
Change-Id: Id559f4a92fe7945370e6a334b4dc1e7c1d9d7adf
CRs-Fixed: 3031979
The power event received status is set when AFC power event is received
but is not reset when AFC expiry event received.
Reset AFC power event received status on receiving AFC expiry event.
Change-Id: I6e3415682b682e7a0f5d15a190d4cf72f5ff935a
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