提交線圖

50 次程式碼提交

作者 SHA1 備註 日期
Shiva Krishna Pittala
29817dce94 qcacmn: Move REGDMN and wireless modes to reg_services_public_struct.h
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
2021-09-27 22:22:23 -07:00
Hariharan Basuthkar
258d7f4c16 qcacmn: Implement the 6G AFC power event processing
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
2021-08-31 14:44:50 -07:00
Hariharan Basuthkar
82ee5ef227 qcacmn: Add regulatory support to send AFC cmd to the FW
Add core regulatory APIs to send the WMI_AFC_CMDID to the FW.

Change-Id: I1e2b7d936583a199d1be032895802740ee9f19a1
CRs-Fixed: 2975227
2021-07-14 10:32:56 -07:00
Hariharan Basuthkar
2234d80a72 qcacmn: Make 6G edge channel APIs common
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
2021-06-25 07:20:05 -07:00
Will Huang
b128bc2e3e Revert "qcacmn: Drop ch avoid event if list is empty"
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
2021-06-25 02:56:36 -07:00
Lincoln Tran
b390122275 qcacmn: Drop ch avoid event if list is empty
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
2021-03-30 12:50:47 -07:00
Gururaj Pandurangi
08148f21fa qcacmn: Enable/Disable 6G edge channels ch2 and ch233
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
2021-03-12 02:52:25 -08:00
Priyadarshnee Srinivasan
d617a3a77f qcacmn: FW-Host Handshake for REG_CHAN_LIST_CC_EVENT
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
2021-03-11 19:43:58 +05:30
Gururaj Pandurangi
901a17b4ae qcacmn: Add service bit to support backward compatibility
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
2021-02-16 23:52:04 -08:00
Lincoln Tran
323288debd qcacmn: Expose WMI command in tgt_if
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
2021-01-15 14:38:44 -08:00
Lincoln Tran
c8d397e920 qcacmn: Implement chan_list processing for new WMI event
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
2021-01-12 20:09:53 -08:00
Min Liu
b0d29c4764 qcacmn: Add NULL pointer check for reg_rx_ops
Add NULL pointer check for reg_rx_ops of regulatory component.

Change-Id: If0917361f900d299fa9da519449781459c49ad17
CRs-Fixed: 2773937
2020-09-11 13:55:46 -07:00
Gururaj Pandurangi
b1f6686944 qcacmn: Enable three new 5.9 ghz channels for US
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
2020-07-23 17:24:06 -07:00
Shashikala Prabhu
803403f264 qcacmn: Add null check for reg_rx_ops
Add null check for reg_rx_ops in reg_ch_avoid event handler.

Change-Id: I15f1b7fa13714ba6ea134ceaa892b2692fad8454
CRs-Fixed: 2702122
2020-06-04 23:22:57 -07:00
Jianmin Zhu
bd4a9fe637 qcacmn: Handle WMI_REG_CHAN_LIST_CC_EVENTID in worker thread
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
2020-05-21 14:13:48 -07:00
Neha Bisht
466c04dee9 qcacmn: remove dependency of public files from wlan_objmgr_psoc_obj.h
Remove dependency of wlan_lmac_if_def headerfile from
wlan_objmgr_psoc_obj.h

Change-Id: Ida8472e6f05a90b3930b5a13a2bf89ea8b3e938f
2020-05-15 10:41:46 -07:00
Nandha Kishore Easwaran
8a90280e0e qcacmn: Support for IPQ8074 2G PHYB mode 3/3
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
2020-04-08 13:43:46 -07:00
Ashish Kumar Dhanotiya
48934773cd qcacmn: Reduce regulatory logging
As part of logging optimization, reduce the
logging from regulatory component.

Change-Id: If81f87b06e111cffb9189cae20a1acc66849678d
CRs-Fixed: 2624108
2020-02-25 10:59:06 -08:00
Ashish Kumar Dhanotiya
89029e4d9e qcacmn: Send CTL info to firmware
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
2019-12-26 11:38:36 -08:00
Amar Singhal
5fbd62d6e3 qcacmn: Add 6ghz support functions
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
2019-11-09 22:08:12 -08:00
Rajeev Kumar Sirasanagandla
816b503c44 qcacmn: Ignore regulatory offload indication from FW
Based on the ini "ignore_fw_reg_offload_ind" ignore regulatory
offload indicatin from fw.

Change-Id: Ia95b5bdda6ee1fcc2b07f28f997a7c80afcbc32b
CRs-Fixed: 2533001
2019-10-12 19:03:56 -07:00
Madhvapathi Sriram
0c5bdd7e73 qcacmn: Remove error log for qdf_mem_malloc in target_if files
qdf layer already has the error trace

