0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef __RXTX_H__
0015 #define __RXTX_H__
0016
0017 #include "device.h"
0018 #include "wcmd.h"
0019 #include "baseband.h"
0020
0021 #define DEFAULT_MGN_LIFETIME_RES_64us 125
0022 #define DEFAULT_MSDU_LIFETIME_RES_64us 8000
0023
0024
0025 struct vnt_phy_field {
0026 u8 signal;
0027 u8 service;
0028 __le16 len;
0029 } __packed;
0030
0031
0032 struct vnt_mic_hdr {
0033 u8 id;
0034 u8 tx_priority;
0035 u8 mic_addr2[6];
0036 u8 ccmp_pn[IEEE80211_CCMP_PN_LEN];
0037 __be16 payload_len;
0038 __be16 hlen;
0039 __le16 frame_control;
0040 u8 addr1[6];
0041 u8 addr2[6];
0042 u8 addr3[6];
0043 __le16 seq_ctrl;
0044 u8 addr4[6];
0045 u16 packing;
0046 } __packed;
0047
0048
0049 struct vnt_rrv_time_rts {
0050 __le16 rts_rrv_time_ba;
0051 __le16 rts_rrv_time_aa;
0052 __le16 rts_rrv_time_bb;
0053 u16 wReserved;
0054 __le16 rrv_time_b;
0055 __le16 rrv_time_a;
0056 } __packed;
0057
0058 struct vnt_rrv_time_cts {
0059 __le16 cts_rrv_time_ba;
0060 u16 wReserved;
0061 __le16 rrv_time_b;
0062 __le16 rrv_time_a;
0063 } __packed;
0064
0065 struct vnt_rrv_time_ab {
0066 __le16 rts_rrv_time;
0067 __le16 rrv_time;
0068 } __packed;
0069
0070
0071 struct vnt_tx_datahead_g {
0072 struct vnt_phy_field b;
0073 struct vnt_phy_field a;
0074 __le16 duration_b;
0075 __le16 duration_a;
0076 __le16 time_stamp_off_b;
0077 __le16 time_stamp_off_a;
0078 } __packed;
0079
0080 struct vnt_tx_datahead_ab {
0081 struct vnt_phy_field ab;
0082 __le16 duration;
0083 __le16 time_stamp_off;
0084 } __packed;
0085
0086
0087 struct vnt_rts_g {
0088 struct vnt_phy_field b;
0089 struct vnt_phy_field a;
0090 __le16 duration_ba;
0091 __le16 duration_aa;
0092 __le16 duration_bb;
0093 u16 wReserved;
0094 struct ieee80211_rts data;
0095 struct vnt_tx_datahead_g data_head;
0096 } __packed __aligned(2);
0097
0098 struct vnt_rts_ab {
0099 struct vnt_phy_field ab;
0100 __le16 duration;
0101 u16 wReserved;
0102 struct ieee80211_rts data;
0103 struct vnt_tx_datahead_ab data_head;
0104 } __packed __aligned(2);
0105
0106
0107 struct vnt_cts {
0108 struct vnt_phy_field b;
0109 __le16 duration_ba;
0110 u16 wReserved;
0111 struct ieee80211_cts data;
0112 u16 reserved2;
0113 struct vnt_tx_datahead_g data_head;
0114 } __packed __aligned(2);
0115
0116 union vnt_tx_data_head {
0117
0118 struct vnt_rts_g rts_g;
0119
0120 struct vnt_rts_ab rts_ab;
0121
0122 struct vnt_cts cts_g;
0123
0124 struct vnt_tx_datahead_ab data_head_ab;
0125 };
0126
0127 struct vnt_tx_mic_hdr {
0128 struct vnt_mic_hdr hdr;
0129 union vnt_tx_data_head head;
0130 } __packed;
0131
0132 union vnt_tx {
0133 struct vnt_tx_mic_hdr mic;
0134 union vnt_tx_data_head head;
0135 };
0136
0137 union vnt_tx_head {
0138 struct {
0139 struct vnt_rrv_time_rts rts;
0140 union vnt_tx tx;
0141 } __packed tx_rts;
0142 struct {
0143 struct vnt_rrv_time_cts cts;
0144 union vnt_tx tx;
0145 } __packed tx_cts;
0146 struct {
0147 struct vnt_rrv_time_ab ab;
0148 union vnt_tx tx;
0149 } __packed tx_ab;
0150 };
0151
0152 struct vnt_tx_fifo_head {
0153 u8 tx_key[WLAN_KEY_LEN_CCMP];
0154 __le16 fifo_ctl;
0155 __le16 time_stamp;
0156 __le16 frag_ctl;
0157 __le16 current_rate;
0158 } __packed;
0159
0160 struct vnt_tx_buffer {
0161 struct vnt_tx_fifo_head fifo_head;
0162 union vnt_tx_head tx_head;
0163 } __packed;
0164
0165 struct vnt_tx_short_buf_head {
0166 __le16 fifo_ctl;
0167 u16 time_stamp;
0168 struct vnt_phy_field ab;
0169 __le16 duration;
0170 __le16 time_stamp_off;
0171 } __packed;
0172
0173 int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb);
0174 int vnt_beacon_make(struct vnt_private *priv, struct ieee80211_vif *vif);
0175 int vnt_beacon_enable(struct vnt_private *priv, struct ieee80211_vif *vif,
0176 struct ieee80211_bss_conf *conf);
0177
0178 #endif