aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 42da96a4eeee..4dd4c3cdc442 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -930,10 +930,9 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
930 if (tb[IFLA_VF_MAC]) { 930 if (tb[IFLA_VF_MAC]) {
931 struct ifla_vf_mac *ivm; 931 struct ifla_vf_mac *ivm;
932 ivm = nla_data(tb[IFLA_VF_MAC]); 932 ivm = nla_data(tb[IFLA_VF_MAC]);
933 write_lock_bh(&dev_base_lock); 933 err = -EOPNOTSUPP;
934 if (ops->ndo_set_vf_mac) 934 if (ops->ndo_set_vf_mac)
935 err = ops->ndo_set_vf_mac(dev, ivm->vf, ivm->mac); 935 err = ops->ndo_set_vf_mac(dev, ivm->vf, ivm->mac);
936 write_unlock_bh(&dev_base_lock);
937 if (err < 0) 936 if (err < 0)
938 goto errout; 937 goto errout;
939 modified = 1; 938 modified = 1;
@@ -942,12 +941,11 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
942 if (tb[IFLA_VF_VLAN]) { 941 if (tb[IFLA_VF_VLAN]) {
943 struct ifla_vf_vlan *ivv; 942 struct ifla_vf_vlan *ivv;
944 ivv = nla_data(tb[IFLA_VF_VLAN]); 943 ivv = nla_data(tb[IFLA_VF_VLAN]);
945 write_lock_bh(&dev_base_lock); 944 err = -EOPNOTSUPP;
946 if (ops->ndo_set_vf_vlan) 945 if (ops->ndo_set_vf_vlan)
947 err = ops->ndo_set_vf_vlan(dev, ivv->vf, 946 err = ops->ndo_set_vf_vlan(dev, ivv->vf,
948 (u16)ivv->vlan, 947 ivv->vlan,
949 (u8)ivv->qos); 948 ivv->qos);
950 write_unlock_bh(&dev_base_lock);
951 if (err < 0) 949 if (err < 0)
952 goto errout; 950 goto errout;
953 modified = 1; 951 modified = 1;
@@ -957,10 +955,9 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
957 if (tb[IFLA_VF_TX_RATE]) { 955 if (tb[IFLA_VF_TX_RATE]) {
958 struct ifla_vf_tx_rate *ivt; 956 struct ifla_vf_tx_rate *ivt;
959 ivt = nla_data(tb[IFLA_VF_TX_RATE]); 957 ivt = nla_data(tb[IFLA_VF_TX_RATE]);
960 write_lock_bh(&dev_base_lock); 958 err = -EOPNOTSUPP;
961 if (ops->ndo_set_vf_tx_rate) 959 if (ops->ndo_set_vf_tx_rate)
962 err = ops->ndo_set_vf_tx_rate(dev, ivt->vf, ivt->rate); 960 err = ops->ndo_set_vf_tx_rate(dev, ivt->vf, ivt->rate);
963 write_unlock_bh(&dev_base_lock);
964 if (err < 0) 961 if (err < 0)
965 goto errout; 962 goto errout;
966 modified = 1; 963 modified = 1;