Wykres commitów

6903 Commity

Autor SHA1 Wiadomość Data
Jiani Liu
25d847280f qcacmn: Add PTP timestamp socket options support(wmi part)
Add tsf64 enable/disable related functions and definitions.

Change-Id: I81da3b9d0596055810409ff5d7ae2d3c2aef8a5d
CRs-Fixed: 2454513
2019-05-23 22:57:38 -07:00
Varun Reddy Yeturu
a7c21dc7f3 qcacmn: Allocate multi page memory for dp_rx_desc_pool_alloc
Allocate memory in multiple smaller chunks for dp_rx_desc_pool_alloc,
and link the pages instead of allocating one big contiguous memory to
avoid memory allocation failures.

Change-Id: Id81de10727555c4ca78963a6f01ed3b992ce9924
CRs-Fixed: 2443999
2019-05-23 20:35:07 -07:00
Jeffin Mammen
1514e796b6 qcacmn: Update Peer rx/tx rate based on DATA packets
Packets sent/received at fixed rate were also considered to
update the client rates as displayed in wlanconfig command output.
An idle client transmits NULL packets at basic rate and hence
rx rate shows up the basic rate when an idle client is connected.
Consider only data packets to update rates. Do not consider
NULL packets for rate update.
CRs-Fixed: 2435447

Change-Id: Icbf9f2a656bb0d36e16d953952c529185c119f17
2019-05-23 09:31:11 -07:00
sheenam monga
d74e1fdc5f qcacmn: Fix bss peer use after free in stats
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.
Stale entry of peer can lead to Assert.

Use wlan_objmgr_vdev_try_get_bsspeer API for stats to get the BSS
peer which increment the refcount if peer is valid. With this the
peer won't be deleted till the caller release the ref count of the
peer.

Change-Id: I3690f1309cbc7643ed55d8e903814b06f9d8755f
CRs-Fixed: 2454080
2019-05-23 09:31:06 -07:00
Sravan Kumar Kairam
5b8283fe08 qcacmn: Flush rx cache frames at peer delete
Currently cached rx buffer frames are forwarded to stack
at the time of successful association completion. If the
association with the AP is unsuccessful frames are not
flushed and this leads to memory leak. To fix this clear
the cached buffers at the time of peer deletion.

Change-Id: Icec36376f9588dba8114f855ac9719b5735512e8
CRs-Fixed: 2452030
2019-05-23 09:31:03 -07:00
Sravan Kumar Kairam
0bd6c23c89 qcacmn: Fix decrement flush in progress
When rx buffer queue list is empty flush in progress
atomic variable is not decremented before return. Fix
this by removing the code to check list empty as the
qdf function to remove the node from front will also
do the same check for empty list, so the code fall
through and return at the end of the function.

Change-Id: I29b87eb7f9e5d35918aba6ad1d0ccbbdbf6eee3b
CRs-Fixed: 2444437
2019-05-23 09:30:55 -07:00
Rajeev Kumar
e386d8bcbc qcacmn: Add QDF API for DRV feature support
Add QDF API to check if DRV is connected or not such that
proper decision can be taken during wow enable request.

Change-Id: Ic128882d564b5717b6dc749c6fe229a6dbb86c8f
CRs-Fixed: 2457065
2019-05-23 01:52:01 -07:00
Varsha Mishra
09a4c0e6bd qcacmn: Fill skb->priority only for macro ATH_RX_PRI_SAVE
skb->priority is needed only for ATH_RX_PRI_SAVE. This access can
be avoided in regular datapath by using skb->cb for faster access.

Change-Id: I5ef970fa45fa314db7e14284d898c98a59d8591e
2019-05-22 12:13:38 -07:00
Chaithanya Garrepalli
d3d99db55b qcacmn: changes to read all MSDUs of MPDU in single reap
We need to read all MSDUs of MPDU in single reap for RAW mode
to prepare the complete SG list

