aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r--net/mac80211/ieee80211.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index f811a260ee9c..4715a9525918 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -464,8 +464,10 @@ static int ieee80211_open(struct net_device *dev)
464 if (sdata->type == IEEE80211_IF_TYPE_MNTR) { 464 if (sdata->type == IEEE80211_IF_TYPE_MNTR) {
465 local->monitors++; 465 local->monitors++;
466 local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; 466 local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP;
467 } else 467 } else {
468 ieee80211_if_config(dev); 468 ieee80211_if_config(dev);
469 ieee80211_reset_erp_info(dev);
470 }
469 471
470 if (sdata->type == IEEE80211_IF_TYPE_STA && 472 if (sdata->type == IEEE80211_IF_TYPE_STA &&
471 !local->user_space_mlme) 473 !local->user_space_mlme)
@@ -748,6 +750,27 @@ int ieee80211_hw_config(struct ieee80211_local *local)
748 return ret; 750 return ret;
749} 751}
750 752
753void ieee80211_erp_info_change_notify(struct net_device *dev, u8 changes)
754{
755 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
756 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
757 if (local->ops->erp_ie_changed)
758 local->ops->erp_ie_changed(local_to_hw(local), changes,
759 sdata->use_protection,
760 !sdata->short_preamble);
761}
762
763void ieee80211_reset_erp_info(struct net_device *dev)
764{
765 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
766
767 sdata->short_preamble = 0;
768 sdata->use_protection = 0;
769 ieee80211_erp_info_change_notify(dev,
770 IEEE80211_ERP_CHANGE_PROTECTION |
771 IEEE80211_ERP_CHANGE_PREAMBLE);
772}
773
751struct dev_mc_list *ieee80211_get_mc_list_item(struct ieee80211_hw *hw, 774struct dev_mc_list *ieee80211_get_mc_list_item(struct ieee80211_hw *hw,
752 struct dev_mc_list *prev, 775 struct dev_mc_list *prev,
753 void **ptr) 776 void **ptr)