diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-17 19:59:56 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-10-30 21:20:45 +0100 |
commit | 9b30c7f46e2c55aed06cea8d1daa9093f331fb20 (patch) | |
tree | 53af4df3d3209ca34b2747a5ee8ef6b4e75041c8 /src/pcu_l1_if.cpp | |
parent | b6acfdaa24851e1aa95bfc4611709737aaafa5f1 (diff) |
bts: Move the frame_number into the BTS sructure
The current_frame is an attribute of the BTS. Move it from the
pcu_l1_if.cpp into the BTS. As the next step we can trigger
actions depending on the change of the frame.
Diffstat (limited to 'src/pcu_l1_if.cpp')
-rw-r--r-- | src/pcu_l1_if.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 82392473..ad0887ea 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -50,19 +50,6 @@ int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, extern void *tall_pcu_ctx; -// Variable for storage current FN. -int frame_number; - -int get_current_fn() -{ - return frame_number; -} - -void set_current_fn(int fn) -{ - frame_number = fn; -} - /* * PCU messages */ @@ -512,6 +499,7 @@ static int pcu_rx_time_ind(struct gsm_pcu_if_time_ind *time_ind) struct gprs_rlcmac_sba *sba, *sba2; uint32_t elapsed; uint8_t fn13 = time_ind->fn % 13; + int frame_number = time_ind->fn; /* omit frame numbers not starting at a MAC block */ if (fn13 != 0 && fn13 != 4 && fn13 != 8) @@ -520,7 +508,7 @@ static int pcu_rx_time_ind(struct gsm_pcu_if_time_ind *time_ind) // LOGP(DL1IF, LOGL_DEBUG, "Time indication received: %d\n", // time_ind->fn % 52); - set_current_fn(time_ind->fn); + BTS::main_bts()->set_current_frame_number(time_ind->fn); /* check for poll timeout */ llist_for_each_entry(tbf, &gprs_rlcmac_ul_tbfs, list) { |