Commit Graph

463 Commits

Author SHA1 Message Date
Jeff Johnson
94f016c5f2 qcacmn: Fix BLOCK_COMMENT_STYLE issues in target_if/dfs
A few instances of violating "Block comments should align the * on
each line" have been identified in target_if/dfs, so fix them.

Change-Id: Ic198912225b8bec587e30d00d7a2a5f76e03d366
CRs-Fixed: 2359528
2018-12-02 14:59:56 -08:00
Bala Venkatesh
c05f8e47be qcacmn: Avoid possible integer overflow
In function init_deinit_chainmask_table_alloc, alloc size is declared
as uint32 and is assigned the value the multiplying non zero value
sizeof(struct wlan_psoc_host_chainmask_capabilities) and uint32
value ser_ext_par->chainmask_table[i].num_valid_chainmasks.
This can lead to overflow as multiplies value can be more than uint32.

Change-Id: I9a886d9ee5213ae8989a2c5d4502336cc275418a
CRs-Fixed: 2347650
2018-11-27 02:01:39 -08:00
Basamma Yakkanahalli
5f7cfd49c2 qcacmn: Device and Target type support for qca6018
Added target and device type support for qca6018.

Change-Id: I85382bf053d0a5f34cfaf0cca78a4b66b4265989
CRs-Fixed: 2323023
2018-11-27 00:32:00 -08:00
Vignesh Mohan
4974032991 qcacmn: Add dfs tgt API to set Sub Channel Marking
Introduce dfs_tgt API to send the WMI command to enable/disable
"Subchannel Marking" in Firmware (only in  Full Offload)

Change-Id: If739409521c8704b612e52dfc8ed6b86ffe32bca
CRs-Fixed: 2334258
2018-11-23 10:13:16 -08:00
Shashikala Prabhu
dae5623949 qcacmn: Use qdf API to allocate aligned memory for direct buffers
In target_if_dbr_fill_ring(), min_buf_align (8 bytes) was added to
min_buf_size before allocating the memory for dbr_buf_pool. This leads to
extra 1MB allocation.

To avoid this extra allocation, call qdf_aligned_malloc() to allocate
aligned memory for direct rx buffers.

Change-Id: I72f7c616c7a699437b081de7149a4a67a3ad30c4
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed : 2336697
2018-11-22 00:43:55 -08:00
Aniruddha Paul
c34164e97e qcacmn: Add support for NSS DBTC mode
Add dbtc support for NSS offload mode.

Change-Id: I3673c0a42071f7d7767e086618c0171658e8a6f0
CRs-Fixed: 2330655
2018-11-21 22:59:16 -08:00
Krishna Rao
cc54e49b78 qcacmn: Add array bounds check and count update for FFT bin array
Add an array bounds check for the FFT bin arrays in SAMP message so
that they do not overflow even if an unexpectedly high FFT bin count
parameter is requested by the caller. Also reflect FFT counts limited
by bounds check into SAMP message. These changes act as an additional
guard sequence - functionality for the calling path itself to reject
samples that exceed the expected FFT bin count or have other
unexpected issues will be added in the future based on target side
profiling.

Change-Id: I4af24f623691cc2c2b04243cb64f05d159f035f6
CRs-Fixed: 2348397
2018-11-16 15:11:47 -08:00
Krishna Rao
8bd4f992f9 qcacmn: Remove temp_samp_msg_len and unnecessary updates to it
Remove unused variable temp_samp_msg_len from
target_if_spectral_create_samp_msg(). This variable does get updated,
but is ultimately unused. By removing it, we save processor cycles
which would otherwise be wasted on the update operations occurring for
each Spectral sample.

Change-Id: Ib5ca5598d5bee6cc15ca72e9e002239d2e76fd6c
CRs-Fixed: 2349113
2018-11-14 04:03:05 -08:00
Venkata Sharath Chandra Manchala
443b9b4da2 qcacmn: Print HP/TP Stats
Extend txrx_stats to print current HP/TP
Status for UMAC rings.

Change-Id: I50332f7507fdf1841dee51f0b1e97ef4ea68f04f
CRs-Fixed: 2332191
2018-11-13 06:56:15 -08:00
Shiva Krishna Pittala
3e4f08be93 qcacmn: Increase the DBR_NUM_RESP_PER_EVENT to 2
Increase the number of repsonses per dbr event to 2 to
support Spectral scan in 160MHz mode

Change-Id: I47ee933b06d94a9a02f7d448b631dfdb99e297c4
CRs-Fixed: 2297498
2018-10-31 11:50:48 -07:00
Liangwei Dong
cc8676b6a8 qcacmn: Action frame random mac addr tx support
1. Send add random mac addr rx filter WMI command
to target
2. Add/Del the active random mac addr entry
3. Clear random mac addr from target if not active

