aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154/iface.c
diff options
context:
space:
mode:
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)
196 196
197 mutex_lock(&phy->pib_lock); 197 mutex_lock(&phy->pib_lock);
198 198
199 if (phy->set_txpower) { 199 if (local->hw.flags & IEEE802154_HW_TXPOWER) {
200 rc = drv_set_tx_power(local, sdata->mac_params.transmit_power); 200 rc = drv_set_tx_power(local, sdata->mac_params.transmit_power);
201 if (rc < 0) 201 if (rc < 0)
202 goto out; 202 goto out;
203 } 203 }
204 204
205 if (phy->set_lbt) { 205 if (local->hw.flags & IEEE802154_HW_LBT) {
206 rc = drv_set_lbt_mode(local, sdata->mac_params.lbt); 206 rc = drv_set_lbt_mode(local, sdata->mac_params.lbt);
207 if (rc < 0) 207 if (rc < 0)
208 goto out; 208 goto out;
209 } 209 }
210 210
211 if (phy->set_cca_mode) { 211 if (local->hw.flags & IEEE802154_HW_CCA_MODE) {
212 rc = drv_set_cca_mode(local, sdata->mac_params.cca_mode); 212 rc = drv_set_cca_mode(local, sdata->mac_params.cca_mode);
213 if (rc < 0) 213 if (rc < 0)
214 goto out; 214 goto out;
215 } 215 }
216 216
217 if (phy->set_cca_ed_level) { 217 if (local->hw.flags & IEEE802154_HW_CCA_ED_LEVEL) {
218 rc = drv_set_cca_ed_level(local, 218 rc = drv_set_cca_ed_level(local,
219 sdata->mac_params.cca_ed_level); 219 sdata->mac_params.cca_ed_level);
220 if (rc < 0) 220 if (rc < 0)
221 goto out; 221 goto out;
222 } 222 }
223 223
224 if (phy->set_csma_params) { 224 if (local->hw.flags & IEEE802154_HW_CSMA_PARAMS) {
225 rc = drv_set_csma_params(local, sdata->mac_params.min_be, 225 rc = drv_set_csma_params(local, sdata->mac_params.min_be,
226 sdata->mac_params.max_be, 226 sdata->mac_params.max_be,
227 sdata->mac_params.csma_retries); 227 sdata->mac_params.csma_retries);
@@ -229,7 +229,7 @@ static int mac802154_wpan_open(struct net_device *dev)
229 goto out; 229 goto out;
230 } 230 }
231 231
232 if (phy->set_frame_retries) { 232 if (local->hw.flags & IEEE802154_HW_FRAME_RETRIES) {
233 rc = drv_set_max_frame_retries(local, 233 rc = drv_set_max_frame_retries(local,
234 sdata->mac_params.frame_retries); 234 sdata->mac_params.frame_retries);
235 if (rc < 0) 235 if (rc < 0)