Commit Graph

8820 次程式碼提交

作者 SHA1 備註 提交日期
bings
3a5c2d3456 qcacmn: Fix print format error
Fix print format error in hal_rx_fst_attach

Change-Id: I45aefcedd9806279552ff25a8713c66f350fedae
CRs-Fixed: 2666498
2020-06-01 01:37:37 -07:00
bings
1d5343f48a qcacmn: ndo_tx_timeout support for 5.6+ kernel
New parameter txqueue is added for callback ndo_tx_timeout.
Add support for it under the kernel version compilation flag.

Change-Id: I0234dade56f65d15a4370404e17ff51a8a73ee4e
CRs-Fixed: 2666444
2020-06-01 00:04:14 -07:00
bings
e3fe6fc3c0 qcacmn: proc_create_data support for 5.6+ kernel
One parameter of proc_create_data is changed from struct
file_operations to struct proc_ops.
Add support for it under the kernel version compilation flag.

Change-Id: Ic87222f9c267debef56dcc66fc629854058ffabd
CRs-Fixed: 2666492
2020-06-01 00:04:11 -07:00
bings
1740435d49 qcacmn: Use ktime_get_real_ts64 for kernel 3.17.0+
ktime_get_real_ts64 is defined from kernel 3.17.0.
Use ktime_get_real_ts64 instead of ktime_get_ts from
kernel 3.17.0.

Change-Id: Ica72545fe5224966fbb350813bf3c2d849946dbc
CRs-Fixed: 2666404
2020-06-01 00:04:08 -07:00
Abhinav Kumar
5839296d1d qcacmn: Fix mem leak while deleting pmksa
Due to commit : I83e8d4c0c8b3ad503aa5894ffdc4a14bc3aeec7a,
while processing set_del_pmk command driver checks pmk_len
to delete pmk. In case if new PMK gets added with 0 lengths,
pmk entry with pmk_len = 0 will never be deleted. It is only
overwritten without freeing due to incorrect logic set_del
pmk logic.

Fix is to modify set and del pmk logic to avoid mem leak.

Change-Id: Idff573d020940dd926d07e1ec4f146eaa1215686
CRs-Fixed: 2696207
2020-05-29 19:52:56 -07:00
Jia Ding
c66705291b qcacmn: Properly set OL_TXRX_NUM_LOCAL_PEER_IDS
Set OL_TXRX_NUM_LOCAL_PEER_IDS to WLAN_MAX_CLIENTS_ALLOWED
if WLAN_MAX_CLIENTS_ALLOWED is defined.

Change-Id: Ifb5c6ab15e791f92aa8503537e624195cf3fad6d
CRs-Fixed: 2694492
2020-05-29 14:51:01 -07:00
Manjunathappa Prakash
32acca2463 qcacmn: Flush the PCIe window select config before device access
PCIe window select config reg update goes on different NoC and
actual PCIe device register access goes on the different NoC.
If there is delay in window select reg config, it can result in
access some other PCIe IO memory access and will result in actual
register write lost issue. Make sure to flush the window select
reg write before actual device reg access.

Change-Id: I1fe17aad7ae8fd5dea7a618273d9cd813b236a85
CRs-Fixed: 2687676
2020-05-29 14:50:57 -07:00
Saket Jha
d30eab103c qcacmn: Create monitor mode spinlock and add null check
Due to changes in datapath init/deinit path, mon_lock spinlock was not
getting created. Create mon_lock spinlock during
dp_rx_pdev_mon_cmn_desc_pool_init.

Add null check to validate rx_tlv_header before calling
hal_rx_mpdu_start_tlv_tag_valid.

Change-Id: I41c781de29f2c8c05ec1bfa90f9c8f742f2539bf
CRs-Fixed: 2693687
2020-05-29 14:50:54 -07:00
gaurank kathpalia
d7ec6fab20 qcacmn: Enable band preference for 6 GHZ
Enable band preference for 6 GHZ and give default
maximum weightage to 6 GHZ to push it for STA operation.

Change-Id: Id05e81ca4fb9de7653dc0291d2ffe970104849cb
CRs-Fixed: 2692068
2020-05-29 13:13:41 -07:00
Chaithanya Garrepalli
1d144f88bd qcacmn: store peer_id instead of peer_ids array in dp_peer
In lithium a peer will have only single peer_id hence remove
peer_ids array from dp_peer structure

