[MAC80211]: remove turbo modes
This patch removes all mention of the atheros turbo modes that can't possibly work properly anyway since in some places we don't check for them when we should. I have no idea what the iwlwifi drivers were doing with these but it can't possibly have been correct. Cc: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d4e46a3d98
commit
b708e61062
@@ -618,8 +618,6 @@ static void ieee80211_send_assoc(struct net_device *dev,
|
||||
*pos++ = len;
|
||||
for (i = 0; i < len; i++) {
|
||||
int rate = mode->rates[i].rate;
|
||||
if (mode->mode == MODE_ATHEROS_TURBO)
|
||||
rate /= 2;
|
||||
*pos++ = (u8) (rate / 5);
|
||||
}
|
||||
|
||||
@@ -629,8 +627,6 @@ static void ieee80211_send_assoc(struct net_device *dev,
|
||||
*pos++ = mode->num_rates - len;
|
||||
for (i = len; i < mode->num_rates; i++) {
|
||||
int rate = mode->rates[i].rate;
|
||||
if (mode->mode == MODE_ATHEROS_TURBO)
|
||||
rate /= 2;
|
||||
*pos++ = (u8) (rate / 5);
|
||||
}
|
||||
}
|
||||
@@ -889,10 +885,7 @@ static void ieee80211_send_probe_req(struct net_device *dev, u8 *dst,
|
||||
pos = skb_put(skb, 1);
|
||||
supp_rates[1]++;
|
||||
}
|
||||
if (mode->mode == MODE_ATHEROS_TURBO)
|
||||
*pos = rate->rate / 10;
|
||||
else
|
||||
*pos = rate->rate / 5;
|
||||
*pos = rate->rate / 5;
|
||||
}
|
||||
|
||||
ieee80211_sta_tx(dev, skb, 0);
|
||||
@@ -1285,16 +1278,12 @@ static void ieee80211_rx_mgmt_assoc_resp(struct net_device *dev,
|
||||
mode = local->oper_hw_mode;
|
||||
for (i = 0; i < elems.supp_rates_len; i++) {
|
||||
int rate = (elems.supp_rates[i] & 0x7f) * 5;
|
||||
if (mode->mode == MODE_ATHEROS_TURBO)
|
||||
rate *= 2;
|
||||
for (j = 0; j < mode->num_rates; j++)
|
||||
if (mode->rates[j].rate == rate)
|
||||
rates |= BIT(j);
|
||||
}
|
||||
for (i = 0; i < elems.ext_supp_rates_len; i++) {
|
||||
int rate = (elems.ext_supp_rates[i] & 0x7f) * 5;
|
||||
if (mode->mode == MODE_ATHEROS_TURBO)
|
||||
rate *= 2;
|
||||
for (j = 0; j < mode->num_rates; j++)
|
||||
if (mode->rates[j].rate == rate)
|
||||
rates |= BIT(j);
|
||||
@@ -1514,8 +1503,6 @@ static void ieee80211_rx_bss_info(struct net_device *dev,
|
||||
rate = elems.ext_supp_rates
|
||||
[i - elems.supp_rates_len];
|
||||
own_rate = 5 * (rate & 0x7f);
|
||||
if (mode->mode == MODE_ATHEROS_TURBO)
|
||||
own_rate *= 2;
|
||||
for (j = 0; j < num_rates; j++)
|
||||
if (rates[j].rate == own_rate)
|
||||
supp_rates |= BIT(j);
|
||||
@@ -2344,8 +2331,6 @@ static int ieee80211_sta_join_ibss(struct net_device *dev,
|
||||
mode = local->oper_hw_mode;
|
||||
for (i = 0; i < bss->supp_rates_len; i++) {
|
||||
int bitrate = (bss->supp_rates[i] & 0x7f) * 5;
|
||||
if (mode->mode == MODE_ATHEROS_TURBO)
|
||||
bitrate *= 2;
|
||||
for (j = 0; j < mode->num_rates; j++)
|
||||
if (mode->rates[j].rate == bitrate)
|
||||
rates |= BIT(j);
|
||||
@@ -2418,8 +2403,6 @@ static int ieee80211_sta_create_ibss(struct net_device *dev,
|
||||
pos = bss->supp_rates;
|
||||
for (i = 0; i < mode->num_rates; i++) {
|
||||
int rate = mode->rates[i].rate;
|
||||
if (mode->mode == MODE_ATHEROS_TURBO)
|
||||
rate /= 2;
|
||||
*pos++ = (u8) (rate / 5);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user