Commit Graph

230 Commits

Author SHA1 Message Date
Shashikala Prabhu
f7786d3822 qcacmn: Change the data type of average/roundup tx rate
The datatype of average and round up tx rate was uint32_t which truncates
the upper byte of the average and round up tx rate value.

changing the datatype of average and round up tx rate from uint32_t to
uint64_t.

Change-Id: I3809ba7cfc73ec0b4609981e70d57112ac958f33
CRs-Fixed: 2409751
2019-04-16 09:09:38 -07:00
Chaitanya Kiran Godavarthi
e541e9ccda qcacmn: Add Tx AMPDU statistics
Count of MSDUs Tx with AMPDU aggregation and
MSDUs without AMPDU aggregation is maintained. This
count is obtained from per ppdu stats.

Change-Id: I7c38846534bbe5f2fd0a9b3602a9d453e1c1f449
2019-04-10 05:27:06 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Jeff Johnson
a8edf330f0 qcacmn: dp: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within dp replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I61f3adab1208682d36235421f44a048e35df346d
CRs-Fixed: 2418258
2019-03-27 06:10:00 -07:00
Amir Patel
468bded892 qcacmn: Add RDK statistics changes for Hawkeye
Add RDK statistics changes to collect below stats
a. Tx rate statistics
b. Tx sojourn statistics
c. Rx rate statistics

CRs-Fixed: 2416141
Change-Id: I0c8127cd387b7665a76847f4125977bbb8c5a57a
2019-03-21 23:04:43 -07:00
Kiran Venkatappa
07921611b4 qcacmn: Use HTT message to disable rx_pkt_header tlv
On low memory platform rx_pkt_header tlv is not subscribed to get a
savings of 128bytes in skb. This is required to reduce the skb size from
4K to 2K on 32-bit platforms. Use HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG
message to unsubscribe rx_pkt_header tlv for rxdma ring.

Change-Id: Ie684f1ca1de9c824a869b4e13fd0ee1d068004e7
CRs-Fixed: 2408424
2019-03-08 23:38:07 -08:00
Santosh Anbu
4de9ffb5b1 qcacmn: Update retry count for failed tx frames
Check for completion status of the ppdu based on
HTT_PPDU_STATS_USR_COMMON_TLV and
HTT_PPDU_STATS_USR_COMPLTN_ACK_BA_STATUS_TLV.
Update the stats only when completion status is ok else
update retry and failed frames count.

Change-Id: Iac7730715f853746d77873488b7886e7beed467d
CRs-Fixed: 2390383
2019-03-08 12:06:01 -08:00
chenguo
26c518a6f6 qcacmn: Fix wrong trace info in PEER_UNMAP_V2 message
It is easy to be misled when unmapping message is traced as map
message. Correct this wrong message.

CRs-Fixed: 2376470
Change-Id: I5577ae8e0f787925452c3ecf91ce0e2ff8a2ae9f
2019-03-03 22:25:15 -08:00
Venkata Sharath Chandra Manchala
69a0ed394a qcacmn: Add counters for wdi messages
Add counters to account for wdi messages from firmware.

Change-Id: I1c12d42ac4d385d2ed27f6eff84dd2fcfd540ab1
CRs-Fixed: 2365971
2019-03-01 23:39:17 -08:00
Amir Patel
78824b1d4e qcacmn: Add changes for RDK statistics
Change API signature for dp_getrateindex to populate rate index
and add additional stats required for RDK.
Add QDF abstraction for EWMA average rssi

CRs-Fixed: 2397918
Change-Id: Id878971799c5df2ae60057a86b2769724ee0dcc5
2019-02-27 03:13:56 -08:00
nobelj
23bb63a3a9 qcacmn: Do not flush tlv if we get same tlv for MUMIMO
For MUMIMO and OFDMA, we get same tlv multiple times.
So flush not required.

