Commit-Graf

6344 Incheckningar

Upphovsman SHA1 Meddelande Datum
Naga
71b2748ffc qcacmn: Cleanup vdev mgmt related structures in WMI
Cleanup WMI to use new data structures in vdev mlme
for corresponding vdev mgmt op

Change-Id: I0126dcb34e569aac2af82de15e0f3362cf5a0a5e
CRs-Fixed: 2383346
2019-02-05 06:29:56 -08:00
Naga
ba29b56cd6 qcacmn: Add MLME Tx & Rx Ops for vdev mgmt ops
Add Tx & Rx callbacks in LMAC structure and
the same will be (de)initialized through psoc
disable and enable from init_deinit component

Change-Id: I346c9076f0966545fb779dc150f5d6498c793308
CRs-Fixed: 2383346
2019-02-05 06:29:52 -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
Naga
916a4b1e96 qcacmn: Add mlme/vdev_mgr support for vdev mgmt ops
Add support in mlme vdev_mgr to update
data structures corresponding to vdev mgmt
ops as expected by WMI and send the same to
target_if/mlme/vdev_mgr for sending to WMI.

Core MLME data structures in wlan_vdev_mlme.h
will be updated through provided ucfg APIs
which are used in updated vdev mgmt ops
data structures.

Change-Id: Ic6fc03bcb817c9f2f2724a9591b76656840903ba
CRs-Fixed: 2383346
2019-02-05 06:29:43 -08:00
Surya Prakash
1f0930190b qcacmn: Clear compilation warnings
Clear compilation warnings for wmi files which
has unsued functions in case of some macros
aren't defined.

Change-Id: If3a9ee68206a44e35f459e3c39d9da2d6f7ba4ba
2019-02-05 04:02:24 -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
Surya Prakash
27fba324b4 qcacmn: Enhance debug message for wmi
Print endpoint ID, soc ID, target type and transmission
queue depth when queued wmi commands reaches max wmi queue size.

Change-Id: Ia781f3a2c964651d5fdb8cb54ab975021cd11566
CRs-Fixed: 2360714
2019-02-05 04:02:13 -08:00
gaurank kathpalia
f49f17ea85 qcacmn: Use the peer mac address array instead of structure
Currently the driver uses structure for peer mac address
to store the mac address.

Use the already existing peer mac address array for the same.

Change-Id: Ib49b2ac4747fce3610da73a1d29c67ccaaeaad65
CRs-Fixed: 2390282
2019-02-05 01:39:09 -08:00
Sandeep Puligilla
da4a452492 qcacmn: Fix MBSSID scan IE parse failure
Failed to generate Non-Tx BSS scan entry due
to corrupted non-tx beacon IE.

Fix the sequence of fields need to be copied to generate
the new non-tx scan entry.

Change-Id: I6ed8773fb0efe6193c954f4963c364b9d8bf1960
CRs-Fixed: 2386423
2019-02-04 17:52:31 -08:00
hqu
c783c07b93 qcacmn: Fix possible OOB read in extract_mac_phy_cap_service_ready_ext_tlv
In extract_mac_phy_cap_service_ready_ext() the field num_hw_modes
of hw_caps is used as loop bounds and may be attacked.

hw_mode_caps is a pointer defined by firmware. The exact array
length cannot be got since hw_mode_caps pointing array length
is variable. Fix is to add check for field num_hw_modes of hw_caps.

Change-Id: Ie234db3f2356186a4e7aac121ec88dd7e6453efd
CRs-Fixed: 2387221
2019-02-04 17:52:28 -08:00
gaurank kathpalia
c81b9a3b34 qcacmn: Filter out invalid BSSID from rx MGMT frame
Currently the driver accepts zero BSSID obtained from the
beacon/probe response and also allows to connect to them
by creating a peer, but since connection doesn't go
forward with the peer as BSSID is zero, the driver
deletes the peer, but since the BSSID is zero, the
host doesnt sends the peer delete to FW, which causes
a peer leak.

