From: Malcolm Priestley Date: Wed, 25 Jun 2014 20:14:28 +0000 (+0100) Subject: staging: vt6656: mac80211 conversion: vnt_update_ifs change basic rates X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ee61fde2074fbcc7575e52206aba67853e0e56cc;p=linux-beck.git 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 Signed-off-by: Greg Kroah-Hartman --- 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;