Change-Id: I532f4893320c28083d0f29d319fbc0db5b5d14b8
2019-02-21 15:01:39 -08:00
hangtian
fe681a5c2d qcacmn: Use qdf_mem_zero for zero initialization, dp part
Use qdf_mem_zero for zero initialization, dp part.

Change-Id: I8cd5d43b554bf355dfcff0463ba4acb6d22ba254
CRs-Fixed: 2378005
2019-02-21 01:46:39 -08:00
nobelj
7966633c14 qcacmn: OFDMA counter get increased when num_msdu 0
Sometimes we receive num_msdu as 0 with ru_tones and ru_start
which cause OFDMA counter to get increament

Change-Id: Ib099a2143799551266e94bc9b8d281237092a46e
2019-02-20 12:56:39 -08:00
Amir Patel
1ea85d4671 qcacmn: Add support for STA inactive time in Hawkeye
Currently there is not STA inactive time support for lithium.
Read inactive_time from htt_peer_stats_cmn_tlv by sending
HTT_DBG_EXT_STATS_PEER_INFO to firmware.
After sending command, wait on completion variable till
firmware to response, trigger completion upon firmware response.

CRs-Fixed: 2319219
Change-Id: I93e6343641ae5c72610a57dd6ba551cca0b010c1
2019-02-09 11:52:40 -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
Amir Patel
36a79a672c qcacmn: Fix htt ppdu tlv bitmap issue
Define two tlvs for 64-bit and 256-bit transmission window

CRs-Fixed: 2377256
Change-Id: Id11e1d3695101ef001c689d33e4546ac8a5faea6
2019-01-29 12:20:55 -08:00
nobelj
bc064fb1b9 qcacmn: Fix transmit type double increment and RU increment
transmit type is incremented twice on update status.
RU tone need to get increment for MIMO_OFDMA and OFDMA

Change-Id: I4e83a91b7653b7452cf5605b7f8aad956c355350
2019-01-24 09:59:08 -08:00
nobelj
4e9d51f914 qcacmn: Populate MU-MIMO user pos and mu group id
populate TX OFDMA and TX MU MIMO information from
user rate tlv and display the same in fc_peer_stats.

Change-Id: If1dab15bbdf391fba00a701abd6024c420d1d8f7
2019-01-24 09:59:06 -08:00
Pamidipati, Vijay
221b3e4ab7 qcacmn: Change the assert condition for PPDU Tag processing
Fix the assert in HTT PPDU TLV processing to account for
member additions at the end of htt_ppdu_stats structures by FW
This ensures Host-FW compatibility without placing hard constraints
on timelines for fwcmn header files to be synchronized with host.

Change-Id: I9f730e5896bec916c8e4e3f0eaa06b183c62f393
2019-01-20 17:28:29 -08:00
Chaithanya Garrepalli
9cc562c53b qcacmn: Modify CDP AST APIs to synchronize add and delete cmds to FW
Change the CDP abstraction APIs for ast entry find, add and delete
to avoid external references for ast entry in upper layers

Process the HTT v2 peer map messages which will be enabled for
nexthop ast entries and use these messages instead of WMI event
for HKv1 WAR where we have to wait for delete confirmation from
target event which is processed in control path

Change-Id: Ifa91a259c0762344deb8ab89e868fc5554d75543
CRs-fixed: 2354951
2019-01-17 02:22:24 -08:00
Venkata Sharath Chandra Manchala
96e3633874 qcacmn: Pktlog Enhancements
1. Reduce the log level for every buffer received
   from firmware
2. Set the default pktlog buffer size to 10MB.

Change-Id: Iad8827084579592fcfa69056dcfc9d57095151e7
CRs-Fixed: 2364380
2018-12-15 08:43:26 -08:00
chenguo
b21a49a57e qcacmn: Peer ref count leaks in ppdu stats and descriptor deliver
Because of reference counter decrement is not triggered for every
condition path, it is possible that peer reference counter leaking
happens under some perticular circumstance. Make sure the peer ref
count unreference is called for each possible path.

