summaryrefslogtreecommitdiff
path: root/net/mac802154/iface.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-28 20:21:23 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-10-29 01:19:07 +0300
commita543c5989d7711d984608f4e12a73218642ca865 (patch)
tree2a0613d1873fbd5d37de7c330430309ddfc72e1c /net/mac802154/iface.c
parente1d299f61a1660cbbabccfa0d07421861b9b9711 (diff)
downloadlinux-a543c5989d7711d984608f4e12a73218642ca865.tar.xz
mac802154: remove driver ops in wpan-phy
This patch removes the driver ops callbacks inside of wpan_phy struct. It was used to check if a phy supports this driver ops call. We do this now via hardware flags. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/iface.c')
-rw-r--r--net/mac802154/iface.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
index 025cd5aba13f..300877a1a0c9 100644
--- a/net/mac802154/iface.c
+++ b/net/mac802154/iface.c
@@ -196,32 +196,32 @@ static int mac802154_wpan_open(struct net_device *dev)
mutex_lock(&phy->pib_lock);
- if (phy->set_txpower) {
+ if (local->hw.flags & IEEE802154_HW_TXPOWER) {
rc = drv_set_tx_power(local, sdata->mac_params.transmit_power);
if (rc < 0)
goto out;
}
- if (phy->set_lbt) {
+ if (local->hw.flags & IEEE802154_HW_LBT) {
rc = drv_set_lbt_mode(local, sdata->mac_params.lbt);
if (rc < 0)
goto out;
}
- if (phy->set_cca_mode) {
+ if (local->hw.flags & IEEE802154_HW_CCA_MODE) {
rc = drv_set_cca_mode(local, sdata->mac_params.cca_mode);
if (rc < 0)
goto out;
}
- if (phy->set_cca_ed_level) {
+ if (local->hw.flags & IEEE802154_HW_CCA_ED_LEVEL) {
rc = drv_set_cca_ed_level(local,
sdata->mac_params.cca_ed_level);
if (rc < 0)
goto out;
}
- if (phy->set_csma_params) {
+ if (local->hw.flags & IEEE802154_HW_CSMA_PARAMS) {
rc = drv_set_csma_params(local, sdata->mac_params.min_be,
sdata->mac_params.max_be,
sdata->mac_params.csma_retries);
@@ -229,7 +229,7 @@ static int mac802154_wpan_open(struct net_device *dev)
goto out;
}
- if (phy->set_frame_retries) {
+ if (local->hw.flags & IEEE802154_HW_FRAME_RETRIES) {
rc = drv_set_max_frame_retries(local,
sdata->mac_params.frame_retries);
if (rc < 0)