Change-Id: Iaf2d0b9f32bf10181ce7646bf60c4d7e70aed36b
CRs-fixed: 2320143
2019-05-22 09:06:22 -07:00
Tallapragada Kalyan
9e4b36fd89 qcacmn: Rx optimizations to improve small pkt perf
basically tried reading peer_id from peer structure
to avoid 1 cache-line miss per pkt and access mac address
from frame data for WDS only if WDS condition is valid.
The other optimization is to avoid accessing queue_mapping
field of skb for skb received which is at 140 offset
This again helps to avoid i cache miss.
Another place is to do a memcpy only when we intend to
add an ast entry.

Change-Id: I7e328060c505bc21419d045e77329c2cda9e3644
CRs-fixed: 2388857
2019-05-22 00:18:17 -07:00
Jinwei Chen
5bcc30f51c qcacmn: fix peer ref counter unexpected increasement
Host will drop the RX data that introduced in change
"add counters for sa_idx invalid issue", the related peer
has done ref_cnt + 1, but there is no peer ref_cnt -1 accordingly.
peer ref_cnt increase unexpected, panic happened when rmmod at last.

add the peer ref_cnt decrease operation.

Change-Id: Ie6bc5b57560a93c5f21431838b7bcb1140abfec5
CRs-Fixed: 2454468
2019-05-22 00:18:14 -07:00
Yue Ma
ac7c8d1c44 qcacmn: Tag power related WMI commands for runtime PM
Power related WMI commands need to be tagged for runtime PM so that
they will not invoke runtime PM "get" and can be sent to firmware
without causing a resume right after suspend (WOW_ENABLE WMI command).

Change-Id: If9476ade9adff898847916fcf6bbd05e9c58f5a8
CRs-fixed: 2451973
2019-05-21 21:57:10 -07:00
Edayilliam Jayadev
64e320b697 qcacmn: Bound check while setting Spectral params
Do bounds check for some Spectral params and throw an
error in case of any out of bound inputs.

CRs-Fixed: 2449740 2449704
Change-Id: Ibc3159267076fa355ab3e50f2d8b0b1524ae444c
2019-05-21 16:45:23 -07:00
Rajeev Kumar Sirasanagandla
cfa662fba6 qcacmn: Fix legacy NDP confirm path
When NDP v2 support was implemented, event buffer validation check
related to TLV wmi_ndp_channel_info was added. But this check is
breaking legacy NDP confirm path.

To address this, avoid above mentioned check when firmware does not
indicate support for WMI_SERVICE_NDI_DBS_SUPPORT.

Change-Id: Iedd2e0de756111cfeaa94504db36376eee440574
CRs-Fixed: 2427911
2019-05-21 16:45:20 -07:00
Ankit Kumar
e222775d39 qcacmn: Extract tid from REO descriptor and save to skb cb
earlier we were extracting the tid from the rx tlvs, this
was in the last cache line of the 384 byte tlv. we are
extracting various fields from REO descriptor, now we are
also getting tid from the descriptor to avoid accessing
the last cache line of rx TLV there by avoiding one
cache miss per packet.

Change-Id: I1f4f12dca402604692ea374599add6763d68ab01
CRs-fixed: 2449706
2019-05-21 14:43:21 -07:00
Aakanksha Doda
aeb2e4b2ad qcacmn: Antenna power save when 1x1 client is connected
Enable Green AP when only 1x1 clients are connected.

Change-Id: I5dd180bb56eaba337454dbe1d3a7f8135be9102f
2019-05-21 14:43:18 -07:00
Uraj Sasan
775ab18f1c qcacmn: Trigger FW dump during WMI backpressure
[Patch 1/1]
Incase we have WMI backpressure issue, which
is not caused by host, collect the fw dump.

We trigger host dump when WMI Pending cmds reache max
wmi commands. If this feature is enable then we will
not assert host,rather will wait for fw to dump the logs
which can later be used by fw team for debugging.

To enable this debug feature:-
cfg80211tool  wifi0 set_wmi_dis_dump 1

