summaryrefslogtreecommitdiff
path: root/mac/common/sta.h
blob: 36537df87cdbd29407e262da14d2bfae9d46fb84 (plain)
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
#ifndef mac_common_sta_h
#define mac_common_sta_h
/* Cesar project {{{
 *
 * Copyright (C) 2007 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    mac/common/sta.h
 * \brief   Information about a peer.
 * \ingroup mac_common
 */
#include "mac/common/tonemap.h"
#include "mac/common/nek.h"
#include "ce/rxce_stats.h"

/** Station information.  Must be < BLK_SIZE. */
struct sta_t
{
    /** Terminal equipment identifier. */
    u8 tei;
    /** Is this STA authenticated. */
    bool authenticated;
    /** EKS/NEK pairs pointer, used for unicast. */
    mac_nek_t (*nek)[2];
    /** Tonemaps for transmission. */
    tonemaps_t *tx_tonemaps;
    /** Tonemaps for reception. */
    tonemaps_t *rx_tonemaps;
    /** channel estimation status, statistics, and temporary computation. */
    rxce_processing_t rxce;
};
typedef struct sta_t sta_t;

/**
 * Initialise a station, called from MAC store.
 * \param  sta  STA to initialise
 * \param  tei  TEI
 */
void
sta_init (sta_t *sta, uint tei);

/**
 * Release the blocks pointed by the sta_t  
 * \param  sta Sta to uninit.
 *
 * Release the tonemaps,the set of tonemaps allocated during the existence of
 * the sta.( with eventually the tm_in_build used by Channel Estimation). 
 */
void
sta_uninit (sta_t *sta);


#endif /* mac_common_sta_h */