[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8735mvhyvk.fsf@codeaurora.org>
Date: Tue, 14 Dec 2021 19:36:47 +0200
From: Kalle Valo <kvalo@...nel.org>
To: David Mosberger-Tang <davidm@...uge.net>
Cc: Ajay Singh <ajay.kathat@...rochip.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
linux-wireless <linux-wireless@...r.kernel.org>,
"netdev\@vger.kernel.org" <netdev@...r.kernel.org>
Subject: Re: RFC: wilc1000: refactor TX path to use sk_buff queue
David Mosberger-Tang <davidm@...uge.net> writes:
> I'd like to propose to restructure the wilc1000 TX path to take
> advantage of the existing sk_buff queuing and buffer operations rather
> than using a driver-specific solution. To me, the resulting code looks
> simpler and the diffstat shows a fair amount of code-reduction:
>
> cfg80211.c | 35 ----
> mon.c | 36 ----
> netdev.c | 28 ---
> netdev.h | 10 -
> wlan.c | 499 ++++++++++++++++++++++++++-----------------------------------
> wlan.h | 51 ++----
> 6 files changed, 255 insertions(+), 404 deletions(-)
Looks like a very good cleanup.
> +static void wilc_wlan_txq_drop_net_pkt(struct sk_buff *skb)
> +{
> + struct wilc_vif *vif = netdev_priv(skb->dev);
> + struct wilc *wilc = vif->wilc;
> + struct wilc_skb_tx_cb *tx_cb = WILC_SKB_TX_CB(skb);
> +
> + if ((u8)tx_cb->q_num >= NQUEUES) {
> + netdev_err(vif->ndev, "Invalid AC queue number %d",
> + tx_cb->q_num);
> + return;
> + }
But why the cast here? Casting should be avoided as much as possible,
they just create so many problems if used badly.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists