Pekka Enberg | cc18071 | 2008-10-30 16:14:35 +0200 | [diff] [blame] | 1 | #ifndef __WINBOND_CORE_H |
| 2 | #define __WINBOND_CORE_H |
| 3 | |
Pekka Enberg | 3c09386 | 2010-09-19 12:28:41 +0300 | [diff] [blame^] | 4 | #include <linux/spinlock.h> |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 5 | #include <linux/wireless.h> |
Pekka Enberg | 3c09386 | 2010-09-19 12:28:41 +0300 | [diff] [blame^] | 6 | #include <linux/types.h> |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 7 | |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 8 | #include "wbhal_s.h" |
Pekka Enberg | 64328c8 | 2009-01-07 17:33:45 +0200 | [diff] [blame] | 9 | #include "mto.h" |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 10 | |
Pekka Enberg | 3c09386 | 2010-09-19 12:28:41 +0300 | [diff] [blame^] | 11 | #include "mac_structures.h" |
| 12 | #include "mds_s.h" |
| 13 | |
| 14 | #define MAX_NUM_TX_MMPDU 2 |
| 15 | #define MAX_MMPDU_SIZE 1512 |
| 16 | #define MAX_NUM_RX_MMPDU 6 |
| 17 | |
| 18 | struct mlme_frame { |
| 19 | s8 *pMMPDU; |
| 20 | u16 len; |
| 21 | u8 DataType; |
| 22 | u8 IsInUsed; |
| 23 | |
| 24 | spinlock_t MLMESpinLock; |
| 25 | |
| 26 | u8 TxMMPDU[MAX_NUM_TX_MMPDU][MAX_MMPDU_SIZE]; |
| 27 | u8 TxMMPDUInUse[(MAX_NUM_TX_MMPDU + 3) & ~0x03]; |
| 28 | |
| 29 | u16 wNumTxMMPDU; |
| 30 | u16 wNumTxMMPDUDiscarded; |
| 31 | |
| 32 | u8 RxMMPDU[MAX_NUM_RX_MMPDU][MAX_MMPDU_SIZE]; |
| 33 | u8 SaveRxBufSlotInUse[(MAX_NUM_RX_MMPDU + 3) & ~0x03]; |
| 34 | |
| 35 | u16 wNumRxMMPDU; |
| 36 | u16 wNumRxMMPDUDiscarded; |
| 37 | |
| 38 | u16 wNumRxMMPDUInMLME; /* Number of the Rx MMPDU */ |
| 39 | u16 reserved_1; /* in MLME. */ |
| 40 | /* excluding the discarded */ |
| 41 | }; |
| 42 | |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 43 | #define WBLINUX_PACKET_ARRAY_SIZE (ETHERNET_TX_DESCRIPTORS*4) |
| 44 | |
| 45 | #define WB_MAX_LINK_NAME_LEN 40 |
Pekka Enberg | cc18071 | 2008-10-30 16:14:35 +0200 | [diff] [blame] | 46 | |
| 47 | struct wbsoft_priv { |
Ruslan Pisarev | 5dcf8f6 | 2010-03-20 15:37:21 +0200 | [diff] [blame] | 48 | u32 adapterIndex; /* 20060703.4 Add for using padapterContext |
| 49 | global adapter point */ |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 50 | |
Ruslan Pisarev | 5dcf8f6 | 2010-03-20 15:37:21 +0200 | [diff] [blame] | 51 | struct wb_local_para sLocalPara; /* Myself connected |
| 52 | parameters */ |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 53 | |
Pekka Enberg | c4d562a | 2010-09-19 12:28:38 +0300 | [diff] [blame] | 54 | struct mlme_frame sMlmeFrame; /* connect to peerSTA parameters */ |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 55 | |
Ruslan Pisarev | 5dcf8f6 | 2010-03-20 15:37:21 +0200 | [diff] [blame] | 56 | struct wb35_mto_params sMtoPara; /* MTO_struct ... */ |
| 57 | struct hw_data sHwData; /*For HAL */ |
Pekka Enberg | b7caf94 | 2009-08-12 11:03:33 +0300 | [diff] [blame] | 58 | struct wb35_mds Mds; |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 59 | |
| 60 | spinlock_t SpinLock; |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 61 | |
| 62 | atomic_t ThreadCount; |
| 63 | |
| 64 | u32 RxByteCount; |
| 65 | u32 TxByteCount; |
| 66 | |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 67 | struct sk_buff *packet_return; |
Ruslan Pisarev | 5dcf8f6 | 2010-03-20 15:37:21 +0200 | [diff] [blame] | 68 | s32 netif_state_stop; /* 1: stop 0: normal */ |
Pekka Enberg | 1e8a2b6 | 2008-10-30 16:14:38 +0200 | [diff] [blame] | 69 | struct iw_statistics iw_stats; |
| 70 | |
| 71 | u8 LinkName[WB_MAX_LINK_NAME_LEN]; |
Pekka Enberg | c930e0c0 | 2008-10-30 18:12:04 +0200 | [diff] [blame] | 72 | |
| 73 | bool enabled; |
Pekka Enberg | cc18071 | 2008-10-30 16:14:35 +0200 | [diff] [blame] | 74 | }; |
| 75 | |
| 76 | #endif /* __WINBOND_CORE_H */ |