ieee802154: 6lowpan: fix ARPHRD to ARPHRD_6LOWPAN
[firefly-linux-kernel-4.4.55.git] / net / ieee802154 / nl-mac.c
index cd919493c976000e6b5cd206014110500e68886e..9105265920fe735db77650607bd3fe89d143869a 100644 (file)
@@ -121,7 +121,7 @@ static int ieee802154_nl_fill_iface(struct sk_buff *msg, u32 portid,
                               params.transmit_power) ||
                    nla_put_u8(msg, IEEE802154_ATTR_LBT_ENABLED, params.lbt) ||
                    nla_put_u8(msg, IEEE802154_ATTR_CCA_MODE,
-                              params.cca_mode) ||
+                              params.cca.mode) ||
                    nla_put_s32(msg, IEEE802154_ATTR_CCA_ED_LEVEL,
                                params.cca_ed_level) ||
                    nla_put_u8(msg, IEEE802154_ATTR_CSMA_RETRIES,
@@ -136,7 +136,8 @@ static int ieee802154_nl_fill_iface(struct sk_buff *msg, u32 portid,
        }
 
        wpan_phy_put(phy);
-       return genlmsg_end(msg, hdr);
+       genlmsg_end(msg, hdr);
+       return 0;
 
 nla_put_failure:
        wpan_phy_put(phy);
@@ -516,7 +517,7 @@ int ieee802154_set_macparams(struct sk_buff *skb, struct genl_info *info)
                params.lbt = nla_get_u8(info->attrs[IEEE802154_ATTR_LBT_ENABLED]);
 
        if (info->attrs[IEEE802154_ATTR_CCA_MODE])
-               params.cca_mode = nla_get_u8(info->attrs[IEEE802154_ATTR_CCA_MODE]);
+               params.cca.mode = nla_get_u8(info->attrs[IEEE802154_ATTR_CCA_MODE]);
 
        if (info->attrs[IEEE802154_ATTR_CCA_ED_LEVEL])
                params.cca_ed_level = nla_get_s32(info->attrs[IEEE802154_ATTR_CCA_ED_LEVEL]);