save state if traffic or non-traffic burst at AACH time

the later code processing the SB/NB can then refer to that state.
This commit is contained in:
Harald Welte 2011-05-28 20:10:56 +02:00
parent 06b01f79b3
commit 5868bbf87f
2 changed files with 9 additions and 0 deletions

View File

@ -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);

View File

@ -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");
}