Commit Graph

327 Commits

Author SHA1 Message Date
Nandha Kishore Easwaran
372f566a59 qcacmn: Remove rx_header.h file inclusion
Remove inclusion of rx_header.h file

Change-Id: Ie585334fcfed369f2ff81b4d1d1bc16466c46c3e
CRs-fixed: 2256497
2018-06-08 20:14:15 -07:00
Mohit Khanna
4b3b7e7110 qcacmn: debug prints for monitor mode TLVs
Add prints to track:
* Incoming TLVs in the monitor mode status ring.
* HE, HE-MU and HE-MU-Other values being passed to the
  stack.

Change-Id: Ib23336353dc4a2253a62444b767d2a706ce372ea
CRs-Fixed: 2242514
2018-05-22 13:00:04 -07:00
Mohit Khanna
6c22db3b45 qcacmn: process PHYRX_OTHER_RECEIVE_INFO_OTHER TLV
Process WIFIPHYRX_OTHER_RECEIVE_INFO_E and
WIFIPHYRX_OTHER_RECEIVE_INFO_RU_DETAILS_E TLVs in monitor mode.

Change-Id: I9cea6cee0499fd9ae9e07d4479c7010e35f3e5a5
CRs-Fixed: 2242514
2018-05-22 13:00:02 -07:00
Jeff Johnson
f7aed493b1 qcacmn: hal: Fix misspellings
Address the following issues in the hal folder:
CHECK: 'completly' may be misspelled - perhaps 'completely'?
CHECK: 'Initalize' may be misspelled - perhaps 'Initialize'?
CHECK: 'refered' may be misspelled - perhaps 'referred'?
CHECK: 'Retreive' may be misspelled - perhaps 'Retrieve'?
CHECK: 'settting' may be misspelled - perhaps 'setting'?

Change-Id: I98368830eeef7942c20380dbe6c638319a9860d9
CRs-Fixed: 2241575
2018-05-19 19:40:27 -07:00
Jeff Johnson
dc9c55962d qcacmn: Fix typo "lenght"
Replace typo "lenght" with correct spelling "length".

Change-Id: Ieea0c547c61248e510835d16a9fa55ace486df23
CRs-Fixed: 2238309
2018-05-17 00:47:02 -07:00
Jeff Johnson
9f2d54f039 qcacmn: Fix typo "accross"
Replace typo "accross" with correct spelling "across"

Change-Id: Ifec1b81cbc6c808784d86afe055468ff42674a57
CRs-Fixed: 2238309
2018-05-17 00:46:41 -07:00
Kai Chen
783e038223 qcacmn: Add monitor mode ppdu and mpdu stats
Add monitor mode status ring ppdu stats and destination
ring ppdu/mpdu stats

Change-Id: I702172f40ffc0915b630dd3781a697199bdd20fd
2018-05-14 21:54:53 -07:00
Pramod Simha
848fc04585 qcacmn: Fix DSCP-TID mapping configuration recipe
Enable/Disable the DSCP TID map program bit before
writing the mapping configuration into HW registers.
This is a new recipe for NPR AX & HK 2.0

Change-Id: I0af968dab507b32167909dbfa8ecc7a946e4af84
CRs-Fixed: 2221226
2018-05-04 20:43:07 -07:00
nobelj
d803959826 qcacmn: Populate BeamFormed info from VHT_SIG_A and HE_SIG_A
Populate Beamformed information from VHT_SIG_A and HE_SIG_A

Change-Id: Iba108f6f9905ed02490936c5ca2f00e0e94b318f
CRs-Fixed: 2185151
2018-05-02 03:19:25 -07:00
Tallapragada Kalyan
70539512de qcacmn: chain nbufs using phy_ppdu_id for peer invalid case
nbufs received on wbm_release ring were chained based on
first_msdu and last_msdu bits if the peer is invalid for these
frames, but these fields in the rx tlv header were in-correct as
hardware does not decap these msdu's.
Based on inputs from firmware we now changed this logic to
using phy_ppdu_id field from the rx_mpdu_start tlv & rx_attention tlv.

