Pine and Spruce supports 80P80 mode of operation in 5 GHz band
and hence opclass 130 is sent to the user application in
MESH_MAP_OPCLASS_FOR_CUR_HWMODE NL80211 command.
However, these chips support 80P80 mode of operation
only on CFI 138 and 155, but to the application all the 80 MHz
channels in the 5 GHz band are advertised as supported.
This causes the application's channel selection algorithm to fail.
The existing API reg_is_chan_supported() can determine if the input
frequency is 80P80 capable only if cfreq2 of the 80P80 channel is
provided and in reg_get_cfis_from_opclassmap_for_non6g() API, it is not
possible to determine all combinations of cfreq2 for the given primary
frequency. Hence, a call to is_freq_80p80_supported() is made to
determine if any 80P80 combination is possible for the given input
frequency.
Also, 6 GHz channels do not support 80P80 mode of operation.
reg_is_cfi_supported() does a lot of computation to find out that
80P80 is not supported. Hence, if the opclass entry
is 6 GHz 80P80, set 80p80_supported as false.
Hence, send only the supported 80P80 CFIs in the
supported channel list array in MESH_MAP_OPCLASS_FOR_CUR_HWMODE command.
CRs-Fixed: 3627501
Change-Id: Ib5d3e872b34b8df81b8466e877b10f2fd4e68e40
When setting the country from user space, the thread sleeps and waits for
the init_cc event to awake. Right now the thread is woken up only in 2
case:
(i) when the country configuration is success from FW and regulatory and,
(ii) when country configuration failed in FW.
The thread is not woken up if there is failure in regulatory. This is
leading to timeout which will assert the kernel. In order to handle all the
return errors from the regulatory init_cc event handler should execute and
the status should be returned to thread waiting for the init_cc event
irrespective of the status of the init_cc handler. In order to achieve
this, the following actions are taken:
(i) Introduce a new regulatory tx_ops set_wait_for_init_cc_response_event()
that will wake up the thread waiting for init_cc response and return the
status of the init_cc response handler.
(ii) Remove the tx_ops set_country_failed() which just sends the failure
status to the thread waiting for init_cc event. This will be handled by the
new tx_ops.
(iii) Send the status of init_cc handler using the new regulatory tx_ops.
Change-Id: I1b29651682e9b7219d428c13d6d0ea299d6f81ba
CRs-Fixed: 3552823
AFC request is sent for all the opclass supported in the global opclass
including 80p80. Not all the devices support 80p80 and so, it is
unnecessarily included in the AFC request.
Create a callback function in regulatory to check if 80p80 is supported by
the device. If the support is present then the AFC request can include
80p80 opclass (opclass number 135 in global operating class). If not, then
the AFC request excludes 80p80 opclass.
Include 80p80 opclass in the AFC request based on the devices' support.
Change-Id: I9e72c960fefe6fbdc106bb83fb240d84d8522b80
CRs-Fixed: 3538926
In enterprise mode, when power event is received from Target, ACS is
not called and regulatory takes no action to AFC power event.
Hence, when host receives the event REG_AFC_EVENT_TIMER_EXPIRY with
subevent type SWITCH_TO_LPI or STOP_TX from FW as a response to payload
reset command from client application, the channel list is not updated
as 'afc_reg_no_action' is enabled.
To fix this issue and update the channel list, add reg txops to trigger
channel list update while processing REG_AFC_EVENT_TIMER_EXPIRY event
from FW when 'afc_reg_no_action' is set.
It is to be noted that 'afc_reg_no_action' should be set only in
enterprise mode.
Change-Id: I9ba2a0a0d0c4282895b3787943aca1dd45c199c3
CRs-Fixed: 3492604
Correct the documentation of the function
tgt_if_regulatory_unregister_rate2power_table_update_handler().
Change-Id: I04da3b3bd66f0665023a387d06cbe8c8242b152a
CRs-Fixed: 3430546
The kernel-doc script identified doucmentation issues in the
target_if/regulatory folder, so fix them.
Change-Id: I4c4cb774318153f672b9fddf651fa711e100f19a
CRs-Fixed: 3417469
Add APIs to register and unregister the handler of rate2power table update
response event received from target. Add the handler API
tgt_rate_to_power_complete_handler to extract the response event
parameters from WMI.
Change-Id: I462abd8a333c74b943a04c62096da647ab667adc
CRs-Fixed: 3405417
When AFC event come and update 6 GHz SP channels' state and power
attribution, SAP which already started on 5 GHz or 6 GHz channel
can move in or out from SP channel, which has higher tx power limit.
SAP target channel/bandwidth is decided by ACS channel select callback
register to SAP module, which will take channel max tx power limit
into account.
After target channel/bandwidth determined, SAPs move to same target
channel/bandwidth with eCSA process. If violate any concurrency
limitation, AFC DCS process should abort.
Add AFC component id and reference id.
Change-Id: Iba6933a30c0957eabf549fd6c8442bed547e8152
CRs-Fixed: 3204172
In case of split-phy radio, both the wmacs may belong to the
same PSOC. Hence in WMI_VDEV_SET_TPC_POWER_CMDID/
WMI_SET_INIT_COUNTRY_CMDID/WMI_AFC_CMDID, instead of
fetching the wmi_handle from psoc, find the WMI handle for the
corresponding pdev on which the cmd must be sent.
CRs-Fixed: 3333857
Change-Id: Ib38b15dbda4ea83edd6341d7732addbb1a563ad2
Add common code to configure target AFC flags:
enable_6ghz_sp_pwrmode_supp, afc_disable_timer_check,
afc_disable_request_id_check.
Remove cfg_get set is_afc_reg_noaction code, add it to psoc regulatory
private data.
Add APIs to set and get these AFC configures.
Change-Id: Idf74b245113eee18b071a7fbb92bb151cd535ce8
CRs-Fixed: 3154185
Add reg txops to fetch min_psd for punctured SP channels.
min_psd is computed from afc response. Using the min_psd power value,
EIRP is computed for the non-punctured BW using the formula
EIRP = PSD + 10 * log10(non-punctured BW).
Add an entry in bw_to_10log10_map for all possible non-punctured
bandwidth.
CRs-Fixed: 3329625
Change-Id: I79707cb233640342c521e41e9c4d776e121c1d6d
Add target_if support to set EIRP as the preferred power in the
WMI_VDEV_SET_TPC_CMDID to the target.
Change-Id: I77850ce93a3561c9765b8d70ae84e940b2bbf4d4
CRs-Fixed: 3307372
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
In function reg_freq_width_to_chan_op_class_auto, global_tbl_lookup is set
to false for 2.4 GHz and 5 GHz without considering the global opclass set
by user command. This results in wrong opclass information in eCSA.
Add an api to check if global opclass is set and update global_tbl_lookup
accordingly in reg_freq_width_to_chan_op_class_auto.
Change-Id: I069131d6068fb546f2b59f1e752a3c8c50f15759
CRs-Fixed: 3168817
Add init sequence handling to support AFC device deployment type
Set AFC device deployment type to regulatory private obj
Change-Id: Ib041d2010552412aaaa41395915d948aa2ea2bba
CRs-Fixed: 3190288
Currently host driver defines 11d offload APIs under
HOST_11D_SCAN feature flag which is not correct.
Add 11d offload APIs under TARGET_11D_SCAN feature flag.
Change-Id: I0d3205b215c9fc363a71c4e7a6b54e40fb10a964
CRs-Fixed: 3183200
Firmware sends the following reg rule to build 5G 240MHZ channels
240MHZ reg rule:
start: 5490, end: 5730, max_bw: 240.
However, 240MHZ is not one of the standard IEEE channel width.
Hence the channel finding APIs will fail to find a channel of 240MHZ BW.
240MHZ is considered as a punctured 320MHZ channel (320 - 80).
Hence convert the max bw of 240MHZ reg rule to 320MHZ within the host
so that channel can be built.
Also, change the 5G 240MHZ bonded pair's end freq to 5720. Since there is a
5MHZ bandwidth gap between channel 144 and 149, the bonded pair is
restricted to 5720MHZ on 5G.
Change-Id: Iee8dad0317f7ecb95843faa3d0779b854b8f48fa
CRs-Fixed: 3106866
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
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
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
This reverts change-id I176b9c09106cc0d7f5cfbc474912e4a48d633ff2.
The 0 count chan avoid event is used to clear all previous reported
chan avoid freq range, so it can't be skipped.
Change-Id: Ie01d88c353a7f71bbee70ae67f54147ea147f6d4
CRs-Fixed: 2970061
Add check to drop the avoid channel list event if the range count is 0
since it would not affect the channel list anyways.
Also, add the rate limited debug print for the target_if module.
Change-Id: I176b9c09106cc0d7f5cfbc474912e4a48d633ff2
CRs-fixed: 2909614
Enable lower 6G edge channel ch2 (5935MHz) for APL2 6G regdmn
using a service bit WMI_SERVICE_ENABLE_LOWER_6G_EDGE_CH_SUPP,
which is not enabled by default.
Also, disable upper 6G edge channel (7115MHz) using another
service bit WMI_SERVICE_DISABLE_UPPER_6G_EDGE_CH_SUPP, that
is enabled by default.
Change-Id: Ia7cb7f7d3165375178adbe70adb19b8671496b6d
CRs-Fixed: 2885623
In order to support different power levels of 6G AP and client,
the channel list event from FW namely "REG_CHAN_LIST_CC_EVENTID"
is modified to add few parameters specific to 6GHZ devices.
Hence the existing event is replaced by REG_CHAN_LIST_CC_EVENT_EXT for
all 2G/5G/6G pdevs in FW. Therefore, after the service ready event, FW
sends the channel list for the configured country/regdomain via
REG_CHAN_LIST_CC_EVENT_EXT. This mandates that all host software need
to have the processing capability of REG_CHAN_LIST_CC_EVENT_EXT to bring
up the AP.
As there can be host software which has not yet implemented the
version of "REG_CHAN_LIST_CC_EVENT_EXT", backward compatibility is lost
if "ONLY REG_CHAN_LIST_CC_EVENT_EXT" is sent by FW.
Hence a 3 way handshake between host and FW is established.
1. FW advertises its capability of processing REG_CHAN_LIST_CC_EVENT_EXT
id via wmi service bit 'wmi_service_reg_cc_ext_event_support'.
2. If the host is capable of processing the "REG_CHAN_LIST_CC_EVENT_EXT"
event id (which is done based on registration of this event), host
sends the capability in WMI_INIT_CMDID setting a bit in host_service_flags.
3. Based on host capability advertised in WMI_INIT_CMDID, FW decides to
send the old event ("REG_CHAN_LIST_CC_EVENTID") or the new event
("REG_CHAN_LIST_CC_EVENT_EXT").
4. If there is no flag indicated by host to FW in WMI_INIT_CMDID, FW
by default sends the old event ("REG_CHAN_LIST_CC_EVENTID").
CRs-Fixed: 2876360
Change-Id: Ibe95f414ad9fff0e5641bcc6e60450ef9afe245b
The host will send TPC power to FW via the new WMI cmd
WMI_VDEV_SET_TPC_POWER_CMDID going forward instead of
WMI_VDEV_PARAM_TX_PWRLIMIT to accommodate 6GHz channels.
But, to support backward compatibility for New Host+old FW
the TPC power will be sent to FW via legacy WMI cmds
WMI_VDEV_SET_PARAM_CMDID (during initial connection) or
WMI_VDEV_PARAM_TX_PWRLIMIT (power value change during RRM
req/bcn processing from connected AP) with the help of a
service bit WMI_SERVICE_EXT_TPC_REG_SUPPORT.
Change-Id: I22e11ff847cd384fac8ea0061e5df42cea0c8de8
CRs-Fixed: 2874245
Expose the API to send WMI_SET_TPC_POWER_CMDID within the target_if
module. Register the callback under tx_ops.
Change-Id: I1d075df717cff997e7ac85884fe587ed298cbb28
CRs-fixed: 2849695
Add functions to handle the new WMI event,
WMI_REG_CHAN_LIST_CC_EXT_EVENTID. This includes processing new
data regarding standard power, low power indoor, and very low
power Clients and APs.
Process the regulatory rules from FW to populate the new 6G
channel lists. Fill in the current channel list with the
correct 6G master channel list. Copy other information from
the event into the regulatory private objects as needed.
Change-Id: I0c2001d809e4f0b292bac866780faa2850b1a8b1
CRs-fixed: 2799403
Add new channel bonding pairs as well as frequency
pairs for 40, 80 and 160 MHz with the support of
three new 5.9 GHz channels 169, 173 and 177.
Add new API reg_modify_chan_list_for_5dot9_ghz_channels
to enable/disable these new channels based on
INI value and service bit.
Change-Id: I8598e705ba4047e96e7167661ba70d4236cde251
CRs-Fixed: 2696211
Somtimes F/W event WMI_REG_CHAN_LIST_CC_EVENTID comes for country
code changed before WMI_READY_EVENTID processed completely in
worker thread, to update current channel list,
hdd_regulatory_dyn_cbk is invoked in scheduler thread and wiphy
is extracted from pdev which isn't attached to pdev yet, assert
will happen.
WMI_READY_EVENTID and WMI_REG_CHAN_LIST_CC_EVENTID
should be serialized, both of them should be handled in same
context, such as worker thread.
Set WMI_REG_CHAN_LIST_CC_EVENTID execution context same as
WMI_READY_EVENTID: WMI_RX_WORK_CTX.
Host F/W handshake during init:
Host <- FW WMI_SERVICE_READY_EVENTID
Host <- FW WMI_SERVICE_READY_EXT_EVENTID
Host -> FW WMI_INIT_CMDID
Host <- FW WMI_REG_CHAN_LIST_CC_EVENTID
Host -> FW WMI_SET_CURRENT_COUNTRY_CMDID
Host <- FW WMI_READY_EVENTID
Host <- FW WMI_REG_CHAN_LIST_CC_EVENTID
Change-Id: I922e5f2a9722e9b441cc844dd38b1039dd4d8900
CRs-Fixed: 2689274
This mode is supported through hw_mode_id 7. A special mode for
IPQ8074 platform alone to bring up single pdev alone on 2G mode.
FW would advertise the mode 7 support through the WMI service
ready message and this mode will be the default mode for AP-HK10 alone.
Added new APIs in tgt_reg to get pdev_id from phy_id and vice versa.
Fixed all places where pdev_id is used to acces psoc regulatory params
and converted them into use phy_id
Change-Id: I14920627f5e4ddafcc37440fa3281150b65ff04f
CRs-fixed: 2653042
In regulatory non-offloads feature, send conformance_test_limit_2G,
conformance_test_limit_5G, reg_domain, reg_domain_2G and reg_domain_5G
information to firmware using WMI_PDEV_SET_REGDOMAIN_CMDID.
If all these attributes are not populated then CTL power limit is
not applied by the firmware.
Change-Id: I1523ab447aec64ec0af42da32318136f90fd17ca
CRs-Fixed: 2518246
Add API to know whether 6ghz is supported. Also add API to know
whether an operating class is 6ghz operating class.
Change-Id: I75747502c0033e31d119e58a2254b220646bba10
CRs-Fixed: 2556998
Based on the ini "ignore_fw_reg_offload_ind" ignore regulatory
offload indicatin from fw.
Change-Id: Ia95b5bdda6ee1fcc2b07f28f997a7c80afcbc32b
CRs-Fixed: 2533001
Currently 11d offload functionality is in reg_host_11d.c and
reg_host_11d.h files and are getting controlled with a
feature flag HOST_11D_SCAN.
HOST_11D_SCAN flag is to enable host 11d scan and 11d offload
feature should not be controlled with this flag.
Move 11d offload functionality to separate files
reg_offload_11d_scan.c and reg_offload_11d_scan.h.
Change-Id: Ia56fe7009f2f5f9317da9e0e22f15040fe19a20d
CRs-Fixed: 2382486
Create below regdb file in core component and move the code from
reg_services.c file.
These files has only MCL specific code.
reg_db_lte.c: this file has LTE feature code.
reg_host_11d.c: this file has 11d feature code.
reg_opclass.c: this file has opclass related code.
reg_getset.c: this file has the functions related to setting and getting
regdb related variables.
reg_callbacks.c: this file has regdb callbacks/notificatoion functions.
Change-Id: Ie43acc03a5c35200f3e43bc978b792d5047eeb77
CRs-Fixed: 2349173
Remove 11d and LTE feature specific code from target_if_reg,c file.
Removed code is present in target_if_reg_11d.c and target_if_reg_lte.c
files.
target_if_reg.c file has the common code used by both WIN and MCL.
Change-Id: I976efbfadc6b01289cb258be4856b81d4783456a
CRs-Fixed: 2349173
Create target_if_reg_11d.c and target_if_reg_lte.c files.
Move 11d and LTE feature specific code from target_if_reg.c file to
these files.
These files has only MCL specific code.
Change-Id: I016c6e6c8b6d54670496367e08ac5d83ad94bebd
CRs-Fixed: 2349173
During SSR, target country code is reset to default, may not same as
current country code, need restore it.
Change-Id: Ib8f51755f442d73ad6e11bbfb18fb22a60f724ba
CRs-Fixed: 2318283
Phy_id value in reg_process_master_chan_list comes directly from firmware.
Therefore, check for OOB value for phy_id.
Change-Id: I0b634e2630c4d6e5d4a15a86953e7a0ed3df6f47
CRs-Fixed: 2327711
Add new qdf API: qdf_is_recovering and
qdf_register_recovering_state_query_callback.
Client driver will register the state query callback
to common driver to report the recovering state.
Regulatory skip the chanlist update event during SSR
to keep the current regulatory setting.
Change-Id: I58e503cce162a0351d566148c1897a5012889c62
CRs-Fixed: 2321820
Pointer wmi_handle is returned from a function may
be NULL and will be dereferenced in another function.
Add sanity checking to return if the pointer is NULL.
Change-Id: I2a38098335dde8d76a04129c06166203aefdd2ec
CRs-Fixed: 2317021
Add qdf_platform source file to qdf/Kbuild and
clean-up WAR introduced in change
I8172f3dbe0716be24a4dda739afb49f94528a4f6
Change-Id: Icb76d53544590b8bcace275ef52870606fb5d826