提交線圖

209 次程式碼提交

作者 SHA1 備註 日期
Harsh Kumar Bijlani
2be2bf6a69 qcacmn: Fix memory leaks in Rx monitor path
Fix the following 2 memory leaks in Rx monitor path:

1. When MPDU queue is empty and MON_BUF_ADDR_TLV is received,
   then free page fragment memory.

2. In case of small size packets, 1 MPDU can have more than
   2*QDF_NBUF_MAX_FRAGS fragments wherein each nbuf can have maximum of
   QDF_NBUF_MAX_FRAGS frags. In this case, add the frags to nbuf in the
   following way.

   parent_nbuf (QDF_NBUF_MAX_FRAGS frags attached)
	|
	| (fraglist)
	|
	----> tmp_nbuf1 (QDF_NBUF_MAX_FRAGS frags attached) ----> tmp_nbuf2
							    (next)

Change-Id: I54e8162bf0b9da8629a3c80d123421fbeaf8df11
CRs-Fixed: 3453676
2023-04-27 04:08:30 -07:00
Devender Kumar
8e3fc021bf qcacmn: Add qdf_nbuf_fast_xmit() API
Some platforms support a skb_recycler feature which patches the Linux
kernel to add a bool fast_xmit member to struct sk_buff.
Add a QDF abstraction to return the value of this member when it is
supported, and return false when it is not supported.

Change-Id: I6dfe6276779218f4d0245ec44035b4aa596d0e2a
CRs-Fixed: 3418516
2023-03-15 20:59:36 -07:00
Aravind Kishore Sukla
a3a4e67eed qcacmn: Add check for buffer overflow and null pointer dereference
There is a chance for null pointer dereference for
num_eht_user_info_valid and array out of bounds for eht_user_info.

Add checks for both the cases as it may cause crash.

Change-Id: Icb5235612a1225b9991c99519b5ee49536c577bc
CRs-Fixed: 3426873
2023-03-15 17:41:32 -07:00
Chaithanya Garrepalli
4eedfd8cf7 qcacmn: For WDS EXT use descriptor fields for 4-addr
For WDS ext use fr_ds and to_ds fields to check for
4-addr instead of reading value from TLV

Change-Id: I261746018de2320367e8650332a5c355edfb1489
CRs-Fixed: 3410639
2023-02-24 07:05:02 -08:00
Jeff Johnson
a81eb57e42 qcacmn: Fix QDF nbuf documentation
The kernel-doc script identified a large number of documentation
issues in the QDF nbuf abstractions, so fix those issues. In addition,
there are a number of instances where public functions have their
implementation documented instead of having their interface
documented, so move that documentation.

Change-Id: I744e98469d0fd6d6a2c7c907b2f9af5307f84458
CRs-Fixed: 3398757
2023-02-14 13:34:05 -08:00
Amit Mehta
f9f4ba1b9d qcacmn: Log EAP 8-way handshake packets properly
Currently EAP 8-way handshake packets are logged as
EAP REQ and EAP RSP.
Fix the logging issue by logging EAP 8-way handshake
packets properly

Change-Id: I6af3b3140b5881ece58dd06a9725c103c9388b4c
CRs-Fixed: 3400396
2023-02-13 05:28:32 -08:00
Jinwei Chen
b4f81eace0 qcacmn: Set TX flow queue for TCP ack
If TX data is TCP ACK, configure TX flow index 3 in
SW2TCL data cmd ring descriptor.

Change-Id: Ibd08b13ba8f0481aa11cd9c3dc54a49cd73674fb
CRs-Fixed: 3368303
2023-01-30 01:34:05 -08:00
Amit Mehta
1db627cc73 qcacmn: Distinguish EAPOL-Key msg 4/4 from 2/4 based on Key Nonce
IEEE 802.11be adds the MAC Address KDE into the EAPOL-Key msg 4/4 when
MLO is used and as such, the previously used check for Key Data Length
value 0 is not sufficient for recognizing the EAPOL-Key msg 4/4 anymore.
Also check for an all zero Key Nonce value since that field is supposed
to be zero in EAPOL-Key msg 4/4 and it has to be a random value in
EAPOL-Key msg 2/4.

Change-Id: Iafb2f0e59a3fd52fa47317f8f3daff3f115271d1
CRs-Fixed: 3380806
2023-01-20 22:11:56 -08:00
Amit Mehta
7e50aa48ab qcacmn: Log additional EAPOL packets
Add changes to log additional EAPOL packet types.

