diff options
Diffstat (limited to 'net/mac80211/mesh_plink.c')
-rw-r--r-- | net/mac80211/mesh_plink.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 1213a23ff0fa..7e57f5d07f66 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c | |||
@@ -92,7 +92,9 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, | |||
92 | if (!sta) | 92 | if (!sta) |
93 | return NULL; | 93 | return NULL; |
94 | 94 | ||
95 | sta->flags = WLAN_STA_AUTHORIZED | WLAN_STA_AUTH | WLAN_STA_WME; | 95 | set_sta_flag(sta, WLAN_STA_AUTH); |
96 | set_sta_flag(sta, WLAN_STA_AUTHORIZED); | ||
97 | set_sta_flag(sta, WLAN_STA_WME); | ||
96 | sta->sta.supp_rates[local->hw.conf.channel->band] = rates; | 98 | sta->sta.supp_rates[local->hw.conf.channel->band] = rates; |
97 | rate_control_rate_init(sta); | 99 | rate_control_rate_init(sta); |
98 | 100 | ||
@@ -185,8 +187,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, | |||
185 | pos = skb_put(skb, 2); | 187 | pos = skb_put(skb, 2); |
186 | memcpy(pos + 2, &plid, 2); | 188 | memcpy(pos + 2, &plid, 2); |
187 | } | 189 | } |
188 | if (mesh_add_srates_ie(skb, sdata) || | 190 | if (ieee80211_add_srates_ie(&sdata->vif, skb) || |
189 | mesh_add_ext_srates_ie(skb, sdata) || | 191 | ieee80211_add_ext_srates_ie(&sdata->vif, skb) || |
190 | mesh_add_rsn_ie(skb, sdata) || | 192 | mesh_add_rsn_ie(skb, sdata) || |
191 | mesh_add_meshid_ie(skb, sdata) || | 193 | mesh_add_meshid_ie(skb, sdata) || |
192 | mesh_add_meshconf_ie(skb, sdata)) | 194 | mesh_add_meshconf_ie(skb, sdata)) |
@@ -383,7 +385,7 @@ int mesh_plink_open(struct sta_info *sta) | |||
383 | __le16 llid; | 385 | __le16 llid; |
384 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 386 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
385 | 387 | ||
386 | if (!test_sta_flags(sta, WLAN_STA_AUTH)) | 388 | if (!test_sta_flag(sta, WLAN_STA_AUTH)) |
387 | return -EPERM; | 389 | return -EPERM; |
388 | 390 | ||
389 | spin_lock_bh(&sta->lock); | 391 | spin_lock_bh(&sta->lock); |
@@ -503,7 +505,7 @@ void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_m | |||
503 | return; | 505 | return; |
504 | } | 506 | } |
505 | 507 | ||
506 | if (sta && !test_sta_flags(sta, WLAN_STA_AUTH)) { | 508 | if (sta && !test_sta_flag(sta, WLAN_STA_AUTH)) { |
507 | mpl_dbg("Mesh plink: Action frame from non-authed peer\n"); | 509 | mpl_dbg("Mesh plink: Action frame from non-authed peer\n"); |
508 | rcu_read_unlock(); | 510 | rcu_read_unlock(); |
509 | return; | 511 | return; |