.. | .. |
---|
8 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
---|
9 | 9 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
---|
10 | 10 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
---|
| 11 | + * Copyright(c) 2018 - 2020 Intel Corporation |
---|
11 | 12 | * |
---|
12 | 13 | * This program is free software; you can redistribute it and/or modify |
---|
13 | 14 | * it under the terms of version 2 of the GNU General Public License as |
---|
.. | .. |
---|
30 | 31 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
---|
31 | 32 | * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH |
---|
32 | 33 | * Copyright(c) 2016 - 2017 Intel Deutschland GmbH |
---|
| 34 | + * Copyright(c) 2018 - 2020 Intel Corporation |
---|
33 | 35 | * All rights reserved. |
---|
34 | 36 | * |
---|
35 | 37 | * Redistribution and use in source and binary forms, with or without |
---|
.. | .. |
---|
318 | 320 | } __packed; /* MAC_TIME_EVENT_NTFY_API_S_VER_1 */ |
---|
319 | 321 | |
---|
320 | 322 | /* |
---|
| 323 | + * struct iwl_hs20_roc_req_tail - tail of iwl_hs20_roc_req |
---|
| 324 | + * |
---|
| 325 | + * @node_addr: Our MAC Address |
---|
| 326 | + * @reserved: reserved for alignment |
---|
| 327 | + * @apply_time: GP2 value to start (should always be the current GP2 value) |
---|
| 328 | + * @apply_time_max_delay: Maximum apply time delay value in TU. Defines max |
---|
| 329 | + * time by which start of the event is allowed to be postponed. |
---|
| 330 | + * @duration: event duration in TU To calculate event duration: |
---|
| 331 | + * timeEventDuration = min(duration, remainingQuota) |
---|
| 332 | + */ |
---|
| 333 | +struct iwl_hs20_roc_req_tail { |
---|
| 334 | + u8 node_addr[ETH_ALEN]; |
---|
| 335 | + __le16 reserved; |
---|
| 336 | + __le32 apply_time; |
---|
| 337 | + __le32 apply_time_max_delay; |
---|
| 338 | + __le32 duration; |
---|
| 339 | +} __packed; |
---|
| 340 | + |
---|
| 341 | +/* |
---|
321 | 342 | * Aux ROC command |
---|
322 | 343 | * |
---|
323 | 344 | * Command requests the firmware to create a time event for a certain duration |
---|
.. | .. |
---|
336 | 357 | * @sta_id_and_color: station id and color, resumed during "Remain On Channel" |
---|
337 | 358 | * activity. |
---|
338 | 359 | * @channel_info: channel info |
---|
339 | | - * @node_addr: Our MAC Address |
---|
340 | | - * @reserved: reserved for alignment |
---|
341 | | - * @apply_time: GP2 value to start (should always be the current GP2 value) |
---|
342 | | - * @apply_time_max_delay: Maximum apply time delay value in TU. Defines max |
---|
343 | | - * time by which start of the event is allowed to be postponed. |
---|
344 | | - * @duration: event duration in TU To calculate event duration: |
---|
345 | | - * timeEventDuration = min(duration, remainingQuota) |
---|
346 | 360 | */ |
---|
347 | 361 | struct iwl_hs20_roc_req { |
---|
348 | 362 | /* COMMON_INDEX_HDR_API_S_VER_1 hdr */ |
---|
.. | .. |
---|
351 | 365 | __le32 event_unique_id; |
---|
352 | 366 | __le32 sta_id_and_color; |
---|
353 | 367 | struct iwl_fw_channel_info channel_info; |
---|
354 | | - u8 node_addr[ETH_ALEN]; |
---|
355 | | - __le16 reserved; |
---|
356 | | - __le32 apply_time; |
---|
357 | | - __le32 apply_time_max_delay; |
---|
358 | | - __le32 duration; |
---|
| 368 | + struct iwl_hs20_roc_req_tail tail; |
---|
359 | 369 | } __packed; /* HOT_SPOT_CMD_API_S_VER_1 */ |
---|
360 | 370 | |
---|
361 | 371 | /* |
---|
.. | .. |
---|
383 | 393 | __le32 status; |
---|
384 | 394 | } __packed; /* HOT_SPOT_RSP_API_S_VER_1 */ |
---|
385 | 395 | |
---|
| 396 | +/** |
---|
| 397 | + * enum iwl_mvm_session_prot_conf_id - session protection's configurations |
---|
| 398 | + * @SESSION_PROTECT_CONF_ASSOC: Start a session protection for association. |
---|
| 399 | + * The firmware will allocate two events. |
---|
| 400 | + * Valid for BSS_STA and P2P_STA. |
---|
| 401 | + * * A rather short event that can't be fragmented and with a very |
---|
| 402 | + * high priority. If every goes well (99% of the cases) the |
---|
| 403 | + * association should complete within this first event. During |
---|
| 404 | + * that event, no other activity will happen in the firmware, |
---|
| 405 | + * which is why it can't be too long. |
---|
| 406 | + * The length of this event is hard-coded in the firmware: 300TUs. |
---|
| 407 | + * * Another event which can be much longer (it's duration is |
---|
| 408 | + * configurable by the driver) which has a slightly lower |
---|
| 409 | + * priority and that can be fragmented allowing other activities |
---|
| 410 | + * to run while this event is running. |
---|
| 411 | + * The firmware will automatically remove both events once the driver sets |
---|
| 412 | + * the BSS MAC as associated. Neither of the events will be removed |
---|
| 413 | + * for the P2P_STA MAC. |
---|
| 414 | + * Only the duration is configurable for this protection. |
---|
| 415 | + * @SESSION_PROTECT_CONF_GO_CLIENT_ASSOC: not used |
---|
| 416 | + * @SESSION_PROTECT_CONF_P2P_DEVICE_DISCOV: Schedule the P2P Device to be in |
---|
| 417 | + * listen mode. Will be fragmented. Valid only on the P2P Device MAC. |
---|
| 418 | + * Valid only on the P2P Device MAC. The firmware will take into account |
---|
| 419 | + * the duration, the interval and the repetition count. |
---|
| 420 | + * @SESSION_PROTECT_CONF_P2P_GO_NEGOTIATION: Schedule the P2P Device to be be |
---|
| 421 | + * able to run the GO Negotiation. Will not be fragmented and not |
---|
| 422 | + * repetitive. Valid only on the P2P Device MAC. Only the duration will |
---|
| 423 | + * be taken into account. |
---|
| 424 | + * @SESSION_PROTECT_CONF_MAX_ID: not used |
---|
| 425 | + */ |
---|
| 426 | +enum iwl_mvm_session_prot_conf_id { |
---|
| 427 | + SESSION_PROTECT_CONF_ASSOC, |
---|
| 428 | + SESSION_PROTECT_CONF_GO_CLIENT_ASSOC, |
---|
| 429 | + SESSION_PROTECT_CONF_P2P_DEVICE_DISCOV, |
---|
| 430 | + SESSION_PROTECT_CONF_P2P_GO_NEGOTIATION, |
---|
| 431 | + SESSION_PROTECT_CONF_MAX_ID, |
---|
| 432 | +}; /* SESSION_PROTECTION_CONF_ID_E_VER_1 */ |
---|
| 433 | + |
---|
| 434 | +/** |
---|
| 435 | + * struct iwl_mvm_session_prot_cmd - configure a session protection |
---|
| 436 | + * @id_and_color: the id and color of the mac for which this session protection |
---|
| 437 | + * is sent |
---|
| 438 | + * @action: can be either FW_CTXT_ACTION_ADD or FW_CTXT_ACTION_REMOVE |
---|
| 439 | + * @conf_id: see &enum iwl_mvm_session_prot_conf_id |
---|
| 440 | + * @duration_tu: the duration of the whole protection in TUs. |
---|
| 441 | + * @repetition_count: not used |
---|
| 442 | + * @interval: not used |
---|
| 443 | + * |
---|
| 444 | + * Note: the session protection will always be scheduled to start as |
---|
| 445 | + * early as possible, but the maximum delay is configuration dependent. |
---|
| 446 | + * The firmware supports only one concurrent session protection per vif. |
---|
| 447 | + * Adding a new session protection will remove any currently running session. |
---|
| 448 | + */ |
---|
| 449 | +struct iwl_mvm_session_prot_cmd { |
---|
| 450 | + /* COMMON_INDEX_HDR_API_S_VER_1 hdr */ |
---|
| 451 | + __le32 id_and_color; |
---|
| 452 | + __le32 action; |
---|
| 453 | + __le32 conf_id; |
---|
| 454 | + __le32 duration_tu; |
---|
| 455 | + __le32 repetition_count; |
---|
| 456 | + __le32 interval; |
---|
| 457 | +} __packed; /* SESSION_PROTECTION_CMD_API_S_VER_1 */ |
---|
| 458 | + |
---|
| 459 | +/** |
---|
| 460 | + * struct iwl_mvm_session_prot_notif - session protection started / ended |
---|
| 461 | + * @mac_id: the mac id for which the session protection started / ended |
---|
| 462 | + * @status: 1 means success, 0 means failure |
---|
| 463 | + * @start: 1 means the session protection started, 0 means it ended |
---|
| 464 | + * @conf_id: see &enum iwl_mvm_session_prot_conf_id |
---|
| 465 | + * |
---|
| 466 | + * Note that any session protection will always get two notifications: start |
---|
| 467 | + * and end even the firmware could not schedule it. |
---|
| 468 | + */ |
---|
| 469 | +struct iwl_mvm_session_prot_notif { |
---|
| 470 | + __le32 mac_id; |
---|
| 471 | + __le32 status; |
---|
| 472 | + __le32 start; |
---|
| 473 | + __le32 conf_id; |
---|
| 474 | +} __packed; /* SESSION_PROTECTION_NOTIFICATION_API_S_VER_2 */ |
---|
| 475 | + |
---|
386 | 476 | #endif /* __iwl_fw_api_time_event_h__ */ |
---|