diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-10-30 22:13:49 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-10-31 22:49:27 +0100 |
commit | 86d99c9d455e5695a24cf8504f2ba0a0cde9ce28 (patch) | |
tree | 93412cb5ecf4530ffbbf1e33936e0931002f27c8 /patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch | |
parent | 338c4388ccd4bc5829c9c0c5953264f529ae1ad4 (diff) |
backports: replace netlink portid by semantic patch
Introduce the infrastructure to apply semantic patches
and make use of it for the (frequently breaking) portid
patch for netlink.
Unfortunately this is significantly slower:
before:
real 0m14.312s
user 0m12.144s
sys 0m1.784s
after:
real 0m25.932s
user 0m21.768s
sys 0m2.932s
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch')
-rw-r--r-- | patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch b/patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch deleted file mode 100644 index e87ae9e5..00000000 --- a/patches/collateral-evolutions/nfc/01-netlink-portid/net_nfc_netlink.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- a/net/nfc/netlink.c -+++ b/net/nfc/netlink.c -@@ -71,7 +71,7 @@ static int nfc_genl_send_target(struct s - { - void *hdr; - -- hdr = genlmsg_put(msg, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, -+ hdr = genlmsg_put(msg, NETLINK_CB_PORTID(cb->skb), cb->nlh->nlmsg_seq, - &nfc_genl_family, flags, NFC_CMD_GET_TARGET); - if (!hdr) - return -EMSGSIZE; -@@ -546,7 +546,7 @@ static int nfc_genl_dump_devices(struct - while (dev) { - int rc; - -- rc = nfc_genl_send_device(skb, dev, NETLINK_CB(cb->skb).portid, -+ rc = nfc_genl_send_device(skb, dev, NETLINK_CB_PORTID(cb->skb), - cb->nlh->nlmsg_seq, cb, NLM_F_MULTI); - if (rc < 0) - break; -@@ -665,7 +665,7 @@ static int nfc_genl_get_device(struct sk - goto out_putdev; - } - -- rc = nfc_genl_send_device(msg, dev, info->snd_portid, info->snd_seq, -+ rc = nfc_genl_send_device(msg, dev, genl_info_snd_portid(info), info->snd_seq, - NULL, 0); - if (rc < 0) - goto out_free; -@@ -756,7 +756,7 @@ static int nfc_genl_start_poll(struct sk - - rc = nfc_start_poll(dev, im_protocols, tm_protocols); - if (!rc) -- dev->genl_data.poll_req_portid = info->snd_portid; -+ dev->genl_data.poll_req_portid = genl_info_snd_portid(info); - - mutex_unlock(&dev->genl_data.genl_data_mutex); - -@@ -790,7 +790,7 @@ static int nfc_genl_stop_poll(struct sk_ - - mutex_lock(&dev->genl_data.genl_data_mutex); - -- if (dev->genl_data.poll_req_portid != info->snd_portid) { -+ if (dev->genl_data.poll_req_portid != genl_info_snd_portid(info)) { - rc = -EBUSY; - goto out; - } -@@ -916,7 +916,7 @@ static int nfc_genl_llc_get_params(struc - goto exit; - } - -- rc = nfc_genl_send_params(msg, local, info->snd_portid, info->snd_seq); -+ rc = nfc_genl_send_params(msg, local, genl_info_snd_portid(info), info->snd_seq); - - exit: - device_unlock(&dev->dev); -@@ -1254,7 +1254,7 @@ static int nfc_genl_dump_ses(struct sk_b - while (dev) { - int rc; - -- rc = nfc_genl_send_se(skb, dev, NETLINK_CB(cb->skb).portid, -+ rc = nfc_genl_send_se(skb, dev, NETLINK_CB_PORTID(cb->skb), - cb->nlh->nlmsg_seq, cb, NLM_F_MULTI); - if (rc < 0) - break; -@@ -1499,12 +1499,12 @@ static int nfc_genl_rcv_nl_event(struct - if (event != NETLINK_URELEASE || n->protocol != NETLINK_GENERIC) - goto out; - -- pr_debug("NETLINK_URELEASE event from id %d\n", n->portid); -+ pr_debug("NETLINK_URELEASE event from id %d\n", netlink_notify_portid(n)); - - w = kmalloc(sizeof(*w), GFP_ATOMIC); - if (w) { - INIT_WORK((struct work_struct *) w, nfc_urelease_event_work); -- w->portid = n->portid; -+ w->portid = netlink_notify_portid(n); - schedule_work((struct work_struct *) w); - } - |