Change-Id: Ifc7faa2d1b0585bcc226e5cb2045fcb29d152273
2018-05-01 21:37:40 -07:00
Mohit Khanna
1fe9fd414a qcacmn: add HE radiotap flags for MU cases
HE field in radiotap header are not being updated for MU frames.
Add support for MU-MIMO and MU-OFDMA frames.

Change-Id: If33e9f9039c8df6e1bb8f591879d4defed184ac8
CRs-Fixed: 2191215
2018-04-20 12:09:02 -07:00
Rhythm Patwa
f6862a6527 qcacmn: Add HE MU and HE MU Other support
Populate HE-MU and HE-MU-Other fields in the radiotap header.

Change-Id: Iab9b9c47e076007b43b7abeb296ea15f0ec2a2cb
CRs-Fixed: 2191215
2018-04-20 12:09:00 -07:00
Rhythm Patwa
fef604ff99 qcacmn: Fix issue to correctly populate HT MCS rates
Fix the issue where the MCS rates for HT were repopulated
causing the MCS rates to be decoded incorrectly.

Change-Id: I73efac79d853b6f8af966aec57e70ad645418528
CRs-fixed: 2206784
2018-04-17 02:29:34 -07:00
Soumya Bhat
35fc699c0f qcacmn: Populate RX PPDU length
Add change to compute and populate RX ppdu length
from RX ampdu length.

Change-Id: I0e60764be1d3b0a0e69a8dc52cfb094a5df0f596
2018-04-11 09:15:12 -07:00
Soumya Bhat
dc8aca8501 qcacmn: Strip additional bytes from skb containing Rx payload
In existing code, the RX payload buffer for M-copy mode contained
RX MSDU payload followed by additional TLV data.

Add change to strip the skb and only provide MSDU payload

Change-Id: I9834fabfb0e26404a620d8419e7c570fff68f182
2018-03-30 06:31:18 -07:00
sumedh baikady
668d8679ff qcacmn: Fix minor pn_size init and index check
1. In hal reo setup initialize pn_size to avoid uninitialization
in default case.
2. In hal validate shadow register function, fix the check
for index as shadow_config array can take 0 to 35 as index values.

Change-Id: I8b729dc70053e333ef659ba38fb0c2f66cd8b35a
CRs-fixed: 2208799
2018-03-23 21:38:54 -07:00
Nandha Kishore Easwaran
56c28c0cd1 qcacmn: Assign lmac id on tx packet enqueue
On napier AX, HK2.0 ast search is tied to lmac_id.
This ast search feature is added to support DBDC repeater usecase.
Assign lmac id 3 to search by default on all macs until more
formal per pdev changes are made. This enables 2g.

Change-Id: Ia06d9243bddd3f4943426d6b0de3f452a252d819
CRs-fixed: 2198431
2018-03-08 18:47:14 -08:00
sumedh baikady
b882f93dbc qcacmn: Fix channel info in radiotap
Fix frequency and channel flags fields in radiotap API

Change-Id: Ic991ea796d0b19f8adc16a5bc33cfde0042c167e
CRs-fixed: 2189914
2018-03-03 23:44:46 -08:00
Karunakar Dasineni
31b98d4cd7 qcacmn: Fix memory leak during REO cmd ring drain
Fix possible REO descriptor leak while draining REO
command ring by invoking command status handlers with
special error code.

Change-Id: I2fe5f60489b57a4b0a287e67e5610112f7292677
2018-03-02 19:34:25 -08:00
sumedh baikady
3507923a80 qcacmn: Fix Coding field in radiotap for VHT
Populate coding field for VHT in radiotap API.