Fix is to filter out the beacons which has invalid BSSID,
and try to recreate the address from the addr2 which is
the FROM address in the MAC address. In case of AP the
BSSID and FROM address would be same, and hence BSSID
can be copied from the same.

Change-Id: I75842c2d80254aaffc31e689782be2eebc118466
CRs-Fixed: 2391346
2019-02-04 15:36:49 -08:00
Vivek
332df1206f qcacmn: Change log level of a debug message
Add change to decrease the log level from error to debug

Change-Id: Ic07a0dd083e6bd112a7d45af5397330ce4f29890
CRs-Fixed: 2391733
2019-02-04 15:36:45 -08:00
nobelj
fdfe7ea3cf qcacmn: Fix memory leak in rx tid setup
Take care to handle failure case resource leakage
in TID setup.

Change-Id: I83fbe2c5edcf0c7554d8e64eba8987fbc15502c2
2019-02-04 13:08:07 -08:00
Krunal Soni
53add6504b qcacmn: WAR to drop MPDU with incorrect sw_peer_id
In certain scenarios where AP sends OFDMA TCP packet to
multiple STAs in HE80 mode in poor RSSI conditions, it has been
observed that host in STA gets in to null_q_descr handling case and
rxtlv doesn't carry correct sw_peer_id. Due to this,
driver can't find correct peer from table and ends up sending deauth
frame to handle invalid peer case. The TA is valid and host is able to
find the peer using the TA.

Apply workaround by detecting this special case and drop the frame.

CRs-Fixed: 2367420
Change-Id: I0cbdbb8e9976e739c959062261fc1c946e446d63
2019-02-04 13:08:03 -08:00
Nachiket Kukade
e2c9a74022 qcacmn: Combine all NAN related flags with WLAN_FEATURE_NAN
Flag WLAN_FEATURE_NAN_CONVERGENCE was added to protect the
converged NAN code inside NAN Component. Since the original
NAN Discovery related code has now been moved inside NAN
component, keeping this flag separate doesn't make sense.

Combine this flag with WLAN_FEATURE_NAN flag which is the
original NAN feature flag.

Change-Id: I0045dcccd36524cbcd4253347c9e0a5704193c2b
CRs-Fixed: 2377393
2019-02-04 10:44:44 -08:00
nobelj
9d8154dcd3 qcacmn: update TID to skb priority
update TID to skb priority before checking process_rx_status.

Change-Id: Ic81666e3cf918f6d089c43ae8234cd7a06fd0ccc
2019-02-04 07:28:30 -08:00
Krunal Soni
98092294a4 qcacmn: Add unified WMI support for WLM stats
The TLV WMI added support for a new WMI_SERVICE_WLM_STATS_REQUEST
service along with an associated WMI_WLM_STATS_EVENTID event, so add
support for a proxy unified WMI service and event.

Change-Id: Ic79c4b757fe2d4e806306750250e3c102745c486
CRs-Fixed: 2388911
2019-02-04 01:50:15 -08:00
Ashish Kumar Dhanotiya
3be335ca19 qcacmn: Avoid compilation issue with kernel 4.19
There is a compilation issue if a variable is passed to
kernel api DECLARE_HASHTABLE.
TO resolve this issue, instead of passing a variable
pass a constant to DECLARE_HASHTABLE.

Change-Id: Ie9782af541bb34cc50f79060b0007dc73881e5f4
CRs-Fixed: 2386893
2019-02-02 15:27:57 -08:00
Ashish Kumar Dhanotiya
ad85c38928 qcacmn: Update driver timer APIs according to kernel 4.19
There are some changes to timer APIs in latest kernel,
update driver APIs accordingly to invoke correct kernel
APIs for timer functionalities.

Change-Id: Ie017c8b1ef8237ca34f696c23509519a1187167c
CRs-fixed: 2383574
2019-02-02 15:27:54 -08:00
Santosh Anbu
0a46a191fa qcacmn: Add change to export symbol
Export the symbol as it is used across multiple modules