Change-Id: I499d83d5f014e953310481816e40c3c15b715620
2019-05-21 14:43:15 -07:00
Kiran Venkatappa
0df30dd0a0 qcacmn: Mark CE10 as unused for qca8074
CE10 is not used in any endpoint service map. Mark this as unused CE so
that buffer are not enqueued in this CE. This gives a savings of 512
buffers or ~2M

Change-Id: I32f0d332becadb3536a0cb40c4ea88e518f448f6
CRs-Fixed: 2451745
2019-05-21 13:14:35 -07:00
sheenam monga
1273bcec05 qcacmn: Fix bss peer use after free in crypto
wlan_vdev_get_bsspeer() return bss peer without taking the ref count
of the peer and thus if peer is deleted after wlan_vdev_get_bsspeer()
returns a valid peer, the caller will have stale entry of the peer.
Stale entry of peer can lead to Assert.

Use wlan_objmgr_vdev_try_get_bsspeer API for crypto to get the BSS
peer which increment the refcount if peer is valid. With this the
peer won't be deleted till the caller release the ref count of the
peer.

Change-Id: I5472c80d267a6639acaff2d47dbc09e37963bc93
CRs-Fixed: 2447249
2019-05-21 13:14:32 -07:00
Abhishek Singh
0d4275671b qcacmn: If scan is for single channel don't filter the channel
Scan is rejected if single DFS channel is requested with
gEnableDFSChnlScan set to 0.

Fix is to allow single DFS channel scan and not to filter the
DFS channels.

Change-Id: Ifea85c7c85d3ace6cf08984c8c8e8ef00623303c
CRs-Fixed: 2454535
2019-05-21 13:14:29 -07:00
Sravan Kumar Kairam
9d6aceacb4 qcacmn: Retain the correct file copyright years
As part of Change-Id: I0dc410ae2e7c9df58ef53e3f20ca7979d086659e
for file dp_tx.c copyright years changed wrongly. So retain the
original copyright years.

Change-Id: Ib3e918744183bc59250590bc33dc7de75b1c38fb
CRs-Fixed: 2451733
2019-05-21 06:14:25 -07:00
Bala Venkatesh
94b9ce4320 qcacmn: Release the platform_info spin lock before del_timer_sync
In qdf_mc_timer_stop_sync acquires the platform_info spinlock
and call's the del_tymer_sync. del_timer_sync waits for callbacks
to execute all CPU's. But callback scheduler_mc_timer_callback
tries to acquire the platform_info lock to execute. This can
lead to deadlock.

Change-Id: Ib21ee5b57e11d1c98e1308ee5318fb47d78a6ba2
CRs-Fixed: 2453603
2019-05-21 06:14:20 -07:00
Akshay Kosigi
a8a1f93112 qcacmn: Add change to deinit vdev timer
Move deinit of vdev timer under CMN_VDEV_MGR_TGT_IF_ENABLE
macro

Change-Id: I1815c93f8690757d8bd3b199eb009620227ee6b1
2019-05-21 06:14:16 -07:00
Wu Gao
da8a7e60e5 qcacmn: Cleanup CONFIG_MCL in spectral scan
Use new macro "SPECTRAL_MODULIZED_ENABLE" to replace "CONFIG_MCL" and
"CONFIG_WIN" in spectral scan component.

Change-Id: Ib0167fa7b7cb08efde8d690f24eff85dd21897a1
CRs-Fixed: 2444204
2019-05-20 22:15:52 -07:00
Venkata Sharath Chandra Manchala
c61826c476 qcacmn: Cleanup statistics
1. Move statistics API's to dp_stats.c
2. Move DP_TRACE_STATS to DP_PRINT_STATS
   as it is implemented based on target.