Change-Id: Ib98270b7fd98f1199b862e4608f990687914b7cc
2020-05-29 13:13:37 -07:00
Ke Huang
b404458d20 qcacmn: Add NULL pointer check for KW issues
Add NULL pointer check in function hif_send_single() and
htc_dump_counter_info() for KW issues.

Change-Id: I4b020c566b14b28a825c13752dccf67b5f8bb837
CRs-Fixed: 2675205
2020-05-29 03:13:53 -07:00
phadiman
9789bab0d9 qcacmn: Replace dp_srng_setup with dp_srng_alloc/init in debug logs
dp_srng_setup was split into dp_srng_alloc and
dp_srng_init as part of lithium DP init and de
init improvements but the debug prints remain
unchanged

Rectify mistakes in debug prints accordingly
to match dp_srng_alloc or dp_srng_init

CRs-Fixed: 2696952
Change-Id: If6c41ffe80006852f9ac308ce65ceee69736fcb9
2020-05-29 00:28:33 -07:00
Baowei Liu
ca3412698e qcacmn: Not set "force_set" if event completed
"qdf_complete_wait_events" set force_set flag for all event in
"qdf_wait_event_list". This cause qdf_wait_for_event_completion
return QDF_STATUS_E_FAULT, even if event have completed

Add new flag "done" to record event completed. Use this flag to
detect event have completed or not.

Change-Id: I31f947169153ccbeb8435c539faab1059c055c04
2020-05-28 17:28:50 -07:00
Yu Tian
76013e1056 qcacmn: Change tx_desc, desc_ext min threshold
For DBS SAP case, need to balance the CPU cost and
TPUT KPI, use tx_descriptor size to control this can
in avoid the influence of IPA part.

CRs-Fixed: 2665268
Change-Id: I702a605b7a3156e429476f6a4d623b69bb19f615
2020-05-28 10:43:09 -07:00
Alok Kumar
163a364d27 qcacmn: Set TCP PSH flag only for the last segment of TSO packet
Currently, if TCP PSH flag is set in TSO packet then
PSH flag is set for each TSO segment in the driver.
This causes GRO flush for each segment received in the receiver side.

Set this PSH flag only in last TSO segment so that GRO flush
happens for the last segment in the receiver end.

Change-Id: I6d6b34fab71ab2984ea68d8197f2979d25b36c6b
CRs-Fixed: 2692251
2020-05-28 07:57:09 -07:00
Jianmin Zhu
0818b326b1 qcacmn: Enable firmware dump when kernel panic for Rome
Firmware dump is necessary to debug host panic issues because
host and firmware are out of sync.
MACRO DEBUG is undefined by default, after remove it,
hif_crash_shutdown->ol_copy_ramdump is called to collect firmware
dump.
Since dump depend on functions in bmi, add MACRO
WLAN_FEATURE_BMI check.

TargetFailure event wont't be received after inject assert due to
irqs disabled, so can't set target RESET state which is checked
when dump IRAM

Change-Id: Ia75f5032a2817e35e4c7e777857b137ba3998ebd
CRs-Fixed: 2682677
2020-05-27 07:04:53 -07:00
Aakanksha Doda
ae8ef356d8 qcacmn: Add a check to not process DEL_MULTISTREAM event in wait state
Add a check to make sure that WLAN_GREEN_AP_DEL_MULTISTREAM_STA_EVENT
event is not processed in wait state to avoid any disruptions in the
qdf_timer running before when WLAN_GREEN_AP_DEL_STA_EVENT event was
received.

Change-Id: I7ca04243f5faa593afb65bd41db1f4bf3a8d4e74
2020-05-26 08:02:58 -07:00
Linux Build Service Account
b1cd82186a Merge "qcacmn: Don't destroy uncreated completion_freeq_lock" 2020-05-26 04:40:45 -07:00
Gerrit - the friendly Code Review server
42fad8e2c2 Merge changes into wlan-cmn.driver.lnx.2.0 2020-05-26 04:32:46 -07:00
Baowei Liu
68487f9c5c qcacmn: Don't destroy uncreated completion_freeq_lock
Sometimes, BMI download FW fail, cause destroy this uncreated spinlock.

Because fw download fail, hif_start() not called, so 
&pipe_info->completion_freeq_lock not be created.But hif_ce_stop() call
qdf_spinlock_destroy(&pipe_info->completion_freeq_lock);Cause WLAN Panic 
@ qdf_lock_stats_cookie_destroy:824: Lock destroyed twice or never created

