Commit Graph

463 Commits

Author SHA1 Message Date
Dustin Brown
b5b21cac42 qcacmn: Remove qdf_*_outline() APIs
Several qdf_*_outline() APIs exist which are straight aliases to their
regular qdf_*() counterparts. Remove them, and update any callers to use
the regular APIs instead.

Change-Id: Ibe6e9cced521b93061e89690ab817ceafe49a469
CRs-Fixed: 2408267
2019-03-12 13:58:27 -07:00
bings
9b58b7ad56 qcacmn: Remove CONFIG_MCL for target_process_bang_radar_cmd
target_process_bang_radar_cmd should be defined with meaningful body only
when WLAN_DFS_FULL_OFFLOAD is defined.

This is for CONFIG_MCL cleanup

Change-Id: Id038231e6aa967c68674f40ef4247ac023313b71
CRs-Fixed: 2411981
2019-03-12 00:56:24 -07:00
Nachiket Kukade
6943747a55 qcacmn: Remove redundant counter increments under RA match event
In the case of WOW resume due to RA match event, driver will
update the protocol and destination type WOW stats after parsing
the data packet. The same stats are again incremented under RA
match case in TX op that is called in wma_inc_wow_stats. This is
causing counters to increment twice for each packet. Therefore
remove the increment of wow stats from TX op case.

Remove redundant counter increments under RA match event in
target_if_cp_stats_inc_wake_lock_stats.

Change-Id: I10486d083175772f976542a38364ba964c8e1a87
CRs-Fixed: 2406975
2019-03-08 12:06:11 -08:00
Manoj Ekbote
6db1ddac13 qcacmn: Add pdev level feature flag for MBSS IE
A service bit is used to indicate support for MBSS IE.
This is set as capability in host at psoc level.
In host, we also maintain a flag for user to configure
MBSS support at pdev level. It could be used in future.

Change-Id: I31a27a755fb027de93bfe6c9639fdbda9693bace
CRs-Fixed: 2403030
2019-03-08 12:06:04 -08:00
Santosh Anbu
ab422a470b qcacmn: Fix sending of txbf caps to FW
Add change to avoid resetting txbf caps by setting SU_BFEE param.

Change-Id: Ib0de197829454923ef349a020c8ef515658e6e56
CRs-Fixed: 2410130
2019-03-07 02:01:56 -08:00
Abhiram Jogadenu
c528145962 qcacmn: Add support for peer tx event param extraction
Add host's copy of peer cfr tx completion event param and prototype for
extract API.

CRs-Fixed: 2406064
Change-Id: I433171fc90d3c5dbb92dd525e8b5b2c441cc1bf9
2019-03-04 15:48:08 -08:00
Naga
0891ef366c qcacmn: Use wmi_service_enabled to check for service
Add change to use wmi_service_enabled for
wmi_service_sync_delete_cmds instead of using
chipset specific name in target_if

Change QDG_BUG to QDF_DEBUG_PANIC in target_if
vdev response expiry handler.

Change-Id: Ie0f3de2a043198e5aaf5a11add3b8e13b6a47812
CRs-Fixed: 2407877
2019-03-04 08:52:01 -08:00
Kiran Venkatappa
22b6ccb1ae qcacmn: Add direct rx buffer changes for CFR requirements
CFR needs to correlate data received from direct dma ring and WMI event
for tx completion. These two events can come in any order. To facilitate
correlation CFR module has to hold on to the buffer until both events
are received and then replenish buffer back to direct dma ring. To
facilitate this requirement direct rx buf module is modified to change
callback return to bool to indicate whether buffer can be replenished
immediatley or not. Also add API to indiciate buffer release/replenish
later.

Change-Id: I848c0e7cf0118156fff7cf37ac9027cdf8e2e416
CRs-Fixed: 2403395
2019-03-04 04:00:43 -08:00
Varun Reddy Yeturu
09a3b065f9 qcacmn: Fix WEP functionality in converged set key
Fix WEP security mode issues in converged set key.