Change-Id: I62f3076a51ca35f0e12cdb0ff0230ea87c2baaf7
CRs-Fixed: 2453443
2019-05-20 20:53:27 -07:00
Lin Bai
ec7b3cfb47 qcacmn: Fix driver loading failure on 32-bit ARM
long long div on 32-bit ARM will fail the driver load by -
unknown symbol __aeabi_uldivmod.

Use qdf wrapped do_div() instead.

Change-Id: I689a28c7ee3c7b9bfc87a6b727f2968a59231892
CRs-Fixed: 2433430
2019-05-20 19:05:29 -07:00
Chaithanya Garrepalli
ef40fec41d Revert "qcacmn: Flush ME desc while mcast enhancement disable"
This reverts Change-Id: Ieeaab082d09135b4c803d68041ebf9b4bf7bb144

Change-Id: I4d4b07ae357cffea24c2975445120df79cbddc0d
CRs-fixed: 2444484
2019-05-20 16:55:49 -07:00
Pamidipati, Vijay
480c931d7e qcacmn: Raw mode AMSDU check
Add check for AMSDU for raw mode HW WAR

Change-Id: I4c6bfbed9f01c1d28a9e7ab75a0181d1d18635e6
CRs-Fixed: 2266916
2019-05-20 13:40:51 -07:00
Jinwei Chen
79b4fc80bf qcacmn: Fix TX Desc invalid accessing when process TX completion
In some corner case, host has done Vdev destroy and TX desc flush
since there is pending outstanding TX data on this vdev, but later
FW/HW still indicate the TX completion to host and which likely
these TX completion get delayed, conflict happened due to same TX
Desc accessing.

To fix it:
(1) Only reset TX desc Vdev to NULL in dp_tx_vdev_detach().
(2) Do more enhancement in dp_tx_comp_handler() to avoid
    invalid Vdev accessing.
(3) Do TX desc flush in dp_tx_pdev_detach().

Change-Id: I44cce9451e4f07fed6e21a9cd3fc0eaefa3d54c2
CRs-Fixed: 2441455
2019-05-20 13:40:48 -07:00
Wu Gao
f499e4620c qcacmn: Add QDF_MODULE_ID_MIN
In case it will use the starting module id, add QDF_MODULE_ID_MIN.

Change-Id: I7e4a8185fcd089ca0602b3b9dd6fd1258c229d20
CRs-Fixed: 2452854
2019-05-20 11:22:29 -07:00
Paul Zhang
f9afcce798 qcacmn: Add subcmd QCA_NL80211_VENDOR_SUBCMD_INTEROP_ISSUES_AP
In practice, some APs have interop issues with the DUT. This sub command
is used to transfer the AP info between the driver and user space. This
works both as a command and event. As a command, it configures the
stored list of APs from user space to firmware; as an event, it
indicates the AP info detected by the firmware to user space for
persistent storage. The attributes defined in enum
qca_vendor_attr_interop_issues_ap are used to deliver the parameters.

Change-Id: I18c8f5b9555573cf3d732ad14e83840f56a74d48
CRs-Fixed: 2441046
2019-05-20 11:22:25 -07:00
Ankit Kumar
0ae4abc97b qcacmn: Replace QDF_DMA_BIDIRECTIONAL to QDF_DMA_FROM_DEVICE in rx
In Rx path, We really don't need to flush data and invalidate.
Hence replacing map/unmap flag to QDF_DMA_FROM_DEVICE.

Change-Id: I3de0c73e11a08a875114167a55fe9fe4432f1dd4
CRs-fixed: 2449712
2019-05-20 11:22:21 -07:00
Pranita Solanke
05862964ab qcacmn: Identify WIN/MCC specific features
Identify the WIN/MCC specific features. Move the features under feature
specific flags. Get rid of WIN/MCC specific code.

Change-Id: Iaf4e5befd7d574a20bea5c078201adbeac3b762c
2019-05-20 09:58:47 -07:00
Abhishek Ambure
409a3b2c53 qcacmn: Cleanup VDEV_SM legacy code
Legacy code for VDEV_SM is no more used, hence this clean up is done.

