Commit Graph

81 Commits

Author SHA1 Message Date
Linux Build Service Account
587c236f05 Merge "qca-wifi: Add frame types to TX Capture" 2020-04-23 15:47:39 -07:00
Linux Build Service Account
2e3dd6f8e4 Merge "qca-wifi: adjust data by pulling extra HTT header from nbuf" 2020-04-22 02:23:13 -07:00
Srinivas Pitla
381441b56b qca-wifi: adjust data by pulling extra HTT header from nbuf
For packets from exception ring will have extra HTT header, that
is adjusted to avoid wrong LLC header

Change-Id: I36adaa6ab0c3ba96a5eec9bf05747576e3938028
CRs-Fixed: 2661034
2020-04-20 13:16:14 -07:00
Linux Build Service Account
51120720e7 Merge "qca-wifi: filter by mac check" 2020-04-20 12:46:45 -07:00
Linux Build Service Account
d035dfef20 Merge "qca-wifi: ignore ack with 0 mac addr" 2020-04-14 17:59:18 -07:00
Christopher Chopp
cf78ddd987 qca-wifi: Add frame types to TX Capture
The current implementation of the TX Capture
feature assumes a non QoS 3 address frame for
each frame. If a frame is a QoS frame, the extra
fields are manually added, but if the frame is a
4 address frame, there is no handling. Add QoS,
4 address and 4 address QoS frame types to the
TX Capture feature and update accordingly.

Change-Id: Idd7f8f55a5543718f52bc38be396d671b87b54bd
CRs-Fixed: 2636684
2020-04-14 16:38:53 -07:00
Ruben Columbus
f73266f87c qca-wifi: filter by mac check
filter pass seems to not be working for control frames
so we are using mac check address comparison for non-bss freames
when tx_monitor is set

Change-Id: I3a003636381f73191081e821dbe8cf00a67cb042
2020-04-13 17:33:22 -07:00
Srinivas Pitla
3e6eb3562a qca-wifi: Free nbuf on bpr disabled case only
If tx capture, sniffer are not enabled, mgmt nbuf is freed.
It is causing use-after-free in bpr enabled case

Added change to free only when bpr is disabled

CRs-Fixed: 2662214
Change-Id: I0d889f371cf47047200f70563b589fac99733c49
2020-04-13 11:32:37 -07:00
Srinivas Pitla
c1fbfdd72c qca-wifi: fix TSF wrap around case in tx capture
Handle wrap around correctly during TSF delta calculation.

Change-Id: I1303053dbf33175e9f3c7beec0988a4aef03eb7f
CRs-Fixed: 2651294
2020-03-27 10:26:16 -07:00
Srinivas Pitla
e13d2f6375 qca-wifi: Fix RTS and CTS duration in tx capture
This change updates correct timestamp for self gen RTS/CTS frames

Change-Id: I934de171f7d78288a91b57581c9cdb0ff48b9067
CRs-Fixed: 2632369
2020-03-27 10:26:00 -07:00
Ruben Columbus
490a45106d qca-wifi: ignore ack with 0 mac addr
use mac addr compare function with dummy mac addr set to all 0 and dest
mac addr. if they are similar then just ignore frame.

Change-Id: I8c892d0ca4a210865720b94b580b6e24dad0382b
2020-03-26 16:07:28 -07:00
Srinivas Pitla
58a1539c08 qca-wifi: Mark beacon frames as selfgen
Beacon frames are FW generated frames, FW indicated them as DATA_SU,
with this, frame is not marked as self gen. It gets added to retry_q.

Check ppdu frame type and subtype to mark frame as selfgen if it beacon

Change-Id: If0bfd9bf2cc321afe207a4db7529e24baebfd376
CRs-Fixed: 2643848
2020-03-19 16:14:40 -07:00
Srinivas Pitla
298c78568e qca-wifi: cleanup buffers for incomplete amsdu
if last_msdu is not received  then allocated
mpdu_nbuf and mpdu_q is not freed,

