[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>
This commit is contained in:
Larry Finger 2007-07-02 22:36:38 -07:00 коммит произвёл David S. Miller
Родитель d041005116
Коммит eef6caf8a9
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -283,14 +283,16 @@ static void rate_control_simple_rate_init(void *priv, void *priv_sta,
int i; int i;
sta->txrate = 0; sta->txrate = 0;
mode = local->oper_hw_mode; mode = local->oper_hw_mode;
/* TODO: what is a good starting rate for STA? About middle? Maybe not /* TODO: This routine should consider using RSSI from previous packets
* the lowest or the highest rate.. Could consider using RSSI from * as we need to have IEEE 802.1X auth succeed immediately after assoc..
* previous packets? Need to have IEEE 802.1X auth succeed immediately * Until that method is implemented, we will use the lowest supported rate
* after assoc.. */ * as a workaround, */
for (i = 0; i < mode->num_rates; i++) { for (i = 0; i < mode->num_rates; i++) {
if ((sta->supp_rates & BIT(i)) && if ((sta->supp_rates & BIT(i)) &&
(mode->rates[i].flags & IEEE80211_RATE_SUPPORTED)) (mode->rates[i].flags & IEEE80211_RATE_SUPPORTED)) {
sta->txrate = i; sta->txrate = i;
break;
}
} }
} }