abis_rsl: Allow to specify the release mode for a given channel.

This can be used by handover, early assignment to indicate the
close of the old channel...
This commit is contained in:
Holger Hans Peter Freyther 2010-06-08 11:57:45 +08:00
parent 44752d9f84
commit 4f5848dc91
3 changed files with 5 additions and 4 deletions

View File

@ -68,7 +68,7 @@ unsigned int get_paging_group(u_int64_t imsi, unsigned int bs_cc_chans,
unsigned int n_pag_blocks(int bs_ccch_sdcch_comb, unsigned int bs_ag_blks_res);
u_int64_t str_to_imsi(const char *imsi_str);
u_int8_t lchan2chan_nr(const struct gsm_lchan *lchan);
int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id);
int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t reason);
int rsl_lchan_set_state(struct gsm_lchan *lchan, int);

View File

@ -752,14 +752,15 @@ int rsl_establish_request(struct gsm_lchan *lchan, u_int8_t link_id)
RELEASE CONFIRM, which we in turn use to trigger RSL CHANNEL RELEASE,
which in turn is acknowledged by RSL CHANNEL RELEASE ACK, which calls
lchan_free() */
int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id)
int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t reason)
{
struct msgb *msg;
msg = rsl_rll_simple(RSL_MT_REL_REQ, lchan2chan_nr(lchan),
link_id, 0);
msgb_tv_put(msg, RSL_IE_RELEASE_MODE, 0); /* normal release */
/* 0 is normal release, 1 is local end */
msgb_tv_put(msg, RSL_IE_RELEASE_MODE, reason);
/* FIXME: start some timer in case we don't receive a REL ACK ? */

View File

@ -363,7 +363,7 @@ int lchan_auto_release(struct gsm_lchan *lchan)
DEBUGP(DRLL, "%s Recycling Channel\n", gsm_lchan_name(lchan));
rsl_lchan_set_state(lchan, LCHAN_S_REL_REQ);
rsl_release_request(lchan, 0);
rsl_release_request(lchan, 0, 0);
return 1;
}