{
struct mac802154_priv *priv = wpan_phy_priv(phy);
- if (!priv->ops->set_txpower)
- return -ENOTSUPP;
-
return priv->ops->set_txpower(&priv->hw, db);
}
{
struct mac802154_priv *priv = wpan_phy_priv(phy);
- if (!priv->ops->set_lbt)
- return -ENOTSUPP;
-
return priv->ops->set_lbt(&priv->hw, on);
}
{
struct mac802154_priv *priv = wpan_phy_priv(phy);
- if (!priv->ops->set_cca_mode)
- return -ENOTSUPP;
-
return priv->ops->set_cca_mode(&priv->hw, mode);
}
{
struct mac802154_priv *priv = wpan_phy_priv(phy);
- if (!priv->ops->set_cca_ed_level)
- return -ENOTSUPP;
-
return priv->ops->set_cca_ed_level(&priv->hw, level);
}
{
struct mac802154_priv *priv = wpan_phy_priv(phy);
- if (!priv->ops->set_csma_params)
- return -ENOTSUPP;
-
return priv->ops->set_csma_params(&priv->hw, min_be, max_be, retries);
}
{
struct mac802154_priv *priv = wpan_phy_priv(phy);
- if (!priv->ops->set_frame_retries)
- return -ENOTSUPP;
-
return priv->ops->set_frame_retries(&priv->hw, retries);
}
priv->phy->add_iface = mac802154_add_iface;
priv->phy->del_iface = mac802154_del_iface;
- priv->phy->set_txpower = mac802154_set_txpower;
- priv->phy->set_lbt = mac802154_set_lbt;
- priv->phy->set_cca_mode = mac802154_set_cca_mode;
- priv->phy->set_cca_ed_level = mac802154_set_cca_ed_level;
- priv->phy->set_csma_params = mac802154_set_csma_params;
- priv->phy->set_frame_retries = mac802154_set_frame_retries;
+ if (priv->ops->set_txpower)
+ priv->phy->set_txpower = mac802154_set_txpower;
+ if (priv->ops->set_lbt)
+ priv->phy->set_lbt = mac802154_set_lbt;
+ if (priv->ops->set_cca_mode)
+ priv->phy->set_cca_mode = mac802154_set_cca_mode;
+ if (priv->ops->set_cca_ed_level)
+ priv->phy->set_cca_ed_level = mac802154_set_cca_ed_level;
+ if (priv->ops->set_csma_params)
+ priv->phy->set_csma_params = mac802154_set_csma_params;
+ if (priv->ops->set_frame_retries)
+ priv->phy->set_frame_retries = mac802154_set_frame_retries;
rc = wpan_phy_register(priv->phy);
if (rc < 0)