diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-05-28 20:10:56 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-05-28 20:10:56 +0200 |
commit | 5868bbf87f85df6f0e7ce4cc0ea123f0378b0ff1 (patch) | |
tree | ded65cec2bba4bab345927cafb55709360d32531 /src | |
parent | 06b01f79b346f4ffa8bdc5c7485df54e3a092f18 (diff) |
save state if traffic or non-traffic burst at AACH time
the later code processing the SB/NB can then refer to that state.
Diffstat (limited to 'src')
-rw-r--r-- | src/tetra_common.h | 3 | ||||
-rw-r--r-- | src/tetra_upper_mac.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/tetra_common.h b/src/tetra_common.h index 6c32db4..3169b8a 100644 --- a/src/tetra_common.h +++ b/src/tetra_common.h @@ -44,6 +44,9 @@ extern struct tetra_phy_state t_phy_state; struct tetra_mac_state { struct llist_head voice_channels; + struct { + int is_traffic; + } cur_burst; }; void tetra_mac_state_init(struct tetra_mac_state *tms); diff --git a/src/tetra_upper_mac.c b/src/tetra_upper_mac.c index f0d8c52..0bfc0e1 100644 --- a/src/tetra_upper_mac.c +++ b/src/tetra_upper_mac.c @@ -241,6 +241,12 @@ static void rx_aach(struct tetra_tmvsap_prim *tmvp, struct tetra_mac_state *tms) if (aad.pres & TETRA_ACC_ASS_PRES_UL_USAGE) printf("UL_USAGE: %s ", tetra_get_ul_usage_name(aad.ul_usage)); + /* save the state whether the current burst is traffic or not */ + if (aad.dl_usage > 3) + tms->cur_burst.is_traffic = 1; + else + tms->cur_burst.is_traffic = 0; + printf("\n"); } |