CRs-Fixed: 2352433
Change-Id: I60bc5a5210519c26c57cdc563d0d1b02d799e090
2018-12-05 13:13:46 -08:00
Amir Patel
c2cc252d18 qcacmn: Fix avg_tx_rate computaion
Assign dp_ath_rate_lpf return value to avg_tx_rate,
which is further used to compute ppdu_tx_rate

Change-Id: Ib51be85c2436bef8feffeb611982314720399a69
CRs-Fixed: 2356831
2018-12-04 15:12:31 -08:00
Mohit Khanna
40f76b57f8 qcacmn: Fix regression from DP init-deinit path changes
MCL DP initialization path is running into issues due to change
I5732453f617bdc16995fda916b645c41845c3ecb. Fix the same.

Move flow control lock variables to re-use region. This is needed since
flow control deinit happens in dp_soc_detach, while in dp_soc_deinit, the
soc memory is being partially reset.

De-init HTT memory in dp_soc_deinit and free HTT handle
in dp_soc_detach. The existing code was not freeing HTT
packets for MCL case and freeing the HTT handle twice.

CRs-Fixed: 2359409
Change-Id: I52dcccc0444d4ce139a29ffcb884598bbacda88f
2018-12-02 13:31:08 -08:00
Anish Nataraj
e9d4c3bf33 qcacmn: Reorganise DP init-deinit path to reuse memory
Avoid memory fragmentation that happens during
attach-detach flow.
- Reuse transmit allocated static pool memory across soc up/down.
 These memories are allocated during soc attach.
- Reuse DP source ring memory, DP soc context, DP pdev context
  across soc up/down.
- Reorganise structure members of DP soc and DP pdev so that
  we can zero out structure members across soc up/down
- Add cdp soc init/deinit and cdp pdev init/deinit that
  will be active across soc up/down

Change-Id: I5732453f617bdc16995fda916b645c41845c3ecb
2018-11-30 03:40:43 -08:00
Viyom Mittal
27fe1239d3 qcacmn: Set ack_rssi_valid to 1 for successful TX
The ack_rssi_valid flag to set to 1 only when completion_status
value is 0 which shows that the TX was successful.

Change-Id: I9e520422995e374d7d35b9db0c060d1fce2f9067
2018-11-27 11:20:21 -08:00
Amir Patel
3c60631d7c qcacmn: Add support for last_per
Calculate last_per based on unicast packets and success packets
in last one second

Change-Id: I8b469e5d9c1e40498b3267bf7bdf3149159bdc31
CRs-Fixed: 2343479
2018-11-15 03:38:29 -08:00
Venkata Sharath Chandra Manchala
0ce469e330 qcacmn: Add pktlog handler to process rate events
Add dp_msg_pktlog_handler to handle
rate events from the firmware.

Change-Id: I24776caa3b78ec38d94421f243ec72d81ee3102d
CRs-Fixed: 2340639
2018-11-11 09:27:32 -08:00
Amir Patel
756d05e9e5 qcacmn: Replace interface of dp stats updation to upper layer
Replace ol_if interface with WDI for dp stats updation to upper layer.
Define a new CDP API to get radiostats.

CRs-Fixed: 2326789
Change-Id: Ieaee2fe18fc9a0ad0e259e36f59529fe9bc4e208
2018-10-31 13:21:28 -07:00
Amir Patel
8ae687908d qcacmn: Avoid processing tx rate stats
Avoid processing tx rate stats if STATS_USR_RATE_TLV is not processed
in htt_ppdu_stats

Change-Id: Icce8ca0b351ae1ae784ba605d1d984dcdd033715
CRs-Fixed: 2316130
2018-10-30 08:47:20 -07:00
Venkata Sharath Chandra Manchala
8747958dff qcacmn: Enable Monitor Mode for QCA6390
Support Monitor Mode for QCA6390 as RXDMA1 block is
now removed.
1. Monitor buffers are now received on rxdma_err_dst_ring
2. RXDMA1 monitor status ring is moved to RXDMA0 monitor
   status ring
