Commit Graph

705 Commits

Author SHA1 Message Date
Mohit Khanna
16816ae8d0 qcacmn: Enable GRO for TCP packets
Add support for GRO functionality for TCP packets.
- Pass GRO config to DP layer as a part of dp_update_config_parameters
- Add API to read the number of active RX contexts from DP layer
  cdp_get_num_rx_contexts
- Fill GRO info into skb->cb from rx_tlv during dp_rx_process

CRs-Fixed: 2346995
Change-Id: I1c143d8ce2c7522ba2c76142fb6cc82193df5608
2018-12-18 00:08:08 -08:00
Krunal Soni
ce2009b364 qcacmn: Clean-up all peers in-case of SSR
Current driver doesn't clean-up all the peers because the TARGET
state is not marked as reset and due to which nobody is there to
mimic fake peer unmap events to reduce the reference count.

Also, there is no peer delete API being called as well in case of SSR.
Identify the TARGET state in-case of SSR by calling HDD callback
and mimic the unmap events and call peer delete API as well.

CRs-Fixed: 2350285
Change-Id: I878b7a15701c01ac9ef80010086f7e868a631a74
2018-12-14 16:06:30 -08:00
Chaithanya Garrepalli
7ab76aec94 qcacmn: Enable monitor dest ring in m_copy mode
In existing code, 132 bytes of OTA mgmt. and control payload is
provided to upper layers by subscribing to packet header TLV.

The requirement in M-copy mode though is to get complete payload for
mgmt. and ctrl. packets. Add change to configure monitor destination
ring and add mgmt. and ctrl. packet filter to receive full mgmt. and
ctrl. packets.

Change-Id: I0014837b51cac6f0143dcc5cb624ea2086cf4486
CRs-Fixed: 2256159
2018-12-14 16:06:06 -08:00
sumedh baikady
da15920d5b qcacmn: Support for smart monitor on HKv2
Add support for smart monitor feature on HKv2.
For HKv2, NAC filtering is done by HW and NAC is
programmed directly in the AST table. The NAC entries
in AST table have monitor direct bit set and this
is obtained by host via monitor status ring.
host subscribes for packet header in MD packets.

To these filtered packets radiotap header is added
and delivered to the stack.

Change-Id: I123f986531943e376ac5c492540e01f0b03348c4
2018-12-13 16:46:07 -08:00
Pamidipati, Vijay
8a4c03a869 qcacmn: protect peer-list access in AST aging timer
Add missing lock to protect peer list access in AST
aging timer

Change-Id: I3e0f7c0bd0e81398dd927bb4f51627a46c5eae19
2018-12-13 14:57:29 -08:00
Vinay Adella
9420115f04 qcacmn: Change peer unref delete API parameters
Pass vdev mac-addr and vdev-mode, instead of vdev-id.
The vdev-id that was passed earlier, was used to get
the mac-addr and vdev-mode from the vdev structure.
But there are cases when this vdev structure may be
freed, when this API is called.
So pass the mac-addr and vdev-mode from the dp structures.

Change-Id: I2148e7ecef433f4363385eeaec2e18f3ec131ab8
CRs-Fixed: 2356315
2018-12-12 03:52:00 -08:00
Karunakar Dasineni
6fb46e2759 qcacmn: Release link descriptors on defrag errors
Link descriptors should be returned to WBM release ring if
fragments are not reinjected due to defrag errors.

Change-Id: Ia37db9f195f6848092918cf7cc221dc50e827ac5
2018-12-12 01:45:50 -08:00
chenguo
d22ed62ec8 qcacmn: Make sure int_timer is initialized in monitor mode
During vdev attachment in monitor mode, the ini_timer is not
initialzied which will cause FW assertion. Make sure int_timer
is initialized properly.

CRs-Fixed: 2359908
Change-Id: I48c97161345b17a0eb3e8a939499eabeae683bd2
2018-12-10 05:36:53 -08:00
Aditya Sathish
b514afc58a qcacmn: Add sanity check for txrx_stats 28
Add sanity check for txrx_stats 28 for a MAC address pointer.