hif_state->started be set to true in hif_start( )This fixes use 
hif_state->started to judge hif_start() be called or not.If false, 
hif_start() not be called, so needn’t destroy  uncreated 
completion_freeq_lock

Change-Id: Id6aae8024fe9df2ac6cf7976047ebd7a850438e4
2020-05-26 01:40:47 -07:00
Tiger Yu
7d8cf5af55 qcacmn: Fix compiling error when enable HIF_CE_DEBUG_DATA_BUF
Use %zu instead of %lu for type size_t to fix the compiling error
on 32bit system when enable the HIF_CE_DEBUG_DATA_BUF.

Change-Id: Ib11cf7a798514bf654141269b2cafc6fc198a48c
CRs-Fixed: 2688568
2020-05-25 12:34:38 -07:00
Hariharan Basuthkar
4f9a6b9016 qcacmn: Add max_bw field in struct regdomain
When RD ETSI11 is configued, 5G HT40 channels are getting built for
low band channel frequencies. As per regulatory update #31,
this is not allowed.

To fix this issue, add a new field max_bw that indicates the maximum
supported bandwidth by a regdomain. Add max_bw values for all 2G and
5G regdomains definitions. Also pick bandwidth between reg-domain's
max_bw and country's max_bw.

Change-Id: Ie0e9f9c7d9ae21eea2bc534626ef7a13602577bb
CRs-Fixed: 2682424
2020-05-25 04:25:05 -07:00
Lincoln Tran
bf4490a41d qcacmn: Remove min check for channel list
Remove the min check for channel list in PNO scan as there is no
limitation in FW for number of channel. The min check is truncating
the 6G channels.

Change-Id: Ic12a82e6b1f9d22c6136abc01125f0465fe821c9
CRs-fixed: 2661087
2020-05-22 18:30:09 -07:00
Aditya Sathish
a88235db0e qcacmn: Add support for FW cap for chan_width_switch_cmd
WMI_PEER_CHAN_WIDTH_SWITCH_CMDID sent from host fragments the
command based on the size of the WMI buffer.

Add support to instead use a FW regulated value taken from the
WMI service ready extended_2 event.

CRs-Fixed: 2684788
Change-Id: Iaeccf785c64b385bf2ad6bc372da239981143fa0
2020-05-21 23:52:25 -07:00
Srikanth Marepalli
5c4527f338 qcacmn: Increase the PMKSA Cache entry size to 16 in host
Currently only atmost 3 PMK Cache entries are allowed in Host,
which is not equivalent to that of Firmware, as upto 16 max PMK
cache entries are allowed in Firmware.
This change is to support upto 16 PMKID entries in driver as well

Change-Id: I383ca79e284de4913197ca4afec317e8669edd86
CRs-Fixed: 2689482
2020-05-21 22:32:18 -07:00
Yeshwanth Sriram Guntuka
1173b39f0f qcacmn: Update peer rx mpdu count per mcs rate
Update the peer rx mpdu count per mcs rate as part
of peer stats updation.

Change-Id: I945d32c7701f5f5c9bfbbaa6ab4576b94389c84c
CRs-Fixed: 2688068
2020-05-21 20:34:59 -07:00
Gururaj Pandurangi
dce7e20f02 qcacmn: Fix possible out of bound access
In reg_set_5g_channel_params_for_freq if the input channel
bandwidth is 5MHz then while getting the next lower bandwidth
out of bound access occurs.
Fix out of bound access in getting next lower bandwidth value.

Change-Id: Ice394e68e01a5fb4c8e4098395897a8d5a1d24a9
CRs-Fixed: 2680938
2020-05-21 17:50:37 -07:00
Edayilliam Jayadev
86c7e9c3b7 qcacmn: Always populate agile frequency in SAMP message
Populate the agile frequency in SAMP message irrespective of
the current Spectral mode.

CRs-Fixed: 2688422
Change-Id: I2a897449d37a69af2144c9f9710612d6d4a13e8c
2020-05-21 14:13:52 -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
narayan
2d3493959f qcacmn: Update correct Rx rate for SU Rx ppdu
Currently computation of Rx rate depends on SU MCS
and SU NSS for SU PPDU. For SU PPDU, incorrect SU NSS leads to
incorrect computation of Rx rate.
To fix this, use respective PPDU information(MCS and NSS) and
calculate Rx rate based on proper SU NSS.

