Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 1 | /* |
Rakshith Suresh Patkar | d31f1e5 | 2019-05-09 13:25:00 +0530 | [diff] [blame] | 2 | * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved. |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 3 | * |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 4 | * Permission to use, copy, modify, and/or distribute this software for |
| 5 | * any purpose with or without fee is hereby granted, provided that the |
| 6 | * above copyright notice and this permission notice appear in all |
| 7 | * copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 10 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 11 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 12 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 13 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 14 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 15 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 16 | * PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 19 | #ifndef _WDI_EVENT_H_ |
| 20 | #define _WDI_EVENT_H_ |
| 21 | |
| 22 | #include "athdefs.h" |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 23 | #include "qdf_nbuf.h" |
Rakshith Suresh Patkar | d31f1e5 | 2019-05-09 13:25:00 +0530 | [diff] [blame] | 24 | #include <cdp_txrx_stats_struct.h> |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 25 | |
Venkata Sharath Chandra Manchala | 1240fc7 | 2017-10-26 17:32:29 -0700 | [diff] [blame] | 26 | #define WDI_NO_VAL (-1) |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 27 | |
| 28 | struct wdi_event_rx_peer_invalid_msg { |
Nirav Shah | cbc6d72 | 2016-03-01 16:24:53 +0530 | [diff] [blame] | 29 | qdf_nbuf_t msdu; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 30 | struct ieee80211_frame *wh; |
| 31 | uint8_t vdev_id; |
| 32 | }; |
| 33 | |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 34 | #define WDI_EVENT_NOTIFY_BASE 0x200 |
| 35 | enum WDI_EVENT_NOTIFY { |
| 36 | WDI_EVENT_SUB_DEALLOCATE = WDI_EVENT_NOTIFY_BASE, |
| 37 | /* End of new notification types */ |
| 38 | |
| 39 | WDI_EVENT_NOTIFY_LAST |
| 40 | }; |
| 41 | |
| 42 | /* Opaque event callback */ |
Venkata Sharath Chandra Manchala | 1240fc7 | 2017-10-26 17:32:29 -0700 | [diff] [blame] | 43 | typedef void (*wdi_event_cb)(void *pdev, enum WDI_EVENT event, void *data, |
| 44 | u_int16_t peer_id, uint32_t status); |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 45 | |
| 46 | /* Opaque event notify */ |
| 47 | typedef void (*wdi_event_notify)(enum WDI_EVENT_NOTIFY notify, |
| 48 | enum WDI_EVENT event); |
| 49 | |
| 50 | /** |
| 51 | * @typedef wdi_event_subscribe |
| 52 | * @brief Used by consumers to subscribe to WDI event notifications. |
| 53 | * @details |
| 54 | * The event_subscribe struct includes pointers to other event_subscribe |
| 55 | * objects. These pointers are simply to simplify the management of |
| 56 | * lists of event subscribers. These pointers are set during the |
| 57 | * event_sub() function, and shall not be modified except by the |
| 58 | * WDI event management SW, until after the object's event subscription |
| 59 | * is canceled by calling event_unsub(). |
| 60 | */ |
| 61 | |
| 62 | typedef struct wdi_event_subscribe_t { |
Yun Park | 196641d | 2017-04-06 22:29:34 -0700 | [diff] [blame] | 63 | /* subscriber event callback structure head */ |
| 64 | wdi_event_cb callback; |
| 65 | /* subscriber object that processes the event callback */ |
| 66 | void *context; |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 67 | struct { |
Yun Park | 196641d | 2017-04-06 22:29:34 -0700 | [diff] [blame] | 68 | /* |
| 69 | * private - the event subscriber SW shall not use this struct |
| 70 | */ |
Prakash Dhavali | 7090c5f | 2015-11-02 17:55:19 -0800 | [diff] [blame] | 71 | struct wdi_event_subscribe_t *next; |
| 72 | struct wdi_event_subscribe_t *prev; |
| 73 | } priv; |
| 74 | } wdi_event_subscribe; |
| 75 | |
| 76 | #endif |