Change-Id: I9dcbdc20b76d9865da7a8db6ee013bf5e44e4407
CRs-Fixed: 2322097
2018-10-26 10:39:34 -07:00
Edayilliam Jayadev
7dacaff96d qcacmn: fftbin size WAR for HK V2
For HK V2 each fft bin is 2 bytes due to
some HW limitations. To fix this modify the
fftbin size WAR to convert 2 byte fft bins to 1 byte
and forward to applications via SAMP message.

CRs-Fixed: 2319415
Change-Id: I6c27d6804ddaf91ed9e6695e0b21a81115744fff
2018-10-24 08:17:42 -07: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
Harprit Chhabada
9f5e60128f qcacmn: Fix OOB read in init_deinit_handle_host_mem_req()
num_mem_reqs used as for loop vairable in init_deinit_handle_host_mem_req,
will give user control over tgt_hdl->info->num_mem_chunks used in
init_deinit_alloc_host_mem()  which is later passed to
init_cmd_send_tlv().

In init_cmd_send_tlv() num_mem_chunks is used as a for loop variable,
and can result in OOB issue.

Change-Id: Ica9bd42e596da19a4033ffd9424ddeedb593bad1
CRs-Fixed: 2331844
2018-10-19 10:49:20 -07:00
Pratik Gandhi
8af026a2ca qcacmn: Abstract BMI and add export symbols for ko separation
Abstract BMI callback from common module and move it to specific component.
Add Export symbols to support modularization in WIN. (BMI)

CRs-Fixed: 2324081
Change-Id: I1ec463d41d238ce81254ecc1f0bb1dc545e1248e
2018-10-18 06:32:45 -07:00
Priyadarshnee S
8bf0fa04eb qcacmn: Target if Changes to send usenol pdev param
Add changes in target interface layer to send usenol pdev param to FW.

Change-Id: I5526066f34ae27234f9542fdd54901e6eb915fdb
CRs-Fixed: 2328894
2018-10-18 02:17:34 -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
Balaganapathy Palanisamy
9e0e1667d4 qcacmn: Cleanup duplicate STA inactivity detection
Move the station inactivity detection code from datapath to
SON layer.

Change-Id: Ia071a19ce2fd36b46a8b0bf4362077609e8b98f9
CRs-Fixed: 2326638
2018-10-12 15:18:18 -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
Krishna Rao
e4de76596e qcacmn: Add WAR to process Gen3 Spectral report mode 1
Add Gen3 Spectral host WAR to remove NULL FFT bins for report mode (1)
in which only summary of metrics for each completed FFT + spectral
scan summary report are to be provided. This would be required on some
Gen3 chipsets (starting with IPQ8074) under the following
circumstances: In report mode 1, HW reports a length corresponding to
all bins, and provides bins with value 0. This is because the
subsystem arranging for the FFT information does not arrange for DMA
of FFT bin values (as expected), but cannot arrange for a smaller
length to be reported by HW. In these circumstances, the host driver
would have to disregard the NULL bins and report a bin count of 0 to
higher layers.

Change-Id: If5fb72805dc80ada0ab617b4b1c2cc9ea497bcf8
CRs-Fixed: 2300251
2018-10-09 00:03:56 -07:00
Aditya Sathish
a06a063b7d qcacmn: Add host WMI support for EAPOL minrate resource config
Add host WMI support for EAPOL minrate resource configuration.

Through the use of the global.ini configuration parameter -
eapol_minrate_set and eapol_minrate_ac_set, the user can set EAPOL
frames to be sent in minimum rate in tunnel mode. In addition to
this, the user can also select between the 4 ACs (BE, BK, VI, VO)
to send the EAPOL frames.

The changes are reflected in the target resource config which
is sent to the firmware.

Change-Id: Ib9a264b64305bf43708c3c2af3ff254b6cc28477
CRs-Fixed: 2298020
2018-10-08 01:53:22 -07:00
Tallapragada Kalyan
16395277c9 qcacmn: pass pdev wmi_handle to lro hash config
pass pdev wmi_handle instead of soc wmi_handle
for lro hash config to avoid target assert.
CRs-Fixed: 2319084

Change-Id: Ic570b07367cd34b39d50324ff709f827d550b6c8
2018-10-08 01:53:19 -07:00
Gyanranjan Hazarika
2c54581814 qcacmn: Changes for BSS Color Enahancement FR40903
1. QDF_MODULE_ID_BSSCOLOR added for logging
2. BSS Color Offload supported trace added
   as target_if_info

