* [RTNETLINK]: Remove remains of wireless extensions over rtnetlink
@ 2007-05-21 21:39 Patrick McHardy
2007-05-22 9:27 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2007-05-21 21:39 UTC (permalink / raw)
To: David S. Miller; +Cc: Kernel Netdev Mailing List
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 3992 bytes --]
[RTNETLINK]: Remove remains of wireless extensions over rtnetlink
Remove some unused variables and function arguments related to the recently
removed wireless extensions over rtnetlink.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 192ecca1d62ada577a664410ed90b9a83315a65a
tree 0c14773793fadfd1d1267a0a361718181e2b8f6e
parent 58bac614f9ea12b45970011ba53b8c2c33d1db3f
author Patrick McHardy <kaber@trash.net> Thu, 17 May 2007 05:31:10 +0200
committer Patrick McHardy <kaber@trash.net> Thu, 17 May 2007 22:06:27 +0200
net/core/rtnetlink.c | 27 ++++++++++-----------------
1 files changed, 10 insertions(+), 17 deletions(-)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 20935f2..e2996bb 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -437,7 +437,7 @@ static void copy_rtnl_link_stats(struct rtnl_link_stats *a,
a->tx_compressed = b->tx_compressed;
};
-static inline size_t if_nlmsg_size(int iwbuflen)
+static inline size_t if_nlmsg_size(void)
{
return NLMSG_ALIGN(sizeof(struct ifinfomsg))
+ nla_total_size(IFNAMSIZ) /* IFLA_IFNAME */
@@ -452,13 +452,12 @@ static inline size_t if_nlmsg_size(int iwbuflen)
+ nla_total_size(4) /* IFLA_LINK */
+ nla_total_size(4) /* IFLA_MASTER */
+ nla_total_size(1) /* IFLA_OPERSTATE */
- + nla_total_size(1) /* IFLA_LINKMODE */
- + nla_total_size(iwbuflen);
+ + nla_total_size(1); /* IFLA_LINKMODE */
}
static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
- void *iwbuf, int iwbuflen, int type, u32 pid,
- u32 seq, u32 change, unsigned int flags)
+ int type, u32 pid, u32 seq, u32 change,
+ unsigned int flags)
{
struct ifinfomsg *ifm;
struct nlmsghdr *nlh;
@@ -523,9 +522,6 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
}
}
- if (iwbuf)
- NLA_PUT(skb, IFLA_WIRELESS, iwbuflen, iwbuf);
-
return nlmsg_end(skb, nlh);
nla_put_failure:
@@ -543,7 +539,7 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
for_each_netdev(dev) {
if (idx < s_idx)
goto cont;
- if (rtnl_fill_ifinfo(skb, dev, NULL, 0, RTM_NEWLINK,
+ if (rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK,
NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, 0, NLM_F_MULTI) <= 0)
break;
@@ -730,8 +726,6 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
struct nlattr *tb[IFLA_MAX+1];
struct net_device *dev = NULL;
struct sk_buff *nskb;
- char *iw_buf = NULL, *iw = NULL;
- int iw_buf_len = 0;
int err;
err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy);
@@ -746,14 +740,14 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
} else
return -EINVAL;
- nskb = nlmsg_new(if_nlmsg_size(iw_buf_len), GFP_KERNEL);
+ nskb = nlmsg_new(if_nlmsg_size(), GFP_KERNEL);
if (nskb == NULL) {
err = -ENOBUFS;
goto errout;
}
- err = rtnl_fill_ifinfo(nskb, dev, iw, iw_buf_len, RTM_NEWLINK,
- NETLINK_CB(skb).pid, nlh->nlmsg_seq, 0, 0);
+ err = rtnl_fill_ifinfo(nskb, dev, RTM_NEWLINK, NETLINK_CB(skb).pid,
+ nlh->nlmsg_seq, 0, 0);
if (err < 0) {
/* -EMSGSIZE implies BUG in if_nlmsg_size */
WARN_ON(err == -EMSGSIZE);
@@ -762,7 +756,6 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
}
err = rtnl_unicast(nskb, NETLINK_CB(skb).pid);
errout:
- kfree(iw_buf);
dev_put(dev);
return err;
@@ -797,11 +790,11 @@ void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change)
struct sk_buff *skb;
int err = -ENOBUFS;
- skb = nlmsg_new(if_nlmsg_size(0), GFP_KERNEL);
+ skb = nlmsg_new(if_nlmsg_size(), GFP_KERNEL);
if (skb == NULL)
goto errout;
- err = rtnl_fill_ifinfo(skb, dev, NULL, 0, type, 0, 0, change, 0);
+ err = rtnl_fill_ifinfo(skb, dev, type, 0, 0, change, 0);
if (err < 0) {
/* -EMSGSIZE implies BUG in if_nlmsg_size() */
WARN_ON(err == -EMSGSIZE);
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [RTNETLINK]: Remove remains of wireless extensions over rtnetlink
2007-05-21 21:39 [RTNETLINK]: Remove remains of wireless extensions over rtnetlink Patrick McHardy
@ 2007-05-22 9:27 ` Johannes Berg
2007-05-23 0:00 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2007-05-22 9:27 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, Kernel Netdev Mailing List
[-- Attachment #1: Type: text/plain, Size: 411 bytes --]
> [RTNETLINK]: Remove remains of wireless extensions over rtnetlink
>
> Remove some unused variables and function arguments related to the recently
> removed wireless extensions over rtnetlink.
Still more! Sorry about that and thanks!
> Signed-off-by: Patrick McHardy <kaber@trash.net>
Since I did the removal in the first place,
Acked-by: Johannes Berg <johannes@sipsolutions.net>
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RTNETLINK]: Remove remains of wireless extensions over rtnetlink
2007-05-22 9:27 ` Johannes Berg
@ 2007-05-23 0:00 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2007-05-23 0:00 UTC (permalink / raw)
To: johannes; +Cc: kaber, netdev
From: Johannes Berg <johannes@sipsolutions.net>
Date: Tue, 22 May 2007 11:27:46 +0200
>
> > [RTNETLINK]: Remove remains of wireless extensions over rtnetlink
> >
> > Remove some unused variables and function arguments related to the recently
> > removed wireless extensions over rtnetlink.
>
> Still more! Sorry about that and thanks!
>
> > Signed-off-by: Patrick McHardy <kaber@trash.net>
>
> Since I did the removal in the first place,
> Acked-by: Johannes Berg <johannes@sipsolutions.net>
Applied, thanks everyone.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-23 0:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 21:39 [RTNETLINK]: Remove remains of wireless extensions over rtnetlink Patrick McHardy
2007-05-22 9:27 ` Johannes Berg
2007-05-23 0:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).