]> git.pld-linux.org Git - packages/ax25-tools.git/blame - ax25-tools-linux26.patch
- added linux26 patch (removes obsolete baycom/soundmodem debugging,
[packages/ax25-tools.git] / ax25-tools-linux26.patch
CommitLineData
94cfbb95
JB
1--- ax25-tools-0.0.8/hdlcutil/sethdlc.c.orig 2001-04-10 04:10:50.000000000 +0200
2+++ ax25-tools-0.0.8/hdlcutil/sethdlc.c 2004-04-10 16:10:41.437874346 +0200
3@@ -478,8 +478,6 @@
4 char getsetparams = 0;
5 char cal = 0;
6 int cal_val = 0;
7- struct sm_ioctl bsi;
8- struct baycom_ioctl bbi;
9 struct hdrvc_channel_state chst;
10 unsigned char pktbuf[2048];
11
12@@ -547,21 +545,6 @@
13 chst.dcd ? 'D' : '-', chst.ptt ? 'P' : '-',
14 chst.rx_packets, chst.tx_packets, chst.rx_errors,
15 chst.tx_errors);
16-#ifdef HDRVC_KERNEL
17- if (hdrvc_sm_ioctl(SMCTL_GETDEBUG, &bsi) >= 0) {
18- printf(" intrate: %u modcyc: %u "
19- "demodcyc: %u dmares: %u",
20- bsi.data.dbg.int_rate,
21- bsi.data.dbg.mod_cycles,
22- bsi.data.dbg.demod_cycles,
23- bsi.data.dbg.dma_residue);
24- }
25- if (hdrvc_baycom_ioctl(BAYCOMCTL_GETDEBUG, &bbi) >= 0) {
26- printf(" dbg1: %lu dbg2: %lu dbg3: %li",
27- bbi.data.dbg.debug1, bbi.data.dbg.debug2,
28- bbi.data.dbg.debug3);
29- }
30-#endif /* HDRVC_KERNEL */
31 printf("\n");
32 break;
33 case 2:
34--- ax25-tools-0.0.8/hdlcutil/hdrvcomm.h.orig 2001-04-10 04:10:48.000000000 +0200
35+++ ax25-tools-0.0.8/hdlcutil/hdrvcomm.h 2004-04-10 16:09:53.581322837 +0200
36@@ -42,8 +42,6 @@
37
38 #ifdef HDRVC_KERNEL
39 #include <linux/hdlcdrv.h>
40-#include <linux/soundmodem.h>
41-#include <linux/baycom.h>
42 #endif /* HDRVC_KERNEL */
43
44 /* ---------------------------------------------------------------------- */
45@@ -104,9 +102,6 @@
46
47 #ifdef HDRVC_KERNEL
48 extern int hdrvc_hdlcdrv_ioctl(int cmd, struct hdlcdrv_ioctl *par);
49-extern int hdrvc_sm_ioctl(int cmd, struct sm_ioctl *par);
50-extern int hdrvc_baycom_ioctl(int cmd, struct baycom_ioctl *par);
51-extern int hdrvc_diag(struct sm_diag_data *diag);
52 #endif /* HDRVC_KERNEL */
53
54 /* ---------------------------------------------------------------------- */
55--- ax25-tools-0.0.8/hdlcutil/hdrvcomm.c.orig 2001-04-10 04:10:48.000000000 +0200
56+++ ax25-tools-0.0.8/hdlcutil/hdrvcomm.c 2004-04-10 16:12:47.636682893 +0200
57@@ -48,6 +48,7 @@
58 #include "hdrvcomm.h"
59 #include "usersmdiag.h"
60 #include <net/if_arp.h>
61+#include <netinet/in.h>
62 #include <linux/if_ether.h>
63 #include <linux/if_packet.h>
64 #ifndef SOL_PACKET
65@@ -311,36 +312,6 @@
66
67 /* ---------------------------------------------------------------------- */
68
69-int hdrvc_sm_ioctl(int cmd, struct sm_ioctl *par)
70-{
71- struct ifreq ifr = ifr_h;
72-
73- if (!kernel_mode) {
74- errno = EINVAL;
75- return -1;
76- }
77- ifr.ifr_data = (caddr_t)par;
78- par->cmd = cmd;
79- return ioctl(fd, SIOCDEVPRIVATE, &ifr);
80-}
81-
82-/* ---------------------------------------------------------------------- */
83-
84-int hdrvc_baycom_ioctl(int cmd, struct baycom_ioctl *par)
85-{
86- struct ifreq ifr = ifr_h;
87-
88- if (!kernel_mode) {
89- errno = EINVAL;
90- return -1;
91- }
92- ifr.ifr_data = (caddr_t)par;
93- par->cmd = cmd;
94- return ioctl(fd, SIOCDEVPRIVATE, &ifr);
95-}
96-
97-/* ---------------------------------------------------------------------- */
98-
99 unsigned int hdrvc_get_ifflags(void)
100 {
101 struct ifreq ifr;
102@@ -356,46 +327,6 @@
103 return IFF_UP | IFF_RUNNING;
104 }
105
106-/* ---------------------------------------------------------------------- */
107-
108-int hdrvc_diag(struct sm_diag_data *diag)
109-{
110- struct sm_ioctl smi;
111- int ret;
112- struct usersmmsg msg;
113-
114- if (!diag) {
115- errno = EINVAL;
116- return -1;
117- }
118- if (kernel_mode) {
119- memcpy(&smi.data.diag, diag, sizeof(smi.data.diag));
120- ret = hdrvc_sm_ioctl(SMCTL_DIAGNOSE, &smi);
121- memcpy(diag, &smi.data.diag, sizeof(smi.data.diag));
122- return ret;
123- }
124- msg.hdr.type = USERSM_CMD_REQ_DIAG;
125- msg.hdr.channel = 0;
126- msg.data.diag.mode = diag->mode;
127- msg.data.diag.flags = diag->flags;
128- msg.data.diag.samplesperbit = diag->samplesperbit;
129- msg.data.diag.datalen = diag->datalen;
130- hdrvc_sendmsg(&msg, sizeof(msg.data.diag));
131- ret = hdrvc_recvmsg(&msg, sizeof(msg), USERSM_CMD_ACK_DIAG);
132- if (ret < 0)
133- return ret;
134- if (ret < sizeof(msg.data.diag) || ret < sizeof(msg.data.diag)+msg.data.diag.datalen*sizeof(short)) {
135- errno = EIO;
136- return -1;
137- }
138- diag->mode = msg.data.diag.mode;
139- diag->flags = msg.data.diag.flags;
140- diag->samplesperbit = msg.data.diag.samplesperbit;
141- diag->datalen = msg.data.diag.datalen;
142- memcpy(diag->data, msg.data.diag_out.samples, msg.data.diag.datalen*sizeof(short));
143- return 0;
144-}
145-
146 #endif /* HDRVC_KERNEL */
147
148 /* ---------------------------------------------------------------------- */
149@@ -593,27 +524,6 @@
150 errno = EINVAL;
151 return -1;
152 }
153-#ifdef HDRVC_KERNEL
154- if (kernel_mode) {
155- struct sm_ioctl smi;
156- static unsigned int modeconvsm[4] = {
157- SM_DIAGMODE_OFF, SM_DIAGMODE_INPUT, SM_DIAGMODE_DEMOD, SM_DIAGMODE_CONSTELLATION
158- };
159-
160- smi.data.diag.mode = modeconvsm[mode];
161- smi.data.diag.flags = (flags & HDRVC_DIAGFLAG_DCDGATE) ? SM_DIAGFLAG_DCDGATE : 0;
162- smi.data.diag.samplesperbit = 0;
163- smi.data.diag.datalen = maxdatalen;
164- smi.data.diag.data = data;
165- if ((ret = hdrvc_sm_ioctl(SMCTL_DIAGNOSE, &smi)) < 0)
166- return ret;
167- if (samplesperbit)
168- *samplesperbit = smi.data.diag.samplesperbit;
169- if (smi.data.diag.mode != modeconvsm[mode] || !(smi.data.diag.flags & SM_DIAGFLAG_VALID))
170- return 0;
171- return smi.data.diag.datalen;
172- }
173-#endif /* HDRVC_KERNEL */
174 msg.hdr.type = USERSM_CMD_REQ_DIAG;
175 msg.hdr.channel = 0;
176 msg.data.diag.mode = modeconvusersm[mode];
177--- ax25-tools-0.0.8/hdlcutil/Makefile.am.orig 2001-04-10 04:10:44.000000000 +0200
178+++ ax25-tools-0.0.8/hdlcutil/Makefile.am 2004-04-10 16:23:49.641133913 +0200
179@@ -5,10 +5,9 @@
180
181 SUBDIRS = fl
182
183-bin_PROGRAMS = sethdlc smmixer $(X11_bin_programs)
184+bin_PROGRAMS = sethdlc $(X11_bin_programs)
185
186 sethdlc_SOURCES = sethdlc.c hdrvcomm.c hdrvcomm.h usersmdiag.h
187-smmixer_SOURCES = smmixer.c hdrvcomm.c hdrvcomm.h usersmdiag.h
188 smdiag_SOURCES = smdiag.c hdrvcomm.c hdrvcomm.h usersmdiag.h
189
190 smdiag_LDADD = $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
191@@ -19,7 +18,7 @@
192 AX25_SYSCONFDIR=$(sysconfdir)/ax25/
193 AX25_LOCALSTATEDIR=$(localstatedir)/ax25/
194
195-man_MANS = sethdlc.8 smmixer.8 baycom.9 hdlcdrv.9 soundmodem.9 smdiag.8
196+man_MANS = sethdlc.8 baycom.9 hdlcdrv.9 soundmodem.9 smdiag.8
197
198 EXTRA_DIST = $(man_MANS)
199
This page took 0.088031 seconds and 4 git commands to generate.