Change-Id: Idd4071c8aef141cb45db9006c5773a94b352879a
CRs-Fixed: 2400864
2019-03-03 22:25:23 -08:00
Chaithanya Garrepalli
0e2d7fc5ad qcacmn: Handle failure in service ready event
Handle error case if unable to allocate peer map
memory.

Change-Id: Id11b04e6ae0714a9f09f051fc61231b758b56179
CRs-fixed: 2396533
2019-03-03 22:25:19 -08:00
Dustin Brown
3fe77afae9 qcacmn: Remove references to EOK
EOK is a legacy definition and frequently misused. Remove references to
it from qcacmn.

Change-Id: Ic3179ad95beb75edb97e1dda7ac879a65a86a2e4
CRs-Fixed: 2404900
2019-03-01 11:14:45 -08:00
Abhiram Jogadenu
db3bb4b4a7 qcacmn: Add extract API for ring params from DBR
Extract ring parameters using dbr_rx_ops for functions in umac.

CRs-Fixed: 2404710
Change-Id: I6fa02668b4fead35ace9e1b4886954ca4cca09c6
2019-02-27 03:13:49 -08:00
Santosh Anbu
3e67f9aa15 qcacmn: Fix typo in conditional check
Add change to fix typo on a conditional check.

Change-Id: I5928ed07f6bca18e2f6266b658365fd5317de31b
CRs-Fixed: 2404622
2019-02-26 11:30:16 -08:00
Naga
7dd88340fe qcacmn: Enhance and update target_if/mlme/vdev_mgr
Enhance target_if/mlme/vdev_mgr by addressing
review comments and update response handling
APIs to handler timers and response bit maps
as expected

Change-Id: I8a5bf3f2931f0c36a367dfebfc898ed2621f3516
CRs-Fixed: 2397184
2019-02-24 20:04:45 -08:00
Akshay Kosigi
1726ae21c5 qcacmn: Add API to update cmn vdev mlme structures
Add API to update cmn vdev mlme structures,
with the addition of new members to the new mlme
vdev structure,new api's are required to update
those members which will be subsequently used the
new mlme target if layer to send commands to the firmware

Change-Id: I9618613c0ad00f78003cd32951b30b631934ba71
2019-02-24 20:04:41 -08:00
narayan
d9e53400e9 qcacmn: CFR Feature support
Add CFR component specific Rx-Ops callbacks

Change-Id: Ic1e89ca2ba049f9579964de50d7285cd40a0d3a7
CRs-Fixed: 2397716
2019-02-22 22:52:26 -08:00
hangtian
9f8f9d68ba qcacmn: Use qdf_mem_zero for zero initialization, target_if part
Use qdf_mem_zero for zero initialization, target_if part.

Change-Id: Id5abc97548cd7728a52b3a55547c0cad6bd56dac
CRs-Fixed: 2378005
2019-02-21 01:47:02 -08:00
Jeff Johnson
6889ddf7bb qcacmn: Replace CONVERGED_TDLS_ENABLE feature flag
The CONVERGED_TDLS_ENABLE feature flag was originally introduced when
the TDLS feature was being componentized so that one could select
either the legacy implementation or the componentized implementation.
That componentization activity has concluded and the legacy
implementation no longer exists. To align with the current usage
remove all legacy TDLS code and switch to using the FEATURE_WLAN_TDLS
feature flag since that more accurately describes the code being
protected.

Change-Id: Ieef785844bd25b06604167eae2f52e39717f502f
CRs-Fixed: 2395694
2019-02-20 09:09:44 -08:00
Abhiram Jogadenu
880ba01add qcacmn: Add target_if support for CFR
Add target_if support for CFR.

CRs-Fixed: 2372061
Change-Id: I8ad14d714306acc20c9a7e09c8d6f17f7caeae16
2019-02-20 06:21:18 -08:00
Chaitanya Kiran Godavarthi
6df18d4da8 qcacmn: Remove service ready callback for smartlog enable
Remove service ready callback for smartlog enable.

