@@ -64,7 +64,8 @@ enum hwsim_tx_control_flags {
64
64
* @HWSIM_CMD_TX_INFO_FRAME: Transmission info report from user space to
65
65
* kernel, uses:
66
66
* %HWSIM_ATTR_ADDR_TRANSMITTER, %HWSIM_ATTR_FLAGS,
67
- * %HWSIM_ATTR_TX_INFO, %HWSIM_ATTR_SIGNAL, %HWSIM_ATTR_COOKIE
67
+ * %HWSIM_ATTR_TX_INFO, %WSIM_ATTR_TX_INFO_FLAGS,
68
+ * %HWSIM_ATTR_SIGNAL, %HWSIM_ATTR_COOKIE
68
69
* @HWSIM_CMD_NEW_RADIO: create a new radio with the given parameters,
69
70
* returns the radio ID (>= 0) or negative on errors, if successful
70
71
* then multicast the result
@@ -123,6 +124,8 @@ enum {
123
124
* @HWSIM_ATTR_RADIO_NAME: Name of radio, e.g. phy666
124
125
* @HWSIM_ATTR_NO_VIF: Do not create vif (wlanX) when creating radio.
125
126
* @HWSIM_ATTR_FREQ: Frequency at which packet is transmitted or received.
127
+ * @HWSIM_ATTR_TX_INFO_FLAGS: additional flags for corresponding
128
+ * rates of %HWSIM_ATTR_TX_INFO
126
129
* @__HWSIM_ATTR_MAX: enum limit
127
130
*/
128
131
@@ -149,6 +152,7 @@ enum {
149
152
HWSIM_ATTR_NO_VIF ,
150
153
HWSIM_ATTR_FREQ ,
151
154
HWSIM_ATTR_PAD ,
155
+ HWSIM_ATTR_TX_INFO_FLAGS ,
152
156
__HWSIM_ATTR_MAX ,
153
157
};
154
158
#define HWSIM_ATTR_MAX (__HWSIM_ATTR_MAX - 1)
@@ -171,4 +175,66 @@ struct hwsim_tx_rate {
171
175
u8 count ;
172
176
} __packed ;
173
177
178
+ /**
179
+ * enum hwsim_tx_rate_flags - per-rate flags set by the rate control algorithm.
180
+ * Inspired by structure mac80211_rate_control_flags. New flags may be
181
+ * appended, but old flags not deleted, to keep compatibility for
182
+ * userspace.
183
+ *
184
+ * These flags are set by the Rate control algorithm for each rate during tx,
185
+ * in the @flags member of struct ieee80211_tx_rate.
186
+ *
187
+ * @MAC80211_HWSIM_TX_RC_USE_RTS_CTS: Use RTS/CTS exchange for this rate.
188
+ * @MAC80211_HWSIM_TX_RC_USE_CTS_PROTECT: CTS-to-self protection is required.
189
+ * This is set if the current BSS requires ERP protection.
190
+ * @MAC80211_HWSIM_TX_RC_USE_SHORT_PREAMBLE: Use short preamble.
191
+ * @MAC80211_HWSIM_TX_RC_MCS: HT rate.
192
+ * @MAC80211_HWSIM_TX_RC_VHT_MCS: VHT MCS rate, in this case the idx field is
193
+ * split into a higher 4 bits (Nss) and lower 4 bits (MCS number)
194
+ * @MAC80211_HWSIM_TX_RC_GREEN_FIELD: Indicates whether this rate should be used
195
+ * in Greenfield mode.
196
+ * @MAC80211_HWSIM_TX_RC_40_MHZ_WIDTH: Indicates if the Channel Width should be
197
+ * 40 MHz.
198
+ * @MAC80211_HWSIM_TX_RC_80_MHZ_WIDTH: Indicates 80 MHz transmission
199
+ * @MAC80211_HWSIM_TX_RC_160_MHZ_WIDTH: Indicates 160 MHz transmission
200
+ * (80+80 isn't supported yet)
201
+ * @MAC80211_HWSIM_TX_RC_DUP_DATA: The frame should be transmitted on both of
202
+ * the adjacent 20 MHz channels, if the current channel type is
203
+ * NL80211_CHAN_HT40MINUS or NL80211_CHAN_HT40PLUS.
204
+ * @MAC80211_HWSIM_TX_RC_SHORT_GI: Short Guard interval should be used for this
205
+ * rate.
206
+ */
207
+ enum hwsim_tx_rate_flags {
208
+ MAC80211_HWSIM_TX_RC_USE_RTS_CTS = BIT (0 ),
209
+ MAC80211_HWSIM_TX_RC_USE_CTS_PROTECT = BIT (1 ),
210
+ MAC80211_HWSIM_TX_RC_USE_SHORT_PREAMBLE = BIT (2 ),
211
+
212
+ /* rate index is an HT/VHT MCS instead of an index */
213
+ MAC80211_HWSIM_TX_RC_MCS = BIT (3 ),
214
+ MAC80211_HWSIM_TX_RC_GREEN_FIELD = BIT (4 ),
215
+ MAC80211_HWSIM_TX_RC_40_MHZ_WIDTH = BIT (5 ),
216
+ MAC80211_HWSIM_TX_RC_DUP_DATA = BIT (6 ),
217
+ MAC80211_HWSIM_TX_RC_SHORT_GI = BIT (7 ),
218
+ MAC80211_HWSIM_TX_RC_VHT_MCS = BIT (8 ),
219
+ MAC80211_HWSIM_TX_RC_80_MHZ_WIDTH = BIT (9 ),
220
+ MAC80211_HWSIM_TX_RC_160_MHZ_WIDTH = BIT (10 ),
221
+ };
222
+
223
+ /**
224
+ * struct hwsim_tx_rate - rate selection/status
225
+ *
226
+ * @idx: rate index to attempt to send with
227
+ * @count: number of tries in this rate before going to the next rate
228
+ *
229
+ * A value of -1 for @idx indicates an invalid rate and, if used
230
+ * in an array of retry rates, that no more rates should be tried.
231
+ *
232
+ * When used for transmit status reporting, the driver should
233
+ * always report the rate and number of retries used.
234
+ *
235
+ */
236
+ struct hwsim_tx_rate_flag {
237
+ s8 idx ;
238
+ u16 flags ;
239
+ } __packed ;
174
240
#endif /* __MAC80211_HWSIM_H */
0 commit comments