Change-Id: I8a7550014d0faf2d3985dd0f938374c7d3abc3de
Crs-fixed: 2197874
2018-03-01 03:53:35 -08:00
sumedh baikady
3303889557 qcacmn: Fix GI and LTF in radiotap field of HE
Fix GI and LTF fields for HE SU PPDU and HE ER SU PPDU
when DCM and STBC is 1.

Change-Id: I2f1f6cf52a7ca4182541fe7e95bf27e560ad60b8
CRs-fixed: 2185322
2018-02-28 13:22:32 -08:00
Keyur Parekh
e85133ca71 qcacmn: populate duration value for rx status structure
Duration was populated under wrong TLV header. Change
place to populate with TLV header

Change-Id: Ieac59f622d92f9377d846b035d9aed7d14685e66
2018-02-27 21:17:13 -08:00
sumedh baikady
710c252550 qcacmn: Fix flags field in radiotap for HT
Set short GI known to true in flags field for HT case.

Change-Id: I4259dee7b10ebf23cf9cbaa647aa8951f3dbe633
CRs-fixed: 2189918
2018-02-27 15:07:58 -08:00
Karunakar Dasineni
25f1b0434b qcacmn: Change REO queue descriptor delete sequence
Change REO queue descriptor delete sequence to flush base and
extension descriptors separately, since flushing base descriptor
alone results in extensions flushed by HW much later,
sometimes after freeing descriptor memory, causing use-after-free
corruptions. Also increase REO command and status ring sizes
since number of commands per RX TID flush has increased with
this change.
Fix interrupt batch count setting for non pkt/buffer rings,
which includes REO status ring.
Also remove callbacks during reo command list destroy,
done as part of SOC detach. This should not be done since
callbacks will access stale data structures that are freed
as part of PDEV/SOC detach.

Change-Id: I4337454d3f53cc0b3c3014ef07cc2ba13cfebb18
CRs-Fixed: 2175989
2018-02-17 09:42:22 -08:00
Mohit Khanna
9a6fdd5cee qcacmn: Debug prints for monitor mode
Add some debug prints for monitor mode

Change-Id: Ie12279c832647cac9e1f152c98fa0205dd9d495e
CRs-Fixed: 2173407
2018-02-16 22:58:07 -08:00
Keyur Parekh
844e627170 qcacmn: Based on Preamble type setting flags value
1. Moving HT,VHT and HE flags setting into
WIFIRX_PPDU_END_USER_STATS_E case.
As this TLV already have preamble type populated.
2. NSS value wrongly populated in WIFIRX_PPDU_END_USER_STATS_E
case. It has been removed now.

Change-Id: I1c530385c585c0ea0dd14a07a6759a85b80e6a10
2018-02-10 00:00:38 -08:00
Keyur Parekh
e6d32a9f38 qcacmn: populate current channel number from TLV
populate channel number from TLV and update mon_rx_status
structure field

Change-Id: I780c6303a35e27a86ad8d1e3b4dd30ba274666f5
2018-02-08 19:46:10 -08:00
Keyur Parekh
4d36b32991 qcacmn: Add Indication for MSDU or MPDU level aggregation
populate flags for MPDU or MSDU level aggregation in
mon_rx_status structure.

Change-Id: I5d8d026a42ffef9e95f579178b4f8cdc581699ec
2018-02-08 19:46:08 -08:00
Pratik Gandhi
dc82a77896 qcacmn: Support to WIN for split of kernel modules
Add EXPORT_SYMBOLS to support modularization in WIN.

Change-Id: I587fe6f2c5cce4b54756358de5c488b146f61850
CRs-Fixed: 2179854
2018-02-08 06:58:35 -08:00
Aniruddha Paul
91dfd50160 qcacmn: Add API to change Rx Fragment DST ring
Add API to change the Rx Fragment DST ring based on the SoC NSS
config
CRs-Fixed: 2175933

