|
@@ -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;
|