Change-Id: I2d752fafb6ee805206047bae9711aa0387f22f69
CRs-Fixed: 2376430
2019-02-11 02:30:02 -08:00
Ashish Kumar Dhanotiya
9d90996935 qcacmn: Move 11d offload functionality to separate file
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
2019-02-07 07:53:41 -08:00
Shashikala Prabhu
daa645bcab qcacmn: Add 11d, LTE, opclass, getset and callback regdb files
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
2019-01-23 15:14:29 -08:00
Shashikala Prabhu
65572e5538 qcacmn: Remove 11d and LTE feature code from target_if_reg.c file
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
2019-01-23 15:14:23 -08:00
Shashikala Prabhu
75b0650131 qcacmn: Add new target_if layer files for for LTE and 11d feature
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
2019-01-17 20:04:48 -08:00
Jianmin Zhu
df8bb93d25 qcacmn: Restore target country code during SSR
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
2018-10-23 08:11:56 -07:00
Amar Singhal
9ff61bb709 qcacmn: Check for OOB for phy_id value
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
2018-10-15 17:32:58 -07:00
Liangwei Dong
89fdd82b93 qcacmn: Skip chanlist event during recovering
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
2018-10-09 10:54:33 -07:00
Paul Zhang
6780655a63 qcacmn: Fix kw issue in target_if_reg.c
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
2018-09-25 05:33:47 -07:00
Amir Patel
20a0efabb1 qcacmn: Add qdf_platform source file to qdf/Kbuild
Add qdf_platform source file to qdf/Kbuild and
clean-up WAR introduced in change
I8172f3dbe0716be24a4dda739afb49f94528a4f6

Change-Id: Icb76d53544590b8bcace275ef52870606fb5d826
2018-09-24 18:55:20 -07:00
Jianmin Zhu
ff034e9797 qcacmn: Fix compiling issue of qdf_platform
qdf_platform.h/qdf_platform.c is only used by MCL

Change-Id: I8172f3dbe0716be24a4dda739afb49f94528a4f6
CRs-Fixed: 2310882
2018-09-06 22:48:27 -07:00
Tushnim Bhattacharyya
80dfdd5a6f qcacmn: Fix NULL pointer dereference in pno & regulatory
In target_if_pno_start, target_if_pno_stop,
tgt_reg_chan_list_update_handler, tgt_reg_11d_new_cc_handler &
tgt_reg_ch_avoid_event_handler wmi_handle is derived & dereferenced
with out a NULL check. Add a NULL check for wmi_handle before it is
dereferenced.

Change-Id: I4b4afa5bb74a2c97d921af2672eb285f7c34062a
CRs-Fixed: 2305512
2018-09-05 22:14:59 -07:00
Liangwei Dong
9996a315be qcacmn: Skip chan list update during SSR
The Firmware will switch to default US regdomain
after SSR.

After SSR we need to keep the old country code,
so skip the chan list update firmware event duing SSR.

Change-Id: I8735abef67e072f60961aab655a016348dc9d4a0
CRs-Fixed: 2304303
2018-09-05 18:11:36 -07:00
Dustin Brown
3fc809d63d qcacmn: Reduce target_if info logging
Excessive logging in target_if has been identified as the root cause of
a watchdog timeout. Reduce target_if logging in normal operation paths
to debug level to avoid excessive CPU use.

Change-Id: If384474270bb4b860100b98e5eea81d54b7c2184
CRs-Fixed: 2286630
2018-07-31 15:25:52 -07:00
Shashikala Prabhu
d50f3a6b05 qcacmn: Fix 4.9GHz issue for legacy devices
In the scan channel list, host sends both 2.4GHz and 4.9GHz channels to FW
because there are ieee channels which have same value in 2.4 GHz and 5GHz
bands.  Example: channel 1 is 2.412 in 2.4GHz and 4.942 in 5 GHz.
When converting a channel to freq, the host uses low/high 2GHz and 5GHz
frequency ranges. For a partial-offload 5GHz pdev, both low/high 2.4 GHz
and 5 GHz frequencies are set and hence 4.9 GHz channel is converted to
2.4GHz frequency.

To fix the above issue, based on the wireless modes remove either low/high
2.4 GHz or low/high 5 GHz frequency based on the wireless modes.

Change-Id: I1fb0a56c70d1dc0ffc2731da3f25c910af46bb41
CRs-Fixed: 2239771
2018-07-12 04:58:51 -07:00
Akshay Kosigi
2a216edab0 qcacmn: Replace void pointers with appropriate/common structure types
Void pointer usage may lead to memory corruption due to
wrong pointer is typecasted. Hence define structure for all, and modules
internally typecasting based on their type