Change-Id: I7dd70bd0cf48b2f24cc10de7fd2e4bdd6bd938c6
CRs-Fixed: 2391939
2019-02-02 08:18:45 -08:00
Sourav Mohapatra
6066636527 qcacmn: Fix kernel 4.15 timer list dependencies
With the changes made in Ibe0f8adc4df7bb98aceb509d438e241fac507393 and
Ic4cef0d6301230197443d4d5247188f2af643674 there are compilation issues
with converged code.

Resolve the issues by creating ifdefs for the timer_list definitions
according to kernel version.

Change-Id: Id9c29413ca0d21533a0afae245595051fa3a400f
CRs-Fixed: 2390884
2019-02-01 20:12:03 -08:00
Dustin Brown
8acb74ae9a qcacmn: Add >=4.15 kernel support to qdf_timer
The various setup_*_timer() APIs were removed from the linux kernel in
4.15, and replaced with similar timer_setup_*() APIs. Add conditional
compilation to qdf_timer to use the correct APIs depending on the
version of the kernel being compiled against.

Change-Id: Ibe0f8adc4df7bb98aceb509d438e241fac507393
CRs-Fixed: 2388570
2019-02-01 20:12:00 -08:00
Dustin Brown
bf8e81ef4c qcacmn: Do not directly alias 'struct timer_list'
There are a number of places where the kernel's timer_list type has been
used in conjunction with qdf_timer APIs. To prevent reintroduction of
similar issues in the future, do not directly alias qdf_timer_t to
timer_list.

See also: I410b7fafad18be01141008b6220fbe34ab07601e

Change-Id: Ic4cef0d6301230197443d4d5247188f2af643674
CRs-Fixed: 2388595
2019-02-01 20:11:57 -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
Srinivas Pitla
f491953edb qcacmn: Print readable states, event in SM history
This change prints state, event names while printing SM history

Change-Id: I41a9ea429441255380ac6624952a8eff9fdcbc17
CRs-Fixed: 2390042
2019-02-01 12:44:13 -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
Jingxiang Ge
eb26aa78ae qcacmn: Clean CONFIG_MCL for log_to_console/assert_on_excessive_logging
The aim is to remove CONFIG_MCL or CONFIG_WIN from
cmn component.

This change takes care log_to_console and
assert_on_excessive_logging.

Change-Id: I365f5156a2825a11c279b931b9191cf5c470e943
CRs-Fixed: 2359042
2019-02-01 05:54:38 -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
Ashish Kumar Dhanotiya
d163a896ef qcacmn: Avoid variable size array
There are couple of instances in driver where variable sized arrays
are getting used which are giving compilation issues on kernel-4.19.

To resolve this issue, replace static array with dynamic memory
allocation.

Change-Id: Idb12386265d03db5c857039b692a82ccdf227836
CRs-fixed: 2386880
2019-01-31 19:58:42 -08:00
Venkata Sharath Chandra Manchala
368fb3aff9 qcacmn: Reduce the log level for fragmented packets
Reduce log level from info to debug level for
received fragmented packets in dp_rx_defrag path.

Change-Id: I0d1c7bf91e0337a56ea9e52565e0cbdf47a1772d
CRs-Fixed: 2385483
2019-01-31 19:58:39 -08:00
Yuanyuan Liu
4c21f53aa9 qcacmn: move over to new explicit reset API
Move over to new explicit reset API as the old calls are removed
in kernel msm-4.19.

CRs-Fixed: 2386317
Change-Id: I4d550fc19970baa8e1c90ed170beb995cb850706
2019-01-31 17:30:17 -08:00
Sandhya Mahadevan
091c291f38 qcacmn: Fixing misleading indentation warnings
To fix misleading indentation warnings caused
due to gcc upgrade.

