diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index c26e231c733a..bd7529363193 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -207,6 +207,10 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
207 | sdata->vif.bss_conf.bssid = NULL; | 207 | sdata->vif.bss_conf.bssid = NULL; |
208 | else if (ieee80211_vif_is_mesh(&sdata->vif)) { | 208 | else if (ieee80211_vif_is_mesh(&sdata->vif)) { |
209 | sdata->vif.bss_conf.bssid = zero; | 209 | sdata->vif.bss_conf.bssid = zero; |
210 | } else if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE) { | ||
211 | sdata->vif.bss_conf.bssid = sdata->vif.addr; | ||
212 | WARN_ONCE(changed & ~(BSS_CHANGED_IDLE), | ||
213 | "P2P Device BSS changed %#x", changed); | ||
210 | } else { | 214 | } else { |
211 | WARN_ON(1); | 215 | WARN_ON(1); |
212 | return; | 216 | return; |
@@ -514,6 +518,11 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = { | |||
514 | BIT(IEEE80211_STYPE_AUTH >> 4) | | 518 | BIT(IEEE80211_STYPE_AUTH >> 4) | |
515 | BIT(IEEE80211_STYPE_DEAUTH >> 4), | 519 | BIT(IEEE80211_STYPE_DEAUTH >> 4), |
516 | }, | 520 | }, |
521 | [NL80211_IFTYPE_P2P_DEVICE] = { | ||
522 | .tx = 0xffff, | ||
523 | .rx = BIT(IEEE80211_STYPE_ACTION >> 4) | | ||
524 | BIT(IEEE80211_STYPE_PROBE_REQ >> 4), | ||
525 | }, | ||
517 | }; | 526 | }; |
518 | 527 | ||
519 | static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = { | 528 | static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = { |
@@ -536,6 +545,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
536 | int priv_size, i; | 545 | int priv_size, i; |
537 | struct wiphy *wiphy; | 546 | struct wiphy *wiphy; |
538 | 547 | ||
548 | if (WARN_ON(!ops->tx || !ops->start || !ops->stop || !ops->config || | ||
549 | !ops->add_interface || !ops->remove_interface || | ||
550 | !ops->configure_filter)) | ||
551 | return NULL; | ||
552 | |||
539 | if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove))) | 553 | if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove))) |
540 | return NULL; | 554 | return NULL; |
541 | 555 | ||
@@ -588,13 +602,6 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
588 | 602 | ||
589 | local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN); | 603 | local->hw.priv = (char *)local + ALIGN(sizeof(*local), NETDEV_ALIGN); |
590 | 604 | ||
591 | BUG_ON(!ops->tx); | ||
592 | BUG_ON(!ops->start); | ||
593 | BUG_ON(!ops->stop); | ||
594 | BUG_ON(!ops->config); | ||
595 | BUG_ON(!ops->add_interface); | ||
596 | BUG_ON(!ops->remove_interface); | ||
597 | BUG_ON(!ops->configure_filter); | ||
598 | local->ops = ops; | 605 | local->ops = ops; |
599 | 606 | ||
600 | /* set up some defaults */ | 607 | /* set up some defaults */ |