summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xpp/card_fxo.c4
-rw-r--r--xpp/card_fxs.c4
-rw-r--r--xpp/xpd.h2
-rw-r--r--xpp/xpp_zap.c20
-rw-r--r--xpp/xproto.h2
5 files changed, 16 insertions, 16 deletions
diff --git a/xpp/card_fxo.c b/xpp/card_fxo.c
index 85b014f..25d3e95 100644
--- a/xpp/card_fxo.c
+++ b/xpp/card_fxo.c
@@ -259,9 +259,9 @@ static void do_sethook(xpd_t *xpd, int pos, bool offhook)
mark_ring(xpd, pos, 0); // No more rings
__do_sethook(xpd->xbus, xpd, pos, offhook);
if(offhook) {
- BIT_SET(xpd->hookstate, pos);
+ BIT_SET(xpd->offhook, pos);
} else {
- BIT_CLR(xpd->hookstate, pos);
+ BIT_CLR(xpd->offhook, pos);
xpd->delay_until_dialtone[pos] = 0;
}
spin_unlock_irqrestore(&xpd->lock, flags);
diff --git a/xpp/card_fxs.c b/xpp/card_fxs.c
index 0050348..99dd354 100644
--- a/xpp/card_fxs.c
+++ b/xpp/card_fxs.c
@@ -821,10 +821,10 @@ HANDLER_DEF(FXS, SLIC_REPLY)
BIT_CLR(lines, channo);
BIT_SET(lines, newchanno);
xpd->ringing[newchanno] = 0; // Stop ringing. No leds for digital inputs.
- if(offhook && !IS_SET(xpd->hookstate, newchanno)) { // OFFHOOK
+ if(offhook && !IS_SET(xpd->offhook, newchanno)) { // OFFHOOK
DBG("%s/%s/%d: OFFHOOK\n", xbus->busname, xpd->xpdname, newchanno);
update_line_status(xpd, newchanno, 1);
- } else if(!offhook && IS_SET(xpd->hookstate, newchanno)) { // ONHOOK
+ } else if(!offhook && IS_SET(xpd->offhook, newchanno)) { // ONHOOK
DBG("%s/%s/%d: ONHOOK\n", xbus->busname, xpd->xpdname, newchanno);
update_line_status(xpd, newchanno, 0);
}
diff --git a/xpp/xpd.h b/xpp/xpd.h
index 4de2510..1d67822 100644
--- a/xpp/xpd.h
+++ b/xpp/xpd.h
@@ -243,7 +243,7 @@ struct xpd {
byte revision; /* Card revision */
xpd_direction_t direction; /* TO_PHONE, TO_PSTN */
xpp_line_t no_pcm; /* Temporary: disable PCM (for USB-1) */
- xpp_line_t hookstate; /* Actual chip state: 0 - ONHOOK, 1 - OFHOOK */
+ xpp_line_t offhook; /* Actual chip state: 0 - ONHOOK, 1 - OFHOOK */
xpp_line_t cid_on;
xpp_line_t digital_outputs; /* 0 - no, 1 - yes */
xpp_line_t digital_inputs; /* 0 - no, 1 - yes */
diff --git a/xpp/xpp_zap.c b/xpp/xpp_zap.c
index b805075..e0e3560 100644
--- a/xpp/xpp_zap.c
+++ b/xpp/xpp_zap.c
@@ -399,9 +399,9 @@ static int xpd_read_proc(char *page, char **start, off_t off, int count, int *eo
for_each_line(xpd, i) {
len += sprintf(page + len, "%d ", IS_SET(xpd->digital_inputs, i));
}
- len += sprintf(page + len, "\n\t%-17s: ", "hookstate");
+ len += sprintf(page + len, "\n\t%-17s: ", "offhook");
for_each_line(xpd, i) {
- len += sprintf(page + len, "%d ", IS_SET(xpd->hookstate, i));
+ len += sprintf(page + len, "%d ", IS_SET(xpd->offhook, i));
}
len += sprintf(page + len, "\n\t%-17s: ", "ringing");
for_each_line(xpd, i) {
@@ -508,7 +508,7 @@ xpd_t *xpd_alloc(size_t privsize, xbus_t *xbus, int xpd_num, const xproto_table_
xpd->chans = NULL;
xpd->card_present = 0;
snprintf(xpd->xpdname, XPD_NAMELEN, "XPD-%d", xpd_num);
- xpd->hookstate = 0x0; /* ONHOOK */
+ xpd->offhook = 0x0; /* ONHOOK */
xpd->type = proto_table->type;
xpd->xproto = proto_table;
xpd->xops = &proto_table->xops;
@@ -633,10 +633,10 @@ void update_line_status(xpd_t *xpd, int pos, bool to_offhook)
* a nested spinlock scenario
*/
if(to_offhook) {
- BIT_SET(xpd->hookstate, pos);
+ BIT_SET(xpd->offhook, pos);
zt_hooksig(chan, ZT_RXSIG_OFFHOOK);
} else {
- BIT_CLR(xpd->hookstate, pos);
+ BIT_CLR(xpd->offhook, pos);
zt_hooksig(chan, ZT_RXSIG_ONHOOK);
}
}
@@ -902,14 +902,14 @@ static void xpp_transmitprep(xpd_t *xpd)
wake_up_interruptible(&xpd->txstateq[i]);
}
}
- if(IS_SET(xpd->hookstate, i) || IS_SET(xpd->cid_on, i)) {
+ if(IS_SET(xpd->offhook, i) || IS_SET(xpd->cid_on, i)) {
memcpy((u_char *)w, chans[i].writechunk, ZT_CHUNKSIZE);
// fill_beep((u_char *)w, 5);
}
w += ZT_CHUNKSIZE;
}
-// if(xpd->hookstate != 0 || sync_master != xpd) {
- ret = CALL_XMETHOD(PCM_WRITE, xpd->xbus, xpd, xpd->hookstate | xpd->cid_on, writechunk);
+// if(xpd->offhook != 0 || sync_master != xpd) {
+ ret = CALL_XMETHOD(PCM_WRITE, xpd->xbus, xpd, xpd->offhook | xpd->cid_on, writechunk);
if(ret < 0) {
DBG("failed to write PCM %d\n", ret);
}
@@ -978,7 +978,7 @@ static void xpp_receiveprep(xpd_t *xpd)
}
for (i = 0; i < channels; i++) {
- if(IS_SET(xpd->hookstate, i)) {
+ if(IS_SET(xpd->offhook, i)) {
// memset((u_char *)readchunk, 0x5A, ZT_CHUNKSIZE); // DEBUG
// fill_beep((u_char *)readchunk, 1); // DEBUG: BEEP
memcpy(chans[i].readchunk, (u_char *)readchunk, ZT_CHUNKSIZE);
@@ -1142,7 +1142,7 @@ static int xpp_sethook(struct zt_chan *chan, int hookstate)
BUG_ON(!xpd);
xbus = xpd->xbus;
- DBG("%s (%d) (old=0x%04X, hook-command=%d)\n", chan->name, pos, xpd->hookstate, hookstate);
+ DBG("%s (%d) (old=0x%04X, hook-command=%d)\n", chan->name, pos, xpd->offhook, hookstate);
ret = CALL_XMETHOD(card_sethook, xpd->xbus, xpd, pos, hookstate);
return ret;
}
diff --git a/xpp/xproto.h b/xpp/xproto.h
index 77e387f..5a1d13d 100644
--- a/xpp/xproto.h
+++ b/xpp/xproto.h
@@ -159,7 +159,7 @@ struct xops {
int (*card_ioctl)(xpd_t *xpd, int pos, unsigned int cmd, unsigned long arg);
int (*SYNC_SOURCE)(xbus_t *xbus, xpd_t *xpd, bool setit, bool is_master);
- int (*PCM_WRITE)(xbus_t *xbus, xpd_t *xpd, xpp_line_t hookstate, volatile byte *buf);
+ int (*PCM_WRITE)(xbus_t *xbus, xpd_t *xpd, xpp_line_t offhook, volatile byte *buf);
int (*CHAN_ENABLE)(xbus_t *xbus, xpd_t *xpd, xpp_line_t lines, bool on);
int (*CHAN_CID)(xbus_t *xbus, xpd_t *xpd, int pos);