diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2007-07-03 01:36:38 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:16:25 -0400 |
commit | eef6caf8a916f32f8d9b2a02d4fa7674736c00ac (patch) | |
tree | d9ecce23fc7d8b2c4c94905bc43f42dc77424822 /net/mac80211 | |
parent | d0410051164bbbc597e15f068b53c06a954ae0d4 (diff) |
[MAC80211]: Set low initial rate in rc80211_simple
The initial rate for STA's using rc80211_simple is set to the last
rate in the rate table. For situations for which the signal is weak,
the rate may be too high for authentication and association. Although
the rc80211_simple module will adjust the speed, the response may not
be fast enough for a successful connection. This modification sets the
initial rate to the lowest supported value.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rc80211_simple.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/mac80211/rc80211_simple.c b/net/mac80211/rc80211_simple.c index 2048cfd1ca70..5ae7fc454665 100644 --- a/net/mac80211/rc80211_simple.c +++ b/net/mac80211/rc80211_simple.c | |||
@@ -283,14 +283,16 @@ static void rate_control_simple_rate_init(void *priv, void *priv_sta, | |||
283 | int i; | 283 | int i; |
284 | sta->txrate = 0; | 284 | sta->txrate = 0; |
285 | mode = local->oper_hw_mode; | 285 | mode = local->oper_hw_mode; |
286 | /* TODO: what is a good starting rate for STA? About middle? Maybe not | 286 | /* TODO: This routine should consider using RSSI from previous packets |
287 | * the lowest or the highest rate.. Could consider using RSSI from | 287 | * as we need to have IEEE 802.1X auth succeed immediately after assoc.. |
288 | * previous packets? Need to have IEEE 802.1X auth succeed immediately | 288 | * Until that method is implemented, we will use the lowest supported rate |
289 | * after assoc.. */ | 289 | * as a workaround, */ |
290 | for (i = 0; i < mode->num_rates; i++) { | 290 | for (i = 0; i < mode->num_rates; i++) { |
291 | if ((sta->supp_rates & BIT(i)) && | 291 | if ((sta->supp_rates & BIT(i)) && |
292 | (mode->rates[i].flags & IEEE80211_RATE_SUPPORTED)) | 292 | (mode->rates[i].flags & IEEE80211_RATE_SUPPORTED)) { |
293 | sta->txrate = i; | 293 | sta->txrate = i; |
294 | break; | ||
295 | } | ||
294 | } | 296 | } |
295 | } | 297 | } |
296 | 298 | ||