Change-Id: I00db87f6619f7857dd83cf1eb5d805780c501805
CRs-fixed: 2242109
2018-10-05 22:10:06 -07:00
Edayilliam Jayadev
2256850e61 qcacmn: 160 MHz/80p80 support for gen III Spectral
For generation 3 spectral reports for the 80 MHz segments
come as part of different events. To deal with this a
state machine is added to report handler. Noise floor
value of the lowest chain in the chain mask is populated
in the SAMP message.

CRs-Fixed: 2236331
Change-Id: Ie24426449cf8503c9d7f7c30ca617a6697ca2b5e
2018-10-05 02:14:07 -07:00
Sathish Kumar
a8dcd50683 qcacmn: Featurize WMI APIs and TLVs that are specific to WIN
In the existing converged component, WMI TLV APIs are implemented in
a generic manner without proper featurization. All the APIs exposed
outside of WMI are implemented in wmi_unified_api.c and all the APIs
forming the CMD or extracting the EVT is implemented in wmi_unified_tlv.c.

Since WIN and MCL have a unified WMI layer in the converged component and
there are features within WIN and MCL that are not common, there exists a
good number of WMI APIs which are specific to WIN but compiled by MCL and
vice-versa. Due to this inadvertent problem, there is a chunk of code and
memory used up by WIN and MCL for features that are not used in their
products.

Featurize WMI APIs and TLVs that are specific to WIN
- Air Time Fareness (ATF)
- Direct Buffer Rx (DBR)
- Smart Antenna (SMART_ANT)
- Generic WIN specific WMI (AP)

Change-Id: I7b27c8993da04c9e9651a9682de370daaa40d187
CRs-Fixed: 2320273
2018-10-05 02:14:04 -07:00
Yeshwanth Sriram Guntuka
d3ceb840a7 qcacmn: Release vdev ref in os_if_ndp_end_ind_handler
NAN vdev ref count incremented as part of end_ind handler
is not released which will result in the nan vdev not
getting physically deleted.

Fix is to release nan vdev ref in os_if_ndp_end_ind_handler.

Change-Id: I31a32fa241fb9e86d3a64d490722bc42905970c4
CRs-Fixed: 2325580
2018-10-04 14:05:43 -07:00
Shashikala Prabhu
70da943414 qcacmn: Add wmi wrapper function to get target pdev id from host
Add wmi wrapper function to convert host pdev id to target  pdev id.

Change-Id: I3824a7556bf0b740d069602e9ee5a572c427c49c
CRs-Fixed: 2316715
2018-10-02 13:48:38 -07:00
Tushnim Bhattacharyya
16e7479fa6 qcacmn: Fix kw issue in target_if_nan_deregister_events
Potential NULL pointer dereference of handle in
target_if_nan_deregister_events. Add null check
in the function.

Change-Id: Ie30720b525c457e6c805bd0d212044be9270bd53
CRs-Fixed: 2323349
2018-10-02 05:44:16 -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
Jingxiang Ge
de9bd0182e qcacmn: Fix kw issue in target_if_nan_register_events
Potential NULL pointer dereference of handle in
target_if_nan_register_events.

Add null check in the function.

Change-Id: I1fc57d712713bc47345b178c972cc5fc926a42d0
CRs-Fixed: 2317017
2018-09-24 13:02:17 -07:00
gaurank kathpalia
7b95da6afa qcacmn: Possible NULL pointer dereference in target-if
Currently, the return value of get_wmi_unified_hdl_from_psoc() API
is passing directly as argument to some functions without checking
the return value for NULL which may cause NULL pointer dereference.

To address this issue, add NULL checks for return value of
get_wmi_unified_hdl_from_psoc() API where ever it is getting used.

Change-Id: I9e9bf1372a8728e1af1be65065c9ba12f95ee305
CRs-Fixed: 2317025
2018-09-23 15:50:53 -07:00
Arif Hussain
4957585f02 qcacmn: Add validation code for wmi handler in stats module
Add validation code for get_wmi_unified_hdl_from_psoc() return
to avoid null pointer access.

Change-Id: Id5dc6069ddcd9604248039f2957a69f27bc48187
CRs-Fixed: 2317016
2018-09-21 10:09:28 -07:00
Frank Liu
3526a0eb12 qcacmn: Fix KW issue in tdls
Potential NULL pointer dereferences of wmi_handle are found in these
functions:
target_if_tdls_event_handler()
target_if_tdls_register_event_handler()
target_if_tdls_unregister_event_handler()

Do wmi_handle NULL check in the above functions.

Change-Id: I7cb4b574750d6bc6538862aa24a0cf49831b7c25
CRs-Fixed: 2317029
2018-09-21 00:27:25 -07:00
Arif Hussain
d5a4e64886 qcacmn: Add validation code for wmi handler in dfs module
Add validation code for get_wmi_unified_hdl_from_psoc() return
to avoid null pointer access.

