kernels/linux-2.4.0/drivers/net/wan/sdla_chdlc.c
/*============================================================================
 * Timer interrupt handler.
 * The timer interrupt is used for two purposes:
 *    1) Processing udp calls from 'cpipemon'.
 *    2) Reading board-level statistics for updating the proc file system.
 */
Timer interrupt handler.
The timer interrupt is used for two purposes:
1) Processing udp calls from 'cpipemon'.
2) Reading board-level statistics for updating the proc file system.
Timer interrupt handler . The timer interrupt is used for two purposes : 1 ) Processing udp calls from ' cpipemon ' . 2 ) Reading board - level statistics for updating the proc file system .
void timer_intr(sdla_t *card)
{
        struct net_device* dev;
        chdlc_private_area_t* chdlc_priv_area = NULL;
        SHARED_MEMORY_INFO_STRUCT* flags = NULL;
        dev = card->wandev.dev; 
        chdlc_priv_area = dev->priv;
       	if(chdlc_priv_area->timer_int_enabled & TMR_INT_ENABLED_UDP) {
               	process_udp_mgmt_pkt(card, dev,
                       chdlc_priv_area);
		chdlc_priv_area->timer_int_enabled &= ~TMR_INT_ENABLED_UDP;
        }
	if(chdlc_priv_area->timer_int_enabled & TMR_INT_ENABLED_UPDATE) {
		update_comms_stats(card, chdlc_priv_area);
                if(!(-- chdlc_priv_area->update_comms_stats)) {
			chdlc_priv_area->timer_int_enabled &= 
				~TMR_INT_ENABLED_UPDATE;
		}
        }
        if(!chdlc_priv_area->timer_int_enabled) {
                flags = card->u.c.flags;
                flags->interrupt_info_struct.interrupt_permission &=
                        ~APP_INT_ON_TIMER;
        }
}
void timer_intr ( sdla_t * card ) { struct net_device * dev ; chdlc_private_area_t * chdlc_priv_area = NULL ; SHARED_MEMORY_INFO_STRUCT * flags = NULL ; dev = card -> wandev . dev ; chdlc_priv_area = dev -> priv ; if ( chdlc_priv_area -> timer_int_enabled & TMR_INT_ENABLED_UDP ) { process_udp_mgmt_pkt ( card , dev , chdlc_priv_area ) ; chdlc_priv_area -> timer_int_enabled &= ~ TMR_INT_ENABLED_UDP ; } if ( chdlc_priv_area -> timer_int_enabled & TMR_INT_ENABLED_UPDATE ) { update_comms_stats ( card , chdlc_priv_area ) ; if ( ! ( -- chdlc_priv_area -> update_comms_stats ) ) { chdlc_priv_area -> timer_int_enabled &= ~ TMR_INT_ENABLED_UPDATE ; } } if ( ! chdlc_priv_area -> timer_int_enabled ) { flags = card -> u . c . flags ; flags -> interrupt_info_struct . interrupt_permission &= ~ APP_INT_ON_TIMER ; } }
Timer interrupt handler.
Timer interrupt handler .
/* process a udp call if pending */ /* read the communications statistics if required */ /* only disable the timer interrupt if there are no udp or statistic */ /* updates pending */