diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-23 10:13:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:36 -0400 |
commit | 2d0ddec5b2b859f06116f631fc0ffe94fbceb556 (patch) | |
tree | 9bf3cdfcbbefcb34f5984e6d797f488ebe358196 /drivers/net/wireless/libertas_tf/main.c | |
parent | 57c4d7b4c4986037be51476b8e3025d5ba18d8b8 (diff) |
mac80211: unify config_interface and bss_info_changed
The config_interface method is a little strange, it contains the
BSSID and beacon updates, while bss_info_changed contains most
other BSS information for each interface. This patch removes
config_interface and rolls all the information it previously
passed to drivers into bss_info_changed.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas_tf/main.c')
-rw-r--r-- | drivers/net/wireless/libertas_tf/main.c | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c index 68e47fb47a1..10a99e26d39 100644 --- a/drivers/net/wireless/libertas_tf/main.c +++ b/drivers/net/wireless/libertas_tf/main.c | |||
@@ -366,36 +366,6 @@ static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed) | |||
366 | return 0; | 366 | return 0; |
367 | } | 367 | } |
368 | 368 | ||
369 | static int lbtf_op_config_interface(struct ieee80211_hw *hw, | ||
370 | struct ieee80211_vif *vif, | ||
371 | struct ieee80211_if_conf *conf) | ||
372 | { | ||
373 | struct lbtf_private *priv = hw->priv; | ||
374 | struct sk_buff *beacon; | ||
375 | |||
376 | switch (priv->vif->type) { | ||
377 | case NL80211_IFTYPE_AP: | ||
378 | case NL80211_IFTYPE_MESH_POINT: | ||
379 | beacon = ieee80211_beacon_get(hw, vif); | ||
380 | if (beacon) { | ||
381 | lbtf_beacon_set(priv, beacon); | ||
382 | kfree_skb(beacon); | ||
383 | lbtf_beacon_ctrl(priv, 1, vif->bss_conf.beacon_int); | ||
384 | } | ||
385 | break; | ||
386 | default: | ||
387 | break; | ||
388 | } | ||
389 | |||
390 | if (conf->bssid) { | ||
391 | u8 null_bssid[ETH_ALEN] = {0}; | ||
392 | bool activate = compare_ether_addr(conf->bssid, null_bssid); | ||
393 | lbtf_set_bssid(priv, activate, conf->bssid); | ||
394 | } | ||
395 | |||
396 | return 0; | ||
397 | } | ||
398 | |||
399 | #define SUPPORTED_FIF_FLAGS (FIF_PROMISC_IN_BSS | FIF_ALLMULTI) | 369 | #define SUPPORTED_FIF_FLAGS (FIF_PROMISC_IN_BSS | FIF_ALLMULTI) |
400 | static void lbtf_op_configure_filter(struct ieee80211_hw *hw, | 370 | static void lbtf_op_configure_filter(struct ieee80211_hw *hw, |
401 | unsigned int changed_flags, | 371 | unsigned int changed_flags, |
@@ -451,6 +421,29 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw, | |||
451 | u32 changes) | 421 | u32 changes) |
452 | { | 422 | { |
453 | struct lbtf_private *priv = hw->priv; | 423 | struct lbtf_private *priv = hw->priv; |
424 | struct sk_buff *beacon; | ||
425 | |||
426 | if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_INT)) { | ||
427 | switch (priv->vif->type) { | ||
428 | case NL80211_IFTYPE_AP: | ||
429 | case NL80211_IFTYPE_MESH_POINT: | ||
430 | beacon = ieee80211_beacon_get(hw, vif); | ||
431 | if (beacon) { | ||
432 | lbtf_beacon_set(priv, beacon); | ||
433 | kfree_skb(beacon); | ||
434 | lbtf_beacon_ctrl(priv, 1, | ||
435 | bss_conf->beacon_int); | ||
436 | } | ||
437 | break; | ||
438 | default: | ||
439 | break; | ||
440 | } | ||
441 | } | ||
442 | |||
443 | if (changes & BSS_CHANGED_BSSID) { | ||
444 | bool activate = !is_zero_ether_addr(bss_conf->bssid); | ||
445 | lbtf_set_bssid(priv, activate, bss_conf->bssid); | ||
446 | } | ||
454 | 447 | ||
455 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { | 448 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { |
456 | if (bss_conf->use_short_preamble) | 449 | if (bss_conf->use_short_preamble) |
@@ -459,8 +452,6 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw, | |||
459 | priv->preamble = CMD_TYPE_LONG_PREAMBLE; | 452 | priv->preamble = CMD_TYPE_LONG_PREAMBLE; |
460 | lbtf_set_radio_control(priv); | 453 | lbtf_set_radio_control(priv); |
461 | } | 454 | } |
462 | |||
463 | return; | ||
464 | } | 455 | } |
465 | 456 | ||
466 | static const struct ieee80211_ops lbtf_ops = { | 457 | static const struct ieee80211_ops lbtf_ops = { |
@@ -470,7 +461,6 @@ static const struct ieee80211_ops lbtf_ops = { | |||
470 | .add_interface = lbtf_op_add_interface, | 461 | .add_interface = lbtf_op_add_interface, |
471 | .remove_interface = lbtf_op_remove_interface, | 462 | .remove_interface = lbtf_op_remove_interface, |
472 | .config = lbtf_op_config, | 463 | .config = lbtf_op_config, |
473 | .config_interface = lbtf_op_config_interface, | ||
474 | .configure_filter = lbtf_op_configure_filter, | 464 | .configure_filter = lbtf_op_configure_filter, |
475 | .bss_info_changed = lbtf_op_bss_info_changed, | 465 | .bss_info_changed = lbtf_op_bss_info_changed, |
476 | }; | 466 | }; |