Do not reject frames with a length exactly equal to the uIP bufer size.
This commit is contained in:
parent
e88997b71c
commit
74dfff972f
|
@ -243,16 +243,16 @@ fixup29:lda rxtxreg
|
|||
bne :+
|
||||
inc cnt+1
|
||||
|
||||
; Is cnt > bufsize ?
|
||||
; Is bufsize < cnt ?
|
||||
: sec
|
||||
lda cnt
|
||||
sbc bufsize
|
||||
lda cnt+1
|
||||
sbc bufsize+1
|
||||
bcc :+
|
||||
lda bufsize
|
||||
sbc cnt
|
||||
lda bufsize+1
|
||||
sbc cnt+1
|
||||
bcs :+
|
||||
|
||||
; Yes, skip frame
|
||||
; PACKETPP = $0102, PPDATA = PPDATA | $0040
|
||||
; PACKETPP = $0102, PPDATA = PPDATA | $0040
|
||||
lda #$02
|
||||
ldx #$01
|
||||
fixup30:sta packetpp
|
||||
|
@ -272,7 +272,7 @@ fixup33:sta ppdata
|
|||
sta ptr
|
||||
stx ptr+1
|
||||
ldx cnt+1
|
||||
ldy #$00
|
||||
ldy #$00
|
||||
read:
|
||||
fixup34:lda rxtxreg
|
||||
sta (ptr),y
|
||||
|
@ -330,7 +330,7 @@ fixup42:lda ppdata+1
|
|||
bne :+
|
||||
|
||||
; No space avaliable, skip a received frame
|
||||
; PACKETPP = $0102, PPDATA = PPDATA | $0040
|
||||
; PACKETPP = $0102, PPDATA = PPDATA | $0040
|
||||
lda #$02
|
||||
ldx #$01
|
||||
fixup43:sta packetpp
|
||||
|
|
|
@ -262,13 +262,13 @@ fixup24:lda ethdata
|
|||
sbc #$00
|
||||
sta len+1
|
||||
|
||||
; Is len > bufsize ?
|
||||
; Is bufsize < len ?
|
||||
sec
|
||||
lda len
|
||||
sbc bufsize
|
||||
lda len+1
|
||||
sbc bufsize+1
|
||||
bcc :+
|
||||
lda bufsize
|
||||
sbc len
|
||||
lda bufsize+1
|
||||
sbc len+1
|
||||
bcs :+
|
||||
|
||||
; Yes, skip packet
|
||||
; Remove and release RX packet from the FIFO
|
||||
|
@ -285,8 +285,8 @@ fixup25:sta ethmmucr
|
|||
ldx bufaddr+1
|
||||
sta ptr
|
||||
stx ptr+1
|
||||
ldx len+1
|
||||
ldy #$00
|
||||
ldx len+1
|
||||
ldy #$00
|
||||
read:
|
||||
fixup26:lda ethdata
|
||||
sta (ptr),y
|
||||
|
@ -395,8 +395,8 @@ fixup39:sta ethdata
|
|||
bcc :+
|
||||
|
||||
; Yes
|
||||
lda #%00100000 ; ODD
|
||||
bne :++ ; Always
|
||||
lda #%00100000 ; ODD
|
||||
bne :++ ; Always
|
||||
|
||||
; No
|
||||
: lda #$00
|
||||
|
|
Loading…
Reference in a new issue