Change-Id: I754a7ecd57ec02d33f211937b7ffd025278d1e05
CRs-Fixed: 2668760
2020-05-21 12:36:25 -07:00
Santosh Anbu
ef8a6e1b47 qcacmn: Define restart bitmap using qdf_bitmap
Add change to define restart bitmap using the generalized bitmap
declaration. Also use generalized function to check if any of the
bits are set in the bitmap.

Change-Id: I06859fc089f121559231a7e13bcab63322e5ef9b
CRs-Fixed: 2690914
2020-05-21 12:36:22 -07:00
Santosh Anbu
bfaf232db7 qcacmn: Use qdf_bitmap_empty to check bit status
Replace the implementation of checking bitmap status with a
standard API qdf_bitmap_empty

Change-Id: I22ee8c25c1d911f65ba4bfe235557444e6333ca4
CRs-Fixed: 2690914
2020-05-21 12:36:19 -07:00
Shwetha G K
2846a3c308 qcacmn: Capture tx status error as well in CFR stats
Capture tx status errors & cookie lookup failure under CFR stats

Change-Id: I546b70424f5fe5fafde36da3cdf587cb7ab29856
2020-05-20 23:47:41 -07:00
Manjunathappa Prakash
e4155588aa qcacmn: Get back WAR to confirm WBM IDLE ring LSB write
On Lahaina platform it is seen that WBM IDLE ring init is failing,
Write to WBM_IDLE link ring LSB write is failing.
Add temporary WAR to do back to back write of WBM IDLE link ring
LSB address config register.

Change-Id: If0c20da06bafa3037845e9806934f9e4dfbd1c1c
CRs-Fixed: 2690495
2020-05-20 15:20:09 -07:00
Shwetha G K
1347c3ab9c qcacmn: Update Pine specific CFR changes
Update Pine specific CFR changes

Change-Id: Ibdd33e458cd058f6db94de5165df31d25d97eebb
2020-05-20 00:09:20 -07:00
Shwetha G K
3b989e01df qcacmn: Add CFR Pine support
Add CFR Pine support

Change-Id: Id81df0e3e36725e4fc15e92c1ac5a967cf4883f7
2020-05-20 00:09:16 -07:00
Jinwei Chen
05bd796311 qcacmn: fix invalid TX pool status when pool reattach
For AC based TX flow control, when try to do TX desc pool
reattach, currently even if TX desc pool avail_desc count
> BE_BK start threshold, it still mark pool status as
FLOW_POOL_ACTIVE_PAUSED.

Set correct pool status to FLOW_POOL_ACTIVE_UNPAUSED.

Change-Id: I6b675ffd71a2233ac23efbd6df2c235313f59cba
CRs-Fixed: 2687728
2020-05-19 22:29:20 -07:00
Vikram Kandukuri
b94338a8d7 qcacmn: Add null pointer check
Add null pointer check for wmi handle in CFR functions.

CRs-Fixed: 2673593
Change-Id: I0993f36749f856df8849913f0338a8dc2581fa95
2020-05-19 13:25:22 -07:00
Srikanth Marepalli
8a8ee00543 qcacmn: Add support for WPA3 SuiteB roaming
This commit enables support for SuiteB roaming wmi service based
on the WPA3 SuiteB roam service capability advertisement
received from Firmware.
In SuiteB the PMK length is greater than the existing PMK length,
added the extended PMK parameters to fill in the remaining bytes
of PMK in the RSO command.

Change-Id: Ia630580bba050513800e3acac875baf937ec8d14
CRs-Fixed: 2685993
2020-05-19 08:41:11 -07:00
nakul kachhwaha
b57a6d5bd6 qcacmn: Fix compilation issue in iot sim module
Fixing the compilation in iot sim module by
properly dereferencing tx ops from psoc.

Change-Id: If60d5350502e50f2ebc64bd6b03787e7fe860546
CRs-Fixed: 2688627
2020-05-19 08:41:07 -07:00
Wu Gao
53808c0dc4 qcacmn: Allocate lut based on number of DBR entry
CFR component allocate 140 luts but some of platform use 48 of them,
which allocate huge memory at one time and waste memory in some
platform. In low memory case, it may be failed to alloc luts at one
time. So, allocate lut based on number of DBR entry and split memory
allocation.

Change-Id: Id49c3f9a0f81cfa6d639cb72b62bb377911f0e77
CRs-Fixed: 2679470
2020-05-19 04:38:07 -07:00
Basamma Yakkanahalli
c0b1d0ebf0 qcacmn: use distinct I/O remap to access CE register for ipq5018
In ipq5018 CE registers(0x08400000)  kept outside WCSS(0x0C000000) block.
As both regions are more than 60MB apart, not feasible to allocate
single resource which include both.
So, using a separate I/O region to access CE registers.

