Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122796
b: refs/heads/master
c: b8d476c
h: refs/heads/master
v: v3
  • Loading branch information
Jouni Malinen authored and John W. Linville committed Dec 19, 2008
1 parent 23c6de6 commit c1e0699
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0fe45b1debba7302155b62f3829119a1185a4f5a
refs/heads/master: b8d476c8cb64a1640d8762aa442b8a73fa74b7d5
13 changes: 11 additions & 2 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
struct sta_info *sta;
struct ieee80211_sub_if_data *sdata;
int err;
int layer2_update;

/* Prevent a race with changing the rate control algorithm */
if (!netif_running(dev))
Expand Down Expand Up @@ -716,17 +717,25 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,

rate_control_rate_init(sta);

layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
sdata->vif.type == NL80211_IFTYPE_AP;

rcu_read_lock();

err = sta_info_insert(sta);
if (err) {
/* STA has been freed */
if (err == -EEXIST && layer2_update) {
/* Need to update layer 2 devices on reassociation */
sta = sta_info_get(local, mac);
if (sta)
ieee80211_send_layer2_update(sta);
}
rcu_read_unlock();
return err;
}

if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
sdata->vif.type == NL80211_IFTYPE_AP)
if (layer2_update)
ieee80211_send_layer2_update(sta);

rcu_read_unlock();
Expand Down

0 comments on commit c1e0699

Please sign in to comment.