mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 21:37:10 +02:00
swconfig: make it compatible with 3.7
swconfig does not compile with 3.7 because struct netlink_notify->pid has been renamed to struct netlink_notify->portid and struct genl_info->snd_pid has been renamed to struct genl_info->snd_portid Use the new names and add compatibility patches to 3.3 and 3.6. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34288 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
50c442dbb8
commit
def4db1886
@ -376,7 +376,7 @@ swconfig_dump_attr(struct swconfig_callback *cb, void *arg)
|
|||||||
int id = cb->args[0];
|
int id = cb->args[0];
|
||||||
void *hdr;
|
void *hdr;
|
||||||
|
|
||||||
hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, &switch_fam,
|
hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, &switch_fam,
|
||||||
NLM_F_MULTI, SWITCH_CMD_NEW_ATTR);
|
NLM_F_MULTI, SWITCH_CMD_NEW_ATTR);
|
||||||
if (IS_ERR(hdr))
|
if (IS_ERR(hdr))
|
||||||
return -1;
|
return -1;
|
||||||
@ -798,7 +798,7 @@ swconfig_get_attr(struct sk_buff *skb, struct genl_info *info)
|
|||||||
if (!msg)
|
if (!msg)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, &switch_fam,
|
hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, &switch_fam,
|
||||||
0, cmd);
|
0, cmd);
|
||||||
if (IS_ERR(hdr))
|
if (IS_ERR(hdr))
|
||||||
goto nla_put_failure;
|
goto nla_put_failure;
|
||||||
@ -883,7 +883,7 @@ static int swconfig_dump_switches(struct sk_buff *skb,
|
|||||||
list_for_each_entry(dev, &swdevs, dev_list) {
|
list_for_each_entry(dev, &swdevs, dev_list) {
|
||||||
if (++idx <= start)
|
if (++idx <= start)
|
||||||
continue;
|
continue;
|
||||||
if (swconfig_send_switch(skb, NETLINK_CB(cb->skb).pid,
|
if (swconfig_send_switch(skb, NETLINK_CB(cb->skb).portid,
|
||||||
cb->nlh->nlmsg_seq, NLM_F_MULTI,
|
cb->nlh->nlmsg_seq, NLM_F_MULTI,
|
||||||
dev) < 0)
|
dev) < 0)
|
||||||
break;
|
break;
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
reverted:
|
||||||
|
--- a/drivers/net/phy/swconfig.c
|
||||||
|
+++ b/drivers/net/phy/swconfig.c
|
||||||
|
@@ -376,7 +376,7 @@ swconfig_dump_attr(struct swconfig_callb
|
||||||
|
int id = cb->args[0];
|
||||||
|
void *hdr;
|
||||||
|
|
||||||
|
- hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, &switch_fam,
|
||||||
|
+ hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, &switch_fam,
|
||||||
|
NLM_F_MULTI, SWITCH_CMD_NEW_ATTR);
|
||||||
|
if (IS_ERR(hdr))
|
||||||
|
return -1;
|
||||||
|
@@ -798,7 +798,7 @@ swconfig_get_attr(struct sk_buff *skb, s
|
||||||
|
if (!msg)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
- hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, &switch_fam,
|
||||||
|
+ hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, &switch_fam,
|
||||||
|
0, cmd);
|
||||||
|
if (IS_ERR(hdr))
|
||||||
|
goto nla_put_failure;
|
||||||
|
@@ -883,7 +883,7 @@ static int swconfig_dump_switches(struct
|
||||||
|
list_for_each_entry(dev, &swdevs, dev_list) {
|
||||||
|
if (++idx <= start)
|
||||||
|
continue;
|
||||||
|
- if (swconfig_send_switch(skb, NETLINK_CB(cb->skb).portid,
|
||||||
|
+ if (swconfig_send_switch(skb, NETLINK_CB(cb->skb).pid,
|
||||||
|
cb->nlh->nlmsg_seq, NLM_F_MULTI,
|
||||||
|
dev) < 0)
|
||||||
|
break;
|
@ -0,0 +1,30 @@
|
|||||||
|
reverted:
|
||||||
|
--- a/drivers/net/phy/swconfig.c
|
||||||
|
+++ b/drivers/net/phy/swconfig.c
|
||||||
|
@@ -376,7 +376,7 @@ swconfig_dump_attr(struct swconfig_callb
|
||||||
|
int id = cb->args[0];
|
||||||
|
void *hdr;
|
||||||
|
|
||||||
|
- hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, &switch_fam,
|
||||||
|
+ hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, &switch_fam,
|
||||||
|
NLM_F_MULTI, SWITCH_CMD_NEW_ATTR);
|
||||||
|
if (IS_ERR(hdr))
|
||||||
|
return -1;
|
||||||
|
@@ -798,7 +798,7 @@ swconfig_get_attr(struct sk_buff *skb, s
|
||||||
|
if (!msg)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
- hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, &switch_fam,
|
||||||
|
+ hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, &switch_fam,
|
||||||
|
0, cmd);
|
||||||
|
if (IS_ERR(hdr))
|
||||||
|
goto nla_put_failure;
|
||||||
|
@@ -883,7 +883,7 @@ static int swconfig_dump_switches(struct
|
||||||
|
list_for_each_entry(dev, &swdevs, dev_list) {
|
||||||
|
if (++idx <= start)
|
||||||
|
continue;
|
||||||
|
- if (swconfig_send_switch(skb, NETLINK_CB(cb->skb).portid,
|
||||||
|
+ if (swconfig_send_switch(skb, NETLINK_CB(cb->skb).pid,
|
||||||
|
cb->nlh->nlmsg_seq, NLM_F_MULTI,
|
||||||
|
dev) < 0)
|
||||||
|
break;
|
Loading…
Reference in New Issue
Block a user