Change-Id: I02f1de89f7e0fcf68cea20208df1ed153126852d
CRs-Fixed: 3370979
2023-01-11 06:53:40 -08:00
Sai Rupesh Chevuru
88dd4c6970 qcacmn: IGMP leave message handling in MLO MCAST
IGMP leave message handling in MLO MCAST scenarios.

Change-Id: Ic0ac16dbe75b4ef2b27e97be3f42c498b503ca06
CRs-Fixed: 3359488
2023-01-06 00:28:12 -08:00
Nanda Krishnan
97f88fb874 qcacmn: New Alloc API for DS
Requirement:
In skb recycler, if recyler module allocates the buffers
already used by DS module to DS, then memzero, shinfo
reset can be avoided, since the DS packets were not
processed by SW (host).
Hence, we will achieve good KPI with less CPU
utilization.

Fix:
Implemented an new qdf wrapper API qdf_nbuf_alloc_ppe_ds
in wifi driver, which in turn invokes
__netdev_alloc_skb_no_skb_reset API to linux module.
With the use of new netdev_alloc API shinfo reset
will be avoided for DS used buffers alone.
Skb recycler changes are delivered already via
4360331

Change-Id: I3fe8dc07ca12c01136eaee4fcdb1ff6036f80f74
CRs-Fixed: 3350807
2022-12-26 03:23:57 -08:00
KARTHIK KUMAR T
a04069265f qcacmn: Add mlo_mcast cb_ftype
Add mlo_mcast cb_ftype in the cb_ftype enum

Change-Id: I857da8952af500eca9a8e04555937085b3c3cfb2
CRs-Fixed: 3354564
2022-12-13 05:48:19 -08:00
Jia Ding
19a0237072 qcacmn: Properly declare nbuf smmu map unmap
With NBUF_MEMORY_DEBUG=n and IPA_OFFLOAD=y, below errors are seen.

qdf/linux/src/qdf_nbuf.c:943:12: error: no previous prototype for function
'qdf_nbuf_smmu_map_debug' [-Werror,-Wmissing-prototypes]

qdf/linux/src/qdf_nbuf.c:955:12: error: no previous prototype for function
'qdf_nbuf_smmu_unmap_debug' [-Werror,-Wmissing-prototypes]

Currently above two APIs are only declared with NBUF_MEMORY_DEBUG=y.
Checking their definitions, could see that they have two variants
with NBUF_SMMU_MAP_UNMAP_DEBUG=y|n and they should only be valid
with IPA_OFFLOAD=y since IPA API is referenced in them.

Hence properly declare qdf_nbuf_smmu_map_debug() and
qdf_nbuf_smmu_unmap_debug() so that they're only valid with
IPA_OFFLOAD=y. With that, two variants are still kept.
With NBUF_SMMU_MAP_UNMAP_DEBUG=y, smmu map and unmap operations
are tracked. With NBUF_SMMU_MAP_UNMAP_DEBUG=n, no trackings are
maintained.

Change-Id: I83b08b1152d98b3efed3e52e564af0ebfbe5a7f7
CRs-Fixed: 3348594
2022-12-02 20:08:16 -08:00
Neha Bisht
5d0b7ea33f qcacmn: Create a list of skbs to be freed at once
Create a list of skbs to be freed at once in dp tx completion path

Change-Id: I42129b4306206f7224ceabc87d07e2a87b8fcab6
CRs-Fixed: 3274945
2022-11-25 12:35:45 -08:00
jinbaoliu
161650dffa qcacmn: Fix failing to distinguish between EAPOL M2 and M4
Currently we distinguish EAPOL frames by taking the secure bit in key
information field into account. This is sometimes error because for WPA
handshake M3/M4 secure bit is 0 (GTK is not included in M3) whereas for
WPA2 handshake M3/M4 secure bit is 1 for WPA2 handshake. This change uses
the ack bit in key information field to differentiate M1/M3 from M2/M4,
then uses the key data length as well as Key Mic and Encrypted Key Data
in key information field together to identify EAPOL M2 and M4 frames.

Change-Id: Iac88bc5b942415edee08dc4a98dbd4e811cb8604
CRs-Fixed: 3327876
2022-11-23 23:40:03 -08:00
Kai Chen
83521665e6 qcacmn: Add debug counter for monitor mode
Add debug count for count MPDU received based on preamble type,
reception type, UL/DL and user for max 4 user for MU monitor
mode

