1. Add reg_get_min_chwidth to return the max chanwidth supported by
regulatory given the primary frequency and the pdev.
2. Add reg_get_max_chwidth to return the max chanwidth supported by
regulatory given the primary frequency and the pdev.
3. Add dispatcher functions for both
Change-Id: Ia21198fe778d32b1673e5dd30c8cd621cded2c45
CRs-Fixed: 3098311
Wireless mode is of datatype uint64_t but in some places, it is used
as uint32_t.
In this change, replaced 'uint32_t wireless_modes' with
'uint64_t wireless_modes'.
Change-Id: I13b5781ddb14fc0131668e1710df19ae75eb1e34
CRs-Fixed: 3119562
Refine reg_get_5g_bonded_channel_state_for_freq with static puncturing.
Update channel state as CHANNEL_STATE_DFS or CHANNEL_STATE_ENABLE if
its puncture bitmap is valid with given bandwidth.
Change-Id: I3503c8bcf6094b9c98056809f1c304747ba97667
CRs-Fixed: 3106240
Add reg_get_pwrmode_chan_list() which will take an input 6G power mode
and will use super channel list to build the 6G power mode based channel
list.
The 2G and 5G portion of this channel list will be same as the current
channel list and if the input power mode is REG_CURRENT_PWR_MODE, then
also the current channel list is copied to the given buffer.
If the input 6G power mode is REG_BEST_PWR_MODE then all the 6G frequencies
supported by the current country will be present and will indicate the
power values of the best power mode possible for that entry.
For other 6G power types only the 6G portion of the channel list is
modified as per the input 6g power mode.
Change-Id: Ib22399ac950af87ee64ecdb78089bb2ff5221f69
Add the new sets of APIs that checks if given freq is enabled on given
power mode's channel list.
Also, remove reg_is_chan_disabled() and replace the callers with
reg_is_chan_disabled_and_not_nol().
Change-Id: I65ee6b8dde629b0e31b050b478300a8ba5ae5b4a
Add an API to register a callback function that will be called when
the AFC power event is received from the AFC server. The second parameter
of the callback function is 'reg_fw_afc_power_event' structure which
holds the entire power event so that callback function can process the
part or whole of the power event.
Change-Id: I2d6247e54f92c02e9b4ec98bec678e662f1009f4
CRs-Fixed: 3114593
This change is to update restriction mask to uint32_t from uint8_t
as per QCA_WLAN_VENDOR_ATTR_AVOID_FREQUENCY_IFACES_BITMASK.
Change-Id: If5a6748425502b1f27654a2e6bfa0e5c2b8556de
CRs-Fixed: 3118988
Puncture bitmap is different from Puncture pattern.
A bit in the puncture bitmap is set to 1 to indicate the corresponding
20 MHz subchannel is punctured and set to 0 to indicate the
corresponding 20 MHz subchannel is not punctured. Puncture pattern
is the reverse of puncture bitmap.
From the use of reg_punc_pattern, it should be puncture bitmap.
Rename reg_punc_pattern to reg_punc_bitmap.
Change-Id: I1c7fc1b689ba724862761dc10f72a543679bb85e
CRs-Fixed: 3108165
Add reg_is_chan_disabled that is used to check if channel
is disabled or not in given channel list.
Rename the API to reg_is_chan_disabled_and_not_nol.
Change-Id: I2b05b0cea0472fc924634ae921e77842f0608a11
Add an API wlan_reg_get_superchan_entry to get a super channel list
entry for a given input channel index.
Change-Id: Ia231669872c15998549aff6262d66766b8cec5c2
CRs-Fixed: 3098998
Since there are multiple power modes in 6G, 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. This super channel list is essentially a
mapping between a channel and supported power modes, and
their associated attributes, such as power values, Indoor/Outdoor etc.
The 6G super channel list is stored in the regulatory pdev private
object.
Change-Id: I8657fed17823929c87110aa7a6cf24fe898bb78f
CRs-Fixed: 3098998
Currently unsafe channel list updated from firmware using
"wmi_wlan_freq_avoid_event_id".
This change is to update unsafe channel list for vendor
QCA_NL80211_VENDOR_SUBCMD_AVOID_FREQUENCY_EXT which we receive from
userspace.
Change-Id: I57ff334e9cf47468c30bc6884a9ead0a65a92eab
CRs-Fixed: 3103275
The existing logic is if STA and AP have different ctry code,
and STA is in ETSI, then it operates in VLP mode irrespective
of AP ctry.
New logic would be if AP ctry is US and if it advertises LPI
power type in HE ops IE via beacon, then STA can advance to
LPI mode.
Change-Id: Ifbee7052854277c3d21ccd21b65b79edb5e89f46
CRs-Fixed: 3084589
Currently api wlan_reg_get_6g_ap_master_chan_list is declared
and defined under CONFIG_AFC_SUPPORT feature flag, since this is
a generic API and can be used by other functionalities as well.
With this change move wlan_reg_get_6g_ap_master_chan_list api
out of CONFIG_AFC_SUPPORT feature flag.
Change-Id: Ifa7b27895b4660bbf248fc2827472ba50c9df9a4
CRs-Fixed: 3090281
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
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
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
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
Fix a compilation error in ucfg_reg_get_partial_afc_req_info, when
CONFIG_AFC_SUPPORT is enabled.
Change-Id: I9834170b08bd72ee4201284c22211e3b1e5fc560
CRs-Fixed: 3029969
The function reg_get_partial_afc_req_info() declaration is different from
its definition prototype.
Change-Id: Idd36e1343dd2af1d5ecaf3b8dcbaf7dc6839d560
CRs-Fixed: 3023862
Add a regulatory dispatcher API to fetch the value of AFC action
from the ini config.
Change-Id: I053262f98991a656d1919817ce37227202a46bc3
CRs-Fixed: 2997899
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 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
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
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
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
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
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
As part of regulatory cleanup, Cleanup code under
CONFIG_CHAN_NUM_API feature flag.
Change-Id: I3add81605ea939b3631396154ed3f07f59493f24
CRs-Fixed: 2953646