RE: [patch 11/13] wireless: mwifiex: Use the proper interfaces

From: Bing Zhao
Date: Wed Jun 11 2014 - 23:24:09 EST


Hi Thomas,

Thanks for your patch.

> Why is converting time formats so desired if there are proper
> interfaces for this?
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Bing Zhao <bzhao@xxxxxxxxxxx>
> Cc: "John W. Linville" <linville@xxxxxxxxxxxxx>
> Cc: linux-wireless@xxxxxxxxxxxxxxx

[...]

> Index: linux/drivers/net/wireless/mwifiex/main.c
> ===================================================================
> --- linux.orig/drivers/net/wireless/mwifiex/main.c
> +++ linux/drivers/net/wireless/mwifiex/main.c
> @@ -611,7 +611,6 @@ mwifiex_hard_start_xmit(struct sk_buff *
> struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
> struct sk_buff *new_skb;
> struct mwifiex_txinfo *tx_info;
> - struct timeval tv;
>
> dev_dbg(priv->adapter->dev, "data: %lu BSS(%d-%d): Data <= kernel\n",
> jiffies, priv->bss_type, priv->bss_num);
> @@ -658,8 +657,7 @@ mwifiex_hard_start_xmit(struct sk_buff *
> * firmware for aggregate delay calculation for stats and
> * MSDU lifetime expiry.
> */
> - do_gettimeofday(&tv);
> - skb->tstamp = timeval_to_ktime(tv);
> + __net_timestamp(skb);
>
> mwifiex_queue_tx_pkt(priv, skb);
>
> Index: linux/drivers/net/wireless/mwifiex/tdls.c
> ===================================================================
> --- linux.orig/drivers/net/wireless/mwifiex/tdls.c
> +++ linux/drivers/net/wireless/mwifiex/tdls.c
> @@ -552,8 +552,7 @@ int mwifiex_send_tdls_data_frame(struct
> tx_info->bss_num = priv->bss_num;
> tx_info->bss_type = priv->bss_type;
>
> - do_gettimeofday(&tv);
> - skb->tstamp = timeval_to_ktime(tv);
> + __net_timestamp(skb);

I guess we need to remove "struct timeval tv" local variable too.

> mwifiex_queue_tx_pkt(priv, skb);
>
> return 0;
> @@ -710,8 +709,7 @@ int mwifiex_send_tdls_action_frame(struc
> pkt_len = skb->len - MWIFIEX_MGMT_FRAME_HEADER_SIZE - sizeof(pkt_len);
> memcpy(skb->data + MWIFIEX_MGMT_FRAME_HEADER_SIZE, &pkt_len,
> sizeof(pkt_len));
> - do_gettimeofday(&tv);
> - skb->tstamp = timeval_to_ktime(tv);
> + __net_timestamp(skb);

And here too.

Could you please remove these two "struct timeval tv" and send v2 with my ACK?

Acked-by: Bing Zhao <bzhao@xxxxxxxxxxx>

Thanks,
Bing

> mwifiex_queue_tx_pkt(priv, skb);
>
> return 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/