p54: remove dead branch in op_conf_tx callback
authorChristian Lamparter <chunkeey@gmail.com>
Sat, 15 Jun 2019 10:00:09 +0000 (12:00 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 25 Jun 2019 05:09:41 +0000 (08:09 +0300)
This patch removes the error branch for (queue > dev->queues).
It is no longer needed anymore as the "queue" value is validated by
cfg80211's parse_txq_params() before the driver code gets called.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intersil/p54/main.c

index 1c6d428515a482a290251ace74b5db837eb63a8f..4cc0ece0cd0e74c471d1ffad97120287fb852f93 100644 (file)
@@ -414,12 +414,9 @@ static int p54_conf_tx(struct ieee80211_hw *dev,
        int ret;
 
        mutex_lock(&priv->conf_mutex);
-       if (queue < dev->queues) {
-               P54_SET_QUEUE(priv->qos_params[queue], params->aifs,
-                       params->cw_min, params->cw_max, params->txop);
-               ret = p54_set_edcf(priv);
-       } else
-               ret = -EINVAL;
+       P54_SET_QUEUE(priv->qos_params[queue], params->aifs,
+                     params->cw_min, params->cw_max, params->txop);
+       ret = p54_set_edcf(priv);
        mutex_unlock(&priv->conf_mutex);
        return ret;
 }