Change-Id: I2e3f0b82d301538f54d9790d55eeccdd0f6fa154
2018-01-30 23:55:20 -08:00
Anish Nataraj
28490c4c5e qcacmn: Add checks in rx_mon_status handler to filter spurious frames
1. find_first_bit API returns Size value if it doesn’t find any bit set.
   This was causing VOICE AC counter to go high even for TID 0
2. Reset stats was not resetting the stats immediately
3. Added checks to avoid spurious stats increment
4. Detect data/mgmt pkt to avoid spurious stats increment

Change-Id: Ic9c5695fc7bdf58d1237e7e20bb79378a02a21f6
2018-01-25 05:08:23 -08:00
Kai Liu
b8e1241366 qcacmn: dump reo ring when flush cache failed
When delete peer, host will try to flush all frames in REO queue
by sending a cmd through reo ring, but sometimes encounted failure to
send this cmd, dump ring status if ecountered above failure.

Change-Id: I3ea4e96e5999f85398b531ddf4f350e91e798d70
CRs-Fixed: 2167419
2018-01-22 07:37:34 -08:00
Anish Nataraj
072d897705 qcacmn: cck,nss and preamble update fix
cck rates were getting updated for ofdm rates
and nss index were getting wrongly incremented
fixed the same

Corrected sgi and preamble too

Change-Id: I2dabb685de6e0bd4ba5094845cde228b3c32e2a9
2018-01-19 12:20:24 -08:00
Pranita Solanke
ed0aba69a9 qcacmn: Rx and Tx peer statistics update
* Update the pkt_type counters correctly within the array bound
 * Add support for NSS counters on Tx side
 * Update ampdu flag in PPDU struct
 * Add support for ampdu flag in hal_ppdu struct

Change-Id: I79ea52727124ea4be4d82912cb2513ea58e2af10
2018-01-18 02:33:34 -08:00
Keyur Parekh
71ab9ef0b7 qcacmn: Populate mon_rx_status structure fields
Update mon_rx_status fields for HE case. Also
added rs_fcs_err field to structure and populate
its value.

Change-Id: I4681543c7d6c6c7ac0d666cd93072caaee285585
2018-01-17 23:38:07 -08:00
Pamidipati, Vijay
980ceb9cb9 qcacmn: Add new HAL API to get SRNG descriptor which is pending reap
To release/flush buffers from source SRNGs which have not been reaped yet,
add a new HAL API to get next descriptor which is pending reap

Change-Id: Ibe490d8f8667ed046beb98fe19bfd7feb31aa286
CRs-Fixed: 2165595
2018-01-11 10:53:46 -08:00
sumedh baikady
2a19fe4317 qcacmn: Fix legacy rate and group id in rx_status
In radiotap section of sniffer, fix group id field for vht
and rate field for legacy.

Change-Id: I3c1e2e650548551230d9eca5bc043b690169e844
CRs-fixed: 2143521
2018-01-09 23:47:25 -08:00
Pratik Gandhi
034cb7cb60 qcacmn: Define Host based TARGET_TYPE
fwhdr_abstrct: Use Host based TARGET_TYPE instead of firmware
defined TARGET_TYPE. It will abstract dependency on bmi_msg.h.

Change-Id: I76d744db27df730a3a91a243adfc07fc17d77487
CRs-Fixed: 2140921
2018-01-03 20:09:46 -08:00
Manoj Ekbote
376116e052 qcacmn: Handle error case with HAL SRNG setup
If hal_srng_setup() fails, memory allocated for srng
is not freed resulting in a leak. Free the memory in
that case. In future, return error to caller and
assert when invalid ring ID is used during setup.

Change-Id: I6f3a7494a5c5e861652f3a38d18c220cd9a6eef2
2018-01-03 14:17:00 -08:00
Keyur Parekh
5929a9fdb4 qcacmn: update mon_rx_status field from TLVs
In mon_rx_status structure mcs,bw and nss values
not populated properly. To resolve this issue, update
mon_rx_status structure fields when embedding values to
respective flags