Change-Id: I6271ed8aa3f94254fd85f41962f23ea36895154e
CRs-Fixed: 2182452
2018-05-11 22:40:13 -07:00
Srinivas Pitla
cc75651c34 qcacmn: Converge initial HOST FW handshake
Implement service ready, ext service ready
ready event handler, init command preparation
and other required APIs

Change-Id: Iaf707227c1e94bb492dd86bd2d0916a1cf875498
CRs-Fixed: 2177109
2018-02-03 15:11:07 -08:00
Sourav Mohapatra
06490bebac qcacmn: Converge on wmi service/ext service is enable
Converge on wmi service/ext service is enable

Change-Id: Ib246befa72cce927bee157394cd22c7d1562d341
CRs-Fixed: 2152751
2018-01-24 13:19:48 -08:00
Mukul Sharma
396cef7bcf qcacmn: Converge on wmi event registration / unregistration
Converge on wmi event registration / unregistration method.

Change-Id: If03a38d74a47cc1d900bc5734a7c8f950513efaa
CRs-Fixed: 2148479
2017-11-30 03:40:33 -08:00
Kiran Kumar Lokere
a78b4bfb67 qcacmn: Add support to process channel avoidance event
Add support to process channel avoidance event

Change-Id: I19ce742406a4778ac0f279faf0bf853bc9069eb0
CRs-Fixed: 2080241
2017-08-13 16:56:55 -07:00
Shashikala Prabhu
3519b96e24 qcacmn: Fixed regdb kernel panic
Analysis:
Seen kernel panic when setting the NULL country code in FW.

Solution:
Send an indication to Offload layer if Firmware fails to set
the country code.

Change-Id: Ic01ee170cfca31d840236625c1d1497426eafc68
CRs-Fixed: 2083318
2017-08-08 02:25:47 -07:00
Abhijit Pradhan
59626eba4b qcacmn: Set country code for full-offload using iwpriv command
For full-offload, send user country code to FW using WMI
command.

Change-Id: I84acbd7ce30aa9a8ce590c8fadea2cb5914240fe
CRs-Fixed: 2053849
2017-07-13 22:02:53 -07:00
Abhijit Pradhan
ca7d77b408 qcacmn: Fill per psoc regulatory info
Move per psoc regulatory info from pdev level function to psoc
level function.

Change-Id: Id06c6fee110ce929925f568db3a3b507214294d5
CRs-Fixed: 2066122
2017-07-12 12:08:42 +05:30
Amar Singhal
2e55c111a8 qcacmn: Implement 11d state machine
Regulatory component needs to listen to vdev messages in order to track
whether a master mode vdev is getting created or destroyed. It is also
used to kick-start the state machine. Also re-run the state machine when
user-space country code is set.

Change-Id: I5112396314a936f84dad2f0e07329f9cb237aa78
CRs-Fixed: 2048784
2017-06-08 13:46:53 -07:00
Kiran Kumar Lokere
82c8645b38 qcacmn: Add support for 11d FW commands and events
Add support to send 11d scan start and stop commands to FW and
process the 11d new country update event from FW.

Change-Id: I5c1588cfb5af672cdb5738784de1bd0b83bdbe77
CRs-Fixed: 2048784
2017-06-08 13:46:51 -07:00
Baila, Shashikala Prabhu
bc3efea885 qcacmn: Add API to get 2GHz/5GHz freq range and wireless modes
Offload layer uses low and high 2GHz/5GHz freq ranges and chip
supported wireless modes to populate umac ic channel list.

Change-Id: I899edd83548d68e67659b3a9273ddaaaf740540b
CRs-Fixed: 2047212
2017-05-31 01:03:11 -07:00
Kiran Kumar Lokere
a843634983 qcacmn: Add support to send new country to FW
Add support to set new country code to the FW

Change-Id: Id24967b7c9e93bfbf045f494f142be9e33e16483
CRs-Fixed: 2042879
2017-05-18 13:42:21 -07:00
Baila, Shashikala Prabhu
af7fd90129 qcacmn: Re-factor processing of WMI_REG_CHAN_LIST_CC_EVENTID
Due to different layers, TLV processing is confined to WMI folder.
Therefore, move the TLV layer processing of WMI_REG_CHAN_LIST_EVENTID
to the wmi folder.

Change-Id: I7e7182997a9506035030f33d2f81a403fbe97a2f
CR-Fixed: 2019750
2017-03-27 06:07:47 -07:00
Amar Singhal
e407974144 qcacmn: Add the event handler for WMI_REG_CHAN_LIST_CC_EVENTID
Add event handler for WMI_REG_CHAN_LIST_CC_EVENTID.This handler
would be called from psoc_open object manager framework
initialization.

Change-Id: Icfd52fdb7056fdb77afdbd1be576d160719b7285
CRs-Fixed: 2002892
2017-03-27 06:07:36 -07:00