Change-Id: I67bb6d5ac82a1c0ed1d3e13f7776f9d69ee19956
2020-05-18 22:33:42 -07:00
Nandha Kishore Easwaran
07df8d3deb qcacmn: Decrease monitor ring low threshold
Make the monitor ring low threshold to half of that of
MON_BUF_MIN_ENTRIES. This is needed so that spurious interrupts
because of reaching low threshold is avoided.

Change-Id: Idfc5dda2e96ad69bf35c3ab4f5cf81931104504e
2020-05-18 05:51:38 -07:00
Santosh Anbu
9e9e3c1719 qcacmn: Define restart bitmap using qdf_bitmap
Add change to define restart bitmap using the generalized bitmap
declaration. Also use generalized function to check if any of the
bits are set in the bitmap.

Change-Id: Ibfc48ef10fe9afcaefa16ef429ef9903343afe24
CRs-Fixed: 2674483
2020-05-17 23:12:51 -07:00
Santosh Anbu
453e7a3240 qcacmn: Add qdf bitmap AND and EMPTY APIs
Add qdf API to check if a given bitmap is empty and API to compute
bitwise AND operation of two given bitmaps.
1. qdf_bitmap_and
2. qdf_bitmap_empty

Change-Id: Ibc26e0f515c3804f1b627e8eaa8bf6f796c40324
CRs-Fixed: 2635330
2020-05-17 23:12:47 -07:00
Yue Ma
876cc3786b qcacmn: Remove runtime PM usage count check from host driver
There may be a race between the usage count check and pending MHI
activity which may result false panic. Remove this check from host
driver and add it back to platform driver after powering off MHI.

Change-Id: I9a87c596dc1eea5d2242099b870361a62494abcc
CRs-fixed: 2687834
2020-05-17 17:16:16 -07:00
Vivek
d73181f045 qcacmn: Use qdf_bitmap for vdev bitmap in psoc
The current bitmap used for vdevs in psoc is a two element
array of 32bit, thus supporting upto 64 bits bitmap.

In certain feature of AP use cases, there could be more
than 64 vdevs of multiple radios of a psoc, so the current
bitmap would not suffice.

Use the qdf_bitmap to define bitmap based on the max vdevs
supported by a psoc, which could be defined to higher value than
64 if a given AP feature is enabled.

CRs-Fixed: 2678131
Change-Id: Icd72f8dbe4654180dab993e3ce35d886c9e6ca43
2020-05-15 21:45:40 -07:00
Shiva Krishna Pittala
fecd279894 qcacmn: Add WMI support for Spatial Reuse commands and service ready bit
In order to enable/disable the OBSSes whose transmission can be treated as
SR opportunity for SRG and Non-SRG based Spatial Reuse, add the required
WMI support. Also, add the Host abstractions for the following
        - WMI_VDEV_PARAM_ENABLE_SRP
        - WMI_SERVICE_SRG_SRP_SPATIAL_REUSE_SUPPORT

CRs-Fixed: 2684157
Change-Id: Ib3e919766436ca4d4e7f9242b642ba309dbf9a47
2020-05-15 20:14:55 -07:00
gaurank kathpalia
e293836285 qcacmn: Fix the condition for filling WAPI params
Fix the condition for filling WAPI params in
wlan_crypto_set_wapi_key

Change-Id: I3b74e2a36cdc83f06e40d746e2d7aa0740aec65a
CRs-Fixed: 2685797
2020-05-15 20:14:51 -07:00
Rakesh Pillai
0f5a52c0f6 qcacmn: Deinit tx desc pool before freeing the pool
Currently when the last tx descriptor in any descriptor
pool is freed, it will also free that particular tx
descriptor pool. But before freeing the tx descriptor
pool, the pool is not marked as inactive.
Due to this, the next time when the tx descriptor pool
is tried to be allocated, since its not inactive, the same
pool is reattached, but without any memory allocated.

Deinitialize the tx desc pool before freeing it, to make
sure that the tx descriptor pool status is marked as
inactive when the decriptor pool memory is freed.

Change-Id: I52d792d115d215561c72f203abef6d327d126c01
CRs-Fixed: 2680397
2020-05-15 10:41:55 -07:00