Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121628
b: refs/heads/master
c: ddf4ac5
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Oct 31, 2008
1 parent 374dca7 commit f3e9b0c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 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: cfa3fa405a5eafd5d5c53b18abc00ca998c35eef
refs/heads/master: ddf4ac53fb8a12a027c0486db743ae040f45b56a
31 changes: 18 additions & 13 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
u8 *pos;
u32 changed = 0;
int i, j;
bool have_higher_than_11mbit = false;
bool have_higher_than_11mbit = false, newsta = false;
u16 ap_ht_cap_flags;

/* AssocResp and ReassocResp have identical structure, so process both
Expand Down Expand Up @@ -1246,7 +1246,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
sta = sta_info_get(local, ifsta->bssid);
if (!sta) {
struct ieee80211_bss *bss;
int err;

newsta = true;

sta = sta_info_alloc(sdata, ifsta->bssid, GFP_ATOMIC);
if (!sta) {
Expand All @@ -1265,13 +1266,6 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
ieee80211_rx_bss_put(local, bss);
}

err = sta_info_insert(sta);
if (err) {
printk(KERN_DEBUG "%s: failed to insert STA entry for"
" the AP (error %d)\n", sdata->dev->name, err);
rcu_read_unlock();
return;
}
/* update new sta with its last rx activity */
sta->last_rx = jiffies;
}
Expand Down Expand Up @@ -1339,13 +1333,24 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,

rate_control_rate_init(sta);

if (elems.wmm_param) {
if (elems.wmm_param)
set_sta_flags(sta, WLAN_STA_WME);
rcu_read_unlock();

if (newsta) {
int err = sta_info_insert(sta);
if (err) {
printk(KERN_DEBUG "%s: failed to insert STA entry for"
" the AP (error %d)\n", sdata->dev->name, err);
rcu_read_unlock();
return;
}
}

rcu_read_unlock();

if (elems.wmm_param)
ieee80211_sta_wmm_params(local, ifsta, elems.wmm_param,
elems.wmm_param_len);
} else
rcu_read_unlock();

if (elems.ht_info_elem && elems.wmm_param &&
(ifsta->flags & IEEE80211_STA_WMM_ENABLED))
Expand Down

0 comments on commit f3e9b0c

Please sign in to comment.