42c42 < // Contributors: Juergen Lambrecht --- > // Contributors: 44,45c44,45 < // Purpose: BSD compatible network driver < // Description: HW network driver for AT91 EMAC block of AT91SAM uC's. --- > // Purpose: > // Description: 46,47d45 < // Limitations: Jumbo frames are not supported because of < // AT91_EMAC_RBD_SR_LEN_MASK = 0xFFF 953c951 < /* buffer_pos is position in current 128B buffer */ --- > 954,957d951 < /* bytes_in_list is position in current sg_list */ < /* total bytes is total no. of packet bytes already copied */ < /* todo: check all cases */ < /* 1. packet in 1 rd-buf */ 960,961c954,955 < while(bytes_in_list < sg_list[i].len) //freebsd - i=0: 14B < { //freebsd - i=1: 128B or remainder of packet --- > while(bytes_in_list < sg_list[i].len) > { 965,966c959,960 < { /* This 128B buffer contains the End Of the Frame. */ < bytes_in_buffer = --- > { > bytes_in_buffer = 968c962 < - total_bytes); /* - buffer_pos; */ --- > - total_bytes) - buffer_pos; 969d962 < //??? total_bytes already contains buffer_pos; ... 972c965 < { /* AT91_EMAC_RX_BUFF_SIZE = 128B */ --- > { 981c974 < memcpy(sg_buf, /* &sg_buf[bytes_in_list], */ --- > memcpy(&sg_buf[bytes_in_list], 991c984 < memcpy(sg_buf, /* wrong: &sg_buf[bytes_in_list], */ --- > memcpy(&sg_buf[bytes_in_list], 1008d1000 < bytes_in_list = 0; /* go to next list */