Change-Id: Ie5afeab68bafce6ed1bdaaa8cb778a94f3a2bbf8
CRs-Fixed: 2454113
2019-05-20 09:58:44 -07:00
Vivek
2ec3781464 qcacmn: Define qdf timer multiplier as a macro
The current QDF timer multiplier factor is of type
uint32 which takes whole number, so we cannot have multiplier
factors like 0.5 or 1.5

To provide such timer multiplier,
we define timer multiplier, as a macro, provided though
build options and support values like 0.5 or 1.5 through
1/2 and 3/2 respectively and this is used to configure the
timeout value.

Change-Id: I3f5441e33cca71f4a399cbbf9c6f61e2f21ee828
CRs-Fixed: 2450710
2019-05-20 07:54:01 -07:00
Ankit Kumar
f2526d44ee qcacmn: Place check under qdf_likely unlikely flag
Place if check inside qdf_likely and qdf_unlikely check
to optimize code through compiler.

Change-Id: I46796247fd09860aa0f62170eb7f7e5ef8e8f896
CRs-fixed: 2455579
2019-05-20 10:46:49 +05:30
Akshay Kosigi
2a2a8afda4 qcacmn: Add change to restart target if timer
Add code to restart timer for a new vdev command being sent to FW,
while we are awaiting for a response from FW for a previous command.

Change-Id: I1847968831cca6b0ee1e49d32b83196061341702
CRs-Fixed: 2450682
2019-05-16 14:46:39 -07:00
Abhishek Singh
77f9ba1cc0 qcacmn: Move legacy serialization flush cmds to common api
Move legacy serialization flush cmds to common api

Change-Id: I7a1a46a615c90e112c91efc4aec1461023b6ad5c
CRs-Fixed: 2452518
2019-05-16 14:46:34 -07:00
Pragaspathi Thilagaraj
a7c83f7401 qcacmn: Fix possible OOB in target_if_direct_buf_rx_rsp_event_handler
The function target_if_direct_buf_rx_rsp_event_handler() handles
the WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID event from target.
This function calls extract_dbr_buf_release_fixed_tlv() to copy
the module id, pdev id number of buffer release entry and number
of meta data release entries. The value of module id is used to
index the array dbr_mod_param to get the value of mod_param.
So if the module id value greater than dbr_pdev_obj->num_modules
could result in possible OOB.

Validate mod_id received in the fixed param of the event
WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID against
dbr_pdev_obj->num_modules.

Change-Id: I1c2c0a2a9c98d8b787496aba7a7c4f8fd781de16
CRs-Fixed: 2428798
2019-05-16 12:43:19 -07:00
Chaitanya Kiran Godavarthi
70aeda1cdd qcacmn: Handle BSS peer in STA mode
1. Set BSS peer for AP during peer-create and for STA in peer-map handler
2. Set Self peer in STA mode
3. Avoid tid cleanup in STA mode
4. Remove redundant selfmac checks in Rx
5. In MEC event handler add a check to ignore MEC events
    when STA is not connected.

Change-Id: I2a34b4742d9dedaa0709c1f4c87f3a06b794f36b
2019-05-16 07:45:55 -07:00
Kiran Venkatappa
110d691272 qcacmn: Increase CE1 buffers to 512 for qca8074
CE1 is used for HTT RX after initial HTC control exchange. Hence
increase it back to 512. This reverts  the change
I2b3a58c1d7a914194d842824945d12ae7c9ebb05

Change-Id: Idd7fdcb45f2f8d4188d4e36431b92b6ee443a982
CRs-Fixed: 2450563
2019-05-16 05:57:37 -07:00
Jianmin Zhu
787c7cdb43 qcacmn: Free serial cmd before its timer when rmmod
Rmmod process:
wlan_hdd_pld_remove --> hdd_stop_adapter --> hdd_vdev_destroy
--> WLAN_SER_CMD_DEL_STA_SESSION (25) cmd queued --> PLD_FW_DOWN
(will complete wait event as part of qdf_complete_wait_events)
--> hdd_wlan_stop_modules --> cds_disable -->
dispatcher_psoc_disable --> wlan_serialization_psoc_disable -->
wlan_serialization_timer_destroy --> umac_stop --> csr_stop -->
wlan_ser_cancel_non_scan_cmd -> check if timer is present but th
 timer are already destroyed, so assert.

