Changeset b72efe8 in mainline for uspace/srv/hw
- Timestamp:
- 2011-06-19T14:38:59Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 74464e8
- Parents:
- 1d1bb0f
- Location:
- uspace/srv/hw/netif/ne2000
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/netif/ne2000/dp8390.c
r1d1bb0f rb72efe8 483 483 } 484 484 485 static li nk_t *ne2k_receive(ne2k_t *ne2k)485 static list_t *ne2k_receive(ne2k_t *ne2k) 486 486 { 487 487 /* … … 490 490 * frames from the network, but they will be lost. 491 491 */ 492 li nk_t *frames = (link_t *) malloc(sizeof(link_t));492 list_t *frames = (list_t *) malloc(sizeof(list_t)); 493 493 if (frames != NULL) 494 494 list_initialize(frames); … … 567 567 } 568 568 569 li nk_t *ne2k_interrupt(ne2k_t *ne2k, uint8_t isr, uint8_t tsr)569 list_t *ne2k_interrupt(ne2k_t *ne2k, uint8_t isr, uint8_t tsr) 570 570 { 571 571 /* List of received frames */ 572 li nk_t *frames = NULL;572 list_t *frames = NULL; 573 573 574 574 if (isr & (ISR_PTX | ISR_TXE)) { -
uspace/srv/hw/netif/ne2000/dp8390.h
r1d1bb0f rb72efe8 241 241 extern void ne2k_down(ne2k_t *); 242 242 extern void ne2k_send(ne2k_t *, packet_t *); 243 extern li nk_t *ne2k_interrupt(ne2k_t *, uint8_t, uint8_t);243 extern list_t *ne2k_interrupt(ne2k_t *, uint8_t, uint8_t); 244 244 245 245 #endif -
uspace/srv/hw/netif/ne2000/ne2000.c
r1d1bb0f rb72efe8 168 168 169 169 if (ne2k != NULL) { 170 li nk_t *frames =170 list_t *frames = 171 171 ne2k_interrupt(ne2k, IRQ_GET_ISR(*call), IRQ_GET_TSR(*call)); 172 172 173 173 if (frames != NULL) { 174 174 while (!list_empty(frames)) { 175 frame_t *frame = 176 list_ get_instance(frames->next, frame_t, link);175 frame_t *frame = list_get_instance( 176 list_first(frames), frame_t, link); 177 177 178 178 list_remove(&frame->link); 179 nil_received_msg(nil_phone, device_id, frame->packet,180 SERVICE_NONE);179 nil_received_msg(nil_phone, device_id, 180 frame->packet, SERVICE_NONE); 181 181 free(frame); 182 182 }
Note:
See TracChangeset
for help on using the changeset viewer.