This change frees the buffers in last_msdu not seen case.

Change-Id: Icaaa6e227f3ea1d314c6d15a9f76c2f622d5d93f
CRs-Fixed: 2643848
2020-03-19 16:14:27 -07:00
Srinivas Pitla
d11868e2c3 qca-wifi: Drop mgmt nbuf in tx_capture disabled case
If tx_capture is disabled, the frames notified to tx_capture
module needs to be freed.

This change frees mgmt frames in tx capture module, in case feature
is disabled

Change-Id: I71f102ba2f25f23bdcef63dddb525d5f7b0a692a
CRs-Fixed: 2643848
2020-03-19 16:13:31 -07:00
Srinivas Pitla
d0aafa3624 qca-wifi: Tx capture stability fixes
1) Avoid removing wrong nbuf from queue
   In corner case, the current flow can remove first nbuf instead of
   actual nbuf from queue, this can lead to having the actual pointer
   stored at two array indexs.

2) tsf wraparound handling for mgmt frame

3) Mpdu tried is higher than ba_sisze
   mpdus[] is allocated with ba_size, it is observed that mpdu_tried
   is higher than ba_size, which can lead to buffer overlow.
   Added the check of ba_size along with mpdu_tried.

To avoid it, copied nbuf in the corner case, and left the actual nbuf
in the xretries queue.

Change-Id: Ifa57eaf62cf50aa2c356a6d1f41ef4b7283be52e
CRs-Fixed: 2643848
2020-03-19 16:11:22 -07:00
Linux Build Service Account
ee0b7860ae Merge "qca-wifi: Fix the issue on block ACK for BAR frame" 2020-03-11 02:16:30 -07:00
Linux Build Service Account
922817af53 Merge "qca-wifi: On mpdu copy expand, get reference of fraglist" 2020-03-09 19:14:54 -07:00
Kai Chen
f4aeb4b87e qca-wifi: Fix the issue on block ACK for BAR frame
Fix the issue on block ACK on response to BAR frame.

Change-Id: Ib8b8b55994ed44ed73a4272e0246f0f688118352
2020-03-09 15:56:18 -07:00
nobelj
1e5c16a0dd qca-wifi: Drop MU in tx capture support and other Fix
Fix to support Tx capture for below issues

a. intermittent change to drops all MU frames in Tx capture.
b. Fix to support, FW indicates enqueue bitmap with more bits than
actual MPDUs tried by HW tx capture holds more pending PPDUs, it causes
higher memory usage.
c. holding peer reference on get and release reference on delete
during tx capture.

Change-Id: I0ac5dce7995413585164b6c15dd8b647f0886fb1
2020-03-06 17:34:29 -08:00
nobelj
ae9de3a7de qca-wifi: On mpdu copy expand, get reference of fraglist
Add support to get reference of frag list when doing copy expand of
buffer.

Change-Id: Ia3bf249afab28ea7c50bfe3a6ff567fd95f86e47
2020-03-06 10:41:43 -08:00
Linux Build Service Account
d99bbeb26f Merge "qca-wifi: Add QoS NULL Check for Data Frames" 2020-03-05 04:38:40 -08:00
Christopher Chopp
4b2fd4033d qca-wifi: Add QoS NULL Check for Data Frames
Currently, there is no check for QoS NULL when
handling data frames in the TX Cap feature. This
leads to QoS NULL frames not being seen OTA. Add
a check in dp_tx_ppdu_stats_process to ensure data
frame is not a QoS NULL data frame before handling,
since QoS NULL payload comes in management path.