Change-Id: I87f1553e1f2f8276501366a825d629cf051d8a80
CRs-Fixed: 3326272
2022-11-14 16:20:25 -08:00
Jeff Johnson
40e6fd1cdf qcacmn: Fix misspelling of "conversion"
The following change introduced a misspelling of "conversion", so fix
it.
- Change-Id I9f8fa776c65cbad84fac5e8c2f65b3fce1386e20
  qcacmn: update RSSI specific parameters in mon pdev

Change-Id: I019f929c09ad4e1de21ed9c7ac485a14f82d786c
CRs-Fixed: 3319342
2022-10-28 01:52:27 -07:00
vijaraj
d5104c49a5 qcacmn: Modify qdf_eapol_pkt_type_to_subtype() to log EAPOL Start
In the api qdf_eapol_pkt_type_to_subtype(), the EAPOL start
packet is not logged to userspace.

Modify the api qdf_eapol_pkt_type_to_subtype() to support
EAPOL Start logging

Change-Id: Ic985a3f6713d298ae04559a897312fdbadb57275
CRs-Fixed: 3311616
2022-10-21 01:29:42 -07:00
Sai Rupesh Chevuru
ef34b5b9ab qcacmn: Handling of IGMP packets in MLO Multipass
Due to the CCE rule in QCN9224 IGMP packets will be routed
to err ring. When multipass is enabled, perform multipass processing
before handing over the packet to stack.

Change-Id: I50b747710eb3c49eab60c81bbc61e75e2f8650ed
CRs-Fixed: 3275888
2022-10-20 06:10:52 -07:00
Jeff Johnson
61db6e2df1 qcacmn: qdf: Fix additional misspellings
Fix additional misspellings introduced since the last spelling
cleanup.

Change-Id: I04fc6b49c1876b80bdc3547cc50ad7f1e8ad00f2
CRs-Fixed: 3314151
2022-10-18 01:42:44 -07:00
KARTHIK KUMAR T
ea38e7997e qcacmn: update RSSI specific parameters in mon pdev
Before we are updating RSSI params directly into mon_rx_status
this structure will reset every PPDU this breaks iwconfig,
wlanconfig and monitor packet RSSI values.
Fix added to storing the values in the mon_pdev.

Change-Id: I9f8fa776c65cbad84fac5e8c2f65b3fce1386e20
CRs-Fixed: 3276503
2022-10-17 16:22:51 -07:00
Jeff Johnson
3bdf954afc qcacmn: qdf: Fix misspellings
Fix misspellings in qdf/...

Change-Id: If61ee47fba94b2bb60f33ab74feda56dbe5cb7bd
CRs-Fixed: 3277902
2022-10-12 23:22:37 -07:00
Azmath Mohammed
6f54fca3a9 qcacmn: Implement qdf support for skb shared info
Implement qdf support for skb shared info and frag list append.
qdf macros will be used to handle skb shared info and list append.

Change-Id: I3e91bfb7a09f2e4547b3210a10919d6c84ec6567
CRs-Fixed: 3243932
2022-09-28 22:31:52 -07:00
aloksing
1a5b0d838e qcacmn: Fix incorrect value of gi in rx stats
Increase GI bit size to 2 to store all possible GIs.

CRs-Fixed: 3292869
Change-Id: I7337e36397f3354458deed16823e4092b8277638
2022-09-26 10:48:52 -07:00
nobelj
5e42bbc352 qcacmn: Add support for tx monitor HE MU and minor fixes
Add support for,
	a) HE MU radiotap information
	b) Multi sta BA frame generation and
minor fix,
	a) handling timestamp NULL,
	b) update NSS and other field in radiotap

Change-Id: I7a8b95328779f967b9e63ff8048242412ab472b0
CRs-Fixed: 3270361
2022-09-19 01:49:40 -07:00
Ripan Deuri
d2c0e76649 qcacmn: Use nbuf in QDF nbuf API
Use nbuf in QDF nbuf API.

Change-Id: Ib427fab156756bcd5d83e5d14e70c603f831fc8b
CRs-Fixed: 3292512
2022-09-19 00:29:14 -07:00
Debasis Das
035bb69743 qcacmn: Add new skb cb frame-type for sawf
Add new Frame-type that should be used for
setting SAWF information in skb cb.

CRs-Fixed: 3292190
Change-Id: Ife4f4382fba151c2b3e189b71df9eb9255dd0c04
2022-09-17 05:53:10 -07:00
Devender Kumar
736edd06a2 qcacmn: Definitions to support SMMU debug framework
To support SMMU debug framework, add new definitions
and add logic to track the mapping and unmapping of
a buffer via nbuf tracker.