Change-Id: I33c19c209fcdb7252af4a7ed6cbdbf3682fd4236
2018-01-02 13:36:59 -08:00
Gurumoorthi Gnanasambandhan
a4fa1ef85d qcacmn: Fix offset for rssi stats from PPDU stats
Initial 12 bytes offset from rx_tlv is not necssary for calucating the rssi
related stats.

Change-Id: Ic52945e4c44b1d0755629b73737d00ff1c727c53
2017-12-29 05:28:54 -08:00
Karunakar Dasineni
65b626eb3d qcacmn: Monitor status PPDU ID wraparound handling
Check PPDU ID wraparound in monitor mode processing.

Change-Id: I9e1dcc7b22d4db8006e945e360b3744f548fb122
CRs-Fixed: 2160214
2017-12-27 01:26:16 -08:00
Pranita Solanke
d7e10baaa9 qcacmn: Change the BW mapping on host side according to FW
Stats counters for BW were not updated correctly
due to difference in mapping of BW on host and FW

Also fix the Rx Stats to account for TCP Ack count

Change-Id: I7e844a7032e7968c110c7a0f8c45b0349a5cb818
2017-12-21 15:26:03 -08:00
sumedh baikady
f7bbb3512f qcacmn: Add HE SU Radiotap Support
Keeping up with changes in radiotap header definitions
and spec. This change reads preamble info for HE SU from
phy tlv and populates the radiotap structure

Change-Id: I0663d1923f2a8277c62ab6c8378aaca026ce18db
Crs-fixed: 2144302
2017-12-19 21:25:03 -08:00
Sathish Kumar
03d77e6590 qcacmn: Add source ring for direct buffer rx module
Direct Buffer Receive provides the driver with a mechanism by which target
can transfer information directly into host memory via DMA.

DMA rings must be initialized and configured before they can be shared
to the target for transfer ot data. Host driver will use the HAL SRNG
APIs to create, initialize and configure the DMA rings.

Change-Id: I43cd39ccbb5f5069c9a14092459d5c88ea514dca
CRs-Fixed: 2157986
2017-12-13 19:18:09 -08:00
Soumya Bhat
f451d046d1 qcacmn: Fix bug in handling hal rx status tlv
Add missing break identifier in switch case of
hal_rx_status_get_tlv_info() used to parse hal rx status
TLV.

Change-Id: Ie913b6795d0a73fe8d28fefedd7ab799edda2619
2017-12-12 18:36:21 -08:00
Alok Kumar
ebdb2daf68 qcacmn: Replace instances of unadorned %p
Replace instances of unadorned %p which violates security guidelines.

Change-Id: I0b00fb9f997d3ed6a2824c2bb133c343fc92caef
CRs-Fixed: 2133330
2017-12-11 11:25:12 -08:00
psimha
6d62ef4e59 qcacmn: Change HAL APIs for the new 11AX header
Change some HAL API to correspond to the header changes that got
modified for the Napier 11AX HW.

Change-Id: I514b18bc2a92ad11d95c1079ba8ef4b96b7bc6eb
CRs-Fixed: 2124274
2017-12-07 13:27:19 -08:00
Soumya Bhat
6fee59c4d5 qcacmn: RX AM Copy mode
Provision to send first MSDU of a PPDU to upper layer based
on PPDU ID received in RX monitor lite ring.
FR 42926

Change-Id: I6daed9382b57fb3355ec6453e0609085cc7b9bb0
CRs-Fixed: 2127108
2017-12-01 22:28:23 -08:00
jiad
5661cef405 qcacmn: Fix pcie remap window to 6 bits mask
Per Napier SWI spec, PCIE_REMAP_1M_BAR_CTRL expects
6 bits mask for window selection.

Change-Id: I72ac800a9eb133790b611ee1a5b56a0dc8ca49e3
CRs-Fixed: 2142294
2017-11-17 15:21:42 -08:00