Change-Id: I7bc3cfb5a18313086e457b6b4888a8002a4f7fd9
CRs-Fixed: 2360609
2018-12-06 10:28:08 -08:00
Keyur Parekh
c28f839a84 qcacmn: FR-50469 Pktlog for particular peer mac address support
This FR is to enhance existing pktlog debug tool
This feature will allow to capture pktlog for particular
peer mac address.

Change-Id: I3676095536185f25b0d498e03f70246260a324fd
2018-12-06 00:03:13 -08:00
Keyur Parekh
11865218ea qcacmn: Enable monitor mode buffer ring LWM interrupt
Eanable monitor mode low water mark interrupt.The monitor
mode processing is stuck in the monitor mode buffer ring full
if monitor mode low water mark interrupt is not enabled.This
is because there is no packet come in when monitor buffer
ring is full and hence there is no ppdu end interrupt.The
monitor is not processing the monitor ring and buffer ring
full condition is not remoevd.

Change-Id: I28b3a4b408db62873c17512d20e63c9844e8d4ea
2018-12-05 22:46:06 -08:00
nobelj
418b2e9af9 qcacmn: Modify index for printing BW stats
bw index are stored as
0 for 20MHz,1 for 40MHz, 2 for 80MHz and 3 for 160MHz

Change-Id: If5c71ca5716c7870782dcd7ddd9b8e73c6f2bbd3
2018-12-05 00:36:03 -08:00
Krunal Soni
07215e8082 qcacmn: Define int_ctx variable to resolve compilation error
int_ctx variable is not defined but it is being used which creates
compilation error. Define this variable as part of the fix.

CRs-Fixed: 2359507
Change-Id: I17e57663eb8daa449616ee99d5eb9455e3b7cee2
2018-12-03 16:41:55 -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
Chaitanya Kiran Godavarthi
f6c061252f qcacmn: Reduce ASE aging for MEC entry type
ASE entry aging for MEC entry type was same as
WDS type for 120 secs, this creates an issue when
device roams from MEC to WDS connection by not
aging out till 120secs. So now we reduce the MEC
aging time to 1sec

Change-Id: I6ab3b095a85c6d09f9fcd95b3b39f7152064d297
2018-11-29 18:12:33 -08:00
chenguo
2a73379e03 qcacmn: Add new cdp API to get vdev in monitor mode
After gerrit#2436786, vdev in monitor mode is removed from vdev
list of pdev. So it is needed to add one more cdp API to get vdev
in monitor mode.

CRs-Fixed: 2343290
Change-Id: I9d74302a464280881ce0cf25dbc8c4f9d8b8d48d
2018-11-28 03:57:17 -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
Kiran Venkatappa
74e6d8b510 qcacmn: Enable AST workaround only for HKV1
HKV1 does not have support to maintain per pdev AST table.
Hence workaround is required to ensure that AST entry is deleted before
adding an entry with same MAC. This syncronization needs to done across
pdev. This workaround in required on for HKV1, add changes to enable
workaround only for HKV1 and disabled for other platforms.

Change-Id: I9aa43ea51fdff2f02cdcc8ff7e906c7305446317
CRs-Fixed: 2344921
2018-11-22 00:43:47 -08:00
sumedh baikady
61cbe85a14 qcacmn: Per tid BA window size enhancement for HKv2
For HKv2, BA window size can be configured on per tid
basis as opposed to per peer basis on Hkv1. This per
peer per tid configuration on Hkv2 is for Tid 0 to 7.

Change-Id: Ic4afee92792af829a9ad8fdfc211625743b9d052
2018-11-21 22:59:19 -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
Karunakar Dasineni
700ad73754 qcacmn: WAR for duplicate buffers in monitor mode
WAR to discard duplicate indications (buffers and link descriptors)
from monitor DMA seen sometimes on RXDMA2SW ring.

Change-Id: I687b782f54fbbf85ae932ee833ac9263b5879ca6
2018-11-17 10:48:13 -08:00
phadiman
4213e9ca61 qcacmn: Separate MEC, DA and WDS Enable Flags
Add new flags for MEC and DA enable/disable
and keep it independent of WDS enable flag

