提交 bb52a653 编写于 作者: L Larry Finger 提交者: John W. Linville

[PATCH] ieee80211softmac: Fix setting of initial transmit rates

There is a bug in ieee80211softmac that always sets the user rate
to 11Mbs, no matter the capabilities of the device. This bug was
probably beneficial as long as the bcm43xx cards were rate limited;
however, most are now capable of relatively high speeds. This patch
fixes that bug and eliminates an assert that is no longer needed.

Once the cards are capable of full OFDM speeds, the 24 Mbs rate will
be changed to 54 Mbs.
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 a5d79d1e
...@@ -265,17 +265,10 @@ void ieee80211softmac_init_bss(struct ieee80211softmac_device *mac) ...@@ -265,17 +265,10 @@ void ieee80211softmac_init_bss(struct ieee80211softmac_device *mac)
/* Change the default txrate to the highest possible value. /* Change the default txrate to the highest possible value.
* The txrate machine will lower it, if it is too high. * The txrate machine will lower it, if it is too high.
*/ */
/* FIXME: We don't correctly handle backing down to lower if (ieee->modulation & IEEE80211_OFDM_MODULATION)
rates, so 801.11g devices start off at 11M for now. People txrates->user_rate = IEEE80211_OFDM_RATE_24MB;
can manually change it if they really need to, but 11M is else
more reliable. Note similar logic in
ieee80211softmac_wx_set_rate() */
if (ieee->modulation & IEEE80211_CCK_MODULATION) {
txrates->user_rate = IEEE80211_CCK_RATE_11MB; txrates->user_rate = IEEE80211_CCK_RATE_11MB;
} else if (ieee->modulation & IEEE80211_OFDM_MODULATION) {
txrates->user_rate = IEEE80211_OFDM_RATE_54MB;
} else
assert(0);
txrates->default_rate = IEEE80211_CCK_RATE_1MB; txrates->default_rate = IEEE80211_CCK_RATE_1MB;
change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT; change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT;
......
...@@ -177,15 +177,10 @@ ieee80211softmac_wx_set_rate(struct net_device *net_dev, ...@@ -177,15 +177,10 @@ ieee80211softmac_wx_set_rate(struct net_device *net_dev,
int err = -EINVAL; int err = -EINVAL;
if (in_rate == -1) { if (in_rate == -1) {
/* FIXME: We don't correctly handle backing down to lower if (ieee->modulation & IEEE80211_OFDM_MODULATION)
rates, so 801.11g devices start off at 11M for now. People in_rate = 24000000;
can manually change it if they really need to, but 11M is
more reliable. Note similar logic in
ieee80211softmac_wx_set_rate() */
if (ieee->modulation & IEEE80211_CCK_MODULATION)
in_rate = 11000000;
else else
in_rate = 54000000; in_rate = 11000000;
} }
switch (in_rate) { switch (in_rate) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册