staging: vt6656: set all cck rates to default.
authorMalcolm Priestley <tvboxspy@gmail.com>
Thu, 2 Apr 2020 21:42:17 +0000 (22:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 06:55:28 +0000 (08:55 +0200)
mac80211 rate control decides which cck rates to use so all of
them should be set enabled at the appropriate bit rate.

This means vnt_get_cck_rate is no longer required.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/dec847da-5bad-1920-f275-741f7f704fb3@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/card.c

index fa9fc8214a52d6c162a81901bd7f04067a206068..82c775bd20d23c7c4787d729d4b58a8e1506e24a 100644 (file)
@@ -74,32 +74,6 @@ void vnt_set_channel(struct vnt_private *priv, u32 connection_channel)
                           (u8)(connection_channel | 0x80));
 }
 
-/*
- * Description: Get CCK 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_cck_rate(struct vnt_private *priv, u16 rate_idx)
-{
-       u16 ui = rate_idx;
-
-       while (ui > RATE_1M) {
-               if (priv->basic_rates & (1 << ui))
-                       return ui;
-               ui--;
-       }
-
-       return RATE_1M;
-}
-
 /*
  * Description: Calculate TxRate and RsvTime fields for RSPINF in OFDM mode.
  *
@@ -216,20 +190,16 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
        int i;
 
        /*RSPINF_b_1*/
-       vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_1M),
-                         PK_TYPE_11B, &phy[0]);
+       vnt_get_phy_field(priv, 14, RATE_1M, PK_TYPE_11B, &phy[0]);
 
        /*RSPINF_b_2*/
-       vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_2M),
-                         PK_TYPE_11B, &phy[1]);
+       vnt_get_phy_field(priv, 14, RATE_2M, PK_TYPE_11B, &phy[1]);
 
        /*RSPINF_b_5*/
-       vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_5M),
-                         PK_TYPE_11B, &phy[2]);
+       vnt_get_phy_field(priv, 14, RATE_5M, PK_TYPE_11B, &phy[2]);
 
        /*RSPINF_b_11*/
-       vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_11M),
-                         PK_TYPE_11B, &phy[3]);
+       vnt_get_phy_field(priv, 14, RATE_11M, PK_TYPE_11B, &phy[3]);
 
        /*RSPINF_a_6*/
        vnt_calculate_ofdm_rate(RATE_6M, bb_type, &tx_rate[0], &rsv_time[0]);