git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dccp: don't restart ccid2_hc_tx_rto_expire() if sk in closed state
[pandora-kernel.git]
/
net
/
mac80211
/
cfg.c
diff --git
a/net/mac80211/cfg.c
b/net/mac80211/cfg.c
index
ebd7fb1
..
11cee76
100644
(file)
--- a/
net/mac80211/cfg.c
+++ b/
net/mac80211/cfg.c
@@
-575,7
+575,7
@@
static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
sdata->vif.bss_conf.dtim_period = new->dtim_period;
sdata->vif.bss_conf.dtim_period = new->dtim_period;
-
RCU_INIT_POINTER
(sdata->u.ap.beacon, new);
+
rcu_assign_pointer
(sdata->u.ap.beacon, new);
synchronize_rcu();
synchronize_rcu();
@@
-832,6
+832,12
@@
static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
if (is_multicast_ether_addr(mac))
return -EINVAL;
if (is_multicast_ether_addr(mac))
return -EINVAL;
+ /* Only TDLS-supporting stations can add TDLS peers */
+ if ((params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) &&
+ !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
+ sdata->vif.type == NL80211_IFTYPE_STATION))
+ return -ENOTSUPP;
+
sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
if (!sta)
return -ENOMEM;
sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
if (!sta)
return -ENOMEM;
@@
-841,12
+847,6
@@
static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
sta_apply_parameters(local, sta, params);
sta_apply_parameters(local, sta, params);
- /* Only TDLS-supporting stations can add TDLS peers */
- if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
- !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
- sdata->vif.type == NL80211_IFTYPE_STATION))
- return -ENOTSUPP;
-
rate_control_rate_init(sta);
layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
rate_control_rate_init(sta);
layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
@@
-922,7
+922,7
@@
static int ieee80211_change_station(struct wiphy *wiphy,
return -EBUSY;
}
return -EBUSY;
}
-
RCU_INIT_POINTER
(vlansdata->u.vlan.sta, sta);
+
rcu_assign_pointer
(vlansdata->u.vlan.sta, sta);
}
sta->sdata = vlansdata;
}
sta->sdata = vlansdata;