Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24753
b: refs/heads/master
c: 2638fed
h: refs/heads/master
i:
  24751: 3f43f84
v: v3
  • Loading branch information
David Woodhouse authored and John W. Linville committed Mar 27, 2006
1 parent 8d7be56 commit 0a0e4e9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16f4352733d19c2d496f682c08cff368ba0495d0
refs/heads/master: 2638fed7ccb07ff43cdc109dd78e821efb629995
17 changes: 11 additions & 6 deletions trunk/net/ieee80211/softmac/ieee80211softmac_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,21 @@ void ieee80211softmac_start(struct net_device *dev)
*/
if (mac->txrates_change)
oldrates = mac->txrates;
if (ieee->modulation & IEEE80211_OFDM_MODULATION) {
mac->txrates.default_rate = IEEE80211_OFDM_RATE_54MB;
change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT;
mac->txrates.default_fallback = IEEE80211_OFDM_RATE_24MB;
change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK;
} else if (ieee->modulation & IEEE80211_CCK_MODULATION) {
/* FIXME: We don't correctly handle backing down to lower
rates, so 801.11g devices start off at 11M for now. People
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) {
mac->txrates.default_rate = IEEE80211_CCK_RATE_11MB;
change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT;
mac->txrates.default_fallback = IEEE80211_CCK_RATE_5MB;
change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK;
} else if (ieee->modulation & IEEE80211_OFDM_MODULATION) {
mac->txrates.default_rate = IEEE80211_OFDM_RATE_54MB;
change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT;
mac->txrates.default_fallback = IEEE80211_OFDM_RATE_24MB;
change |= IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK;
} else
assert(0);
if (mac->txrates_change)
Expand Down
12 changes: 8 additions & 4 deletions trunk/net/ieee80211/softmac/ieee80211softmac_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,15 @@ ieee80211softmac_wx_set_rate(struct net_device *net_dev,
int err = -EINVAL;

if (in_rate == -1) {
/* automatic detect */
if (ieee->modulation & IEEE80211_OFDM_MODULATION)
in_rate = 54000000;
else
/* FIXME: We don't correctly handle backing down to lower
rates, so 801.11g devices start off at 11M for now. People
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
in_rate = 54000000;
}

switch (in_rate) {
Expand Down

0 comments on commit 0a0e4e9

Please sign in to comment.