diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 107a0cbe52ac..485d36bc9a46 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -245,9 +245,12 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
245 | sdata->vif.bss_conf.enable_beacon = | 245 | sdata->vif.bss_conf.enable_beacon = |
246 | !!sdata->u.ibss.presp; | 246 | !!sdata->u.ibss.presp; |
247 | break; | 247 | break; |
248 | #ifdef CONFIG_MAC80211_MESH | ||
248 | case NL80211_IFTYPE_MESH_POINT: | 249 | case NL80211_IFTYPE_MESH_POINT: |
249 | sdata->vif.bss_conf.enable_beacon = true; | 250 | sdata->vif.bss_conf.enable_beacon = |
251 | !!sdata->u.mesh.mesh_id_len; | ||
250 | break; | 252 | break; |
253 | #endif | ||
251 | default: | 254 | default: |
252 | /* not reached */ | 255 | /* not reached */ |
253 | WARN_ON(1); | 256 | WARN_ON(1); |
@@ -481,6 +484,10 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = { | |||
481 | BIT(IEEE80211_STYPE_DEAUTH >> 4) | | 484 | BIT(IEEE80211_STYPE_DEAUTH >> 4) | |
482 | BIT(IEEE80211_STYPE_ACTION >> 4), | 485 | BIT(IEEE80211_STYPE_ACTION >> 4), |
483 | }, | 486 | }, |
487 | [NL80211_IFTYPE_MESH_POINT] = { | ||
488 | .tx = 0xffff, | ||
489 | .rx = BIT(IEEE80211_STYPE_ACTION >> 4), | ||
490 | }, | ||
484 | }; | 491 | }; |
485 | 492 | ||
486 | struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | 493 | struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, |
@@ -514,10 +521,15 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
514 | 521 | ||
515 | wiphy->mgmt_stypes = ieee80211_default_mgmt_stypes; | 522 | wiphy->mgmt_stypes = ieee80211_default_mgmt_stypes; |
516 | 523 | ||
524 | wiphy->privid = mac80211_wiphy_privid; | ||
525 | |||
517 | wiphy->flags |= WIPHY_FLAG_NETNS_OK | | 526 | wiphy->flags |= WIPHY_FLAG_NETNS_OK | |
518 | WIPHY_FLAG_4ADDR_AP | | 527 | WIPHY_FLAG_4ADDR_AP | |
519 | WIPHY_FLAG_4ADDR_STATION; | 528 | WIPHY_FLAG_4ADDR_STATION | |
520 | wiphy->privid = mac80211_wiphy_privid; | 529 | WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS; |
530 | |||
531 | if (!ops->set_key) | ||
532 | wiphy->flags |= WIPHY_FLAG_IBSS_RSN; | ||
521 | 533 | ||
522 | wiphy->bss_priv_size = sizeof(struct ieee80211_bss); | 534 | wiphy->bss_priv_size = sizeof(struct ieee80211_bss); |
523 | 535 | ||
@@ -557,6 +569,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
557 | spin_lock_init(&local->filter_lock); | 569 | spin_lock_init(&local->filter_lock); |
558 | spin_lock_init(&local->queue_stop_reason_lock); | 570 | spin_lock_init(&local->queue_stop_reason_lock); |
559 | 571 | ||
572 | skb_queue_head_init(&local->rx_skb_queue); | ||
573 | |||
560 | INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work); | 574 | INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work); |
561 | 575 | ||
562 | ieee80211_work_init(local); | 576 | ieee80211_work_init(local); |
@@ -593,6 +607,10 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
593 | /* init dummy netdev for use w/ NAPI */ | 607 | /* init dummy netdev for use w/ NAPI */ |
594 | init_dummy_netdev(&local->napi_dev); | 608 | init_dummy_netdev(&local->napi_dev); |
595 | 609 | ||
610 | ieee80211_led_names(local); | ||
611 | |||
612 | ieee80211_hw_roc_setup(local); | ||
613 | |||
596 | return local_to_hw(local); | 614 | return local_to_hw(local); |
597 | } | 615 | } |
598 | EXPORT_SYMBOL(ieee80211_alloc_hw); | 616 | EXPORT_SYMBOL(ieee80211_alloc_hw); |
@@ -737,6 +755,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
737 | } | 755 | } |
738 | } | 756 | } |
739 | 757 | ||
758 | if (!local->ops->remain_on_channel) | ||
759 | local->hw.wiphy->max_remain_on_channel_duration = 5000; | ||
760 | |||
740 | result = wiphy_register(local->hw.wiphy); | 761 | result = wiphy_register(local->hw.wiphy); |
741 | if (result < 0) | 762 | if (result < 0) |
742 | goto fail_wiphy_register; | 763 | goto fail_wiphy_register; |
@@ -898,6 +919,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) | |||
898 | wiphy_warn(local->hw.wiphy, "skb_queue not empty\n"); | 919 | wiphy_warn(local->hw.wiphy, "skb_queue not empty\n"); |
899 | skb_queue_purge(&local->skb_queue); | 920 | skb_queue_purge(&local->skb_queue); |
900 | skb_queue_purge(&local->skb_queue_unreliable); | 921 | skb_queue_purge(&local->skb_queue_unreliable); |
922 | skb_queue_purge(&local->rx_skb_queue); | ||
901 | 923 | ||
902 | destroy_workqueue(local->workqueue); | 924 | destroy_workqueue(local->workqueue); |
903 | wiphy_unregister(local->hw.wiphy); | 925 | wiphy_unregister(local->hw.wiphy); |