mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hostap: Revert a toxic part of the conversion to net_device_ops
@ 2009-09-10  1:44 Martin Decky
  2009-09-10  3:35 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Decky @ 2009-09-10  1:44 UTC (permalink / raw)
  To: j; +Cc: linux-kernel

From: Martin Decky <martin@decky.cz>

As the hostap driver was converted to use net_device_ops, a mistake was 
made in hostap_main.c (commit 5ae4efbcd2611562a8b93596be034e63495706a5). 
Originally, the tx_queue_len was set to 0 for every other interface than 
HOSTAP_INTERFACE_MASTER, but the new fragment of code sets tx_queue_len to 
0 only for HOSTAP_INTERFACE_MASTER. The opposite of the previous 
behavior makes the driver to drop all packets in AP mode.

Change the way 0 is assigned to tx_queue_len according to the original 
logic.

Signed-off-by: Martin Decky <martin@decky.cz>
----
diff -Naurp linux-2.6.30.orig/drivers/net/wireless/hostap/hostap_main.c linux-2.6.30/drivers/net/wireless/hostap/hostap_main.c
--- linux-2.6.30.orig/drivers/net/wireless/hostap/hostap_main.c	2009-06-10 05:05:27.000000000 +0200
+++ linux-2.6.30/drivers/net/wireless/hostap/hostap_main.c	2009-09-08 11:11:23.892816045 +0200
@@ -875,15 +875,16 @@ void hostap_setup_dev(struct net_device 
 
 	switch(type) {
 	case HOSTAP_INTERFACE_AP:
+		dev->tx_queue_len = 0;	/* use main radio device queue */
 		dev->netdev_ops = &hostap_mgmt_netdev_ops;
 		dev->type = ARPHRD_IEEE80211;
 		dev->header_ops = &hostap_80211_ops;
 		break;
 	case HOSTAP_INTERFACE_MASTER:
-		dev->tx_queue_len = 0;	/* use main radio device queue */
 		dev->netdev_ops = &hostap_master_ops;
 		break;
 	default:
+		dev->tx_queue_len = 0;	/* use main radio device queue */
 		dev->netdev_ops = &hostap_netdev_ops;
 	}
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] hostap: Revert a toxic part of the conversion to net_device_ops
  2009-09-10  1:44 [PATCH] hostap: Revert a toxic part of the conversion to net_device_ops Martin Decky
@ 2009-09-10  3:35 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-09-10  3:35 UTC (permalink / raw)
  To: martin; +Cc: j, linux-kernel, linux-wireless

From: Martin Decky <martin@decky.cz>
Date: Thu, 10 Sep 2009 03:44:47 +0200 (CEST)

Thanks, linux-wireless CC:'d, please CC: them on all wireless
patches in the future.

> From: Martin Decky <martin@decky.cz>
> 
> As the hostap driver was converted to use net_device_ops, a mistake was 
> made in hostap_main.c (commit 5ae4efbcd2611562a8b93596be034e63495706a5). 
> Originally, the tx_queue_len was set to 0 for every other interface than 
> HOSTAP_INTERFACE_MASTER, but the new fragment of code sets tx_queue_len to 
> 0 only for HOSTAP_INTERFACE_MASTER. The opposite of the previous 
> behavior makes the driver to drop all packets in AP mode.
> 
> Change the way 0 is assigned to tx_queue_len according to the original 
> logic.
> 
> Signed-off-by: Martin Decky <martin@decky.cz>

> ----
> diff -Naurp linux-2.6.30.orig/drivers/net/wireless/hostap/hostap_main.c linux-2.6.30/drivers/net/wireless/hostap/hostap_main.c
> --- linux-2.6.30.orig/drivers/net/wireless/hostap/hostap_main.c	2009-06-10 05:05:27.000000000 +0200
> +++ linux-2.6.30/drivers/net/wireless/hostap/hostap_main.c	2009-09-08 11:11:23.892816045 +0200
> @@ -875,15 +875,16 @@ void hostap_setup_dev(struct net_device 
>  
>  	switch(type) {
>  	case HOSTAP_INTERFACE_AP:
> +		dev->tx_queue_len = 0;	/* use main radio device queue */
>  		dev->netdev_ops = &hostap_mgmt_netdev_ops;
>  		dev->type = ARPHRD_IEEE80211;
>  		dev->header_ops = &hostap_80211_ops;
>  		break;
>  	case HOSTAP_INTERFACE_MASTER:
> -		dev->tx_queue_len = 0;	/* use main radio device queue */
>  		dev->netdev_ops = &hostap_master_ops;
>  		break;
>  	default:
> +		dev->tx_queue_len = 0;	/* use main radio device queue */
>  		dev->netdev_ops = &hostap_netdev_ops;
>  	}
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-10  3:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-10  1:44 [PATCH] hostap: Revert a toxic part of the conversion to net_device_ops Martin Decky
2009-09-10  3:35 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®