* [PATCH] staging/wilc1000: fix wilc_mac_xmit()'s return type
@ 2018-04-24 13:18 ` Luc Van Oostenryck
0 siblings, 0 replies; 7+ messages in thread
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel
Cc: Luc Van Oostenryck, Aditya Shankar, Ganesh Krishna,
Greg Kroah-Hartman, linux-wireless, devel
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/staging/wilc1000/linux_wlan.c | 2 +-
drivers/staging/wilc1000/wilc_wlan.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 38a83bd31..e06aaed5e 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -941,7 +941,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
kfree(pv_data);
}
-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
+netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
{
struct wilc_vif *vif;
struct tx_complete_data *tx_data = NULL;
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index fa157a67b..d3b5a6b38 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -298,7 +298,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
void wilc_enable_tcp_ack_filter(bool value);
int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc);
-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size);
void host_wakeup_notify(struct wilc *wilc);
--
2.17.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] staging/wilc1000: fix wilc_mac_xmit()'s return type
@ 2018-04-24 13:18 ` Luc Van Oostenryck
0 siblings, 0 replies; 7+ messages in thread
From: Luc Van Oostenryck @ 2018-04-24 13:18 UTC (permalink / raw)
To: linux-kernel
Cc: devel, Greg Kroah-Hartman, linux-wireless, Ganesh Krishna,
Aditya Shankar, Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/staging/wilc1000/linux_wlan.c | 2 +-
drivers/staging/wilc1000/wilc_wlan.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 38a83bd31..e06aaed5e 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -941,7 +941,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
kfree(pv_data);
}
-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
+netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
{
struct wilc_vif *vif;
struct tx_complete_data *tx_data = NULL;
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index fa157a67b..d3b5a6b38 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -298,7 +298,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
void wilc_enable_tcp_ack_filter(bool value);
int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc);
-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size);
void host_wakeup_notify(struct wilc *wilc);
--
2.17.0
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] staging/wilc1000: fix wilc_mac_xmit()'s return type
2018-04-24 13:18 ` Luc Van Oostenryck
(?)
@ 2018-04-25 14:18 ` Claudiu Beznea
-1 siblings, 0 replies; 7+ messages in thread
From: Claudiu Beznea @ 2018-04-25 14:18 UTC (permalink / raw)
To: driverdev-devel
Could you, please, change the "return 0;"s inside wilc_mac_xmit() with
"return NETDEV_TX_OK" ?
Thank you,
Claudiu
On 24.04.2018 15:18, Luc Van Oostenryck wrote:
> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
> which is a typedef for an enum type, but the implementation in this
> driver returns an 'int'.
>
> Fix this by returning 'netdev_tx_t' in this driver too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> drivers/staging/wilc1000/linux_wlan.c | 2 +-
> drivers/staging/wilc1000/wilc_wlan.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 38a83bd31..e06aaed5e 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -941,7 +941,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
> kfree(pv_data);
> }
>
> -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
> +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
> {
> struct wilc_vif *vif;
> struct tx_complete_data *tx_data = NULL;
> diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
> index fa157a67b..d3b5a6b38 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.h
> +++ b/drivers/staging/wilc1000/wilc_wlan.h
> @@ -298,7 +298,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
>
> void wilc_enable_tcp_ack_filter(bool value);
> int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc);
> -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
> +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
>
> void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size);
> void host_wakeup_notify(struct wilc *wilc);
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging/wilc1000: fix wilc_mac_xmit()'s return type
2018-04-24 13:18 ` Luc Van Oostenryck
@ 2018-04-25 16:11 ` Claudiu Beznea
-1 siblings, 0 replies; 7+ messages in thread
From: Claudiu Beznea @ 2018-04-25 16:11 UTC (permalink / raw)
To: Luc Van Oostenryck, linux-kernel
Cc: devel, Greg Kroah-Hartman, linux-wireless, Ganesh Krishna,
Aditya Shankar
Hi Luc,
I'm resending this since last time I only send it to staging ml.
Could you, please, change the "return 0;"s inside wilc_mac_xmit() with
"return NETDEV_TX_OK" ?
Thank you,
Claudiu
On 24.04.2018 15:18, Luc Van Oostenryck wrote:
> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
> which is a typedef for an enum type, but the implementation in this
> driver returns an 'int'.
>
> Fix this by returning 'netdev_tx_t' in this driver too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> drivers/staging/wilc1000/linux_wlan.c | 2 +-
> drivers/staging/wilc1000/wilc_wlan.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 38a83bd31..e06aaed5e 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -941,7 +941,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
> kfree(pv_data);
> }
>
> -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
> +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
> {
> struct wilc_vif *vif;
> struct tx_complete_data *tx_data = NULL;
> diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
> index fa157a67b..d3b5a6b38 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.h
> +++ b/drivers/staging/wilc1000/wilc_wlan.h
> @@ -298,7 +298,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
>
> void wilc_enable_tcp_ack_filter(bool value);
> int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc);
> -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
> +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
>
> void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size);
> void host_wakeup_notify(struct wilc *wilc);
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] staging/wilc1000: fix wilc_mac_xmit()'s return type
@ 2018-04-25 16:11 ` Claudiu Beznea
0 siblings, 0 replies; 7+ messages in thread
From: Claudiu Beznea @ 2018-04-25 16:11 UTC (permalink / raw)
To: Luc Van Oostenryck, linux-kernel
Cc: devel, Greg Kroah-Hartman, Aditya Shankar, linux-wireless,
Ganesh Krishna
Hi Luc,
I'm resending this since last time I only send it to staging ml.
Could you, please, change the "return 0;"s inside wilc_mac_xmit() with
"return NETDEV_TX_OK" ?
Thank you,
Claudiu
On 24.04.2018 15:18, Luc Van Oostenryck wrote:
> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
> which is a typedef for an enum type, but the implementation in this
> driver returns an 'int'.
>
> Fix this by returning 'netdev_tx_t' in this driver too.
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> drivers/staging/wilc1000/linux_wlan.c | 2 +-
> drivers/staging/wilc1000/wilc_wlan.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 38a83bd31..e06aaed5e 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -941,7 +941,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
> kfree(pv_data);
> }
>
> -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
> +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
> {
> struct wilc_vif *vif;
> struct tx_complete_data *tx_data = NULL;
> diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
> index fa157a67b..d3b5a6b38 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.h
> +++ b/drivers/staging/wilc1000/wilc_wlan.h
> @@ -298,7 +298,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
>
> void wilc_enable_tcp_ack_filter(bool value);
> int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc);
> -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
> +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
>
> void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size);
> void host_wakeup_notify(struct wilc *wilc);
>
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] staging/wilc1000: fix wilc_mac_xmit()'s return type
2018-04-25 16:11 ` Claudiu Beznea
(?)
@ 2018-04-26 20:54 ` Luc Van Oostenryck
2018-05-02 8:23 ` Claudiu Beznea
-1 siblings, 1 reply; 7+ messages in thread
From: Luc Van Oostenryck @ 2018-04-26 20:54 UTC (permalink / raw)
To: Claudiu Beznea
Cc: Aditya Shankar, Ganesh Krishna, Greg Kroah-Hartman, devel,
linux-wireless, Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too
and accordingly change 'return 0;' by 'return NETDEV_TX_OK;'
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
drivers/staging/wilc1000/linux_wlan.c | 8 ++++----
drivers/staging/wilc1000/wilc_wlan.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 38a83bd31..d95b9750b 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -941,7 +941,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
kfree(pv_data);
}
-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
+netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
{
struct wilc_vif *vif;
struct tx_complete_data *tx_data = NULL;
@@ -956,14 +956,14 @@ int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
if (skb->dev != ndev) {
netdev_err(ndev, "Packet not destined to this device\n");
- return 0;
+ return NETDEV_TX_OK;
}
tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC);
if (!tx_data) {
dev_kfree_skb(skb);
netif_wake_queue(ndev);
- return 0;
+ return NETDEV_TX_OK;
}
tx_data->buff = skb->data;
@@ -994,7 +994,7 @@ int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
netif_stop_queue(wilc->vif[1]->ndev);
}
- return 0;
+ return NETDEV_TX_OK;
}
static int wilc_mac_close(struct net_device *ndev)
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index fa157a67b..d3b5a6b38 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -298,7 +298,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
void wilc_enable_tcp_ack_filter(bool value);
int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc);
-int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
+netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size);
void host_wakeup_notify(struct wilc *wilc);
--
2.17.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] staging/wilc1000: fix wilc_mac_xmit()'s return type
2018-04-26 20:54 ` [PATCH v2] " Luc Van Oostenryck
@ 2018-05-02 8:23 ` Claudiu Beznea
0 siblings, 0 replies; 7+ messages in thread
From: Claudiu Beznea @ 2018-05-02 8:23 UTC (permalink / raw)
To: Luc Van Oostenryck
Cc: Aditya Shankar, Ganesh Krishna, Greg Kroah-Hartman, devel,
linux-wireless
On 26.04.2018 23:54, Luc Van Oostenryck wrote:
> The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
> which is a typedef for an enum type, but the implementation in this
> driver returns an 'int'.
>
> Fix this by returning 'netdev_tx_t' in this driver too
> and accordingly change 'return 0;' by 'return NETDEV_TX_OK;'
>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> drivers/staging/wilc1000/linux_wlan.c | 8 ++++----
> drivers/staging/wilc1000/wilc_wlan.h | 2 +-
> 2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 38a83bd31..d95b9750b 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -941,7 +941,7 @@ static void linux_wlan_tx_complete(void *priv, int status)
> kfree(pv_data);
> }
>
> -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
> +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
Greg already applied your first version of this patch
"staging/wilc1000: fix wilc_mac_xmit()'s return type" so I will send a new
patch with only the "return NETDEV_TX_OK" changes.
And you can also add:
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> {
> struct wilc_vif *vif;
> struct tx_complete_data *tx_data = NULL;
> @@ -956,14 +956,14 @@ int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
>
> if (skb->dev != ndev) {
> netdev_err(ndev, "Packet not destined to this device\n");
> - return 0;
> + return NETDEV_TX_OK;
> }
>
> tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC);
> if (!tx_data) {
> dev_kfree_skb(skb);
> netif_wake_queue(ndev);
> - return 0;
> + return NETDEV_TX_OK;
> }
>
> tx_data->buff = skb->data;
> @@ -994,7 +994,7 @@ int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
> netif_stop_queue(wilc->vif[1]->ndev);
> }
>
> - return 0;
> + return NETDEV_TX_OK;
> }
>
> static int wilc_mac_close(struct net_device *ndev)
> diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
> index fa157a67b..d3b5a6b38 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.h
> +++ b/drivers/staging/wilc1000/wilc_wlan.h
> @@ -298,7 +298,7 @@ void wilc_chip_sleep_manually(struct wilc *wilc);
>
> void wilc_enable_tcp_ack_filter(bool value);
> int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc);
> -int wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
> +netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
>
> void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size);
> void host_wakeup_notify(struct wilc *wilc);
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-05-02 8:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 13:18 [PATCH] staging/wilc1000: fix wilc_mac_xmit()'s return type Luc Van Oostenryck
2018-04-24 13:18 ` Luc Van Oostenryck
2018-04-25 14:18 ` Claudiu Beznea
2018-04-25 16:11 ` Claudiu Beznea
2018-04-25 16:11 ` Claudiu Beznea
2018-04-26 20:54 ` [PATCH v2] " Luc Van Oostenryck
2018-05-02 8:23 ` Claudiu Beznea
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.