From c21a98ebe5613fe724d40b2a95ffbaf7f9f14325 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Tue, 21 Mar 2017 13:57:34 +0200 Subject: [PATCH] xpp: FXS: Metering tone doesn't yet work on type 6 Generation of metering tone (a feture normally disabled at build time) is not yet implemented on the new FXS type 6 module. Signed-off-by: Tzafrir Cohen --- drivers/dahdi/xpp/card_fxs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index 39fe89c..7f00f75 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -491,6 +491,10 @@ static int metering_gen(xpd_t *xpd, lineno_t chan, bool on) { __u8 value = (on) ? 0x94 : 0x00; + if (XPD_HW(xpd).type == 6) { + XBUS_NOTICE("Metering not supported with FXS type 6"); + return 0; + } LINE_DBG(SIGNAL, xpd, chan, "METERING Generate: %s\n", (on) ? "ON" : "OFF"); return SLIC_DIRECT_REQUEST(xpd->xbus, xpd, chan, SLIC_WRITE, 0x23,