]> 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 21c091dd39ee3ec35fb89ba1550932491f61cfcb..86db63d7f7602a7cd746ef3d69f9803670375c31 100644 (file)
@@ -678,7 +678,7 @@ static int wireless_seq_show(struct seq_file *seq, void *v)
        return 0;
 }
 
-static struct seq_operations wireless_seq_ops = {
+static const struct seq_operations wireless_seq_ops = {
        .start = dev_seq_start,
        .next  = dev_seq_next,
        .stop  = dev_seq_stop,
@@ -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;
 }