]> err.no Git - linux-2.6/blobdiff - net/core/wireless.c
[NET]: Move sk_setup_caps() out of line.
[linux-2.6] / net / core / wireless.c
index 7c6a5db544f1c0e12ca279cc94683b7427c750b4..86db63d7f7602a7cd746ef3d69f9803670375c31 100644 (file)
@@ -1938,7 +1938,7 @@ static inline int rtnetlink_fill_iwinfo(struct sk_buff *  skb,
 {
        struct ifinfomsg *r;
        struct nlmsghdr  *nlh;
-       unsigned char    *b = skb->tail;
+       unsigned char    *b = skb_tail_pointer(skb);
 
        nlh = NLMSG_PUT(skb, 0, 0, type, sizeof(*r));
        r = NLMSG_DATA(nlh);
@@ -1952,12 +1952,12 @@ static inline int rtnetlink_fill_iwinfo(struct sk_buff *        skb,
        /* Add the wireless events in the netlink packet */
        RTA_PUT(skb, IFLA_WIRELESS, event_len, event);
 
-       nlh->nlmsg_len = skb->tail - b;
+       nlh->nlmsg_len = skb_tail_pointer(skb) - b;
        return skb->len;
 
 nlmsg_failure:
 rtattr_failure:
-       skb_trim(skb, b - skb->data);
+       nlmsg_trim(skb, b);
        return -1;
 }