aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/via-ircc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/via-ircc.c')
-rw-r--r--drivers/net/irda/via-ircc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index a5ca71cec028..fddb4efd5453 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -1185,8 +1185,8 @@ F01_E */
1185 * if frame size,data ptr,or skb ptr are wrong ,the get next 1185 * if frame size,data ptr,or skb ptr are wrong ,the get next
1186 * entry. 1186 * entry.
1187 */ 1187 */
1188 if ((skb == NULL) || (skb->data == NULL) 1188 if ((skb == NULL) || (skb->data == NULL) ||
1189 || (self->rx_buff.data == NULL) || (len < 6)) { 1189 (self->rx_buff.data == NULL) || (len < 6)) {
1190 self->netdev->stats.rx_dropped++; 1190 self->netdev->stats.rx_dropped++;
1191 return TRUE; 1191 return TRUE;
1192 } 1192 }
@@ -1284,8 +1284,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1284 self->RetryCount++; 1284 self->RetryCount++;
1285 1285
1286 if ((self->RetryCount >= 1) || 1286 if ((self->RetryCount >= 1) ||
1287 ((st_fifo->pending_bytes + 2048) > self->rx_buff.truesize) 1287 ((st_fifo->pending_bytes + 2048) > self->rx_buff.truesize) ||
1288 || (st_fifo->len >= (MAX_RX_WINDOW))) { 1288 (st_fifo->len >= (MAX_RX_WINDOW))) {
1289 while (st_fifo->len > 0) { //upload frame 1289 while (st_fifo->len > 0) { //upload frame
1290 // Put this entry back in fifo 1290 // Put this entry back in fifo
1291 if (st_fifo->head > MAX_RX_WINDOW) 1291 if (st_fifo->head > MAX_RX_WINDOW)
@@ -1300,8 +1300,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1300 * if frame size, data ptr, or skb ptr are wrong, 1300 * if frame size, data ptr, or skb ptr are wrong,
1301 * then get next entry. 1301 * then get next entry.
1302 */ 1302 */
1303 if ((skb == NULL) || (skb->data == NULL) 1303 if ((skb == NULL) || (skb->data == NULL) ||
1304 || (self->rx_buff.data == NULL) || (len < 6)) { 1304 (self->rx_buff.data == NULL) || (len < 6)) {
1305 self->netdev->stats.rx_dropped++; 1305 self->netdev->stats.rx_dropped++;
1306 continue; 1306 continue;
1307 } 1307 }
@@ -1332,8 +1332,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1332 * if frame is receive complete at this routine ,then upload 1332 * if frame is receive complete at this routine ,then upload
1333 * frame. 1333 * frame.
1334 */ 1334 */
1335 if ((GetRXStatus(iobase) & 0x10) 1335 if ((GetRXStatus(iobase) & 0x10) &&
1336 && (RxCurCount(iobase, self) != self->RxLastCount)) { 1336 (RxCurCount(iobase, self) != self->RxLastCount)) {
1337 upload_rxdata(self, iobase); 1337 upload_rxdata(self, iobase);
1338 if (irda_device_txqueue_empty(self->netdev)) 1338 if (irda_device_txqueue_empty(self->netdev))
1339 via_ircc_dma_receive(self); 1339 via_ircc_dma_receive(self);