Change-Id: I1d2807b0ec59b4f38bb8e2ac5365f3b57cf37437
2019-02-17 08:41:20 -08:00
Aditya Sathish
73d452f3d2 qcacmn: Add support for UL_RU26 WMI service
Add support for UL_RU26 WMI service which will notify the host if
the target has allowed UL_RU26

Change-Id: I639c0872f541cf30776c9f76b87c4b950c1e17f4
CRs-Fixed: 2390350
2019-02-12 11:24:37 -08:00
Tallapragada Kalyan
a702362d34 qcacmn: Check for MAX_AST entries when adding AST entry
check for max_ast entries supported by FW and add the
entry on host accordingly.

Change-Id: Ief70ba631bb41d50c79d3673e3eea0c45b0c1e19
CRs-Fixed: 2355947
2019-02-12 04:47:37 -08: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
Kiran Kumar Lokere
b4d634fbf2 qcacmn: Fix compilation issue with crypto set key
Fix compilation issue with crypto set key feature.

Change-Id: I82d8220a9fea1f9e48338baa74307c124c98e784
CRs-Fixed: 2381329
2019-02-08 15:40:27 -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
Anirban Sirkhell
0f2677d572 qcacmn: Fix possible NULL pointer dereference
In son_ol_send_null(), check for the return value of
GET_WMI_HDL_FROM_PSOC() before using it.

Also, pass argument of type wmi_unified_t in calls
to wmi_unified_stats_request_send().

Change-Id: Idfedae2fcbde6d18b1829adefcabac0adbc55859
CRs-Fixed: 2371368
2019-02-07 04:58:01 -08:00
Naga
f3a70cea4e qcacmn: Add target_if/mlme/vdev_mgr for vdev mgmt ops
Add target_if/mlme/vdev_mgr to handle vdev
mgmt related ops inorder to send corresponding
requests to WMI and processing response events
and Tx callbacks are introduced in MLME LMAC
Tx Ops structure which are initialized from
target_if main.

Change-Id: I9d02b17fdb04757d7dc523dd41e409c0fb1e5edf
CRs-Fixed: 2383346
2019-02-05 06:29:48 -08:00
Edayilliam Jayadev
d4b7e3b572 qcacmn: Populate spectral capability and send via cfg80211
Populate Spectral capability structure with scaling parameters
from extended service ready event parameters. Send the spectral caps
via cf80211 interface.

CRs-Fixed: 2379652
Change-Id: Id0372bdd40843c2101df32d2e71920027a24909f
2019-02-05 04:02:20 -08:00
Edayilliam Jayadev
ac0ddecb36 qcacmn: Get Spectral bin scaling params
Extended service ready event has a tlv
containing the spectral bin scaling parameters.
Populate the spectral capabilities using this info.

CRs-Fixed: 2379652
Change-Id: I0b4648302e7170b5965cf1aec68638e70cd36e73
2019-02-05 04:02:17 -08:00
Dustin Brown
340c627dcf qcacmn: Remove os_timer_t
os_timer_t is a legacy wrapper around the kernel's timer_list type, and
is incorrectly used directly with qdf_timer APIs. Remove os_timer_t,
replacing instances with qdf_timer_t instead.

Change-Id: I410b7fafad18be01141008b6220fbe34ab07601e
CRs-Fixed: 2388575
2019-02-01 20:11:54 -08:00
Edayilliam Jayadev
2bee1aa8ad qcacmn: Add unregister API for direct buf ring
Add Unregister API to de-register and free resources in direct buf
module. Existing logic of freeing all resources as part of pdev destroy
does not take care of soc_start and soc_stop scenarios. Add this API to
enable modules to de-register as part of soc_stop and register during
start.

