-
Notifications
You must be signed in to change notification settings - Fork 2
/
lmac_msg.h
1979 lines (1816 loc) · 56.7 KB
/
lmac_msg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
****************************************************************************************
*
* @file lmac_msg.h
*
* @brief Main definitions for message exchanges with LMAC
*
* Copyright (C) BouffaloLab 2017-2018
*
****************************************************************************************
*/
#ifndef LMAC_MSG_H_
#define LMAC_MSG_H_
/*
* INCLUDE FILES
****************************************************************************************
*/
// for MAC related elements (mac_addr, mac_ssid...)
#include "lmac_types.h"
#include "lmac_mac.h"
/*
****************************************************************************************
*/
/////////////////////////////////////////////////////////////////////////////////
// COMMUNICATION WITH LMAC LAYER
/////////////////////////////////////////////////////////////////////////////////
/* Task identifiers for communication between LMAC and DRIVER */
enum
{
TASK_NONE = (u8_l) -1,
// MAC Management task.
TASK_MM = 0,
// DEBUG task
TASK_DBG,
/// SCAN task
TASK_SCAN,
/// TDLS task
TASK_TDLS,
/// SCANU task
TASK_SCANU,
/// ME task
TASK_ME,
/// SM task
TASK_SM,
/// APM task
TASK_APM,
/// BAM task
TASK_BAM,
/// MESH task
TASK_MESH,
/// RXU task
TASK_RXU,
// This is used to define the last task that is running on the EMB processor
TASK_LAST_EMB = TASK_RXU,
// nX API task
TASK_API,
TASK_MAX,
};
/// For MAC HW States copied from "hal_machw.h"
enum
{
/// MAC HW IDLE State.
HW_IDLE = 0,
/// MAC HW RESERVED State.
HW_RESERVED,
/// MAC HW DOZE State.
HW_DOZE,
/// MAC HW ACTIVE State.
HW_ACTIVE
};
/// Power Save mode setting
enum mm_ps_mode_state
{
MM_PS_MODE_OFF,
MM_PS_MODE_ON,
MM_PS_MODE_ON_DYN,
};
/// Status/error codes used in the MAC software.
enum
{
CO_OK,
CO_FAIL,
CO_EMPTY,
CO_FULL,
CO_BAD_PARAM,
CO_NOT_FOUND,
CO_NO_MORE_ELT_AVAILABLE,
CO_NO_ELT_IN_USE,
CO_BUSY,
CO_OP_IN_PROGRESS,
};
/// Remain on channel operation codes
enum mm_remain_on_channel_op
{
MM_ROC_OP_START = 0,
MM_ROC_OP_CANCEL,
};
#define DRV_TASK_ID 100
/// Message Identifier. The number of messages is limited to 0xFFFF.
/// The message ID is divided in two parts:
/// - bits[15..10] : task index (no more than 64 tasks supported).
/// - bits[9..0] : message index (no more that 1024 messages per task).
typedef u16 lmac_msg_type_t;
typedef u16 lmac_msg_len_t;
typedef u16 lmac_msg_id_t;
typedef u16 lmac_task_id_t;
/// Build the first message ID of a task.
#define LMAC_FIRST_MSG(task) ((lmac_msg_id_t)((task) << 10))
#define MSG_T(msg) ((lmac_task_id_t)((msg) >> 10))
#define MSG_I(msg) ((msg) & ((1<<10)-1))
struct sdio_hdr
{
u16 len;
u16 type;
u16 queue_idx;
u16 reserved;
}__packed;
/// Message structure.
struct lmac_msg
{
struct sdio_hdr sdio_hdr;
lmac_msg_id_t id; ///< Message id.
lmac_task_id_t dest_id; ///< Destination kernel identifier.
lmac_task_id_t src_id; ///< Source kernel identifier.
u16 param_len; ///< Parameter embedded struct length.
u8 param[]; ///< Parameter embedded struct. Must be word-aligned.
};
enum lmac_msg_type
{
BL_TYPE_MSG,
BL_TYPE_ACK,
BL_TYPE_DBG,
BL_TYPE_DATA,
BL_TYPE_TXCFM,
BL_TYPE_AGG_REORD_MSG,
BL_TYPE_DBG_DUMP_START,
BL_TYPE_DBG_DUMP_END,
BL_TYPE_DBG_LA_TRACE,
BL_TYPE_DBG_RHD_DESC,
BL_TYPE_DBG_RBD_DESC,
BL_TYPE_DBG_TX_DESC,
BL_TYPE_DUMP_INFO,
BL_TYPE_TX_STOP,
BL_TYPE_TX_RESUME,
BL_TYPE_MAX,
};
/// List of messages related to the task.
enum mm_msg_tag
{
/// RESET Request.
MM_RESET_REQ = LMAC_FIRST_MSG(TASK_MM),
/// RESET Confirmation.
MM_RESET_CFM,
/// START Request.
MM_START_REQ,
/// START Confirmation.
MM_START_CFM,
/// Read Version Request.
MM_VERSION_REQ,
/// Read Version Confirmation.
MM_VERSION_CFM,
/// ADD INTERFACE Request.
MM_ADD_IF_REQ,
/// ADD INTERFACE Confirmation.
MM_ADD_IF_CFM,
/// REMOVE INTERFACE Request.
MM_REMOVE_IF_REQ,
/// REMOVE INTERFACE Confirmation.
MM_REMOVE_IF_CFM,
/// STA ADD Request.
MM_STA_ADD_REQ,
/// STA ADD Confirm.
MM_STA_ADD_CFM,
/// STA DEL Request.
MM_STA_DEL_REQ,
/// STA DEL Confirm.
MM_STA_DEL_CFM,
/// RX FILTER CONFIGURATION Request.
MM_SET_FILTER_REQ,
/// RX FILTER CONFIGURATION Confirmation.
MM_SET_FILTER_CFM,
/// CHANNEL CONFIGURATION Request.
MM_SET_CHANNEL_REQ,
/// CHANNEL CONFIGURATION Confirmation.
MM_SET_CHANNEL_CFM,
/// DTIM PERIOD CONFIGURATION Request.
MM_SET_DTIM_REQ,
/// DTIM PERIOD CONFIGURATION Confirmation.
MM_SET_DTIM_CFM,
/// BEACON INTERVAL CONFIGURATION Request.
MM_SET_BEACON_INT_REQ,
/// BEACON INTERVAL CONFIGURATION Confirmation.
MM_SET_BEACON_INT_CFM,
/// BASIC RATES CONFIGURATION Request.
MM_SET_BASIC_RATES_REQ,
/// BASIC RATES CONFIGURATION Confirmation.
MM_SET_BASIC_RATES_CFM,
/// BSSID CONFIGURATION Request.
MM_SET_BSSID_REQ,
/// BSSID CONFIGURATION Confirmation.
MM_SET_BSSID_CFM,
/// EDCA PARAMETERS CONFIGURATION Request.
MM_SET_EDCA_REQ,
/// EDCA PARAMETERS CONFIGURATION Confirmation.
MM_SET_EDCA_CFM,
/// ABGN MODE CONFIGURATION Request.
MM_SET_MODE_REQ,
/// ABGN MODE CONFIGURATION Confirmation.
MM_SET_MODE_CFM,
/// Request setting the VIF active state (i.e associated or AP started)
MM_SET_VIF_STATE_REQ,
/// Confirmation of the @ref MM_SET_VIF_STATE_REQ message.
MM_SET_VIF_STATE_CFM,
/// SLOT TIME PARAMETERS CONFIGURATION Request.
MM_SET_SLOTTIME_REQ,
/// SLOT TIME PARAMETERS CONFIGURATION Confirmation.
MM_SET_SLOTTIME_CFM,
/// Power Mode Change Request.
MM_SET_IDLE_REQ,
/// Power Mode Change Confirm.
MM_SET_IDLE_CFM,
/// KEY ADD Request.
MM_KEY_ADD_REQ,
/// KEY ADD Confirm.
MM_KEY_ADD_CFM,
/// KEY DEL Request.
MM_KEY_DEL_REQ,
/// KEY DEL Confirm.
MM_KEY_DEL_CFM,
/// Block Ack agreement info addition
MM_BA_ADD_REQ,
/// Block Ack agreement info addition confirmation
MM_BA_ADD_CFM,
/// Block Ack agreement info deletion
MM_BA_DEL_REQ,
/// Block Ack agreement info deletion confirmation
MM_BA_DEL_CFM,
/// Indication of the primary TBTT to the upper MAC. Upon the reception of this
// message the upper MAC has to push the beacon(s) to the beacon transmission queue.
MM_PRIMARY_TBTT_IND,
/// Indication of the secondary TBTT to the upper MAC. Upon the reception of this
// message the upper MAC has to push the beacon(s) to the beacon transmission queue.
MM_SECONDARY_TBTT_IND,
/// Request for changing the TX power
MM_SET_POWER_REQ,
/// Confirmation of the TX power change
MM_SET_POWER_CFM,
/// Request to the LMAC to trigger the embedded logic analyzer and forward the debug
/// dump.
MM_DBG_TRIGGER_REQ,
/// Set Power Save mode
MM_SET_PS_MODE_REQ,
/// Set Power Save mode confirmation
MM_SET_PS_MODE_CFM,
/// Request to add a channel context
MM_CHAN_CTXT_ADD_REQ,
/// Confirmation of the channel context addition
MM_CHAN_CTXT_ADD_CFM,
/// Request to delete a channel context
MM_CHAN_CTXT_DEL_REQ,
/// Confirmation of the channel context deletion
MM_CHAN_CTXT_DEL_CFM,
/// Request to link a channel context to a VIF
MM_CHAN_CTXT_LINK_REQ,
/// Confirmation of the channel context link
MM_CHAN_CTXT_LINK_CFM,
/// Request to unlink a channel context from a VIF
MM_CHAN_CTXT_UNLINK_REQ,
/// Confirmation of the channel context unlink
MM_CHAN_CTXT_UNLINK_CFM,
/// Request to update a channel context
MM_CHAN_CTXT_UPDATE_REQ,
/// Confirmation of the channel context update
MM_CHAN_CTXT_UPDATE_CFM,
/// Request to schedule a channel context
MM_CHAN_CTXT_SCHED_REQ,
/// Confirmation of the channel context scheduling
MM_CHAN_CTXT_SCHED_CFM,
/// Request to change the beacon template in LMAC
MM_BCN_CHANGE_REQ,
/// Confirmation of the beacon change
MM_BCN_CHANGE_CFM,
/// Request to update the TIM in the beacon (i.e to indicate traffic bufferized at AP)
MM_TIM_UPDATE_REQ,
/// Confirmation of the TIM update
MM_TIM_UPDATE_CFM,
/// Connection loss indication
MM_CONNECTION_LOSS_IND,
/// Channel context switch indication to the upper layers
MM_CHANNEL_SWITCH_IND,
/// Channel context pre-switch indication to the upper layers
MM_CHANNEL_PRE_SWITCH_IND,
/// Request to remain on channel or cancel remain on channel
MM_REMAIN_ON_CHANNEL_REQ,
/// Confirmation of the (cancel) remain on channel request
MM_REMAIN_ON_CHANNEL_CFM,
/// Remain on channel expired indication
MM_REMAIN_ON_CHANNEL_EXP_IND,
/// Indication of a PS state change of a peer device
MM_PS_CHANGE_IND,
/// Indication that some buffered traffic should be sent to the peer device
MM_TRAFFIC_REQ_IND,
/// Request to modify the STA Power-save mode options
MM_SET_PS_OPTIONS_REQ,
/// Confirmation of the PS options setting
MM_SET_PS_OPTIONS_CFM,
/// Indication of PS state change for a P2P VIF
MM_P2P_VIF_PS_CHANGE_IND,
/// Indication that CSA counter has been updated
MM_CSA_COUNTER_IND,
/// Channel occupation report indication
MM_CHANNEL_SURVEY_IND,
/// Message containing Beamformer Information
MM_BFMER_ENABLE_REQ,
/// Request to Start/Stop/Update NOA - GO Only
MM_SET_P2P_NOA_REQ,
/// Request to Start/Stop/Update Opportunistic PS - GO Only
MM_SET_P2P_OPPPS_REQ,
/// Start/Stop/Update NOA Confirmation
MM_SET_P2P_NOA_CFM,
/// Start/Stop/Update Opportunistic PS Confirmation
MM_SET_P2P_OPPPS_CFM,
/// P2P NoA Update Indication - GO Only
MM_P2P_NOA_UPD_IND,
/// Request to set RSSI threshold and RSSI hysteresis
MM_CFG_RSSI_REQ,
/// Indication that RSSI level is below or above the threshold
MM_RSSI_STATUS_IND,
/// Indication that CSA is done
MM_CSA_FINISH_IND,
/// Indication that CSA is in prorgess (resp. done) and traffic must be stopped (resp. restarted)
MM_CSA_TRAFFIC_IND,
/// Request to update the group information of a station
MM_MU_GROUP_UPDATE_REQ,
/// Confirmation of the @ref MM_MU_GROUP_UPDATE_REQ message
MM_MU_GROUP_UPDATE_CFM,
/// MAX number of messages
MM_MAX,
};
/// Interface types
enum
{
/// ESS STA interface
MM_STA,
/// IBSS STA interface
MM_IBSS,
/// AP interface
MM_AP,
// Mesh Point interface
MM_MESH_POINT,
};
///BA agreement types
enum
{
///BlockAck agreement for TX
BA_AGMT_TX,
///BlockAck agreement for RX
BA_AGMT_RX,
};
///BA agreement related status
enum
{
///Correct BA agreement establishment
BA_AGMT_ESTABLISHED,
///BA agreement already exists for STA+TID requested, cannot override it (should have been deleted first)
BA_AGMT_ALREADY_EXISTS,
///Correct BA agreement deletion
BA_AGMT_DELETED,
///BA agreement for the (STA, TID) doesn't exist so nothing to delete
BA_AGMT_DOESNT_EXIST,
};
/// Features supported by LMAC - Positions
enum mm_features
{
/// Beaconing
MM_FEAT_BCN_BIT = 0,
/// Autonomous Beacon Transmission
MM_FEAT_AUTOBCN_BIT,
/// Scan in LMAC
MM_FEAT_HWSCAN_BIT,
/// Connection Monitoring
MM_FEAT_CMON_BIT,
/// Multi Role
MM_FEAT_MROLE_BIT,
/// Radar Detection
MM_FEAT_RADAR_BIT,
/// Power Save
MM_FEAT_PS_BIT,
/// UAPSD
MM_FEAT_UAPSD_BIT,
/// DPSM
MM_FEAT_DPSM_BIT,
/// A-MPDU
MM_FEAT_AMPDU_BIT,
/// A-MSDU
MM_FEAT_AMSDU_BIT,
/// Channel Context
MM_FEAT_CHNL_CTXT_BIT,
/// Packet reordering
MM_FEAT_REORD_BIT,
/// P2P
MM_FEAT_P2P_BIT,
/// P2P Go
MM_FEAT_P2P_GO_BIT,
/// UMAC Present
MM_FEAT_UMAC_BIT,
/// VHT support
MM_FEAT_VHT_BIT,
/// Beamformee
MM_FEAT_BFMEE_BIT,
/// Beamformer
MM_FEAT_BFMER_BIT,
/// WAPI
MM_FEAT_WAPI_BIT,
/// MFP
MM_FEAT_MFP_BIT,
};
/// Maximum number of words in the configuration buffer
#define PHY_CFG_BUF_SIZE 16
/// Structure containing the parameters of the PHY configuration
struct phy_cfg_tag
{
/// Buffer containing the parameters specific for the PHY used
u32_l parameters[PHY_CFG_BUF_SIZE];
};
/// Structure containing the parameters of the Trident PHY configuration
struct phy_trd_cfg_tag
{
/// MDM type(nxm)(upper nibble) and MDM2RF path mapping(lower nibble)
u8_l path_mapping;
/// TX DC offset compensation
u32_l tx_dc_off_comp;
};
/// Structure containing the parameters of the Karst PHY configuration
struct phy_karst_cfg_tag
{
/// TX IQ mismatch compensation in 2.4GHz
u32_l tx_iq_comp_2_4G[2];
/// RX IQ mismatch compensation in 2.4GHz
u32_l rx_iq_comp_2_4G[2];
/// TX IQ mismatch compensation in 5GHz
u32_l tx_iq_comp_5G[2];
/// RX IQ mismatch compensation in 5GHz
u32_l rx_iq_comp_5G[2];
/// RF path used by default (0 or 1)
u8_l path_used;
};
/// Structure containing the parameters of the @ref MM_START_REQ message
struct mm_start_req
{
/// PHY configuration
struct phy_cfg_tag phy_cfg;
/// UAPSD timeout
u32_l uapsd_timeout;
/// Local LP clock accuracy (in ppm)
u16_l lp_clk_accuracy;
};
/// Structure containing the parameters of the @ref MM_SET_CHANNEL_REQ message
struct mm_set_channel_req
{
/// Band (2.4GHz or 5GHz)
u8_l band;
/// Channel type: 20,40,80,160 or 80+80 MHz
u8_l type;
/// Frequency for Primary 20MHz channel (in MHz)
u16_l prim20_freq;
/// Frequency for Center of the contiguous channel or center of Primary 80+80
u16_l center1_freq;
/// Frequency for Center of the non-contiguous secondary 80+80
u16_l center2_freq;
/// Index of the RF for which the channel has to be set (0: operating (primary), 1: secondary
/// RF (used for additional radar detection). This parameter is reserved if no secondary RF
/// is available in the system
u8_l index;
/// Max tx power for this channel
s8_l tx_power;
};
/// Structure containing the parameters of the @ref MM_SET_CHANNEL_CFM message
struct mm_set_channel_cfm
{
/// Radio index to be used in policy table
u8_l radio_idx;
/// TX power configured (in dBm)
s8_l power;
};
/// Structure containing the parameters of the @ref MM_SET_DTIM_REQ message
struct mm_set_dtim_req
{
/// DTIM period
u8_l dtim_period;
};
/// Structure containing the parameters of the @ref MM_SET_POWER_REQ message
struct mm_set_power_req
{
/// Index of the interface for which the parameter is configured
u8_l inst_nbr;
/// TX power (in dBm)
s8_l power;
};
/// Structure containing the parameters of the @ref MM_SET_POWER_CFM message
struct mm_set_power_cfm
{
/// Radio index to be used in policy table
u8_l radio_idx;
/// TX power configured (in dBm)
s8_l power;
};
/// Structure containing the parameters of the @ref MM_SET_BEACON_INT_REQ message
struct mm_set_beacon_int_req
{
/// Beacon interval
u16_l beacon_int;
/// Index of the interface for which the parameter is configured
u8_l inst_nbr;
};
/// Structure containing the parameters of the @ref MM_SET_BASIC_RATES_REQ message
struct mm_set_basic_rates_req
{
/// Basic rate set (as expected by bssBasicRateSet field of Rates MAC HW register)
u32_l rates;
/// Index of the interface for which the parameter is configured
u8_l inst_nbr;
/// Band on which the interface will operate
u8_l band;
};
/// Structure containing the parameters of the @ref MM_SET_BSSID_REQ message
struct mm_set_bssid_req
{
/// BSSID to be configured in HW
struct mac_addr bssid;
/// Index of the interface for which the parameter is configured
u8_l inst_nbr;
};
/// Structure containing the parameters of the @ref MM_SET_FILTER_REQ message
struct mm_set_filter_req
{
/// RX filter to be put into rxCntrlReg HW register
u32_l filter;
};
/// Structure containing the parameters of the @ref MM_ADD_IF_REQ message.
struct mm_add_if_req
{
/// Type of the interface (AP, STA, ADHOC, ...)
u8_l type;
/// MAC ADDR of the interface to start
struct mac_addr addr;
/// P2P Interface
bool_l p2p;
};
/// Structure containing the parameters of the @ref MM_SET_EDCA_REQ message
struct mm_set_edca_req
{
/// EDCA parameters of the queue (as expected by edcaACxReg HW register)
u32_l ac_param;
/// Flag indicating if UAPSD can be used on this queue
bool_l uapsd;
/// HW queue for which the parameters are configured
u8_l hw_queue;
/// Index of the interface for which the parameters are configured
u8_l inst_nbr;
};
struct mm_set_idle_req
{
u8_l hw_idle;
};
/// Structure containing the parameters of the @ref MM_SET_SLOTTIME_REQ message
struct mm_set_slottime_req
{
/// Slot time expressed in us
u8_l slottime;
};
/// Structure containing the parameters of the @ref MM_SET_MODE_REQ message
struct mm_set_mode_req
{
/// abgnMode field of macCntrl1Reg register
u8_l abgnmode;
};
/// Structure containing the parameters of the @ref MM_SET_VIF_STATE_REQ message
struct mm_set_vif_state_req
{
/// Association Id received from the AP (valid only if the VIF is of STA type)
u16_l aid;
/// Flag indicating if the VIF is active or not
bool_l active;
/// Interface index
u8_l inst_nbr;
};
/// Structure containing the parameters of the @ref MM_ADD_IF_CFM message.
struct mm_add_if_cfm
{
/// Status of operation (different from 0 if unsuccessful)
u8_l status;
/// Interface index assigned by the LMAC
u8_l inst_nbr;
};
/// Structure containing the parameters of the @ref MM_REMOVE_IF_REQ message.
struct mm_remove_if_req
{
/// Interface index assigned by the LMAC
u8_l inst_nbr;
};
/// Structure containing the parameters of the @ref MM_VERSION_CFM message.
struct mm_version_cfm
{
/// Version of the LMAC FW
u32_l version_lmac;
/// Version1 of the MAC HW (as encoded in version1Reg MAC HW register)
u32_l version_machw_1;
/// Version2 of the MAC HW (as encoded in version2Reg MAC HW register)
u32_l version_machw_2;
/// Version1 of the PHY (depends on actual PHY)
u32_l version_phy_1;
/// Version2 of the PHY (depends on actual PHY)
u32_l version_phy_2;
/// Supported Features
u32_l features;
};
/// Structure containing the parameters of the @ref MM_STA_ADD_REQ message.
struct mm_sta_add_req
{
/// Maximum A-MPDU size, in bytes, for VHT frames
u32_l ampdu_size_max_vht;
/// PAID/GID
u32_l paid_gid;
/// Maximum A-MPDU size, in bytes, for HT frames
u16_l ampdu_size_max_ht;
/// MAC address of the station to be added
struct mac_addr mac_addr;
/// A-MPDU spacing, in us
u8_l ampdu_spacing_min;
/// Interface index
u8_l inst_nbr;
/// TDLS station
bool_l tdls_sta;
};
/// Structure containing the parameters of the @ref MM_STA_ADD_CFM message.
struct mm_sta_add_cfm
{
/// Status of the operation (different from 0 if unsuccessful)
u8_l status;
/// Index assigned by the LMAC to the newly added station
u8_l sta_idx;
/// MAC HW index of the newly added station
u8_l hw_sta_idx;
};
/// Structure containing the parameters of the @ref MM_STA_DEL_REQ message.
struct mm_sta_del_req
{
/// Index of the station to be deleted
u8_l sta_idx;
};
/// Structure containing the parameters of the @ref MM_STA_DEL_CFM message.
struct mm_sta_del_cfm
{
/// Status of the operation (different from 0 if unsuccessful)
u8_l status;
};
/// Structure containing the parameters of the SET_POWER_MODE REQ message.
struct mm_setpowermode_req
{
u8_l mode;
u8_l sta_idx;
};
/// Structure containing the parameters of the SET_POWER_MODE CFM message.
struct mm_setpowermode_cfm
{
u8_l status;
};
/// Structure containing the parameters of the @ref MM_KEY_ADD REQ message.
struct mm_key_add_req
{
/// Key index (valid only for default keys)
u8_l key_idx;
/// STA index (valid only for pairwise or mesh group keys)
u8_l sta_idx;
/// Key material
struct mac_sec_key key;
/// Cipher suite (WEP64, WEP128, TKIP, CCMP)
u8_l cipher_suite;
/// Index of the interface for which the key is set (valid only for default keys or mesh group keys)
u8_l inst_nbr;
/// A-MSDU SPP parameter
u8_l spp;
/// Indicate if provided key is a pairwise key or not
bool_l pairwise;
};
/// Structure containing the parameters of the @ref MM_KEY_ADD_CFM message.
struct mm_key_add_cfm
{
/// Status of the operation (different from 0 if unsuccessful)
u8_l status;
/// HW index of the key just added
u8_l hw_key_idx;
};
/// Structure containing the parameters of the @ref MM_KEY_DEL_REQ message.
struct mm_key_del_req
{
/// HW index of the key to be deleted
u8_l hw_key_idx;
};
/// Structure containing the parameters of the @ref MM_BA_ADD_REQ message.
struct mm_ba_add_req
{
///Type of agreement (0: TX, 1: RX)
u8_l type;
///Index of peer station with which the agreement is made
u8_l sta_idx;
///TID for which the agreement is made with peer station
u8_l tid;
///Buffer size - number of MPDUs that can be held in its buffer per TID
u8_l bufsz;
/// Start sequence number negotiated during BA setup - the one in first aggregated MPDU counts more
u16_l ssn;
};
/// Structure containing the parameters of the @ref MM_BA_ADD_CFM message.
struct mm_ba_add_cfm
{
///Index of peer station for which the agreement is being confirmed
u8_l sta_idx;
///TID for which the agreement is being confirmed
u8_l tid;
/// Status of ba establishment
u8_l status;
};
/// Structure containing the parameters of the @ref MM_BA_DEL_REQ message.
struct mm_ba_del_req
{
///Type of agreement (0: TX, 1: RX)
u8_l type;
///Index of peer station for which the agreement is being deleted
u8_l sta_idx;
///TID for which the agreement is being deleted
u8_l tid;
};
/// Structure containing the parameters of the @ref MM_BA_DEL_CFM message.
struct mm_ba_del_cfm
{
///Index of peer station for which the agreement deletion is being confirmed
u8_l sta_idx;
///TID for which the agreement deletion is being confirmed
u8_l tid;
/// Status of ba deletion
u8_l status;
};
/// Structure containing the parameters of the @ref MM_CHAN_CTXT_ADD_REQ message
struct mm_chan_ctxt_add_req
{
/// Band (2.4GHz or 5GHz)
u8_l band;
/// Channel type: 20,40,80,160 or 80+80 MHz
u8_l type;
/// Frequency for Primary 20MHz channel (in MHz)
u16_l prim20_freq;
/// Frequency for Center of the contiguous channel or center of Primary 80+80
u16_l center1_freq;
/// Frequency for Center of the non-contiguous secondary 80+80
u16_l center2_freq;
/// Max tx power for this channel
s8_l tx_power;
};
/// Structure containing the parameters of the @ref MM_CHAN_CTXT_ADD_REQ message
struct mm_chan_ctxt_add_cfm
{
/// Status of the addition
u8_l status;
/// Index of the new channel context
u8_l index;
};
/// Structure containing the parameters of the @ref MM_CHAN_CTXT_DEL_REQ message
struct mm_chan_ctxt_del_req
{
/// Index of the new channel context to be deleted
u8_l index;
};
/// Structure containing the parameters of the @ref MM_CHAN_CTXT_LINK_REQ message
struct mm_chan_ctxt_link_req
{
/// VIF index
u8_l vif_index;
/// Channel context index
u8_l chan_index;
/// Indicate if this is a channel switch (unlink current ctx first if true)
u8_l chan_switch;
};
/// Structure containing the parameters of the @ref MM_CHAN_CTXT_UNLINK_REQ message
struct mm_chan_ctxt_unlink_req
{
/// VIF index
u8_l vif_index;
};
/// Structure containing the parameters of the @ref MM_CHAN_CTXT_UPDATE_REQ message
struct mm_chan_ctxt_update_req
{
/// Channel context index
u8_l chan_index;
/// Band (2.4GHz or 5GHz)
u8_l band;
/// Channel type: 20,40,80,160 or 80+80 MHz
u8_l type;
/// Frequency for Primary 20MHz channel (in MHz)
u16_l prim20_freq;
/// Frequency for Center of the contiguous channel or center of Primary 80+80
u16_l center1_freq;
/// Frequency for Center of the non-contiguous secondary 80+80
u16_l center2_freq;
};
/// Structure containing the parameters of the @ref MM_CHAN_CTXT_SCHED_REQ message
struct mm_chan_ctxt_sched_req
{
/// VIF index
u8_l vif_index;
/// Channel context index
u8_l chan_index;
/// Type of the scheduling request (0: normal scheduling, 1: derogatory
/// scheduling)
u8_l type;
};
/// Structure containing the parameters of the @ref MM_CHANNEL_SWITCH_IND message
struct mm_channel_switch_ind
{
/// Index of the channel context we will switch to
u8_l chan_index;
/// Indicate if the switch has been triggered by a Remain on channel request
bool_l roc;
/// VIF on which remain on channel operation has been started (if roc == 1)
u8_l vif_index;
/// Indicate if the switch has been triggered by a TDLS Remain on channel request
bool_l roc_tdls;
};
/// Structure containing the parameters of the @ref MM_CHANNEL_PRE_SWITCH_IND message
struct mm_channel_pre_switch_ind
{
/// Index of the channel context we will switch to
u8_l chan_index;
};
/// Structure containing the parameters of the @ref MM_CONNECTION_LOSS_IND message.
struct mm_connection_loss_ind
{
/// VIF instance number
u8_l inst_nbr;
};
/// Structure containing the parameters of the @ref MM_DBG_TRIGGER_REQ message.
struct mm_dbg_trigger_req
{
/// Error trace to be reported by the LMAC
char error[64];
};
/// Structure containing the parameters of the @ref MM_SET_PS_MODE_REQ message.
struct mm_set_ps_mode_req
{
/// Power Save is activated or deactivated
u8_l new_state;
};
/// Structure containing the parameters of the @ref MM_BCN_CHANGE_REQ message.
#define BCN_MAX_CSA_CPT 2
struct mm_bcn_change_req
{
/// Pointer, in host memory, to the new beacon template
u32_l bcn_ptr;
/// Length of the beacon template
u16_l bcn_len;
/// Offset of the TIM IE in the beacon
u16_l tim_oft;
/// Length of the TIM IE
u8_l tim_len;
/// Index of the VIF for which the beacon is updated
u8_l inst_nbr;
/// Offset of CSA (channel switch announcement) counters (0 means no counter)
u8_l csa_oft[BCN_MAX_CSA_CPT];
///
u8_l bcn_buf[];
};
/// Structure containing the parameters of the @ref MM_TIM_UPDATE_REQ message.
struct mm_tim_update_req
{
/// Association ID of the STA the bit of which has to be updated (0 for BC/MC traffic)
u16_l aid;
/// Flag indicating the availability of data packets for the given STA
u8_l tx_avail;
/// Index of the VIF for which the TIM is updated
u8_l inst_nbr;
};
/// Structure containing the parameters of the @ref MM_REMAIN_ON_CHANNEL_REQ message.
struct mm_remain_on_channel_req
{
/// Operation Code
u8_l op_code;
/// VIF Index
u8_l vif_index;
/// Band (2.4GHz or 5GHz)
u8_l band;
/// Channel type: 20,40,80,160 or 80+80 MHz
u8_l type;
/// Frequency for Primary 20MHz channel (in MHz)
u16_l prim20_freq;
/// Frequency for Center of the contiguous channel or center of Primary 80+80
u16_l center1_freq;
/// Frequency for Center of the non-contiguous secondary 80+80
u16_l center2_freq;
/// Duration (in ms)
u32_l duration_ms;
/// TX power (in dBm)
s8_l tx_power;
};
/// Structure containing the parameters of the @ref MM_REMAIN_ON_CHANNEL_CFM message
struct mm_remain_on_channel_cfm
{
/// Operation Code
u8_l op_code;
/// Status of the operation
u8_l status;
/// Channel Context index
u8_l chan_ctxt_index;
};
/// Structure containing the parameters of the @ref MM_REMAIN_ON_CHANNEL_EXP_IND message
struct mm_remain_on_channel_exp_ind
{
/// VIF Index
u8_l vif_index;
/// Channel Context index
u8_l chan_ctxt_index;