Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214890
b: refs/heads/master
c: 93b0523
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Sep 28, 2010
1 parent 22d080d commit b8b56e4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 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: dc4769f0bb949e312ad8d9b652047ff6709978c2
refs/heads/master: 93b05238027420978d785569f8c1aa4a6867bc13
19 changes: 19 additions & 0 deletions trunk/net/wireless/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
if (wdev->ssid_len)
return -EALREADY;

if (!params->basic_rates) {
/*
* If no rates were explicitly configured,
* use the mandatory rate set for 11b or
* 11a for maximum compatibility.
*/
struct ieee80211_supported_band *sband =
rdev->wiphy.bands[params->channel->band];
int j;
u32 flag = params->channel->band == IEEE80211_BAND_5GHZ ?
IEEE80211_RATE_MANDATORY_A :
IEEE80211_RATE_MANDATORY_B;

for (j = 0; j < sband->n_bitrates; j++) {
if (sband->bitrates[j].flags & flag)
params->basic_rates |= BIT(j);
}
}

if (WARN_ON(wdev->connect_keys))
kfree(wdev->connect_keys);
wdev->connect_keys = connkeys;
Expand Down
17 changes: 0 additions & 17 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -4119,23 +4119,6 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
goto out;
}
}
} else {
/*
* If no rates were explicitly configured,
* use the mandatory rate set for 11b or
* 11a for maximum compatibility.
*/
struct ieee80211_supported_band *sband =
wiphy->bands[ibss.channel->band];
int j;
u32 flag = ibss.channel->band == IEEE80211_BAND_5GHZ ?
IEEE80211_RATE_MANDATORY_A :
IEEE80211_RATE_MANDATORY_B;

for (j = 0; j < sband->n_bitrates; j++) {
if (sband->bitrates[j].flags & flag)
ibss.basic_rates |= BIT(j);
}
}

err = cfg80211_join_ibss(rdev, dev, &ibss, connkeys);
Expand Down

0 comments on commit b8b56e4

Please sign in to comment.