new function: NET_packet_free, i8255x driver should not cause problems anymore.

git-svn-id: svn://kolibrios.org@3861 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-08-07 13:13:29 +00:00
parent b4f0e98afc
commit 72f900e956
10 changed files with 26 additions and 19 deletions

View File

@ -293,7 +293,7 @@ ARP_input:
DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: IP address conflict detected!\n" DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: IP address conflict detected!\n"
.exit: .exit:
call kernel_free call NET_packet_free
add esp, 4 ; pop (balance stack) add esp, 4 ; pop (balance stack)
DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: exiting\n" DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: exiting\n"

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; IPv4.INC ;; ;; IPv4.INC ;;
@ -305,7 +305,7 @@ IPv4_input: ; TODO: add IPv4
.dump: .dump:
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_input: dumping\n" DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_input: dumping\n"
inc [IP_packets_dumped] ; FIXME: use correct interface inc [IP_packets_dumped] ; FIXME: use correct interface
call kernel_free call NET_packet_free
add esp, 4 ; pop (balance stack) add esp, 4 ; pop (balance stack)
ret ret
@ -485,7 +485,7 @@ IPv4_input: ; TODO: add IPv4
push edx ; Push pointer to fragment onto stack push edx ; Push pointer to fragment onto stack
mov ebx, [edx + FRAGMENT_entry.Owner] ; we need to remeber the owner, in case this is the last packet mov ebx, [edx + FRAGMENT_entry.Owner] ; we need to remeber the owner, in case this is the last packet
mov edx, [edx + FRAGMENT_entry.NextPtr] ; Set edx to the next pointer mov edx, [edx + FRAGMENT_entry.NextPtr] ; Set edx to the next pointer
call kernel_free ; free the previous fragment buffer (this uses the value from stack) call NET_packet_free ; free the previous fragment buffer (this uses the value from stack)
pop eax pop eax
cmp edx, -1 ; Check if it is last fragment in chain cmp edx, -1 ; Check if it is last fragment in chain
jne .rebuild_packet_loop jne .rebuild_packet_loop
@ -845,7 +845,7 @@ IPv4_fragment:
add esp, 12 + 4 + 6 add esp, 12 + 4 + 6
.err2: .err2:
DEBUGF DEBUG_NETWORK_VERBOSE, "Ipv4_fragment: dumping\n" DEBUGF DEBUG_NETWORK_VERBOSE, "Ipv4_fragment: dumping\n"
call kernel_free call NET_packet_free
add esp, 4 add esp, 4
ret ret

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2012. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2012-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; PPPoE.INC ;; ;; PPPoE.INC ;;
@ -103,7 +103,7 @@ PPPoE_discovery_input:
popa popa
DEBUGF DEBUG_NETWORK_VERBOSE, 'PPPoE_discovery_input: dumping\n' DEBUGF DEBUG_NETWORK_VERBOSE, 'PPPoE_discovery_input: dumping\n'
call kernel_free call NET_packet_free
add esp, 4 add esp, 4
ret ret
@ -229,7 +229,7 @@ PPPoE_session_input:
.dump: .dump:
DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_input: dumping\n" DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_input: dumping\n"
call kernel_free call NET_packet_free
add esp, 4 add esp, 4
ret ret

View File

@ -82,7 +82,7 @@ ETH_input:
.dump: .dump:
DEBUGF DEBUG_NETWORK_VERBOSE,"ETH_input: dumping\n" DEBUGF DEBUG_NETWORK_VERBOSE,"ETH_input: dumping\n"
call kernel_free call NET_packet_free
add esp, 4 add esp, 4
ret ret

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2004-2010. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; ICMP.INC ;; ;; ICMP.INC ;;
@ -304,7 +304,7 @@ ICMP_input:
.dump: .dump:
DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP_input: dumping\n" DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP_input: dumping\n"
call kernel_free call NET_packet_free
add esp, 4 ; pop (balance stack) add esp, 4 ; pop (balance stack)
ret ret

View File

@ -97,7 +97,7 @@ LOOP_input:
.dump: .dump:
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_input: dumping\n" DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_input: dumping\n"
call kernel_free call NET_packet_free
add esp, 4 add esp, 4
ret ret

View File

@ -929,7 +929,7 @@ SOCKET_receive_dgram:
rep movsd rep movsd
.nd: .nd:
call kernel_free ; free kernel buffer call NET_packet_free
pop eax ; return number of bytes copied to application pop eax ; return number of bytes copied to application
xor ebx, ebx xor ebx, ebx
ret ret
@ -1568,7 +1568,7 @@ SOCKET_input:
call mutex_unlock call mutex_unlock
popa popa
call kernel_free call NET_packet_free
add esp, 8 add esp, 8
ret ret

View File

@ -316,6 +316,11 @@ stack_handler:
ret ret
align 4
NET_packet_free:
and dword[esp+4], not 0xfff
jmp kernel_free
align 4 align 4
NET_link_changed: NET_link_changed:

View File

@ -69,7 +69,7 @@ TCP_input:
inc [TCP_segments_missed + edi] inc [TCP_segments_missed + edi]
add esp, sizeof.TCP_queue_entry - 8 add esp, sizeof.TCP_queue_entry - 8
call kernel_free call NET_packet_free
add esp, 4 add esp, 4
ret ret
@ -1490,6 +1490,8 @@ align 4
.out_of_order: .out_of_order:
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP data is out of order\n"
; Uh-oh, some data is out of order, lets call TCP reassemble for help ; Uh-oh, some data is out of order, lets call TCP reassemble for help
call TCP_reassemble call TCP_reassemble
@ -1621,7 +1623,7 @@ align 4
.dumpit: .dumpit:
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: dumping\n" DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: dumping\n"
call kernel_free call NET_packet_free
add esp, 4 add esp, 4
jmp .loop jmp .loop
@ -1694,6 +1696,6 @@ align 4
.drop_no_socket: .drop_no_socket:
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: Drop (no socket)\n" DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: Drop (no socket)\n"
call kernel_free call NET_packet_free
add esp, 4 add esp, 4
jmp .loop jmp .loop

View File

@ -1,6 +1,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;; ;; ;;
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; ;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;;
;; Distributed under terms of the GNU General Public License ;; ;; Distributed under terms of the GNU General Public License ;;
;; ;; ;; ;;
;; UDP.INC ;; ;; UDP.INC ;;
@ -230,7 +230,7 @@ UDP_input:
DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: checksum mismatch\n" DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: checksum mismatch\n"
.dump: .dump:
call kernel_free call NET_packet_free
add esp, 4 ; pop (balance stack) add esp, 4 ; pop (balance stack)
DEBUGF DEBUG_NETWORK_VERBOSE,"UDP_input: dumping\n" DEBUGF DEBUG_NETWORK_VERBOSE,"UDP_input: dumping\n"