Subversion Repositories Kolibri OS

Rev

Rev 1206 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1206 Rev 1254
Line 16... Line 16...
16
;; based on RTL8029.asm driver for menuetos                        ;;
16
;; based on RTL8029.asm driver for menuetos                        ;;
17
;; and realtek8029.asm for SolarOS by Eugen Brasoveanu             ;;
17
;; and realtek8029.asm for SolarOS by Eugen Brasoveanu             ;;
18
;;                                                                 ;;
18
;;                                                                 ;;
19
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 20... Line 20...
20
 
20
 
Line 21... Line 21...
21
$Revision: 1206 $
21
$Revision: 1254 $
Line 22... Line 22...
22
 
22
 
Line 756... Line 756...
756
 
756
 
757
 
757
 
758
;***************************************************************************
758
;***************************************************************************
759
;   Function
759
;   Function
760
;      transmit
760
;      transmit
Line 761... Line 761...
761
; buffer in [esp], size in [esp+4], pointer to device struct in ebx
761
; buffer in [esp+4], size in [esp+8], pointer to device struct in ebx
762
;***************************************************************************
762
;***************************************************************************
763
 
763
 
Line 764... Line 764...
764
align 4
764
align 4
765
transmit:
765
transmit:
766
	mov	ebp, ebx
766
	mov	ebp, ebx
767
 
767
 
Line 768... Line 768...
768
	mov	esi, [esp]
768
	mov	esi, [esp + 4]
769
	mov	ecx, [esp + 4]
769
	mov	ecx, [esp + 8]
770
	DEBUGF	2,"Transmitting packet, buffer:%x, size:%u\n",esi, ecx
770
	DEBUGF	2,"Transmitting packet, buffer:%x, size:%u\n",esi, ecx
771
	DEBUGF	2,"To: %x-%x-%x-%x-%x-%x From: %x-%x-%x-%x-%x-%x Type:%x%x\n",[esi+0]:2,[esi+1]:2,[esi+2]:2,[esi+3]:2,[esi+4]:2,[esi+5]:2,[esi+6]:2,[esi+7]:2,[esi+8]:2,[esi+9]:2,[esi+10]:2,[esi+11]:2,[esi+13]:2,[esi+12]:2
771
	DEBUGF	2,"To: %x-%x-%x-%x-%x-%x From: %x-%x-%x-%x-%x-%x Type:%x%x\n",[esi+0]:2,[esi+1]:2,[esi+2]:2,[esi+3]:2,[esi+4]:2,[esi+5]:2,[esi+6]:2,[esi+7]:2,[esi+8]:2,[esi+9]:2,[esi+10]:2,[esi+11]:2,[esi+13]:2,[esi+12]:2
Line 772... Line 772...
772
 
772
 
773
	cmp	dword [esp+4], ETH_FRAME_LEN
773
	cmp	dword [esp + 8], ETH_FRAME_LEN
774
	jg	.finish ; packet is too long
774
	jg	.finish ; packet is too long
Line 802... Line 802...
802
	out	dx, al
802
	out	dx, al
Line 803... Line 803...
803
 
803
 
Line 804... Line 804...
804
	DEBUGF	2," - Packet Sent!\n"
804
	DEBUGF	2," - Packet Sent!\n"
805
 
805
 
Line 806... Line 806...
806
	inc	[ebp+device.packets_tx] 	 ;
806
	inc	[ebp+device.packets_tx] 	 ;
807
	mov	eax, [esp+4]			 ; Get packet size in eax
807
	mov	eax, [esp + 8]			 ; Get packet size in eax
808
 
808
 
809
	add	dword [ebp + device.bytes_tx], eax
809
	add	dword [ebp + device.bytes_tx], eax
810
	adc	dword [ebp + device.bytes_tx + 4], 0
-
 
811
.finish:
-
 
812
	mov	ebx, ebp
-
 
813
 
810
	adc	dword [ebp + device.bytes_tx + 4], 0
Line 814... Line 811...
814
	call	KernelFree
811
.finish: