aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/cfg.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 3ea0884c9432..9d4e4d846ec1 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -686,6 +686,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
686 struct sta_info *sta; 686 struct sta_info *sta;
687 struct ieee80211_sub_if_data *sdata; 687 struct ieee80211_sub_if_data *sdata;
688 int err; 688 int err;
689 int layer2_update;
689 690
690 /* Prevent a race with changing the rate control algorithm */ 691 /* Prevent a race with changing the rate control algorithm */
691 if (!netif_running(dev)) 692 if (!netif_running(dev))
@@ -716,17 +717,25 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
716 717
717 rate_control_rate_init(sta); 718 rate_control_rate_init(sta);
718 719
720 layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
721 sdata->vif.type == NL80211_IFTYPE_AP;
722
719 rcu_read_lock(); 723 rcu_read_lock();
720 724
721 err = sta_info_insert(sta); 725 err = sta_info_insert(sta);
722 if (err) { 726 if (err) {
723 /* STA has been freed */ 727 /* STA has been freed */
728 if (err == -EEXIST && layer2_update) {
729 /* Need to update layer 2 devices on reassociation */
730 sta = sta_info_get(local, mac);
731 if (sta)
732 ieee80211_send_layer2_update(sta);
733 }
724 rcu_read_unlock(); 734 rcu_read_unlock();
725 return err; 735 return err;
726 } 736 }
727 737
728 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN || 738 if (layer2_update)
729 sdata->vif.type == NL80211_IFTYPE_AP)
730 ieee80211_send_layer2_update(sta); 739 ieee80211_send_layer2_update(sta);
731 740
732 rcu_read_unlock(); 741 rcu_read_unlock();