]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/wireless/ti/wlcore/rx.c
net: manual clean code which call skb_put_[data:zero]
[mirror_ubuntu-artful-kernel.git] / drivers / net / wireless / ti / wlcore / rx.c
index 52a55f9acd80d41da600b16c2b379ff9a680c83a..0f15696195f884f59c82e431757593362a0489ca 100644 (file)
@@ -117,7 +117,6 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
        struct wl1271_rx_descriptor *desc;
        struct sk_buff *skb;
        struct ieee80211_hdr *hdr;
-       u8 *buf;
        u8 beacon = 0;
        u8 is_data = 0;
        u8 reserved = 0, offset_to_data = 0;
@@ -174,15 +173,13 @@ static int wl1271_rx_handle_data(struct wl1271 *wl, u8 *data, u32 length,
        /* reserve the unaligned payload(if any) */
        skb_reserve(skb, reserved);
 
-       buf = skb_put(skb, pkt_data_len);
-
        /*
         * Copy packets from aggregation buffer to the skbs without rx
         * descriptor and with packet payload aligned care. In case of unaligned
         * packets copy the packets in offset of 2 bytes guarantee IP header
         * payload aligned to 4 bytes.
         */
-       memcpy(buf, data + sizeof(*desc), pkt_data_len);
+       skb_put_data(skb, data + sizeof(*desc), pkt_data_len);
        if (rx_align == WLCORE_RX_BUF_PADDED)
                skb_pull(skb, RX_BUF_ALIGN);