Search Linux Wireless

Re: RFC: wilc1000: refactor TX path to use sk_buff queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Mosberger-Tang <davidm@xxxxxxxxxx> 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



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux