Commit Graph

32 Commits

Author SHA1 Message Date
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