Change-Id: I9fa2e68115327a283b241214ff62534bcb1ed74a
CRs-Fixed: 2632712
2020-03-04 12:37:52 -08:00
Linux Build Service Account
8a69442922 Merge "qca-wifi: Remove dp_rx_mon.h inclusion from dp_tx_capture.c" 2020-03-03 20:08:46 -08:00
Linux Build Service Account
7022f867ec Merge "qca-wifi: Add support for noAck frames for TX capture" 2020-02-28 14:36:21 -08:00
Christopher Chopp
06db648e34 qca-wifi: Temp WAR for MCAST traffic in TX Cap
Add temporary workaround for TX Capture Enhancements
feature to not process stats for  MCAST traffic unless
the peer is a bss peer. This change avoids memory leaks
relating to MCAST Traffic stats handling.

Change-Id: I9b564897e402a4381e6d92d983bc10e1036ee2b4
2020-02-26 18:11:38 -08:00
Linux Build Service Account
57ae16c6e0 Merge "qca-wifi: tx capture stats for msdu and pending ppdu queue" 2020-02-25 13:09:54 -08:00
Linux Build Service Account
ee5754429a Merge "qca-wifi: Fix for tx capture softlockup on mode change" 2020-02-25 13:09:54 -08:00
nobelj
c42f615d91 qca-wifi: Fix for tx capture softlockup on mode change
In tx capture, while changing the tx capture we run into
soft lock up. The fix addressed the soft lock up issue.

Change-Id: I0cb6abb9ede2fb0a5d380e6986ec14dcaa31a13f
2020-02-24 22:54:13 -08:00
nobelj
965f45a0b3 qca-wifi: tx capture stats for msdu and pending ppdu queue
Add stats for msdu queue and pending queue as a part of tx capture stats.

Change-Id: I78f41cd1443715b6b763db01c9db2c4bcef44747
2020-02-24 22:46:53 -08:00
Christopher Chopp
a141b91706 qca-wifi: Add NULL check for mpdu_nbuf in TX Cap
Currently, no NULL check exists before the mpdu array from
the ppdu_dsc is populated. Add a NULL check after
qdf_nbuf_queue_remove before assigning it to the
ppdu_desc->mpdus array.

Change-Id: Ic5002b7939bb85440dbb8ea96dd46d30c70eb2ff
2020-02-24 15:51:53 -08:00
Amir Patel
44481117d3 qca-wifi: Remove dp_rx_mon.h inclusion from dp_tx_capture.c
Remove dp_rx_mon.h inclusion from dp_tx_capture.c

In I3a31dacd7d7e817f144708f9bda5536808080864,
dp monitor inline APIs are moved to header file.
This change is needed to get dp_tx_capture.c compiled.

Change-Id: I145cac1afbc4e19a5d36a97c4a9cbe93fe67f700
2020-02-24 19:43:12 +05:30
Linux Build Service Account
cc95a997ba Merge "qca-wifi: Fix tx capture enable and peer filter" 2020-02-23 12:10:10 -08:00
Amit Shukla
bc3ff96089 qca-wifi: Add support for noAck frames for TX capture
noACK action frames are generated in response to NDPA
frames.

Change-Id: Ib441041353050e7a4736e1e5830dbfd5d08e0f50
CRs-Fixed: 2622583
2020-02-21 14:13:25 -08:00
nobelj
bbcadc149e qca-wifi: Fix tx capture enable and peer filter
As a part of peer filter feature fix, tx capture feature
support only for peer filter. with this fix it support
tx capture enable too. 

Change-Id: I76e02b79a351bb3f73fa5c5d9e9a6dd583c27cc5
2020-02-21 12:03:30 -08:00
Linux Build Service Account
a633871412 Merge "qca-wifi: Rectify nbuf copy expand in TX Capture feature" 2020-02-21 11:44:21 -08:00
Linux Build Service Account
95744c646d Merge "qca-wifi: Fix for incorrect channel frequency in radio tap" 2020-02-20 19:52:49 -08:00
Christopher Chopp
2a21448971 qca-wifi: Rectify nbuf copy expand in TX Capture feature
Replace skb_copy_expand with qdf_nbuf_copy_expand to correctly
get offset for expand length. Additionally, loop over all elements
in nbuf_ppdu_desc_list instead of only checking once.