Move wlan_serialization_purge_cmd_list into converged API file to
be shared by MCC and WIN.

Change-Id: Iad557e4a05d682c257be0c39049c52950e5eb530
CRs-Fixed: 2451058
2019-05-16 05:57:33 -07:00
Karunakar Dasineni
1cd51ddb7c qcacmn: Optimize SRNG memory allocation
To avoid higher order allocations, allocate extra
bytes for base address alignment only if unaligned
address is returned.

Change-Id: I185e58150952cd7e1ae0039e4382973465de5f68
2019-05-15 21:34:36 -07:00
Surya Prakash Raajen
b9780dd207 qcacmn: Update Tx rate only when tid is valid data tid
Update the tx rate only when tid is between 0-7 data tid
or 15 a valid one

Change-Id: I5cc23f6b4fc170d6306d3420c27b879704a0dbf4
CRs-Fixed: 2436934
2019-05-15 21:34:33 -07:00
nwzhao
ea2ffbb331 qcacmn: skip processing duplicate descriptor in dp_rx_err_mpdu_pop
If there's a HW duplicate rx descriptor from hardware,
it'll cause a NULL pointer issue in
__dma_inv_range in dp_rxdma_err_process.
In this case, skip procssing it as a workaround.

CRs-Fixed: 2398327
Change-Id: I5639e5fc9a3a06e6762448ec7cb2ea58d9ae8160
2019-05-15 21:34:29 -07:00
Naga
f1313ba77e qcacmn: Add change to avoid sending wmi cmd
Add change to avoid send wmi command in case
of vdev start, multi vdev restart, stop and delete
when vdev_mlme object is NULL.

Change-Id: Iaa3d3f56fb9caf37b933f029c57311edef0281b4
CRs-Fixed: 2443599
2019-05-15 05:47:17 -07:00
Pranita Solanke
71371bc4ad qcacmn: Removal of CONFIG WIN macro
Move WIN specific structures out of common datapath, WDI_ENUM
into common datapath and remove WIN specific header files inclusion

Change-Id: I8a0d9db4970f3ea9d966337caf178ebce55c28c5
2019-05-15 05:47:13 -07:00
Nirav Shah
0811d82877 qcacmn: Fix multiple unmap of same netbuf
Clear HTC_TX_PACKET_FLAG_FIXUP_NETBUF flag in
hif_send_head failure scenario to avoid
multiple unamap of same netbuf.

Change-Id: Id7f6aeba1eff0d23b76927fcbb03643409fc7859
CRs-Fixed: 2437034
2019-05-14 23:57:59 -07:00
Akshay Kosigi
4a994eff88 qcacmn: Add change to send target if response to HOST
Add code to enable sending target_if vdev response to host,
if FW fails to send response within expiry time.
Move timer free functionality to vdev destroy path so as
to make the system not to go into deadlock

Change-Id: I72bdecf2502a755ffc09414f8b72d230bf9c559f
Crs-Fixed: 2449238
2019-05-14 23:57:56 -07:00
Mohit Khanna
e5a6e94464 qcacmn: Restrict RX softirq poll times
The following changes are made

-Yield dp_rx_process if poll time exceeds
-Yield dp_tx_comp_handler if poll time exceeds
-Interrupt statistics to track various interrupt contexts and
 corresponding interrupt masks
-Add poll times histogram buckets to NAPI stats

Change-Id: I8c7a6bbbb97c7b3dd1dde6ac3a97113c433086a2
CRs-Fixed: 2423879
2019-05-14 18:39:59 -07:00