This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/1120 lapd: adding support for ericsson's lapd dialect - add new lapd profile to support ericssons specific lapd params - add function to switch between lapd profiles Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 --- M include/osmocom/abis/lapd.h M src/input/lapd.c 2 files changed, 24 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/20/1120/1 diff --git a/include/osmocom/abis/lapd.h b/include/osmocom/abis/lapd.h index 2987633..06caa92 100644 --- a/include/osmocom/abis/lapd.h +++ b/include/osmocom/abis/lapd.h @@ -20,6 +20,7 @@ extern const struct lapd_profile lapd_profile_isdn; extern const struct lapd_profile lapd_profile_abis; +extern const struct lapd_profile lapd_profile_abis_ericsson; extern const struct lapd_profile lapd_profile_sat; struct lapd_instance { @@ -63,6 +64,10 @@ void *rx_cbdata), void *rx_cbdata, const struct lapd_profile *profile); +/* Change lapd-profile on the fly (use with caution!) */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile); + void lapd_instance_free(struct lapd_instance *li); /* Start a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */ diff --git a/src/input/lapd.c b/src/input/lapd.c index ac24fd8..4b3179f 100644 --- a/src/input/lapd.c +++ b/src/input/lapd.c @@ -95,6 +95,18 @@ .short_address = 0 }; +const struct lapd_profile lapd_profile_abis_ericsson = { + .k = LAPD_SET_K(2,1), + .n200 = 300, + .n201 = 260, + .n202 = 0, /* infinite */ + .t200_sec = 0, .t200_usec = 300000, + .t201_sec = 1, .t201_usec = 0, + .t202_sec = 2, .t202_usec = 0, + .t203_sec = 10, .t203_usec = 0, + .short_address = 0 +}; + const struct lapd_profile lapd_profile_sat = { .k = LAPD_SET_K(15,15), .n200 = 5, @@ -664,6 +676,13 @@ return li; } +/* Change lapd-profile on the fly (use with caution!) */ +void lapd_instance_set_profile(struct lapd_instance *li, + const struct lapd_profile *profile) +{ + memcpy(&li->profile, profile, sizeof(li->profile)); +} + void lapd_instance_free(struct lapd_instance *li) { struct lapd_tei *teip, *teip2; -- To view, visit https://gerrit.osmocom.org/1120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I892af57013d7ab4216e9e2d0873a69129aaeb8e5 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: dexter <pmaier at sysmocom.de>