aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-10-01 11:12:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-10-01 11:12:36 -0400
commit41f4a6f71fe33faa7971c173c263fb431fe987fe (patch)
treefdc3e603162e3ad63f6ae4160f68eb803bb78d58 /net/wireless
parent94d57c4cfaa43e29ca5fa5ff874048cfc67276f5 (diff)
parent1728943d83e9fd919e454332fe344944123b3c3a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/ibss.c19
-rw-r--r--net/wireless/nl80211.c20
2 files changed, 21 insertions, 18 deletions
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index 27a8ce9343c3..8cb6e08373b9 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -88,6 +88,25 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
88 if (wdev->ssid_len) 88 if (wdev->ssid_len)
89 return -EALREADY; 89 return -EALREADY;
90 90
91 if (!params->basic_rates) {
92 /*
93 * If no rates were explicitly configured,
94 * use the mandatory rate set for 11b or
95 * 11a for maximum compatibility.
96 */
97 struct ieee80211_supported_band *sband =
98 rdev->wiphy.bands[params->channel->band];
99 int j;
100 u32 flag = params->channel->band == IEEE80211_BAND_5GHZ ?
101 IEEE80211_RATE_MANDATORY_A :
102 IEEE80211_RATE_MANDATORY_B;
103
104 for (j = 0; j < sband->n_bitrates; j++) {
105 if (sband->bitrates[j].flags & flag)
106 params->basic_rates |= BIT(j);
107 }
108 }
109
91 if (WARN_ON(wdev->connect_keys)) 110 if (WARN_ON(wdev->connect_keys))
92 kfree(wdev->connect_keys); 111 kfree(wdev->connect_keys);
93 wdev->connect_keys = connkeys; 112 wdev->connect_keys = connkeys;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index f15b1af2c768..9c84825803ce 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4119,23 +4119,6 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
4119 goto out; 4119 goto out;
4120 } 4120 }
4121 } 4121 }
4122 } else {
4123 /*
4124 * If no rates were explicitly configured,
4125 * use the mandatory rate set for 11b or
4126 * 11a for maximum compatibility.
4127 */
4128 struct ieee80211_supported_band *sband =
4129 wiphy->bands[ibss.channel->band];
4130 int j;
4131 u32 flag = ibss.channel->band == IEEE80211_BAND_5GHZ ?
4132 IEEE80211_RATE_MANDATORY_A :
4133 IEEE80211_RATE_MANDATORY_B;
4134
4135 for (j = 0; j < sband->n_bitrates; j++) {
4136 if (sband->bitrates[j].flags & flag)
4137 ibss.basic_rates |= BIT(j);
4138 }
4139 } 4122 }
4140 4123
4141 err = cfg80211_join_ibss(rdev, dev, &ibss, connkeys); 4124 err = cfg80211_join_ibss(rdev, dev, &ibss, connkeys);
@@ -4990,7 +4973,7 @@ static int nl80211_set_power_save(struct sk_buff *skb, struct genl_info *info)
4990 4973
4991 err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev); 4974 err = get_rdev_dev_by_info_ifindex(info, &rdev, &dev);
4992 if (err) 4975 if (err)
4993 goto unlock_rdev; 4976 goto unlock_rtnl;
4994 4977
4995 wdev = dev->ieee80211_ptr; 4978 wdev = dev->ieee80211_ptr;
4996 4979
@@ -5014,6 +4997,7 @@ static int nl80211_set_power_save(struct sk_buff *skb, struct genl_info *info)
5014unlock_rdev: 4997unlock_rdev:
5015 cfg80211_unlock_rdev(rdev); 4998 cfg80211_unlock_rdev(rdev);
5016 dev_put(dev); 4999 dev_put(dev);
5000unlock_rtnl:
5017 rtnl_unlock(); 5001 rtnl_unlock();
5018 5002
5019out: 5003out: