diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-06-25 21:14:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:21:19 -0400 |
commit | ee61fde2074fbcc7575e52206aba67853e0e56cc (patch) | |
tree | 39d0a7e3b4600fd29b2cd26695b8133befd3de3f | |
parent | 30816f838a6589a76bca6d2afd73cafd02343429 (diff) |
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: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/vt6656/card.c | 22 | ||||
-rw-r--r-- | drivers/staging/vt6656/device.h | 2 |
2 files changed, 3 insertions, 21 deletions
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 8be3a89d5a68..1b3e0af156ec 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -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,29 +414,13 @@ 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) { + for (ii = RATE_54M; ii >= RATE_6M; ii--) { + if (priv->wBasicRate & ((u32)(0x1 << ii))) { 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) { - ofdm_rate = true; - break; - } - } - } - if (ofdm_rate == true) { priv->uCwMin = C_CWMIN_A; max_min = 4; diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index 46584c76bcdf..2bd9830e9264 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -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; |