29
29
/*****************************************************************************/
31
31
hysdn_sched_rx(hysdn_card *card, unsigned char *buf, unsigned short len,
37
if (hynet_enable & (1 << card->myid)) {
38
/* give packet to network handler */
39
hysdn_rx_netpkt(card, buf, len);
37
if (hynet_enable & (1 << card->myid)) {
38
/* give packet to network handler */
39
hysdn_rx_netpkt(card, buf, len);
44
hysdn_card_errlog(card, (tErrLogEntry *) buf, len);
45
if (card->err_log_state == ERRLOG_STATE_ON)
46
card->err_log_state = ERRLOG_STATE_START; /* start new fetch */
44
hysdn_card_errlog(card, (tErrLogEntry *) buf, len);
45
if (card->err_log_state == ERRLOG_STATE_ON)
46
card->err_log_state = ERRLOG_STATE_START; /* start new fetch */
48
48
#ifdef CONFIG_HYSDN_CAPI
50
50
/* give packet to CAPI handler */
51
if (hycapi_enable & (1 << card->myid)) {
52
hycapi_rx_capipkt(card, buf, len);
51
if (hycapi_enable & (1 << card->myid)) {
52
hycapi_rx_capipkt(card, buf, len);
55
55
#endif /* CONFIG_HYSDN_CAPI */
57
printk(KERN_INFO "irq message channel %d len %d unhandled \n", chan, len);
57
printk(KERN_INFO "irq message channel %d len %d unhandled \n", chan, len);
60
60
} /* switch rx channel */
72
72
/*****************************************************************************/
74
74
hysdn_sched_tx(hysdn_card *card, unsigned char *buf,
75
unsigned short volatile *len, unsigned short volatile *chan,
76
unsigned short maxlen)
75
unsigned short volatile *len, unsigned short volatile *chan,
76
unsigned short maxlen)
78
78
struct sk_buff *skb;
109
109
return (1); /* tell that data should be send */
110
110
} /* error log start and able to send */
111
111
/* now handle network interface packets */
112
if ((hynet_enable & (1 << card->myid)) &&
113
(skb = hysdn_tx_netget(card)) != NULL)
112
if ((hynet_enable & (1 << card->myid)) &&
113
(skb = hysdn_tx_netget(card)) != NULL)
115
115
if (skb->len <= maxlen) {
116
116
/* copy the packet to the buffer */
123
123
hysdn_tx_netack(card); /* aknowledge packet -> throw away */
124
124
} /* send a network packet if available */
125
125
#ifdef CONFIG_HYSDN_CAPI
126
if( ((hycapi_enable & (1 << card->myid))) &&
127
((skb = hycapi_tx_capiget(card)) != NULL) )
126
if (((hycapi_enable & (1 << card->myid))) &&
127
((skb = hycapi_tx_capiget(card)) != NULL))
129
129
if (skb->len <= maxlen) {
130
130
skb_copy_from_linear_data(skb, buf, skb->len);