diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 49 |
1 files changed, 20 insertions, 29 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 5e1c230744b5..d0ca6da33ca9 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/rcupdate.h> | 13 | #include <linux/rcupdate.h> |
14 | #include <net/cfg80211.h> | 14 | #include <net/cfg80211.h> |
15 | #include "ieee80211_i.h" | 15 | #include "ieee80211_i.h" |
16 | #include "driver-ops.h" | ||
16 | #include "cfg.h" | 17 | #include "cfg.h" |
17 | #include "rate.h" | 18 | #include "rate.h" |
18 | #include "mesh.h" | 19 | #include "mesh.h" |
@@ -245,12 +246,10 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev, | |||
245 | iv32 = key->u.tkip.tx.iv32; | 246 | iv32 = key->u.tkip.tx.iv32; |
246 | iv16 = key->u.tkip.tx.iv16; | 247 | iv16 = key->u.tkip.tx.iv16; |
247 | 248 | ||
248 | if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && | 249 | if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) |
249 | sdata->local->ops->get_tkip_seq) | 250 | drv_get_tkip_seq(sdata->local, |
250 | sdata->local->ops->get_tkip_seq( | 251 | key->conf.hw_key_idx, |
251 | local_to_hw(sdata->local), | 252 | &iv32, &iv16); |
252 | key->conf.hw_key_idx, | ||
253 | &iv32, &iv16); | ||
254 | 253 | ||
255 | seq[0] = iv16 & 0xff; | 254 | seq[0] = iv16 & 0xff; |
256 | seq[1] = (iv16 >> 8) & 0xff; | 255 | seq[1] = (iv16 >> 8) & 0xff; |
@@ -451,18 +450,11 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata, | |||
451 | * This is a kludge. beacon interval should really be part | 450 | * This is a kludge. beacon interval should really be part |
452 | * of the beacon information. | 451 | * of the beacon information. |
453 | */ | 452 | */ |
454 | if (params->interval && (sdata->local->hw.conf.beacon_int != | 453 | if (params->interval && |
455 | params->interval)) { | 454 | (sdata->vif.bss_conf.beacon_int != params->interval)) { |
456 | sdata->local->hw.conf.beacon_int = params->interval; | 455 | sdata->vif.bss_conf.beacon_int = params->interval; |
457 | err = ieee80211_hw_config(sdata->local, | 456 | ieee80211_bss_info_change_notify(sdata, |
458 | IEEE80211_CONF_CHANGE_BEACON_INTERVAL); | 457 | BSS_CHANGED_BEACON_INT); |
459 | if (err < 0) | ||
460 | return err; | ||
461 | /* | ||
462 | * We updated some parameter so if below bails out | ||
463 | * it's not an error. | ||
464 | */ | ||
465 | err = 0; | ||
466 | } | 458 | } |
467 | 459 | ||
468 | /* Need to have a beacon head if we don't have one yet */ | 460 | /* Need to have a beacon head if we don't have one yet */ |
@@ -528,8 +520,9 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata, | |||
528 | 520 | ||
529 | kfree(old); | 521 | kfree(old); |
530 | 522 | ||
531 | return ieee80211_if_config(sdata, IEEE80211_IFCC_BEACON | | 523 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED | |
532 | IEEE80211_IFCC_BEACON_ENABLED); | 524 | BSS_CHANGED_BEACON); |
525 | return 0; | ||
533 | } | 526 | } |
534 | 527 | ||
535 | static int ieee80211_add_beacon(struct wiphy *wiphy, struct net_device *dev, | 528 | static int ieee80211_add_beacon(struct wiphy *wiphy, struct net_device *dev, |
@@ -580,7 +573,8 @@ static int ieee80211_del_beacon(struct wiphy *wiphy, struct net_device *dev) | |||
580 | synchronize_rcu(); | 573 | synchronize_rcu(); |
581 | kfree(old); | 574 | kfree(old); |
582 | 575 | ||
583 | return ieee80211_if_config(sdata, IEEE80211_IFCC_BEACON_ENABLED); | 576 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED); |
577 | return 0; | ||
584 | } | 578 | } |
585 | 579 | ||
586 | /* Layer 2 Update frame (802.2 Type 1 LLC XID Update response) */ | 580 | /* Layer 2 Update frame (802.2 Type 1 LLC XID Update response) */ |
@@ -1120,7 +1114,7 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy, | |||
1120 | p.cw_max = params->cwmax; | 1114 | p.cw_max = params->cwmax; |
1121 | p.cw_min = params->cwmin; | 1115 | p.cw_min = params->cwmin; |
1122 | p.txop = params->txop; | 1116 | p.txop = params->txop; |
1123 | if (local->ops->conf_tx(local_to_hw(local), params->queue, &p)) { | 1117 | if (drv_conf_tx(local, params->queue, &p)) { |
1124 | printk(KERN_DEBUG "%s: failed to set TX queue " | 1118 | printk(KERN_DEBUG "%s: failed to set TX queue " |
1125 | "parameters for queue %d\n", local->mdev->name, | 1119 | "parameters for queue %d\n", local->mdev->name, |
1126 | params->queue); | 1120 | params->queue); |
@@ -1301,16 +1295,13 @@ static int ieee80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev) | |||
1301 | static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) | 1295 | static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed) |
1302 | { | 1296 | { |
1303 | struct ieee80211_local *local = wiphy_priv(wiphy); | 1297 | struct ieee80211_local *local = wiphy_priv(wiphy); |
1298 | int err; | ||
1304 | 1299 | ||
1305 | if (changed & WIPHY_PARAM_RTS_THRESHOLD) { | 1300 | if (changed & WIPHY_PARAM_RTS_THRESHOLD) { |
1306 | int err; | 1301 | err = drv_set_rts_threshold(local, wiphy->rts_threshold); |
1307 | 1302 | ||
1308 | if (local->ops->set_rts_threshold) { | 1303 | if (err) |
1309 | err = local->ops->set_rts_threshold( | 1304 | return err; |
1310 | local_to_hw(local), wiphy->rts_threshold); | ||
1311 | if (err) | ||
1312 | return err; | ||
1313 | } | ||
1314 | } | 1305 | } |
1315 | 1306 | ||
1316 | if (changed & WIPHY_PARAM_RETRY_SHORT) | 1307 | if (changed & WIPHY_PARAM_RETRY_SHORT) |