aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-03-23 17:43:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-03-27 14:04:13 -0500
commit2638fed7ccb07ff43cdc109dd78e821efb629995 (patch)
tree2e6889b01c9974f350f738338e9770c240c40591 /net
parent16f4352733d19c2d496f682c08cff368ba0495d0 (diff)
[PATCH] softmac: reduce default rate to 11Mbps.
We don't make much of an attempt to fall back to lower rates, and 54M just isn't reliable enough for many people. In fact, it's not clear we even set it to 11M if we're trying to associate with an 802.11b AP. This patch makes us default to 11M, which ought to work for most people. When we actually handle dynamic rate adjustment, we can reconsider the defaults -- but even then, probably it makes as much sense to start at 11M and adjust it upwards as it does to start at 54M and reduce it. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_module.c17
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_wx.c12
2 files changed, 19 insertions, 10 deletions
diff --git a/net/ieee80211/softmac/ieee80211softmac_module.c b/net/ieee80211/softmac/ieee80211softmac_module.c
index 6f99f781bff8..60f06a31f0d1 100644
--- a/net/ieee80211/softmac/ieee80211softmac_module.c
+++ b/net/ieee80211/softmac/ieee80211softmac_module.c
@@ -183,16 +183,21 @@ void ieee80211softmac_start(struct net_device *dev)
183 */ 183 */
184 if (mac->txrates_change) 184 if (mac->txrates_change)
185 oldrates = mac->txrates; 185 oldrates = mac->txrates;
186 if (ieee->modulation & IEEE80211_OFDM_MODULATION) { 186 /* FIXME: We don't correctly handle backing down to lower
187 mac->txrates.default_rate = IEEE80211_OFDM_RATE_54MB; 187 rates, so 801.11g devices start off at 11M for now. People
188 change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT; 188 can manually change it if they really need to, but 11M is
189 mac->txrates.default_fallback = IEEE80211_OFDM_RATE_24MB; 189 more reliable. Note similar logic in
190 change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK; 190 ieee80211softmac_wx_set_rate() */
191 } else if (ieee->modulation & IEEE80211_CCK_MODULATION) { 191 if (ieee->modulation & IEEE80211_CCK_MODULATION) {
192 mac->txrates.default_rate = IEEE80211_CCK_RATE_11MB; 192 mac->txrates.default_rate = IEEE80211_CCK_RATE_11MB;
193 change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT; 193 change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT;
194 mac->txrates.default_fallback = IEEE80211_CCK_RATE_5MB; 194 mac->txrates.default_fallback = IEEE80211_CCK_RATE_5MB;
195 change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK; 195 change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK;
196 } else if (ieee->modulation & IEEE80211_OFDM_MODULATION) {
197 mac->txrates.default_rate = IEEE80211_OFDM_RATE_54MB;
198 change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT;
199 mac->txrates.default_fallback = IEEE80211_OFDM_RATE_24MB;
200 change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK;
196 } else 201 } else
197 assert(0); 202 assert(0);
198 if (mac->txrates_change) 203 if (mac->txrates_change)
diff --git a/net/ieee80211/softmac/ieee80211softmac_wx.c b/net/ieee80211/softmac/ieee80211softmac_wx.c
index e1a9bc6d36ff..b559aa9b5507 100644
--- a/net/ieee80211/softmac/ieee80211softmac_wx.c
+++ b/net/ieee80211/softmac/ieee80211softmac_wx.c
@@ -135,11 +135,15 @@ ieee80211softmac_wx_set_rate(struct net_device *net_dev,
135 int err = -EINVAL; 135 int err = -EINVAL;
136 136
137 if (in_rate == -1) { 137 if (in_rate == -1) {
138 /* automatic detect */ 138 /* FIXME: We don't correctly handle backing down to lower
139 if (ieee->modulation & IEEE80211_OFDM_MODULATION) 139 rates, so 801.11g devices start off at 11M for now. People
140 in_rate = 54000000; 140 can manually change it if they really need to, but 11M is
141 else 141 more reliable. Note similar logic in
142 ieee80211softmac_wx_set_rate() */
143 if (ieee->modulation & IEEE80211_CCK_MODULATION)
142 in_rate = 11000000; 144 in_rate = 11000000;
145 else
146 in_rate = 54000000;
143 } 147 }
144 148
145 switch (in_rate) { 149 switch (in_rate) {