staging: wfx: remove "burst" mechanism
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Wed, 1 Apr 2020 11:03:37 +0000 (13:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 06:55:33 +0000 (08:55 +0200)
In the old days, the driver tried to reorder frames in order to send
frames from the same queue grouped to the firmware. However, the
firmware is able to do the job internally for a long time. There is no
reasons to keep this mechanism.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200401110405.80282-5-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/queue.c
drivers/staging/wfx/sta.c
drivers/staging/wfx/wfx.h

index e3aa1e346c70d9378094a972d385bcf41083cacf..712ac783514b7c2b1cc60b59a7cd2984a4f61916 100644 (file)
@@ -363,8 +363,6 @@ static bool hif_handle_tx_data(struct wfx_vif *wvif, struct sk_buff *skb,
 static int wfx_get_prio_queue(struct wfx_vif *wvif,
                                 u32 tx_allowed_mask, int *total)
 {
-       static const int urgent = BIT(WFX_LINK_ID_AFTER_DTIM) |
-               BIT(WFX_LINK_ID_UAPSD);
        const struct ieee80211_tx_queue_params *edca;
        unsigned int score, best = -1;
        int winner = -1;
@@ -389,14 +387,6 @@ static int wfx_get_prio_queue(struct wfx_vif *wvif,
                }
        }
 
-       /* override winner if bursting */
-       if (winner >= 0 && wvif->wdev->tx_burst_idx >= 0 &&
-           winner != wvif->wdev->tx_burst_idx &&
-           !wfx_tx_queue_get_num_queued(&wvif->wdev->tx_queue[winner],
-                                        tx_allowed_mask & urgent) &&
-           wfx_tx_queue_get_num_queued(&wvif->wdev->tx_queue[wvif->wdev->tx_burst_idx], tx_allowed_mask))
-               winner = wvif->wdev->tx_burst_idx;
-
        return winner;
 }
 
@@ -454,7 +444,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
        u32 vif_tx_allowed_mask = 0;
        struct wfx_vif *wvif;
        int not_found;
-       int burst;
        int i;
 
        if (atomic_read(&wdev->tx_lock))
@@ -518,18 +507,6 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev)
                if (hif_handle_tx_data(wvif, skb, queue))
                        continue;  /* Handled by WSM */
 
-               /* allow bursting if txop is set */
-               if (wvif->edca_params[queue_num].txop)
-                       burst = wfx_tx_queue_get_num_queued(queue, tx_allowed_mask) + 1;
-               else
-                       burst = 1;
-
-               /* store index of bursting queue */
-               if (burst > 1)
-                       wdev->tx_burst_idx = queue_num;
-               else
-                       wdev->tx_burst_idx = -1;
-
                return hif;
        }
 }
index 9d430346a58bb32e1f10e4b960a0cffe11d933ad..a275330f551800d14ec9085611dd8d583a10b2ed 100644 (file)
@@ -531,7 +531,6 @@ static void wfx_do_join(struct wfx_vif *wvif)
 
        wfx_set_mfp(wvif, bss);
 
-       wvif->wdev->tx_burst_idx = -1;
        ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen);
        if (ret) {
                ieee80211_connection_loss(wvif->vif);
@@ -624,7 +623,6 @@ static int wfx_start_ap(struct wfx_vif *wvif)
        int ret;
 
        wvif->beacon_int = wvif->vif->bss_conf.beacon_int;
-       wvif->wdev->tx_burst_idx = -1;
        ret = hif_start(wvif, &wvif->vif->bss_conf, wvif->channel);
        if (ret)
                return ret;
index 8b85bb1abb9ce95081512529de1695519435ae97..116f456a5da23097c21b5a395b624d240341e75b 100644 (file)
@@ -51,7 +51,6 @@ struct wfx_dev {
        struct wfx_hif_cmd      hif_cmd;
        struct wfx_queue        tx_queue[4];
        struct wfx_queue_stats  tx_queue_stats;
-       int                     tx_burst_idx;
        atomic_t                tx_lock;
 
        atomic_t                packet_id;