staging: vt6656: use struct wiphy retry short and long settings.
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 29 Apr 2020 20:42:27 +0000 (21:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 May 2020 10:28:00 +0000 (12:28 +0200)
Remove driver options for short and long retry and use the ones
set by user in wiphy.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/fbb8da09-ee46-2249-ff29-daaaff1a64e6@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/device.h
drivers/staging/vt6656/main_usb.c

index 7834d69..4d59685 100644 (file)
@@ -351,9 +351,6 @@ struct vnt_private {
        u16 tx_rate_fb0;
        u16 tx_rate_fb1;
 
-       u8 short_retry_limit;
-       u8 long_retry_limit;
-
        enum nl80211_iftype op_mode;
 
        int short_slot_time;
index 7720a89..7db1e04 100644 (file)
@@ -59,8 +59,6 @@ MODULE_PARM_DESC(tx_buffers, "Number of receive usb tx buffers");
 
 #define RTS_THRESH_DEF     2347
 #define FRAG_THRESH_DEF     2346
-#define SHORT_RETRY_DEF     8
-#define LONG_RETRY_DEF     4
 
 /* BasebandType[] baseband type selected
  * 0: indicate 802.11a type
@@ -93,8 +91,6 @@ static void vnt_set_options(struct vnt_private *priv)
        else
                priv->num_rcb = vnt_rx_buffers;
 
-       priv->short_retry_limit = SHORT_RETRY_DEF;
-       priv->long_retry_limit = LONG_RETRY_DEF;
        priv->op_mode = NL80211_IFTYPE_UNSPECIFIED;
        priv->bb_type = BBP_TYPE_DEF;
        priv->packet_type = priv->bb_type;
@@ -223,8 +219,8 @@ static int vnt_init_registers(struct vnt_private *priv)
        init_cmd->exist_sw_net_addr = priv->exist_sw_net_addr;
        for (ii = 0; ii < ARRAY_SIZE(init_cmd->sw_net_addr); ii++)
                init_cmd->sw_net_addr[ii] = priv->current_net_addr[ii];
-       init_cmd->short_retry_limit = priv->short_retry_limit;
-       init_cmd->long_retry_limit = priv->long_retry_limit;
+       init_cmd->short_retry_limit = priv->hw->wiphy->retry_short;
+       init_cmd->long_retry_limit = priv->hw->wiphy->retry_long;
 
        /* issue card_init command to device */
        ret = vnt_control_out(priv, MESSAGE_TYPE_CARDINIT, 0, 0,