Rev 4498 | Rev 4703 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4498 | Rev 4582 | ||
---|---|---|---|
Line 143... | Line 143... | ||
143 | packet_t received; |
143 | packet_t received; |
144 | device_id_t device_id; |
144 | device_id_t device_id; |
145 | int phone; |
145 | int phone; |
146 | 146 | ||
147 | device_id = IRQ_GET_DEVICE( call ); |
147 | device_id = IRQ_GET_DEVICE( call ); |
148 | rwlock_write_lock( & netif_globals.lock ); |
148 | fibril_rwlock_write_lock( & netif_globals.lock ); |
149 | if( find_device( device_id, & device ) != EOK ){ |
149 | if( find_device( device_id, & device ) != EOK ){ |
150 | rwlock_write_unlock( & netif_globals.lock ); |
150 | fibril_rwlock_write_unlock( & netif_globals.lock ); |
151 | return; |
151 | return; |
152 | } |
152 | } |
153 | dep = ( dpeth_t * ) device->specific; |
153 | dep = ( dpeth_t * ) device->specific; |
154 | if ( dep->de_mode != DEM_ENABLED){ |
154 | if ( dep->de_mode != DEM_ENABLED){ |
155 | rwlock_write_unlock( & netif_globals.lock ); |
155 | fibril_rwlock_write_unlock( & netif_globals.lock ); |
156 | return; |
156 | return; |
157 | } |
157 | } |
158 | assert( dep->de_flags & DEF_ENABLED); |
158 | assert( dep->de_flags & DEF_ENABLED); |
159 | dep->de_int_pending = 0; |
159 | dep->de_int_pending = 0; |
160 | // TODO remove debug print: |
160 | // TODO remove debug print: |
Line 162... | Line 162... | ||
162 | dp_check_ints( dep, IPC_GET_ISR( call )); |
162 | dp_check_ints( dep, IPC_GET_ISR( call )); |
163 | if( dep->received_queue ){ |
163 | if( dep->received_queue ){ |
164 | received = dep->received_queue; |
164 | received = dep->received_queue; |
165 | phone = device->nil_phone; |
165 | phone = device->nil_phone; |
166 | dep->received_queue = NULL; |
166 | dep->received_queue = NULL; |
167 | rwlock_write_unlock( & netif_globals.lock ); |
167 | fibril_rwlock_write_unlock( & netif_globals.lock ); |
168 | // TODO remove debug dump: |
168 | // TODO remove debug dump: |
169 | uint8_t * data; |
169 | uint8_t * data; |
170 | data = packet_get_data( received ); |
170 | data = packet_get_data( received ); |
171 | printf( "Receiving packet:\n\tid\t= %d\n\tlength\t= %d\n\tdata\t= %.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX\n\t\t%.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX\n", packet_get_id( received ), packet_get_data_length( received ), data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ], data[ 6 ], data[ 7 ], data[ 8 ], data[ 9 ], data[ 10 ], data[ 11 ], data[ 12 ], data[ 13 ], data[ 14 ], data[ 15 ], data[ 16 ], data[ 17 ], data[ 18 ], data[ 19 ], data[ 20 ], data[ 21 ], data[ 22 ], data[ 23 ], data[ 24 ], data[ 25 ], data[ 26 ], data[ 27 ], data[ 28 ], data[ 29 ], data[ 30 ], data[ 31 ], data[ 32 ], data[ 33 ], data[ 34 ], data[ 35 ], data[ 36 ], data[ 37 ], data[ 38 ], data[ 39 ], data[ 40 ], data[ 41 ], data[ 42 ], data[ 43 ], data[ 44 ], data[ 45 ], data[ 46 ], data[ 47 ], data[ 48 ], data[ 49 ], data[ 50 ], data[ 51 ], data[ 52 ], data[ 53 ], data[ 54 ], data[ 55 ], data[ 56 ], data[ 57 ], data[ 58 ], data[ 59 ] ); |
171 | printf( "Receiving packet:\n\tid\t= %d\n\tlength\t= %d\n\tdata\t= %.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX\n\t\t%.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX:%.2hhX %.2hhX %.2hhX %.2hhX\n", packet_get_id( received ), packet_get_data_length( received ), data[ 0 ], data[ 1 ], data[ 2 ], data[ 3 ], data[ 4 ], data[ 5 ], data[ 6 ], data[ 7 ], data[ 8 ], data[ 9 ], data[ 10 ], data[ 11 ], data[ 12 ], data[ 13 ], data[ 14 ], data[ 15 ], data[ 16 ], data[ 17 ], data[ 18 ], data[ 19 ], data[ 20 ], data[ 21 ], data[ 22 ], data[ 23 ], data[ 24 ], data[ 25 ], data[ 26 ], data[ 27 ], data[ 28 ], data[ 29 ], data[ 30 ], data[ 31 ], data[ 32 ], data[ 33 ], data[ 34 ], data[ 35 ], data[ 36 ], data[ 37 ], data[ 38 ], data[ 39 ], data[ 40 ], data[ 41 ], data[ 42 ], data[ 43 ], data[ 44 ], data[ 45 ], data[ 46 ], data[ 47 ], data[ 48 ], data[ 49 ], data[ 50 ], data[ 51 ], data[ 52 ], data[ 53 ], data[ 54 ], data[ 55 ], data[ 56 ], data[ 57 ], data[ 58 ], data[ 59 ] ); |
172 | nil_received_msg( phone, device_id, received, NULL ); |
172 | nil_received_msg( phone, device_id, received, NULL ); |
173 | }else{ |
173 | }else{ |
174 | rwlock_write_unlock( & netif_globals.lock ); |
174 | fibril_rwlock_write_unlock( & netif_globals.lock ); |
175 | } |
175 | } |
176 | ipc_answer_0( iid, EOK ); |
176 | ipc_answer_0( iid, EOK ); |
177 | } |
177 | } |
178 | 178 | ||
179 | int netif_probe_auto_message( void ){ |
179 | int netif_probe_auto_message( void ){ |