3. Msdu link descriptors are now returned to WBM descriptor
   release ring.
4. Reap the Monitor buffers and return it to SW Refill ring.
5. Use the same rx descriptor pool for regular and monitor data.

Change-Id: If41e5d13f942da2b97e5aab72b88ae344925ba67
CRs-Fixed: 2297300
2018-10-26 10:39:37 -07:00
Mohit Khanna
81179cb75e qcacmn: Fixes for IPA enablement for lithium/Hastings
- Support to pass IPA enabled(disabled) flag from ini to DP layer
- Use ioremap call to translate tx_comp_doorbell_paddr obtained from
  calling ipa_setup api to tx_comp_doorbell_vaddr. This is needed to
  write the initial value of HP at the doorbell address.
- Change REO_DST_RING_SIZE and WLAN_CFG_TX_RING_SIZE to 1023
  for napier/hastings if IPA is enabled. This is needed because,
  ipa_setup API can handle only 16-bit values for the size param(bytes)
  of the ring.
- Disable hash based flow steering for SAP peers in case IPA is enabled
  and set default reo_dest_ring_4 as default RX ring. Since IPA will be
  reaping RX packets from reo_dest_ring_4 only, flow steering is not
  needed for SAP peers.
- Unmap pre-allocated TX buffers for IPA in the TX completion ring.
- Donot execute IPA functionality if IPA is disabled from ini.

Change-Id: I6855bfe293a457ccc0abd1ad5567f5c95232a9d2
CRs-Fixed: 2183519
2018-10-17 17:42:35 -07:00
Venkata Sharath Chandra Manchala
d18887ee9f qcacmn: Compilation fixes for SM8150 platform
1. Address out of bounds array access while
   populating mcs rates.
2. Use cdp_sec_type enum inplace of htt_sec_type
   for common code.

Change-Id: I0ae1e0acaf7422e73dc26befc9f066f3f424ec6b
CRs-Fixed: 2327153
2018-10-11 10:39:55 -07:00
Chaithanya Garrepalli
3ba616a89a qcacmn: add locks in dp_get_vdev_from_soc_vdev_id_wifi3 API
In dp_get_vdev_from_soc_vdev_id_wifi3 add vdev list lock
while traversing through pdev->vdev_list

Change-Id: I24652a7a65247625b3a6da092476287bf8560e1b
CRs-fixed: 2323655
2018-10-09 19:58:48 -07:00
Sravan Kumar Kairam
26d471ec56 qcacmn: Take peer ref count and dec it after using
Currently peer reference is used with out taking any ref count.
In parallel context execution on different core peer reference may
be cleaned up in peer unmap event. So take ref count while using
the peer reference and decrement after done with it.

Change-Id: I02ca172cbdc4309fabd3bbbad00940826662bbd3
CRs-Fixed: 2301963
2018-09-27 20:24:36 -07:00
Amir Patel
1de3d3ddf3 qcacmn: Fix Tx rate for multicast packets
Fix tx rate for multicast packets

Change-Id: I0f5e628b571577a282817b165a62a1ff640bb0c5
CRs-Fixed: 2309177
2018-09-24 08:48:41 -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
sumedh baikady
59a2d33a2d qcacmn: Use monitor direct for smart monitor
Set monitor direct filter when smart monitor is
enabled. Deliver header from NAC if md bit is set
and smart mesh feature is used.

Change-Id: If1ef865e013c21bbb58bcb89a87856b12d6c7278
Crs-fixed: 2246660
2018-09-08 12:29:31 -07:00
Anish Nataraj
376d9b19f3 qcacmn: Include sgi parameter for ratekps calculation
Currently gi value was not considered for ratekbps calculation
if sgi is enabled, include gi parameter for ratekbps calculation

Change-Id: Idd8b36375493c26f22f2f4f0c7ae922df37e65a1
2018-08-31 04:01:22 -07:00
Anish Nataraj
7235d9b33d qcacmn: Update ack rssi only for successful completion status
Currently ack rssi is updated unconditionally. Check completion
status before updating ack rssi