Change-Id: I807552011a49d7d132476f0ebf0fa50593a15c7e
2019-01-31 07:51:45 -08:00
Balamurugan Mahalingam
2a400f75d8 qcacmn: Fix compilation issue while enabling kernel IOMMU config
pld header files come from a different path for WIN case. Include
the WIN pld header files path to INCS.

Change-Id: If84398944b0102024a6230ba8873f25178396c87
2019-01-31 07:51:41 -08:00
gaurank kathpalia
94ac668ff6 qcacmn: Disable simultaneous scan based on ini
Currently the driver allows simultaneous scan irrespective
of the dual mac feature ini config, which can cause
connect latency.

Fix is to disable the simultaneous scan if the dual
mac config ini is configured to disable DBS scan.

Change-Id: I332284880c04955a8ae2ff19eae10313f240d9ae
CRs-Fixed: 2385027
2019-01-31 00:08:17 -08:00
Sravan Kumar Kairam
deb899b182 qcacmn: Fix implicit conversion error
Fix implicit conversion from enum type QDF_STATUS to
different enum type A_STATUS.

Change-Id: I549c9284e18d73685e879c2f0bb8c54330a35bda
CRs-Fixed: 2389838
2019-01-30 21:46:28 -08:00
Bala Venkatesh
246005bcb2 qcacmn: Remove dual mac disable feature from objmgr psoc
Dual mac disable feature is moved to policy manager. Hence remove
this variable from object manager.

Change-Id: I5d83ce0efa9130cc37734f3d7e982def4fe59ac2
CRs-Fixed: 2388459
2019-01-30 18:54:22 -08:00
Min Liu
2625b976d4 qcacmn: Clean up CONFIG_MCL for hif_bus_id
Remove CONFIG_MCL flag for hif_bus_id in __qdf_device since
it can be shared by WIN and MCL.

Change-Id: I0f88aae7f3139485b99a029fa4f53d848875b0ac
CRs-Fixed: 2368166
2019-01-30 14:31:37 -08:00
Kai Liu
205e8d0726 qcacmn: Fix compile error when enable NAPI_DEBUG
Fix compile error and refine NAPI log when DEBUG option is enabled

Change-Id: Ia2bb8235f92bf4ef2d381deccec707749dbab54d
CRs-Fixed: 2389541
2019-01-30 08:26:26 -08:00
Pavankumar Nandeshwar
3dce817808 qcacmn: enable qdf prints for QDF_TRACE_PRINT_ENABLE flag
Enable printing of QDF prints for QDF_TRACE_PRINT_ENABLE flag
irrespective of the flags WLAN_DEBUG and DEBUG.

Change-Id: I0b53d1759c3d38321d66bec325b855eb1e48e75a
CRs-Fixed: 2355333
2019-01-30 08:26:22 -08:00
Jianmin Zhu
3820084d6c qcacmn: Get 2g vht20 capability from F/W
Add WMI_HOST_REGDMN_MODE_11AC_VHT20_2G in WMI_HOST_REGDMN_MODE
bitmap.

WMI_SERVICE_READY_EVENT indicates ht/vht capability by
hal_reg_capabilities-> wireless_modes, REGDMN_MODE_11AC_VHT20_2G
indicates 2g vht20, check and save it as
WMI_HOST_REGDMN_MODE_11AC_VHT20_2G.

Change-Id: Idfb9a0f576619d4f890c2c0df68fc903f311c510
CRs-Fixed: 2384269
2019-01-30 02:32:25 -08:00
phadiman
ebf4cded6f qcacmn: Check for freelist in Rx Desc Pool
For some corner cases if there are no free
descriptors available in the rx desc pool
then stop processing frames

Add check for the same and break the loop
from processing further frames.

CRs-Fixed: 2380041
Change-Id: Ia5d82813df644af61d898131c2987d8d2798e8c9
2019-01-30 02:32:22 -08:00
Vivek
fa47688f04 qcacmn: Change max scheduler buffers for WIN
Since the usage of the scheduler for WIN,
is now not limited only to scan component alone and
would be used by the new converged MLME also for few specific cases,
we need to increase the size of max scheduler buffers to 4K.

