[dahdi-commits] sruffell: linux/trunk r8489 - /linux/trunk/drivers/dahdi/wcte12xp/base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Apr 6 17:36:12 CDT 2010
Author: sruffell
Date: Tue Apr 6 17:36:10 2010
New Revision: 8489
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8489
Log:
wcte12xp: Load the VPM in startup, not spanconfig
Modified:
linux/trunk/drivers/dahdi/wcte12xp/base.c
Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=8489&r1=8488&r2=8489
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Tue Apr 6 17:36:10 2010
@@ -77,6 +77,7 @@
struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec);
static void echocan_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec);
static int t1xxp_clear_maint(struct dahdi_span *span);
+static int check_and_load_vpm(struct t1 *wc);
static const struct dahdi_echocan_features vpm150m_ec_features = {
.NLP_automatic = 1,
@@ -930,10 +931,26 @@
set_bit(DAHDI_FLAGBIT_RUNNING, &wc->span.flags);
}
+static void set_span_devicetype(struct t1 *wc)
+{
+ strncpy(wc->span.devicetype, wc->variety,
+ sizeof(wc->span.devicetype) - 1);
+
+#if defined(VPM_SUPPORT)
+ if (wc->vpmadt032) {
+ strncat(wc->span.devicetype, " (VPMADT032)",
+ sizeof(wc->span.devicetype) - 1);
+ }
+#endif
+}
+
static int t1xxp_startup(struct dahdi_span *span)
{
struct t1 *wc = span->pvt;
int i;
+
+ check_and_load_vpm(wc);
+ set_span_devicetype(wc);
/* initialize the start value for the entire chunk of last ec buffer */
for (i = 0; i < span->channels; i++) {
@@ -1327,16 +1344,6 @@
vpmadt032_echocan_free(wc->vpmadt032, chan->chanpos - 1, ec);
}
-static void set_span_devicetype(struct t1 *wc)
-{
- strncpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype) - 1);
-
-#if defined(VPM_SUPPORT)
- if (wc->vpmadt032)
- strncat(wc->span.devicetype, " (VPMADT032)", sizeof(wc->span.devicetype) - 1);
-#endif
-}
-
static void
setchanconfig_from_state(struct vpmadt032 *vpm, int channel,
GpakChannelConfig_t *chanconfig)
@@ -1465,9 +1472,6 @@
t1xxp_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
{
struct t1 *wc = span->pvt;
-
- check_and_load_vpm(wc);
- set_span_devicetype(wc);
/* Do we want to SYNC on receive or not */
if (lc->sync) {
More information about the dahdi-commits
mailing list