Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275671
b: refs/heads/rpi-4.1.y
c: 3432f92
h: refs/heads/rpi-4.1.y
i:
  275669: 7cdd531
  275667: 06264b2
  275663: b961328
  • Loading branch information
elp authored and linvjw committed Nov 7, 2011
1 parent 205ef41 commit 5c4cae6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/rpi-4.1.y: ae8e46723f803057daff392bdc93332be2f0ec98
refs/heads/rpi-4.1.y: 3432f9233704a66e6067944339a311744243707d
19 changes: 19 additions & 0 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
int i, j, err;
bool have_higher_than_11mbit = false;
u16 ap_ht_cap_flags;
int min_rate = INT_MAX, min_rate_index = -1;

/* AssocResp and ReassocResp have identical structure */

Expand Down Expand Up @@ -1551,6 +1552,10 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
rates |= BIT(j);
if (is_basic)
basic_rates |= BIT(j);
if (rate < min_rate) {
min_rate = rate;
min_rate_index = j;
}
break;
}
}
Expand All @@ -1568,11 +1573,25 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
rates |= BIT(j);
if (is_basic)
basic_rates |= BIT(j);
if (rate < min_rate) {
min_rate = rate;
min_rate_index = j;
}
break;
}
}
}

/*
* some buggy APs don't advertise basic_rates. use the lowest
* supported rate instead.
*/
if (unlikely(!basic_rates) && min_rate_index >= 0) {
printk(KERN_DEBUG "%s: No basic rates in AssocResp. "
"Using min supported rate instead.\n", sdata->name);
basic_rates = BIT(min_rate_index);
}

sta->sta.supp_rates[wk->chan->band] = rates;
sdata->vif.bss_conf.basic_rates = basic_rates;

Expand Down

0 comments on commit 5c4cae6

Please sign in to comment.