CRs-Fixed: 3255423
Change-Id: I0b9e2828e6cd5e3204b6bba57af8806c4d080b32
2022-09-13 03:24:41 -07:00
Ripan Deuri
c0e0b4f1e1 qcacmn: Add QDF API to get skb timestamp in microsecond
Add QDF API to get skb timestamp in microsecond.

Change-Id: I14019e5e60599c1499285b92b8727e8d6a9bf782
CRs-Fixed: 3286751
2022-09-12 08:15:11 -07:00
vijaraj
8b843ae157 qcacmn: Enable EAPOL logging for FILS Authentication
In api __qdf_nbuf_data_get_eapol_subtype(), the EAPOL key_info
is evaluated only for SAE authentication, which result in EAPOL
logging failure for FILS authentication.

Check ACK and Secure bit in EAPOL key_info to determine
EAPOL packet irrespective of authentication protocol.

Change-Id: Ieef143d36d85cbf473b682810d658de93dbbdad2
CRs-Fixed: 3268362
2022-09-12 08:15:04 -07:00
Amir Patel
49555350f2 qcacmn: Optimize ppdu_info memory
a. Optimize mon_rx_status and mon_rx_user_status objects memory
b. Add QDF API to remove last element in nbuf queue

Change-Id: I53328aae4d2861e0d2972556f61c8556be5e601c
CRs-Fixed: 3278895
2022-09-06 10:23:36 -07:00
Sreeramya Soratkal
351edebeae qcacmn: Resolve difference in pointer signedness
The control buffer element of socket buffer structure (sk_buff)
is of the data type char and the virtual address element of network
buffer control block structure is of the type unsigned char. The
current prototypes cause this pointer assignment with different
signedness.
Fix this by using appropriate type in the API definition.

Change-Id: Ic20ca29ce5d26a134ef295663632a5b7fd420954
CRs-Fixed: 3269690
2022-08-26 09:10:19 -07:00
nakul kachhwaha
ef9ad9d2d2 qcacmn: Add qdf APIs to set/get IPv4/6 TOS and TC field
Add QDF APIs to set/get IPv4/6 TOS and TC field.

Change-Id: Ie048b74bacea33e9b1c57c5561064673247ee14c
CRs-Fixed: 3207377
2022-08-16 07:40:35 -07:00
Author Amrit Sahai
dc5cc15bba qcacmn: Check ICMPV4 and ICMV6 are redirect or not
Add API to check ICMPV4 and ICMPV6 are redirect or not
This is to avoid a security breach.

Change-Id: I61e7c54c6d9279c1e7d2f316381fbc1c83ce5b4a
CRs-Fixed: 3233925
2022-08-08 00:16:44 -07:00
nobelj
7d3197b9a5 qcacmn: tx monitor populate stats information
add tx monitor stats information.

Change-Id: Iffc55c2a4fa5351140daeffac3a50dd6867f6ea1
CRs-Fixed: 3230286
2022-08-02 03:23:01 -07:00
VIJAY RAJ
bece5a698a qcacmn: Send DHCP and EAP event logs through netlink
DHCP and EAP logs are sent through the
vendor event to the supplicant.

Modify the DHCP and EAP log flow through
the diag event to the supplicant in order to maintain single
logging infrastructure.

Change-Id: I43025f393615451f83e3846c767c4572d108462e
CRs-Fixed: 3219460
2022-07-01 13:22:54 -07:00
Neha Bisht
87596da3e4 qcacmn: Avoid qdf framework for nbuf free in Tx. simple path
Avoid qdf framework for nbuf_free in Tx. simple path.

Change-Id: Ic0a82279586a16f07625fc78d3e07d1a134af3a4
CRs-Fixed: 3224285
2022-06-29 04:31:25 -07:00
Chaithanya Garrepalli
bd0375c2de qcacmn: Remove unnecessary checks in Tx path
1. Remove prints in per packet path
2. Add prefecth for skb shinfo
3. Avoid qdf_get_cpu() in DP tx

Change-Id: I86d196cc7865a2d5b3a5a6098f6f7d84397a60d0
CRs-Fixed: 3227568
2022-06-28 14:00:52 -07:00
Harsh Kumar Bijlani
372f5a1376 qcacmn: Correct the value of macro QDF_MON_STATUS_USIG_MU_VALIDATE2_SHIFT
Incorrect value of macro QDF_MON_STATUS_USIG_MU_VALIDATE2_SHIFT
leads to non-zero value of field "Punctured Channel Info" in
USIG TLV in radiotap header even if puncturing is not enabled.

