Subversion Repositories HelenOS

Rev

Rev 4722 | Rev 4731 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4722 Rev 4728
Line 186... Line 186...
186
 
186
 
187
    ERROR_PROPAGATE( find_device( device_id, & device ));
187
    ERROR_PROPAGATE( find_device( device_id, & device ));
188
    if( device->state != NETIF_ACTIVE ) return EPERM;
188
    if( device->state != NETIF_ACTIVE ) return EPERM;
189
    next = packet;
189
    next = packet;
190
    do{
190
    do{
191
        ++ (( device_stats_ref ) device->specific )->tx_packets;
191
        ++ (( device_stats_ref ) device->specific )->send_packets;
192
        ++ (( device_stats_ref ) device->specific )->rx_packets;
192
        ++ (( device_stats_ref ) device->specific )->receive_packets;
193
        length = packet_get_data_length( next );
193
        length = packet_get_data_length( next );
194
        (( device_stats_ref ) device->specific )->tx_bytes += length;
194
        (( device_stats_ref ) device->specific )->send_bytes += length;
195
        (( device_stats_ref ) device->specific )->rx_bytes += length;
195
        (( device_stats_ref ) device->specific )->receive_bytes += length;
196
        next = pq_next( next );
196
        next = pq_next( next );
197
    }while( next );
197
    }while( next );
198
    phone = device->nil_phone;
198
    phone = device->nil_phone;
199
    fibril_rwlock_write_unlock( & netif_globals.lock );
199
    fibril_rwlock_write_unlock( & netif_globals.lock );
200
    nil_received_msg( phone, device_id, packet, sender );
200
    nil_received_msg( phone, device_id, packet, sender );