Change-Id: If9aed3c7c97354d912923ca25c8c52f1db27dac1
CRs-Fixed: 2620672
2020-02-20 19:34:59 -08:00
Linux Build Service Account
7732480801 Merge "qca-wifi: Add 6GHz support for chan/freq/band usage in mesh mode" 2020-02-20 11:09:38 -08:00
Linux Build Service Account
b402abfe62 Merge "qca-wifi: Fix tx capture RTS/CTS send before mgmt frame" 2020-02-19 23:46:41 -08:00
Amit Shukla
dacd2d5bb6 qca-wifi: Fix for incorrect channel frequency in radio tap
Channel frequency was shown as 0 in radio tap header for
tx capture feature.

Change-Id: Iae60770e59603a1d6056be649178fcdee26c1455
CRs-Fixed: 2621057
2020-02-18 21:51:19 -08:00
nobelj
a503717b9c qca-wifi: Support mgmt packet filter based on mac address
tx capture mgmt packet peer filter are filtered
based on RA mac address.

Change-Id: Ib5a5b4d6fc8170e711127e3d15b4389330da9f11
2020-02-13 22:45:38 -08:00
Karunakar Dasineni
f7e9e55e85 qca-wifi: Support HW generated CTS in Tx capture
Generate CTS frames when RTS is received for Tx capture.

Change-Id: I18facb952bbdc3f34fd2403806b7cd5c9c6f18d4
2020-02-11 10:24:47 -08:00
nobelj
2127b951ec qca-wifi: Fix tx capture RTS/CTS send before mgmt frame
FW set mprot_type in NDPA frame as all ping request is a sound + steer.
check mprot type in mgmt frame and send dummy rts and cts.

Change-Id: I0f275c57e254117e06cb17173f4ae4b65f0e07aa
2020-02-07 15:36:02 -08:00
Aditya Sathish
190c110b59 qca-wifi: Add 6GHz support for chan/freq/band usage in mesh mode
Currently mesh mode uses channel numbering scheme which is derived
from APIs which don't support 6GHz channel numbering. This is
important because the channel numbers for 6GHz are overloaded with
those in the 2.4GHz and 5GHz band.

Add support to obtain the correct channel number (and auxiliary
information like band and frequency) through the new APIs that
support 6GHz.

Change-Id: I60afa5294af5e5681974f1bbc45c9e008eda1232
CRs-Fixed: 2605229
2020-02-05 02:04:27 -08:00
Ruben Columbus
11ec57d57b qca-wifi: support for rx ack recreation frame for tx failed frames
rx ack does not get created for tx failed frames.
this is done with a check for completion status on the previous frame.

Change-Id: Idfff8aa8165542bb2ca2cf1370a201ccb057997e
2020-02-04 13:09:24 -08:00
Linux Build Service Account
c339a0ffb2 Merge "qca-wifi: fix the issue in block ack/ack for tx capture mode" 2020-01-28 19:39:18 -08:00
Linux Build Service Account
e0a5418db2 Merge "qca-wifi: N -1 probe response retry count fix" 2020-01-28 19:39:17 -08:00
Linux Build Service Account
49bc88672c Merge "qca-wifi: legacy rx ack frames generation" 2020-01-24 09:42:18 -08:00
Kai Chen
b49539b149 qca-wifi: fix the issue in block ack/ack for tx capture mode
1. Hanndle BAR frame.
2. set rate for ACK frame.
3. Check block ack session and use block ack if block
ack session is established.
4. no ACK for broadcast probe request.
5. no ack if the ack policy is set to no ack in qos control.

Change-Id: Id42b0e95fc7ea043d35c8d7d5686f15140acdea6
2020-01-23 17:41:41 -08:00
Linux Build Service Account
f5915b72b4 Merge "qca-wifi: dequeue peer tid queue on flush tlv and fix out of bound crash" 2020-01-23 10:29:31 -08:00