aboutsummaryrefslogtreecommitdiffstats
path: root/main/dahdi-linux-vanilla/zaphfc-dahdi-2.7.0.patch
blob: 624cfe7b9ad8bf619e766f48e1a306f78a3adc40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- dahdi-linux-2.7.0/drivers/dahdi/zaphfc.c.orig	2013-11-13 14:47:31.772140792 +0200
+++ dahdi-linux-2.7.0/drivers/dahdi/zaphfc.c	2013-11-13 14:55:20.136270113 +0200
@@ -687,19 +687,18 @@
     if (!zthfc->ddev)
 	return -ENOMEM;
 
-    zthfc->ddev->manufacturer = "HFC";
-
+    zthfc->ddev->manufacturer = "Cologne Chips";
+    zthfc->ddev->devicetype = "HFC-S PCI-A ISDN";
+    zthfc->ddev->location = kasprintf(GFP_KERNEL,
+	"PCI Bus %02d Slot %02d",
+	hfctmp->pcidev->bus->number,
+	PCI_SLOT(hfctmp->pcidev->devfn) + 1);
     memset(&zthfc->span, 0x0, sizeof(struct dahdi_span)); // you never can tell...
-
     sprintf(zthfc->span.name, "ZTHFC/%d", hfc_dev_count + 1);
-    if (hfctmp->regs.nt_mode == 1) {
-	sprintf(zthfc->span.desc, "HFC-S PCI A ISDN card %d [NT]", hfc_dev_count + 1);
-    } else {
-	sprintf(zthfc->span.desc, "HFC-S PCI A ISDN card %d [TE]", hfc_dev_count + 1);
-    }
-
+    sprintf(zthfc->span.desc, "HFC-S PCI A ISDN card %d [%s]",
+	hfc_dev_count + 1, hfctmp->regs.nt_mode ? "NT" : "TE");
+    zthfc->span.spantype = hfctmp->regs.nt_mode ? SPANTYPE_DIGITAL_BRI_NT : SPANTYPE_DIGITAL_BRI_TE;
     zthfc->span.ops = &zaphfc_span_ops;
-
     zthfc->span.channels = 3;
     zthfc->span.chans = zthfc->_chans;
     for (i = 0; i < zthfc->span.channels; i++)