Correct the value of macro QDF_MON_STATUS_USIG_MU_VALIDATE2_SHIFT to 14.

Also use correct set of macros for setting of usig_mask.

Change-Id: I4a5594f784137238ee4aa072c7595e83673c1960
CRs-Fixed: 3218536
2022-06-15 13:54:53 -07:00
Amir Patel
ca9379b181 qcacmn: Add fraglist to skb if num_frags exceeds MAX_FRAG
Add fraglist to skb if num_frags exceeds MAX_FRAG

CRs-Fixed: 3186124
Change-Id: I3112d63276fe00aea4fce2e287650078b1573d8a
2022-05-06 16:42:41 -07:00
KARTHIK KUMAR T
1bc325d4f3 qcacmn: calculate RSSI DBM in WKIKI
Add rssi dbm support bit for rssi_comb calculation
using parameters received from the fw.

Change-Id: Ice57ed69db74852a8b03752632bae747c043e93d
CRs-Fixed: 3183406
2022-04-28 11:51:10 -07:00
KARTHIK KUMAR T
c7acbbd7ba qcacmn: calculate RSSI in DBM
calculate rssi_comb and rssi per chain values using
parameters received from the fw.

Change-Id: Ide56549c7d7ee9bde609dc6764013d509f7ccac0
CRs-Fixed: 3157484
2022-04-25 04:12:10 -07:00
Karthik Kantamneni
6380170e35 qcacmn: Introduce new QDF API's to handle skb and net dev requirements
Introduce new QDF API's to handle skb and net dev handling in
os abstract code.

Change-Id: If5a460df2c6c1b4068909fed6e5b3036623c2093
CRs-Fixed: 3164916
2022-04-22 13:19:19 -07:00
aloksing
9cc1b3a305 qcacmn: Get RU details in MIMO case
Get NSS, MCS and RU size from PPDU_START_USER_INFO TLVs.

Change-Id: I5898a46a52e8a1eb25e3cf54e7dfe50c503e1b68
CRs-Fixed: 3167954
2022-04-21 04:33:31 -07:00
Jeevan Kukkalli
af7c896bdc qcacmn: Add lite mon rx filter setup/reset functions
Add function to setup/reset lite monitor filters
whenever lite monitor mode is enabled/disabled
respectively through cmd line.
Also add function to configure rx header tlv dma length.

Change-Id: Ia5d8bc36e1d033b3e15737bb6b9854f6a7cdd5df
CRs-Fixed: 3143570
2022-04-20 03:12:41 -07:00
Amir Patel
6b69543b79 qcacmn: Add API to remove frag from skb
Add API to remove frag from skb

CRs-Fixed: 3172668
Change-Id: I0b392366760036c6fda545f558f72a64138d2b11
2022-04-19 05:17:19 -07:00
aloksing
2c977089aa qcacmn: Get puncture type from puncture pattern
Populate punctured pattern from WIFIPHYRX_COMMON_USER_INFO_E
And get puncture type from puncture pattern.

Change-Id: I3a5ba4c7c478d15cf3c3cfdcfd0573775ae342ca
CRs-Fixed: 3166010
2022-04-13 05:18:17 -07:00
Vulupala Shashank Reddy
f4a25a4af0 qcacmn: Add support for tx flags for packet capture mode
Fill tx flags in radiotap header based on tx status for
tx packets capture in packet capture component.

Change-Id: I52da01a2c0677d32bfb05a1f3095a0e6df084fca
CRs-Fixed: 3132140
2022-03-02 01:28:21 -08:00
nobelj
f0064e8e52 qcacmn: Waikiki tx monitor packet construction
Added function to construct packet and send to stack
after parsing.

Change-Id: I4621eb24840253db261aea63079e27f744f92698
CRs-Fixed: 3115608
2022-03-01 05:39:37 -08:00
Basamma Yakkanahalli
e85fbce095 qcacmn: change to configure and handle undecoded metadata capture
Added change:
1. Set/reset RXDMA MON STATUS ring filter setting and send HTT
   message to capture undecoded frame
2. Handle undecoded frame to update cdp_rx_indication_ppdu structure
   from hal ppdu_info rx status and generate WDI event to deliver it
   to upper layer

Change-Id: I14485f28333b113b5a2fab639611551c2b08af2b
2022-02-18 04:53:18 -08:00