~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal-proposed

« back to all changes in this revision

Viewing changes to drivers/isdn/hysdn/hysdn_sched.c

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft, Andy Whitcroft
  • Date: 2012-06-21 09:16:38 UTC
  • Revision ID: package-import@ubuntu.com-20120621091638-gubhv4nox8xez1ct
Tags: 3.5.0-1.1
[ Andy Whitcroft]

* Rebuild lowlatency against Ubuntu-3.5.0-1.1
* All new configuration system to allow configuration deltas to be
  exposed via debian.lowlatency/config-delta

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
/*****************************************************************************/
30
30
int
31
31
hysdn_sched_rx(hysdn_card *card, unsigned char *buf, unsigned short len,
32
 
                        unsigned short chan)
 
32
               unsigned short chan)
33
33
{
34
34
 
35
35
        switch (chan) {
36
 
                case CHAN_NDIS_DATA:
37
 
                        if (hynet_enable & (1 << card->myid)) {
38
 
                          /* give packet to network handler */
39
 
                                hysdn_rx_netpkt(card, buf, len);
40
 
                        }
41
 
                        break;
 
36
        case CHAN_NDIS_DATA:
 
37
                if (hynet_enable & (1 << card->myid)) {
 
38
                        /* give packet to network handler */
 
39
                        hysdn_rx_netpkt(card, buf, len);
 
40
                }
 
41
                break;
42
42
 
43
 
                case CHAN_ERRLOG:
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 */
47
 
                        break;
 
43
        case CHAN_ERRLOG:
 
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 */
 
47
                break;
48
48
#ifdef CONFIG_HYSDN_CAPI
49
 
                case CHAN_CAPI:
 
49
        case CHAN_CAPI:
50
50
/* give packet to CAPI handler */
51
 
                        if (hycapi_enable & (1 << card->myid)) {
52
 
                                hycapi_rx_capipkt(card, buf, len);
53
 
                        }
54
 
                        break;
 
51
                if (hycapi_enable & (1 << card->myid)) {
 
52
                        hycapi_rx_capipkt(card, buf, len);
 
53
                }
 
54
                break;
55
55
#endif /* CONFIG_HYSDN_CAPI */
56
 
                default:
57
 
                        printk(KERN_INFO "irq message channel %d len %d unhandled \n", chan, len);
58
 
                        break;
 
56
        default:
 
57
                printk(KERN_INFO "irq message channel %d len %d unhandled \n", chan, len);
 
58
                break;
59
59
 
60
60
        }                       /* switch rx channel */
61
61
 
72
72
/*****************************************************************************/
73
73
int
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)
77
77
{
78
78
        struct sk_buff *skb;
79
79
 
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)
114
114
        {
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))
128
128
        {
129
129
                if (skb->len <= maxlen) {
130
130
                        skb_copy_from_linear_data(skb, buf, skb->len);