Change-Id: I9dec8a051adc933ceab33c71ccbb784471b2756e
2018-08-23 01:45:38 -07:00
Anish Nataraj
37b649522c qcacmn: Assign valid user index even for TLVs peerid 0xffff
Peerid 0xffff is for scan peer and rate information needs to
be delivered using valid user index from API dp_get_ppdu_info_user_index

Change-Id: If200467755c4b18002db221413976624ca66a9c9
2018-08-20 11:52:46 -07:00
Chaithanya Garrepalli
be9d5fcc14 qcacmn: populate delayed_ba bit to tx PPDU descriptor
Populate delayed_ba bit to the user info in tx PPDU
descriptor from htt user common tlv

Change-Id: I7d22b10123015cd3799e1c3b2f31c7da6f020c13
2018-08-11 00:29:36 -07:00
y
db24745af8 qcacmn: PPDU changes for DP Componentization
PPDU rate related change moved to data path layer

Change-Id: Id362da61336fb439e394437636af53c0c2c10988
2018-08-10 18:11:36 -07:00
Aditya Sathish
ded018e406 qcacmn: Clean up dp component prints
Clean up datapath component prints by correcting trace levels for
regularly occurring prints and removing newlines from converged
print APIs since qdf_trace_msh appends them by default.

Change-Id: Ie8fe319fcb737720f7400a165e134b6a18bd15b5
CRs-Fixed: 2243843
2018-08-10 18:11:21 -07:00
Amir Patel
52c6b73468 qcacmn: Notify peer stats change to upper layer
Notify peer stats change to upper layer via WDI interface.

Change-Id: I4b9ea3ed98ba09b4afc03e3c3edc42ab9c9f3cba
CRs-Fixed: 2287145
2018-08-06 04:21:34 -07:00
Alok Singh
40a622b062 qcacmn: Add check for bpr feature
Disable m_copy/enhanced_stats feature causes the bpr feature disable.
Hence add check for bpr feature status during enable/disable of m_copy
and enhanced_stats.

CRs-Fixed: 2275686
Change-Id: I5592b422823446374ce560fe3653990be4c796b0
2018-08-01 03:50:18 -07:00
Balamurugan Mahalingam
f72cb1f1ff qcacmn: include hal_hw_headers.h header file
macros and fw cmn headers included in hal_internal.h is moved
to a new hal_hw_headers.h to avoid these getting included in hif
layer. Include the new hal_hw_headers.h file

Change-Id: I3390ae9e71ca561d94a265e1fdf4d9354e7b2474
2018-07-21 00:03:27 -07:00
Akshay Kosigi
5902dfd254 qcacmn: Remove filling mgmt_ctrl frame buffer for NON TLV payload
Reverting the change where mgmt ctrl frame buffer was assinged NULL for
NONTLV payload case as this check is handled later in the same path.

Change-Id: Icccfb401fe34da593198bac27650139654021636
CRs-Fixed: 2276923
2018-07-13 10:36:20 -07:00
Soumya Bhat
1dfef0346b qcacmn: Reset variables appropriately
In existing code, variable used to track mgmt. and control
TLV is getting reset only in success case.

Add change to reset it appropriately.
CRs-Fixed: 2248313

Change-Id: Ieac5dc215f441b0530013ea1e36abcba19294754
2018-07-12 04:58:47 -07:00
Akshay Kosigi
1a9c6d1d4c qcacmn: Rename osif_pdev and os_if_vdev in dp_pdev and osif_dev
structures

Rename osif_pdev to ctrl_pdev and os_if_vdev to ctrl_vdev in dp_pdev and
osif_dev structures respectively which are
pointing to objmgr_pdev and objmgr_vdev structures to maintain
uniformity

Change-Id: Ida95a1a90ea74513573f00c652338baee3df897a
CRs-Fixed: 2241362
2018-07-09 02:02:23 -07:00