linux/drivers/staging/wlan-ng
Johannes Berg 59ae1d127a networking: introduce and use skb_put_data()
A common pattern with skb_put() is to just want to memcpy()
some data into the new space, introduce skb_put_data() for
this.

An spatch similar to the one for skb_put_zero() converts many
of the places using it:

    @@
    identifier p, p2;
    expression len, skb, data;
    type t, t2;
    @@
    (
    -p = skb_put(skb, len);
    +p = skb_put_data(skb, data, len);
    |
    -p = (t)skb_put(skb, len);
    +p = skb_put_data(skb, data, len);
    )
    (
    p2 = (t2)p;
    -memcpy(p2, data, len);
    |
    -memcpy(p, data, len);
    )

    @@
    type t, t2;
    identifier p, p2;
    expression skb, data;
    @@
    t *p;
    ...
    (
    -p = skb_put(skb, sizeof(t));
    +p = skb_put_data(skb, data, sizeof(t));
    |
    -p = (t *)skb_put(skb, sizeof(t));
    +p = skb_put_data(skb, data, sizeof(t));
    )
    (
    p2 = (t2)p;
    -memcpy(p2, data, sizeof(*p));
    |
    -memcpy(p, data, sizeof(*p));
    )

    @@
    expression skb, len, data;
    @@
    -memcpy(skb_put(skb, len), data, len);
    +skb_put_data(skb, data, len);

(again, manually post-processed to retain some comments)

Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16 11:48:37 -04:00
..
cfg80211.c cfg80211: unify cfg80211_roamed() and cfg80211_roamed_bss() 2017-04-28 12:28:44 +02:00
hfa384x_usb.c networking: introduce and use skb_put_data() 2017-06-16 11:48:37 -04:00
hfa384x.h staging wlan-ng: fix type mismatch warnings in mkpdrlist() 2017-04-08 16:54:17 +02:00
Kconfig
Makefile
p80211conv.c staging: wlan-ng: remove extra parentheses 2017-03-06 09:16:59 +01:00
p80211conv.h staging: wlan-ng: add byte order annotation to struct p80211_caphdr 2017-03-09 19:06:36 +01:00
p80211hdr.h staging: wlan-ng: use GENMASK macro in different defines of p80211hdr.h 2016-11-14 15:43:20 +01:00
p80211ioctl.h staging: wlan-ng: fix block comments style in p80211ioctl.h 2016-10-16 10:25:50 +02:00
p80211metadef.h staging: wlan-ng: fix block comments style in p80211metadef.h 2016-10-16 10:25:52 +02:00
p80211metastruct.h
p80211mgmt.h staging: wlan-ng: fix block comments style in p80211mgmt.h 2016-10-16 10:25:52 +02:00
p80211msg.h staging: wlan-ng: fix block comments style in p80211msg.h 2016-10-16 10:25:53 +02:00
p80211netdev.c staging/iio driver patches for 4.11-rc1 2017-02-22 12:14:01 -08:00
p80211netdev.h staging: wlan-ng: use GENMASK macro in define of p80211netdev.h 2016-11-14 15:43:19 +01:00
p80211req.c staging: wlan-ng: break long line in p80211req.c 2017-04-28 12:03:51 +02:00
p80211req.h staging: wlan-ng: fix block comments style in p80211req.h 2016-10-16 10:25:55 +02:00
p80211types.h
p80211wep.c staging: wlan-ng: remove unnecessary blank lines in p80211wep.c 2016-11-10 13:25:33 +01:00
prism2fw.c staging wlan-ng: fix type mismatch warnings in mkpdrlist() 2017-04-08 16:54:17 +02:00
prism2mgmt.c Staging: wlan-ng: prism2mgmt: Removed an empty line 2017-03-06 09:16:59 +01:00
prism2mgmt.h staging: wlan-ng: fix block comments style in prism2mgmt.h 2016-10-16 10:25:56 +02:00
prism2mib.c staging: wlan-ng: remove space before tab 2017-02-16 10:16:55 -08:00
prism2sta.c staging: wlan-ng: Replace "the the " with "the" 2017-03-07 20:15:18 +01:00
prism2usb.c staging: wlang-ng: avoid new typedef: hfa384x_t 2016-10-02 17:05:56 +02:00
README

TODO:
	- checkpatch.pl cleanups
	- sparse warnings
	- move to use the in-kernel wireless stack

Please send any patches or complaints about this driver to Greg
Kroah-Hartman <greg@kroah.com> and don't bother the upstream wireless
kernel developers about it, they want nothing to do with it.