CRs-Fixed: 2385313
Change-Id: Ibe6f6bc5f4bd2acc5a9fe71eee09c151853073bc
2019-02-01 10:33:51 -08:00
Nandha Kishore Easwaran
1d17599f43 qcacmn: Call qwrap_config_enable from ext_handler
Call qwrap_config enable from both ready and extended service ready
handler. This change is needed for lithium chipsets where the number
of radios per soc is more than 1. Number of radios is updated only
in extended service ready handler and this qwraP_config_enable should
be called in extended service ready

Change-Id: I12289c38996f3bb4274e5795d434dd86c83f34c0
CRs-Fixed: 2384604
2019-02-01 03:42:34 -08:00
Shiva Krishna Pittala
66ae9bef51 qcacmn: Check whether Spectral is disabled upon setting rxchainmask
When Spectral is disabled via INI and the rxchainmask is set for
the radio via iwpriv/cfg80211tool, it results in null pointer access
of target_if_spectral pointer. To fix this, add Spectral feature check
inside target_if_spectral_set_rxchainmask.

Change-Id: Ibd43d3bbc8622d4b8502653b55511bb4667cec7a
CRs-Fixed: 2380653
2019-01-23 21:46:39 -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
Kiran Kumar Lokere
25531c4717 qcacmn: Add support for SET KEY convergence
Make changes to the cmn driver to support SET KEY
convergence feature

Change-Id: I17b5f368a1f735eb394ea70f9b61cc033c3eb20a
CRs-Fixed: 2358796
2019-01-08 18:21:17 -08:00
Shiva Krishna Pittala
ec27e10c2a qcacmn: Remove OL_SPECTRAL_DEBUG_CONFIG_INTERACTIONS macro
Logs of the Spectral WMI interaction prints are under
OL_SPECTRAL_DEBUG_CONFIG_INTERACTIONS macro and is disabled by default.
As the WMI logs are already controllable at runtime from qdf_cv_lvl,
there is no need for OL_SPECTRAL_DEBUG_CONFIG_INTERACTIONS anymore.

Change-Id: I3b89192de4deb420d853631064c20add894fb1e3
CRs-Fixed: 2369846
2019-01-07 19:59:17 -08:00
Arif Hussain
c2cd7cce95 qcacmn: Rename target_if_open/close() to target_if_init/deinit()
Rename target_if_open() to target_if_init() and target_if_close()
to target_if_deinit() as these handles global target_if
initializations.

Change-Id: I935eb6461f1774043adaa0539b6e8e0ea9824382
CRs-Fixed: 2352015
2019-01-02 09:28:11 -08:00
Yeshwanth Sriram Guntuka
c4a14ea149 qcacmn: Add host support for db2dbm RSSI changes
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.

Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
2018-12-24 03:33:04 -08:00
Edayilliam Jayadev
4c002343ad qcacmn: Time stamp WAR for spectral
Spectral HW time stamp gets reset when a reset happens in
within target. This can potentially result in unpredictable
behaviour during classification. To mitigate this calculated
offset is added to the time stamp value in the FFT report.

HT = Spectral HW timer
AT = Actual time stamp in spectral report
CF = Time stamp correction factor
CT = Corrected time stamp
L = Time stamp in the last FFT report before reset
F = Time stamp in the first FFT report after reset
D = Time gap between the last spectral report before reset
    and the end of reset(This is provided by FW via direct
    DMA framework)

                         ***Target Reset***
                                 ^
                                 |
                            |<---D---->|           time line--->
       _______________________________________________________
       ^                    ^          ^  ^
       |                    |          |  |

HT --> 0                    L          0  F

AT --> 0                    L             F

CF --> 0                    0           (L+D)

CT --> 0                    L          (F+L+D)

Spectral driver corrects the time stamp received from target
using the following formula and sends upwards.

CT(Corrected time stamp) = AT(Actual time stamp) +
                           CF(Correction Factor)

Calculation of Correction factor (CF):-
---------------------------------------
Initialization : CF = 0
CF += (L + D) (Done only for the first spectral report after reset)