Change-Id: I11818c311b39c42ffda5a79eb7b7137dcb491649
CRs-Fixed: 2387644
2019-01-30 02:32:18 -08:00
Vignesh Mohan
53d6d1b215 qcacmn: Send all args with unit test command for bangradar
The unit test command being sent to FW for bangradar did not have
enough arguments to perform subchannel marking as expected.

Pack in the existing uint32_t argument the following information
	1). Segment ID (2 bits)
	2). Chirp Information (1 bit)
	3). Frequency Offset (8 bits [can be signed]).
that is being sent in the unit test command structure.

Change-Id: I7cc567f7bdc9367ee0f51080d0c54c55aa3e4a6b
CRs-Fixed: 2342535
2019-01-30 02:32:14 -08:00
Nandha Kishore Easwaran
f9c44ce2ad qcacmn: Move DA_war flag to SOC level
Moved DA_war flag from vdev level to soc level.
Also disable DA_war when extap is enabled.

Change-Id: I8e8b2ac7835fb8b5bcad603bd1e7d8036ef7719c
2019-01-30 00:03:13 -08:00
Nirav Shah
bc8daa44ae qcacmn: Changes to support rri_over_ddr support for Genoa
Changes to support rri_over_ddr support for Genoa.

Change-Id: I9b14b4622a5e4413eaee9caec1f9e540db9bab7f
CRs-Fixed: 2357346
2019-01-30 00:03:10 -08:00
Jeff Johnson
6df9155649 qcacmn: Rename sme_session_id in struct add_ts_param (2/2)
The sme_session_id field in struct add_ts_param is poorly named since
that is legacy MCL nomenclature, so there is a desire to rename it to
vdev_id to align with the converged nomenclature.

The first phase of renaming introduced a union so that both the old
and new name could be used by legacy projects, but only the new name
was used within the qcacmn project.

Now since all legacy projects have been updated to use the new name,
for the second phase remove the union, leaving behind just the new
name.

Change-Id: Ie86a3c0833899fbeacd458a53d9e23c6a67e7f12
CRs-Fixed: 2384157
2019-01-30 00:03:07 -08:00
Vivek
601cb9452f qcacmn: Fix number of active command timers in psoc
In psoc open, driver try to get the number of PDEV and
allocate memory for number of timers. But during psoc open number of
pdev are 0, thus timers are not allocated for non scan active queues.

Now if all scan active queues are full and a non scan command is
activated, it tries to find empty timer, which is not found, as
all timers are used by scan commands. Thus timer is not started for
this command and when this command is aborted the timer destroy API
return failure and thus the command is not removed from the active
queue.

Allocate the timer during psoc enable where pdevs are already created
and driver can get the number of pdev and print error if start timer
fails for a command.

Change-Id: Ia5b22e2849c58992a7d3d4097becc257ac673157
CRs-Fixed: 2389157
2019-01-29 21:47:31 -08:00
Jeff Johnson
7929ba9084 qcacmn: Rename sme_session_id in struct add_ts_param (1/2)
The sme_session_id field in struct add_ts_param is poorly named since
that is legacy MCL nomenclature, so there is a desire to rename it to
vdev_id to align with the converged nomenclature. As the first phase
of renaming introduce a union so that both the old and new name can be
used by legacy projects, but otherwise only use the new name within
the qcacmn project.

Change-Id: I93743c3b1e3180589a3af83ed9e51d8dc95324d9
CRs-Fixed: 2384156
2019-01-29 21:47:28 -08:00
Manjunathappa Prakash
721bd5f339 qcacmn: Add DPT for Lithium_dp Tx completion status
Log DPT for Tx completion for Lithium_dp. Do not reset nbuf->cb
as it has DPT markings.

Change-Id: I493c3e0e5f4311b90c1ec60ac3a4b44d13c06f62
CRs-Fixed: 2385743
2019-01-29 19:39:12 -08:00