summaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656/card.c
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2020-04-02 22:41:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-13 08:55:28 +0200
commit1b3409b574c0b6214219670883e1a5f458594f27 (patch)
tree6756b316d22a01a8b44d357bd51b708039535865 /drivers/staging/vt6656/card.c
parent5035fc5915461fd979a78f0118d6040323f49c76 (diff)
staging: vt6656: set all ofdm rates to default
mac80211 rate control decides which odfm rates to use so all of them should be set enabled at the appropriate bit rate. This means vnt_get_ofdm_rate is no longer required. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/9a52d7f4-dd3e-efdc-eef8-bb794f7dea6d@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/card.c')
-rw-r--r--drivers/staging/vt6656/card.c54
1 files changed, 4 insertions, 50 deletions
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 1ef1f6b22195..fa9fc8214a52 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -101,48 +101,6 @@ static u16 vnt_get_cck_rate(struct vnt_private *priv, u16 rate_idx)
}
/*
- * Description: Get OFDM mode basic rate
- *
- * Parameters:
- * In:
- * priv - The adapter to be set
- * rate_idx - Receiving data rate
- * Out:
- * none
- *
- * Return Value: response Control frame rate
- *
- */
-static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx)
-{
- u16 ui = rate_idx;
-
- dev_dbg(&priv->usb->dev, "%s basic rate: %d\n",
- __func__, priv->basic_rates);
-
- if (!vnt_ofdm_min_rate(priv)) {
- dev_dbg(&priv->usb->dev, "%s (NO OFDM) %d\n",
- __func__, rate_idx);
- if (rate_idx > RATE_24M)
- rate_idx = RATE_24M;
- return rate_idx;
- }
-
- while (ui > RATE_11M) {
- if (priv->basic_rates & (1 << ui)) {
- dev_dbg(&priv->usb->dev, "%s rate: %d\n",
- __func__, ui);
- return ui;
- }
- ui--;
- }
-
- dev_dbg(&priv->usb->dev, "%s basic rate: 24M\n", __func__);
-
- return RATE_24M;
-}
-
-/*
* Description: Calculate TxRate and RsvTime fields for RSPINF in OFDM mode.
*
* Parameters:
@@ -289,20 +247,16 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
vnt_calculate_ofdm_rate(RATE_24M, bb_type, &tx_rate[4], &rsv_time[4]);
/*RSPINF_a_36*/
- vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_36M),
- bb_type, &tx_rate[5], &rsv_time[5]);
+ vnt_calculate_ofdm_rate(RATE_36M, bb_type, &tx_rate[5], &rsv_time[5]);
/*RSPINF_a_48*/
- vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_48M),
- bb_type, &tx_rate[6], &rsv_time[6]);
+ vnt_calculate_ofdm_rate(RATE_48M, bb_type, &tx_rate[6], &rsv_time[6]);
/*RSPINF_a_54*/
- vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M),
- bb_type, &tx_rate[7], &rsv_time[7]);
+ vnt_calculate_ofdm_rate(RATE_54M, bb_type, &tx_rate[7], &rsv_time[7]);
/*RSPINF_a_72*/
- vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M),
- bb_type, &tx_rate[8], &rsv_time[8]);
+ vnt_calculate_ofdm_rate(RATE_54M, bb_type, &tx_rate[8], &rsv_time[8]);
put_unaligned(phy[0].len, (u16 *)&data[0]);
data[2] = phy[0].signal;