Change-Id: Idb49c45ebb34a38f876dbdb293806c4e96d49b5d
CRs-Fixed: 2336332
2018-11-15 01:38:27 -08:00
Pamidipati, Vijay
a59b5607c6 qcacmn: Split Tx and Rx indication handling
Add support to handle Tx completion processing and Rx processing into
different NAPI threads/contexts for Lithium DP

Change-Id: I4f5c6ef3ce969ce457e26cf3e8305df1ae782f09
2018-11-14 12:20:34 -08:00
Shashikala Prabhu
8f6703be71 qcacmn: Add support to override tid value
Add support to configure a specific tid for unicast packets derived from
multicast packets.

Set the user provided tid value when both multicast enhancement and
tid_override_en flag is set.

Change-Id: I770166a37c920a7e642c6649f918456846fb5f90
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed: 2342717
2018-11-14 02:35:14 -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
Aditya Sathish
dc949c59be qcacmn: Add CDP support for resolving RA from DA for ME6
Add support for parsing AST entries to resolve the RA for
multicast enhancement (mode 6) and enabling access of the API to
the higher layers through the use of the CDP framework.

Change-Id: I909bea86b90c22f311484c0b2653dd7623971c24
CRs-Fixed: 2333014
2018-11-06 00:22:24 -08:00
Karunakar Dasineni
2b7628c863 qcacmn: Fix interrupt batch count initialization
Interrupt batch count configuration "dp_int_batch_threshold_other"
was initialized to wrong values, which was causing missed interrupts
from REO status ring.
Also remove the extra RXDMA2SW ring handling, which is currently
done in both UMAC and LMAC interrupt processing loops.

Change-Id: I9a9e951780356db6b491d1301d2c08ef1ac585d5
2018-11-02 15:26:19 -07: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
Venkata Sharath Chandra Manchala
f167af18e5 qcacmn: Extend txrx_stats command to print wlan cfg
Add iwpriv <interface> txrx_stats 29 and
iwpriv <interface> txrx_stats 30 to print wlan_cfg
parameters for both soc and pdev.

Change-Id: I666fe4fa999e82e92ea2961ab662e3e629b58bc7
CRs-Fixed: 2331949
2018-10-29 20:10:23 -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
Ruchi, Agrawal
4c5ade6388 qcacmn: add stats for invalid peer
invalid peer stats in rx when m_copy is enabled,
adding stats for invalid peer at pdev level

Change-Id: I394cfad0642eeb66062d8ab79858a8d7720d8c9f
CRs-Fixed: 2309099
2018-10-25 02:56:14 -07:00
Sathyanarayanan Esakkiappan
4af5584f53 qcacmn: Appropriate WDS and MEC entry has been made
Ageout MEC entry after two minutes of inactivity and changes
included to modify existing WDS entry of a peer to MEC on promption

Change-Id: I0ad89671a053250413cbadad2d495f5abff89ac2
CRs-Fixed: 2316368
2018-10-24 03:17:11 -07:00
Pranita Solanke
0588114986 qcacmn: Maintain SG/TSO desc_cnt at pdev stats
Maintain SG/TSO desc_cnt at pdev stats instead of ingress
stats to support legacy stats and change the fw_rem counter
to cdp_pkt_info to have packets and bytes information
for legacy platforms as part of convergence effort.

Change-Id: Ib908e8d1c1d78d191418d3884f41f981ba002b54
2018-10-23 04:19:38 -07:00
Chaithanya Garrepalli
291dfa0043 qcacmn: flushing reo command list before freeing pdev
In dp_soc_dettach flush the reo command list before freeing
pdev to avoid use after free of pdev memory in reo command
callbacks

Change-Id: I2644b259ed9b10dee9b11007ed9064dd7d2399a9
2018-10-22 03:52:24 -07:00
phadiman
6f1af61798 qcacmn: Add AST entry type check
There will not be any AST entry
for HMWDS Seconday

Hence add check for the same in
del_peer_del_ast to avoid deletion
for such entries

