| .. | .. |
|---|
| 1 | | -// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. |
|---|
| 4 | 4 | * All rights reserved. |
|---|
| .. | .. |
|---|
| 22 | 22 | |
|---|
| 23 | 23 | #define DEFAULT_MGN_LIFETIME_RES_64us 125 /* 64us */ |
|---|
| 24 | 24 | #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 |
|---|
| 25 | + |
|---|
| 26 | +/* Length, Service, and Signal fields of Phy for Tx */ |
|---|
| 27 | +struct vnt_phy_field { |
|---|
| 28 | + u8 signal; |
|---|
| 29 | + u8 service; |
|---|
| 30 | + __le16 len; |
|---|
| 31 | +} __packed; |
|---|
| 25 | 32 | |
|---|
| 26 | 33 | /* MIC HDR data header */ |
|---|
| 27 | 34 | struct vnt_mic_hdr { |
|---|
| .. | .. |
|---|
| 70 | 77 | __le16 duration_a; |
|---|
| 71 | 78 | __le16 time_stamp_off_b; |
|---|
| 72 | 79 | __le16 time_stamp_off_a; |
|---|
| 73 | | - struct ieee80211_hdr hdr; |
|---|
| 74 | | -} __packed; |
|---|
| 75 | | - |
|---|
| 76 | | -struct vnt_tx_datahead_g_fb { |
|---|
| 77 | | - struct vnt_phy_field b; |
|---|
| 78 | | - struct vnt_phy_field a; |
|---|
| 79 | | - __le16 duration_b; |
|---|
| 80 | | - __le16 duration_a; |
|---|
| 81 | | - __le16 duration_a_f0; |
|---|
| 82 | | - __le16 duration_a_f1; |
|---|
| 83 | | - __le16 time_stamp_off_b; |
|---|
| 84 | | - __le16 time_stamp_off_a; |
|---|
| 85 | | - struct ieee80211_hdr hdr; |
|---|
| 86 | 80 | } __packed; |
|---|
| 87 | 81 | |
|---|
| 88 | 82 | struct vnt_tx_datahead_ab { |
|---|
| 89 | 83 | struct vnt_phy_field ab; |
|---|
| 90 | 84 | __le16 duration; |
|---|
| 91 | 85 | __le16 time_stamp_off; |
|---|
| 92 | | - struct ieee80211_hdr hdr; |
|---|
| 93 | | -} __packed; |
|---|
| 94 | | - |
|---|
| 95 | | -struct vnt_tx_datahead_a_fb { |
|---|
| 96 | | - struct vnt_phy_field a; |
|---|
| 97 | | - __le16 duration; |
|---|
| 98 | | - __le16 time_stamp_off; |
|---|
| 99 | | - __le16 duration_f0; |
|---|
| 100 | | - __le16 duration_f1; |
|---|
| 101 | | - struct ieee80211_hdr hdr; |
|---|
| 102 | 86 | } __packed; |
|---|
| 103 | 87 | |
|---|
| 104 | 88 | /* RTS buffer header */ |
|---|
| .. | .. |
|---|
| 113 | 97 | struct vnt_tx_datahead_g data_head; |
|---|
| 114 | 98 | } __packed; |
|---|
| 115 | 99 | |
|---|
| 116 | | -struct vnt_rts_g_fb { |
|---|
| 117 | | - struct vnt_phy_field b; |
|---|
| 118 | | - struct vnt_phy_field a; |
|---|
| 119 | | - __le16 duration_ba; |
|---|
| 120 | | - __le16 duration_aa; |
|---|
| 121 | | - __le16 duration_bb; |
|---|
| 122 | | - u16 wReserved; |
|---|
| 123 | | - __le16 rts_duration_ba_f0; |
|---|
| 124 | | - __le16 rts_duration_aa_f0; |
|---|
| 125 | | - __le16 rts_duration_ba_f1; |
|---|
| 126 | | - __le16 rts_duration_aa_f1; |
|---|
| 127 | | - struct ieee80211_rts data; |
|---|
| 128 | | - struct vnt_tx_datahead_g_fb data_head; |
|---|
| 129 | | -} __packed; |
|---|
| 130 | | - |
|---|
| 131 | 100 | struct vnt_rts_ab { |
|---|
| 132 | 101 | struct vnt_phy_field ab; |
|---|
| 133 | 102 | __le16 duration; |
|---|
| 134 | 103 | u16 wReserved; |
|---|
| 135 | 104 | struct ieee80211_rts data; |
|---|
| 136 | 105 | struct vnt_tx_datahead_ab data_head; |
|---|
| 137 | | -} __packed; |
|---|
| 138 | | - |
|---|
| 139 | | -struct vnt_rts_a_fb { |
|---|
| 140 | | - struct vnt_phy_field a; |
|---|
| 141 | | - __le16 duration; |
|---|
| 142 | | - u16 wReserved; |
|---|
| 143 | | - __le16 rts_duration_f0; |
|---|
| 144 | | - __le16 rts_duration_f1; |
|---|
| 145 | | - struct ieee80211_rts data; |
|---|
| 146 | | - struct vnt_tx_datahead_a_fb data_head; |
|---|
| 147 | 106 | } __packed; |
|---|
| 148 | 107 | |
|---|
| 149 | 108 | /* CTS buffer header */ |
|---|
| .. | .. |
|---|
| 156 | 115 | struct vnt_tx_datahead_g data_head; |
|---|
| 157 | 116 | } __packed; |
|---|
| 158 | 117 | |
|---|
| 159 | | -struct vnt_cts_fb { |
|---|
| 160 | | - struct vnt_phy_field b; |
|---|
| 161 | | - __le16 duration_ba; |
|---|
| 162 | | - u16 wReserved; |
|---|
| 163 | | - __le16 cts_duration_ba_f0; |
|---|
| 164 | | - __le16 cts_duration_ba_f1; |
|---|
| 165 | | - struct ieee80211_cts data; |
|---|
| 166 | | - u16 reserved2; |
|---|
| 167 | | - struct vnt_tx_datahead_g_fb data_head; |
|---|
| 168 | | -} __packed; |
|---|
| 169 | | - |
|---|
| 170 | 118 | union vnt_tx_data_head { |
|---|
| 171 | 119 | /* rts g */ |
|---|
| 172 | 120 | struct vnt_rts_g rts_g; |
|---|
| 173 | | - struct vnt_rts_g_fb rts_g_fb; |
|---|
| 174 | 121 | /* rts a/b */ |
|---|
| 175 | 122 | struct vnt_rts_ab rts_ab; |
|---|
| 176 | | - struct vnt_rts_a_fb rts_a_fb; |
|---|
| 177 | 123 | /* cts g */ |
|---|
| 178 | 124 | struct vnt_cts cts_g; |
|---|
| 179 | | - struct vnt_cts_fb cts_g_fb; |
|---|
| 180 | 125 | /* no rts/cts */ |
|---|
| 181 | | - struct vnt_tx_datahead_a_fb data_head_a_fb; |
|---|
| 182 | 126 | struct vnt_tx_datahead_ab data_head_ab; |
|---|
| 183 | 127 | }; |
|---|
| 184 | 128 | |
|---|
| .. | .. |
|---|
| 216 | 160 | } __packed; |
|---|
| 217 | 161 | |
|---|
| 218 | 162 | struct vnt_tx_buffer { |
|---|
| 219 | | - u8 type; |
|---|
| 220 | | - u8 pkt_no; |
|---|
| 221 | | - __le16 tx_byte_count; |
|---|
| 222 | 163 | struct vnt_tx_fifo_head fifo_head; |
|---|
| 223 | 164 | union vnt_tx_head tx_head; |
|---|
| 224 | 165 | } __packed; |
|---|
| .. | .. |
|---|
| 229 | 170 | struct vnt_phy_field ab; |
|---|
| 230 | 171 | __le16 duration; |
|---|
| 231 | 172 | __le16 time_stamp_off; |
|---|
| 232 | | -} __packed; |
|---|
| 233 | | - |
|---|
| 234 | | -struct vnt_beacon_buffer { |
|---|
| 235 | | - u8 type; |
|---|
| 236 | | - u8 pkt_no; |
|---|
| 237 | | - __le16 tx_byte_count; |
|---|
| 238 | | - struct vnt_tx_short_buf_head short_head; |
|---|
| 239 | | - struct ieee80211_mgmt mgmt_hdr; |
|---|
| 240 | 173 | } __packed; |
|---|
| 241 | 174 | |
|---|
| 242 | 175 | int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb); |
|---|