Change-Id: I05a8c135df5197356c77df4997d978c0209b0dfd
CRs-Fixed: 2317012
2018-09-21 00:27:19 -07:00
gaurank kathpalia
5f5b7039bf qcacmn: Add src, and dst id support in TARGET-IF
In the scheduler_post_message, src_id is now added to
know the source module of the msg. the present scheduler
doesn't know about the same which is scheduler_post_msg

Replace the scheduler_post_msg with scheduler_post_message

Change-Id: I24a94a898fc1f8c3c1e2f1faca0ef51aacdb238c
CRs-Fixed: 2306016
2018-09-17 06:09:48 -07:00
Chaithanya Garrepalli
3e93e5f8ae qcacmn: changes to enable peer map V2 messaging
Host changes to enable HTT version 2 messaging for
PEER map and unmap in FW and changes to handle these
messages in host

Change-Id: Ifbe478212bbbc9c9ea1c1e4791c7a78407c376cc
2018-09-15 11:11:04 -07:00
Gyanranjan Hazarika
3dff295d8c qcacmn: Changes for Draft 3.0
Make the HECAP and HEOP changes for 11ax Draft3.0.
Draft2.0 support can still be enabled by unsetting
SUPPORT_11AX_D3 in config.unified.wlan.profile.

Change-Id: I0c0fd885a43b672baca61011b75a51526481b1ee
CRs-fixed: 2294235
2018-09-11 16:42:22 -07:00
Linux Build Service Account
00f98d460c Merge "qcacmn: Use monitor direct for smart monitor" 2018-09-08 21:33:21 -07:00
Edayilliam Jayadev
1f91a239b6 qcacmn: Add fft bin size WAR check
Add the fft bin size WAR check in spectral
report processing routine.

CRs-fixed: 2300341
Change-Id: I662fb469cb3716287663bc6d94d4adccb01a83c4
2018-09-07 03:04:12 -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
680c3e8340 qcacmn: Fix NULL pointer dereference in dfs
In target_if_radar_event_handler, target_if_dfs_cac_complete_event_handler
& target_if_dfs_radar_detection_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: I6dde5132a6a2e31a25654bd818a90e1c164a4a74
CRs-Fixed: 2305505
2018-09-06 01:42:04 -07:00
Rachit Kankane
898f6ff055 qcacmn: Featurize P2P Listen Offload
P2P Listen offload is not a requirement for Genoa, hence featurize
P2P listen offload code to save memory foot-print for Genoa.

Change-Id: I3c32b4ee2b37421e49acee4bd20d36e7a8a3bf77
CRs-Fixed: 2304555
2018-09-06 01:42:01 -07:00
Tushnim Bhattacharyya
9b8cfb0ebf qcacmn: Fix NULL pointer dereference in ftm
In target_if_ftm_process_utf_event is derived & dereferenced
with out a NULL check. Add a NULL check for wmi_handle before it is
dereferenced.

Change-Id: Id3c1ae4df9aa7b0cfc12fbf9288bec2ae72c6de6
CRs-Fixed: 2305506
2018-09-05 22:15:05 -07:00
Tushnim Bhattacharyya
a9307520d3 qcacmn: Fix NULL pointer dereference in tdls
In target_if_tdls_update_fw_state, target_if_tdls_set_offchan_mode,
& target_if_tdls_set_uapsd wmi_handle is derived & dereferenced
with out a NULL check. Add a NULL check for wmi_handle before it is
dereferenced.

Change-Id: If741f69773a712cebcd1be889ca09d01eee97fae
CRs-Fixed: 2305520
2018-09-05 22:15:02 -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
Manoj Ekbote
b8de937cc4 qcacmn: Initial support for 11ax MBSSID IE
1. Service ready ext includes a parameter for max
BSSID indicator.
2. Beacon template includes MBSSID IE offset.
3. Vdev create and up cmds include more parameters.

Change-Id: I71214eacdaa886725b7ea8f61db3a743ba6597e9
CRs-Fixed: 2306638
2018-08-31 19:09:55 -07:00
Akshay Kosigi
0987f2dcf7 qcacmn: Add FTM build flags
Add FTM flags to enable/disable FTM and enable NL80211 only, enable TX99
only or both.

Change-Id: I18bbbadd65d23221dc4d739e05235f4d81c12043
CRs-Fixed: 2240572
2018-08-29 14:03:02 -07:00
Venkateswara Swamy Bandaru
4dd4a62272 qcacmn: Extend target type checks of qca8074v1 to qca8074v2
Extend target type checks of qca8074v1 to qca8074v2

Change-Id: Ie5eba980af03c87f0086ffe2c2c89d7dc86dc71f
CRs-Fixed: 2292315
2018-08-29 03:08:00 -07:00