diff options
Diffstat (limited to 'drivers/net/wireless/prism54')
-rw-r--r-- | drivers/net/wireless/prism54/islpci_eth.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c index 6ebfff034242..7d8bff1dbc4d 100644 --- a/drivers/net/wireless/prism54/islpci_eth.c +++ b/drivers/net/wireless/prism54/islpci_eth.c | |||
@@ -162,13 +162,16 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev) | |||
162 | 162 | ||
163 | skb_put(newskb, init_wds ? skb->len + 6 : skb->len); | 163 | skb_put(newskb, init_wds ? skb->len + 6 : skb->len); |
164 | if (init_wds) { | 164 | if (init_wds) { |
165 | memcpy(newskb->data + 6, skb->data, skb->len); | 165 | skb_copy_from_linear_data(skb, |
166 | newskb->data + 6, | ||
167 | skb->len); | ||
166 | memcpy(newskb->data, wds_mac, 6); | 168 | memcpy(newskb->data, wds_mac, 6); |
167 | #ifdef ISLPCI_ETH_DEBUG | 169 | #ifdef ISLPCI_ETH_DEBUG |
168 | printk("islpci_eth_transmit:wds_mac\n"); | 170 | printk("islpci_eth_transmit:wds_mac\n"); |
169 | #endif | 171 | #endif |
170 | } else | 172 | } else |
171 | memcpy(newskb->data, skb->data, skb->len); | 173 | skb_copy_from_linear_data(skb, newskb->data, |
174 | skb->len); | ||
172 | 175 | ||
173 | #if VERBOSE > SHOW_ERROR_MESSAGES | 176 | #if VERBOSE > SHOW_ERROR_MESSAGES |
174 | DEBUG(SHOW_TRACING, "memcpy %p %p %i wds %i\n", | 177 | DEBUG(SHOW_TRACING, "memcpy %p %p %i wds %i\n", |
@@ -394,8 +397,10 @@ islpci_eth_receive(islpci_private *priv) | |||
394 | /* Update spy records */ | 397 | /* Update spy records */ |
395 | wireless_spy_update(ndev, annex->addr2, &wstats); | 398 | wireless_spy_update(ndev, annex->addr2, &wstats); |
396 | 399 | ||
397 | memcpy(skb->data + sizeof (struct rfmon_header), | 400 | skb_copy_from_linear_data(skb, |
398 | skb->data, 2 * ETH_ALEN); | 401 | (skb->data + |
402 | sizeof(struct rfmon_header)), | ||
403 | 2 * ETH_ALEN); | ||
399 | skb_pull(skb, sizeof (struct rfmon_header)); | 404 | skb_pull(skb, sizeof (struct rfmon_header)); |
400 | } | 405 | } |
401 | skb->protocol = eth_type_trans(skb, ndev); | 406 | skb->protocol = eth_type_trans(skb, ndev); |