This scheme takes care of the wrap around in the 32 bit time stamp
which would have occurred if the timer was not restarted due to
target reset.

CRs-Fixed: 2356382 2355486
Change-Id: I17b55d39eb91eb03b867bcfddaf3eb03d1fc5d1b
2018-12-24 03:32:52 -08:00
Arif Hussain
ee8d84061c qcacmn: Add null pointer validation in init_deinit_alloc_num_units()
Make sure mem_reqs is not null in init_deinit_alloc_num_units().

Change-Id: Id93616fa8b4bfda8216b34e15169fa1636efa5f3
CRs-Fixed: 2347695
2018-12-21 19:23:47 -08:00
Edayilliam Jayadev
db29e57ef8 qcacmn: remove CONFIG_WIN from Spectral module
Remove CONFIG_WIN macro from Spectral module.

CRs-Fixed: 2369720
Change-Id: I67154341497230c66b3c3f5a09894c8b2eff8bff
2018-12-21 10:05:32 -08:00
Edayilliam Jayadev
33b7c9a31d qcacmn: Fix KW isssues in Direct DMA
Fix KW issues in Direct DMA module.

CRs-Fixed: 2366231
Change-Id: I091d6b451c142928743ff29a1e463321bad7bf4c
2018-12-16 21:36:46 -08:00
Kiran Venkatappa
c0d010216a qcacmn: Add support to choose hw_mode_id from FW supported modes
Add support to choose the hw_mode_id from FW supported modes. Preferred
mode will be selected if it is not configured in ini params. It is
selected based on the precedence as per capabilities supported by the
mode. For eg., if FW supports DBS and DBS_SBS, DBS_SBS is selected as it
supports three radio compared to DBS's two radio.
This can be overridden by user by setting proper hw_mode_id in ini file.

Change-Id: I162c3a66182882890c416a68f7f64d5149b8f1e5
CRs-Fixed: 2361280
2018-12-14 14:26:25 -08:00
Edayilliam Jayadev
919727378d qcacmn: Remove duplicate assignment of default values to Spectral params
Remove duplicate assignment of default values
to Spectral params.

CRs-Fixed: 2364567
Change-Id: I77d69c2707ca4295bfdac0ebdb49883c4544f61f
2018-12-13 16:45:58 -08:00
Wu Gao
8e0f32b161 qcacmn: Remove TDLS component and related files from hostcmn
TDLS component used in CLD only and needn't in hostcmn. So there
is requirement to move it from hostcmn to CLD. This change removes
policy mgr related files/codes from hostcmn.

Change-Id: Ifeaf1447e74f83a17072d08c4a0ff62a13e91518
CRs-Fixed: 2361584
2018-12-13 02:38:03 -08:00
Wu Gao
9c68825b0b qcacmn: Remove P2P component and related files from CMN
P2P component used in CLD only, and needn't in hostcmn. So move P2P
component from hostcmn to cld. This change remove P2P related/codes
files from hostcmn.

Change-Id: I351ee153588bbcdb62041b4626370d451a3f56bb
CRs-Fixed: 2361487
2018-12-11 17:26:12 -08:00
Edayilliam Jayadev
780b60ea90 qcacmn: Remove CONFIG_WIN from spectral
Remove CONFIG_WIN from spectral module to achieve maximum
possible convergence.

CRs-Fixed: 2354105
Change-Id: I59e4d8029fcf096042741573cf020136747e7367
2018-12-11 06:11:13 -08:00
Nachiket Kukade
2b5448d685 qcacmn: Remove NAN component and related files from CMN
NAN will not be needed in CMN codebase, to reduce the
unnecessary lines of code all the NAN related files have
been merged into CLD. Remove all those files from CMN,
remove NAN related API's and structures from init-deinit,
target if and lmac components.

Remove NAN component and related files from CMN.

Change-Id: I8fa22b84aff30cfbb7a8cd0a573acf6e0a9d8744
CRs-Fixed: 2338061
2018-12-03 15:18:11 -08:00