summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-12-27 20:49:53 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-01-15 00:03:19 +0100
commitdfcfe65f249efdd79df57e8516c226755ffc1748 (patch)
tree5f07a678922599dc12e9a2d11c89fb99046381d6
parentded0268a8dfcb7ce41df509a5dada9725a21ee5a (diff)
lchan: Rename release_reason to release_mode
Use the name of GSM 08.58 for the release mode.
-rw-r--r--openbsc/include/openbsc/chan_alloc.h2
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h4
-rw-r--r--openbsc/src/libbsc/chan_alloc.c10
3 files changed, 9 insertions, 7 deletions
diff --git a/openbsc/include/openbsc/chan_alloc.h b/openbsc/include/openbsc/chan_alloc.h
index 5eda312ac..1a7c85770 100644
--- a/openbsc/include/openbsc/chan_alloc.h
+++ b/openbsc/include/openbsc/chan_alloc.h
@@ -46,7 +46,7 @@ void lchan_free(struct gsm_lchan *lchan);
void lchan_reset(struct gsm_lchan *lchan);
/* Release the given lchan */
-int lchan_release(struct gsm_lchan *lchan, int sach_deact, int reason);
+int lchan_release(struct gsm_lchan *lchan, int sach_deact, int release_mode);
struct load_counter {
unsigned int total;
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 7964b3cea..9a2451b87 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -177,7 +177,9 @@ struct gsm_lchan {
/* Established data link layer services */
uint8_t sapis[8];
int sach_deact;
- int release_reason;
+
+ /** GSM 08.58 9.3.20 */
+ int release_mode;
struct {
uint32_t bound_ip;
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index c0bdc1be9..846a393af 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -338,7 +338,7 @@ void lchan_free(struct gsm_lchan *lchan)
}
lchan->sach_deact = 0;
- lchan->release_reason = 0;
+ lchan->release_mode = 0;
/* FIXME: ts_free() the timeslot, if we're the last logical
* channel using it */
@@ -377,7 +377,7 @@ static int _lchan_release_next_sapi(struct gsm_lchan *lchan)
link_id = sapi;
if (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H)
link_id |= 0x40;
- rsl_release_request(lchan, link_id, lchan->release_reason);
+ rsl_release_request(lchan, link_id, lchan->release_mode);
return 0;
}
@@ -396,7 +396,7 @@ static void _lchan_handle_release(struct gsm_lchan *lchan)
return;
}
- rsl_release_request(lchan, 0, lchan->release_reason);
+ rsl_release_request(lchan, 0, lchan->release_mode);
rsl_lchan_set_state(lchan, LCHAN_S_REL_REQ);
}
@@ -412,13 +412,13 @@ int rsl_lchan_rll_release(struct gsm_lchan *lchan, uint8_t link_id)
}
/* Consider releasing the channel now */
-int lchan_release(struct gsm_lchan *lchan, int sach_deact, int reason)
+int lchan_release(struct gsm_lchan *lchan, int sach_deact, int mode)
{
DEBUGP(DRLL, "%s starting release sequence\n", gsm_lchan_name(lchan));
rsl_lchan_set_state(lchan, LCHAN_S_REL_REQ);
lchan->conn = NULL;
- lchan->release_reason = reason;
+ lchan->release_mode = mode;
lchan->sach_deact = sach_deact;
_lchan_handle_release(lchan);
return 1;