diff options
Diffstat (limited to 'drivers/net/irda/via-ircc.c')
-rw-r--r-- | drivers/net/irda/via-ircc.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c index c3ed9b3067e5..ff5358574d0a 100644 --- a/drivers/net/irda/via-ircc.c +++ b/drivers/net/irda/via-ircc.c | |||
@@ -925,8 +925,8 @@ static int via_ircc_hard_xmit_fir(struct sk_buff *skb, | |||
925 | 925 | ||
926 | self->tx_fifo.tail += skb->len; | 926 | self->tx_fifo.tail += skb->len; |
927 | self->stats.tx_bytes += skb->len; | 927 | self->stats.tx_bytes += skb->len; |
928 | memcpy(self->tx_fifo.queue[self->tx_fifo.free].start, skb->data, | 928 | skb_copy_from_linear_data(skb, |
929 | skb->len); | 929 | self->tx_fifo.queue[self->tx_fifo.free].start, skb->len); |
930 | self->tx_fifo.len++; | 930 | self->tx_fifo.len++; |
931 | self->tx_fifo.free++; | 931 | self->tx_fifo.free++; |
932 | //F01 if (self->tx_fifo.len == 1) { | 932 | //F01 if (self->tx_fifo.len == 1) { |
@@ -1125,7 +1125,7 @@ static int via_ircc_dma_receive_complete(struct via_ircc_cb *self, | |||
1125 | self->stats.rx_bytes += len; | 1125 | self->stats.rx_bytes += len; |
1126 | self->stats.rx_packets++; | 1126 | self->stats.rx_packets++; |
1127 | skb->dev = self->netdev; | 1127 | skb->dev = self->netdev; |
1128 | skb->mac.raw = skb->data; | 1128 | skb_reset_mac_header(skb); |
1129 | skb->protocol = htons(ETH_P_IRDA); | 1129 | skb->protocol = htons(ETH_P_IRDA); |
1130 | netif_rx(skb); | 1130 | netif_rx(skb); |
1131 | return TRUE; | 1131 | return TRUE; |
@@ -1189,7 +1189,7 @@ F01_E */ | |||
1189 | skb_reserve(skb, 1); | 1189 | skb_reserve(skb, 1); |
1190 | skb_put(skb, len - 4); | 1190 | skb_put(skb, len - 4); |
1191 | 1191 | ||
1192 | memcpy(skb->data, self->rx_buff.data, len - 4); | 1192 | skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4); |
1193 | IRDA_DEBUG(2, "%s(): len=%x.rx_buff=%p\n", __FUNCTION__, | 1193 | IRDA_DEBUG(2, "%s(): len=%x.rx_buff=%p\n", __FUNCTION__, |
1194 | len - 4, self->rx_buff.data); | 1194 | len - 4, self->rx_buff.data); |
1195 | 1195 | ||
@@ -1198,7 +1198,7 @@ F01_E */ | |||
1198 | self->stats.rx_bytes += len; | 1198 | self->stats.rx_bytes += len; |
1199 | self->stats.rx_packets++; | 1199 | self->stats.rx_packets++; |
1200 | skb->dev = self->netdev; | 1200 | skb->dev = self->netdev; |
1201 | skb->mac.raw = skb->data; | 1201 | skb_reset_mac_header(skb); |
1202 | skb->protocol = htons(ETH_P_IRDA); | 1202 | skb->protocol = htons(ETH_P_IRDA); |
1203 | netif_rx(skb); | 1203 | netif_rx(skb); |
1204 | 1204 | ||
@@ -1234,7 +1234,7 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase) | |||
1234 | } | 1234 | } |
1235 | skb_reserve(skb, 1); | 1235 | skb_reserve(skb, 1); |
1236 | skb_put(skb, len - 4 + 1); | 1236 | skb_put(skb, len - 4 + 1); |
1237 | memcpy(skb->data, self->rx_buff.data, len - 4 + 1); | 1237 | skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4 + 1); |
1238 | st_fifo->tail++; | 1238 | st_fifo->tail++; |
1239 | st_fifo->len++; | 1239 | st_fifo->len++; |
1240 | if (st_fifo->tail > MAX_RX_WINDOW) | 1240 | if (st_fifo->tail > MAX_RX_WINDOW) |
@@ -1244,7 +1244,7 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase) | |||
1244 | self->stats.rx_bytes += len; | 1244 | self->stats.rx_bytes += len; |
1245 | self->stats.rx_packets++; | 1245 | self->stats.rx_packets++; |
1246 | skb->dev = self->netdev; | 1246 | skb->dev = self->netdev; |
1247 | skb->mac.raw = skb->data; | 1247 | skb_reset_mac_header(skb); |
1248 | skb->protocol = htons(ETH_P_IRDA); | 1248 | skb->protocol = htons(ETH_P_IRDA); |
1249 | netif_rx(skb); | 1249 | netif_rx(skb); |
1250 | if (st_fifo->len < (MAX_RX_WINDOW + 2)) { | 1250 | if (st_fifo->len < (MAX_RX_WINDOW + 2)) { |
@@ -1303,7 +1303,7 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase) | |||
1303 | } | 1303 | } |
1304 | skb_reserve(skb, 1); | 1304 | skb_reserve(skb, 1); |
1305 | skb_put(skb, len - 4); | 1305 | skb_put(skb, len - 4); |
1306 | memcpy(skb->data, self->rx_buff.data, len - 4); | 1306 | skb_copy_to_linear_data(skb, self->rx_buff.data, len - 4); |
1307 | 1307 | ||
1308 | IRDA_DEBUG(2, "%s(): len=%x.head=%x\n", __FUNCTION__, | 1308 | IRDA_DEBUG(2, "%s(): len=%x.head=%x\n", __FUNCTION__, |
1309 | len - 4, st_fifo->head); | 1309 | len - 4, st_fifo->head); |
@@ -1313,7 +1313,7 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase) | |||
1313 | self->stats.rx_bytes += len; | 1313 | self->stats.rx_bytes += len; |
1314 | self->stats.rx_packets++; | 1314 | self->stats.rx_packets++; |
1315 | skb->dev = self->netdev; | 1315 | skb->dev = self->netdev; |
1316 | skb->mac.raw = skb->data; | 1316 | skb_reset_mac_header(skb); |
1317 | skb->protocol = htons(ETH_P_IRDA); | 1317 | skb->protocol = htons(ETH_P_IRDA); |
1318 | netif_rx(skb); | 1318 | netif_rx(skb); |
1319 | } //while | 1319 | } //while |