qtnfmac: do not reject retry changes in driver
authorSergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Mon, 14 Jan 2019 09:39:42 +0000 (09:39 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 1 Feb 2019 12:12:01 +0000 (14:12 +0200)
Do not reject RETRY changes in driver. This decision
should belong to firmware.

Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
drivers/net/wireless/quantenna/qtnfmac/commands.c

index a43f8120df3cce86cb3d61b950925c70e1547fdd..1b02096934f81097586b44a3f4b85e30896b6d71 100644 (file)
@@ -363,11 +363,6 @@ static int qtnf_set_wiphy_params(struct wiphy *wiphy, u32 changed)
                return -EFAULT;
        }
 
-       if (changed & (WIPHY_PARAM_RETRY_LONG | WIPHY_PARAM_RETRY_SHORT)) {
-               pr_err("MAC%u: can't modify retry params\n", mac->macid);
-               return -EOPNOTSUPP;
-       }
-
        ret = qtnf_cmd_send_update_phy_params(mac, changed);
        if (ret)
                pr_err("MAC%u: failed to update PHY params\n", mac->macid);
index 74dcbcfcd69489df9cfc8738c84abf3eee77c668..0cb76acbec99238f9d4d16725254b87a828405e2 100644 (file)
@@ -1824,6 +1824,14 @@ int qtnf_cmd_send_update_phy_params(struct qtnf_wmac *mac, u32 changed)
                qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_COVERAGE_CLASS,
                                        wiphy->coverage_class);
 
+       if (changed & WIPHY_PARAM_RETRY_LONG)
+               qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_LRETRY_LIMIT,
+                                       wiphy->retry_long);
+
+       if (changed & WIPHY_PARAM_RETRY_SHORT)
+               qtnf_cmd_skb_put_tlv_u8(cmd_skb, QTN_TLV_ID_SRETRY_LIMIT,
+                                       wiphy->retry_short);
+
        ret = qtnf_cmd_send(mac->bus, cmd_skb);
        if (ret)
                goto out;