Commit ee61fde2 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: mac80211 conversion: vnt_update_ifs change basic rates

Use wBasicRate to find ofdm_rate.

wBasicRate is changed to u32 to match struct ieee80211_bss_conf -> basic_rates
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 30816f83
......@@ -402,10 +402,8 @@ void vnt_update_ifs(struct vnt_private *priv)
priv->uCwMin = C_CWMIN_B;
max_min = 5;
} else {/* PK_TYPE_11GA & PK_TYPE_11GB */
u8 rate = 0;
bool ofdm_rate = false;
unsigned int ii = 0;
PWLAN_IE_SUPP_RATES item_rates = NULL;
priv->uSIFS = C_SIFS_BG;
......@@ -416,28 +414,12 @@ void vnt_update_ifs(struct vnt_private *priv)
priv->uDIFS = C_SIFS_BG + 2 * priv->uSlot;
item_rates =
(PWLAN_IE_SUPP_RATES)priv->vnt_mgmt.abyCurrSuppRates;
for (ii = 0; ii < item_rates->len; ii++) {
rate = (u8)(item_rates->abyRates[ii] & 0x7f);
if (RATEwGetRateIdx(rate) > RATE_11M) {
ofdm_rate = true;
break;
}
}
if (ofdm_rate == false) {
item_rates = (PWLAN_IE_SUPP_RATES)priv->vnt_mgmt
.abyCurrExtSuppRates;
for (ii = 0; ii < item_rates->len; ii++) {
rate = (u8)(item_rates->abyRates[ii] & 0x7f);
if (RATEwGetRateIdx(rate) > RATE_11M) {
for (ii = RATE_54M; ii >= RATE_6M; ii--) {
if (priv->wBasicRate & ((u32)(0x1 << ii))) {
ofdm_rate = true;
break;
}
}
}
if (ofdm_rate == true) {
priv->uCwMin = C_CWMIN_A;
......
......@@ -522,7 +522,7 @@ struct vnt_private {
/* Rate */
u8 byBBType; /* 0: 11A, 1:11B, 2:11G */
u8 byPacketType; /* 0:11a 1:11b 2:11gb 3:11ga */
u16 wBasicRate;
u32 wBasicRate;
u8 byTopOFDMBasicRate;
u8 byTopCCKBasicRate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment