* [PATCH] carl9170: remove dead branch in op_conf_tx callback
@ 2019-06-15 10:00 Christian Lamparter
2019-06-15 10:00 ` [PATCH] p54: " Christian Lamparter
2019-06-27 17:48 ` [PATCH] carl9170: " Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Christian Lamparter @ 2019-06-15 10:00 UTC (permalink / raw)
To: linux-wireless; +Cc: Kalle Valo
This patch removes the error branch for (queue > ar->hw->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.
Some background:
In the old days (linux 2.6 and early 3.x), the parse_txq_params()
function did not verify the "queue" value. That's why these drivers
had to do it.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
---
drivers/net/wireless/ath/carl9170/main.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index 7f1bdea742b8..40a8054f8aa6 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -1387,13 +1387,8 @@ static int carl9170_op_conf_tx(struct ieee80211_hw *hw,
int ret;
mutex_lock(&ar->mutex);
- if (queue < ar->hw->queues) {
- memcpy(&ar->edcf[ar9170_qmap[queue]], param, sizeof(*param));
- ret = carl9170_set_qos(ar);
- } else {
- ret = -EINVAL;
- }
-
+ memcpy(&ar->edcf[ar9170_qmap[queue]], param, sizeof(*param));
+ ret = carl9170_set_qos(ar);
mutex_unlock(&ar->mutex);
return ret;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] p54: remove dead branch in op_conf_tx callback
2019-06-15 10:00 [PATCH] carl9170: remove dead branch in op_conf_tx callback Christian Lamparter
@ 2019-06-15 10:00 ` Christian Lamparter
2019-06-25 5:09 ` Kalle Valo
2019-06-27 17:48 ` [PATCH] carl9170: " Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Christian Lamparter @ 2019-06-15 10:00 UTC (permalink / raw)
To: linux-wireless; +Cc: Kalle Valo
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>
---
drivers/net/wireless/intersil/p54/main.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/intersil/p54/main.c b/drivers/net/wireless/intersil/p54/main.c
index 1c6d428515a4..4cc0ece0cd0e 100644
--- a/drivers/net/wireless/intersil/p54/main.c
+++ b/drivers/net/wireless/intersil/p54/main.c
@@ -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;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] p54: remove dead branch in op_conf_tx callback
2019-06-15 10:00 ` [PATCH] p54: " Christian Lamparter
@ 2019-06-25 5:09 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-06-25 5:09 UTC (permalink / raw)
To: Christian Lamparter; +Cc: linux-wireless
Christian Lamparter <chunkeey@gmail.com> wrote:
> 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>
Patch applied to wireless-drivers-next.git, thanks.
12e66ffbd534 p54: remove dead branch in op_conf_tx callback
--
https://patchwork.kernel.org/patch/10997025/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] carl9170: remove dead branch in op_conf_tx callback
2019-06-15 10:00 [PATCH] carl9170: remove dead branch in op_conf_tx callback Christian Lamparter
2019-06-15 10:00 ` [PATCH] p54: " Christian Lamparter
@ 2019-06-27 17:48 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2019-06-27 17:48 UTC (permalink / raw)
To: Christian Lamparter; +Cc: linux-wireless
Christian Lamparter <chunkeey@gmail.com> wrote:
> This patch removes the error branch for (queue > ar->hw->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.
>
> Some background:
> In the old days (linux 2.6 and early 3.x), the parse_txq_params()
> function did not verify the "queue" value. That's why these drivers
> had to do it.
>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
4ba641262b91 carl9170: remove dead branch in op_conf_tx callback
--
https://patchwork.kernel.org/patch/10997023/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-27 17:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-15 10:00 [PATCH] carl9170: remove dead branch in op_conf_tx callback Christian Lamparter
2019-06-15 10:00 ` [PATCH] p54: " Christian Lamparter
2019-06-25 5:09 ` Kalle Valo
2019-06-27 17:48 ` [PATCH] carl9170: " Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.