Change-Id: Ia96856d93531200e27e0d0a97b80ed6ec1baa42b
2018-10-19 02:23:26 -07:00
Anish Nataraj
83d08110b1 qcacmn: Check Non-zero Rx RSSI during vdev / pdev aggregate
MultiVap if no sta associated or monitor mode,
data packets do not carry any rx rssi
or rate values while aggregating pdev or vdev stats.
Do not update for vap in if rx rssi or
rx rate value is zero.
Do not attach monitor vdev to vdev list

Change-Id: Ie64a05d795660d557d928cb9b874fa5e702f4f55
2018-10-18 16:58:43 -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
Krunal Soni
be43d55622 qcacmn: Replace Linux Fix-Width data-type with C-99 stdints
Datapath supposed to be HLOS-agnostic, but there is some use of
Linux fixed-width types u8, u16, and u32. These should be replaced with
C99 fixed-width types uint8_t, uint16_t, and uint32_t so that they will
correctly be HLOS-agnostic and work on non-Linux targets.

CRs-Fixed: 2326406
Change-Id: I8f9099a0170e4f94a54cdd6cc6c2e321a29af717
2018-10-17 05:50:39 -07:00
Chaithanya Garrepalli
32fcc2a194 qcacmn: add MU stats support in txrx_stats
Add support for MU stats in txrx_stats from
wifistats

Change-Id: I248d3bdf8ef49bbf68675f3b765faec6d405d5ea
CRs-fixed: 2298079
2018-10-16 06:25:35 -07:00
Tallapragada Kalyan
8c93d5d032 qcacmn: setup tid queues only if default route is set
ensure we setup tid queues only if default route is set
Also we no longer set default route or tid queue setup
for BSS Peer.

Change-Id: Id240b9b8ddd67136ff85e1098840938928857fc4
2018-10-16 04:35:01 -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
phadiman
64a7b9157e qcacmn: Handle AST deletion in Roaming
Avoid AST entry deletion in roaming

CRs-Fixed: 2324511
Change-Id: If7018e2ac6c62de5bf6ceeb9bbad36b9a767be6a
2018-10-12 15:18:11 -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
jitiphil
60ac9aa036 qcacmn: Add legacy DP CFG items and APIs
Add the basic infra for legacy DP CFG items and the APIs to be used from
other components.

Change-Id: Iec1718f0a93fcb91061892b96ae6ae88174df9ee
CRs-Fixed: 2328481
2018-10-11 08:56:51 -07:00
Venkata Sharath Chandra Manchala
389c4e1f70 qcacmn: Helper function for Txrx_stats
Add a helper function for txrx_stats
to display all the statistics
supported for Lithium based products.

Change-Id: Ieb2d088274dfcc8e9ffc6ac34638404f0d4b2eba
CRs-Fixed: 2327066
2018-10-09 23:20:15 -07:00
Pranita Solanke
92096e4912 qcacmn: Calculate total PER value
Write a datapath function to compute total PER value and corresponding CDP
interface to get the calculated value.

Change-Id: I1c7feaf48c55689817b83185a4e6d4b8622e51c0
CRs-Fixed: 2308044
2018-10-09 09:19:59 -07:00
Chaithanya Garrepalli
cf347d1686 qcacmn: Add APIs to get AST entry with pdev_id
With HKv1 WAR to handle DBDC backhaul SON cases a AST
entry for same mac can exist on different radio added
CDP APIs to support the same

Change-Id: I374b8af3fe5e34f62eeb5b09819e331fdeda602a
2018-10-08 03:36:21 -07:00
Chaithanya Garrepalli
7c8cf12b76 qcacmn: add API to get ast entry from peer ast list
We are adding AST entry to ast_table from
dp_rx_mcast_echo_check in STA mode as in STA mode
we will not get the peer map event.

Find AST entry from the peer ast list to get ast entry
added in host for that particular peer. As in QWRAP
mode there can exist multiple peers with same mac address
and corresponding AST entries will be added

Change-Id: Ia75f88c03c4d0eba0edbebf8e8f40d41396543d5
CRs-fixed: 2307540
2018-10-08 01:53:25 -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