linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: set carrier on for monitor interfaces on ieee80211_open
@ 2010-07-19 18:44 David Gnedt
  2010-07-19 20:26 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: David Gnedt @ 2010-07-19 18:44 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Johannes Berg

If a station interface is reused as monitor interface it is possible that
the carrier is still set to off. This breaks packet injection on that
monitor interface.
Force the carrier on in monitor interface initialisation like it is also done
for other interface types (e.g. adhoc, mesh point, ap).

Signed-off-by: David Gnedt <david.gnedt@davizone.at>
---
 net/mac80211/iface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 910729f..d07d223 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -249,6 +249,8 @@ static int ieee80211_open(struct net_device *dev)
 			local->fif_other_bss++;

 		ieee80211_configure_filter(local);
+
+		netif_carrier_on(dev);
 		break;
 	default:
 		res = drv_add_interface(local, &sdata->vif);
-- 
1.6.3.3


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

* Re: [PATCH] mac80211: set carrier on for monitor interfaces on ieee80211_open
  2010-07-19 18:44 [PATCH] mac80211: set carrier on for monitor interfaces on ieee80211_open David Gnedt
@ 2010-07-19 20:26 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2010-07-19 20:26 UTC (permalink / raw)
  To: David Gnedt; +Cc: John W. Linville, linux-wireless

On Mon, 2010-07-19 at 20:44 +0200, David Gnedt wrote:
> If a station interface is reused as monitor interface it is possible that
> the carrier is still set to off. This breaks packet injection on that
> monitor interface.
> Force the carrier on in monitor interface initialisation like it is also done
> for other interface types (e.g. adhoc, mesh point, ap).
> 
> Signed-off-by: David Gnedt <david.gnedt@davizone.at>

This looks good,

Acked-by: Johannes Berg <johannes@sipsolutions.net>

> ---
>  net/mac80211/iface.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
> index 910729f..d07d223 100644
> --- a/net/mac80211/iface.c
> +++ b/net/mac80211/iface.c
> @@ -249,6 +249,8 @@ static int ieee80211_open(struct net_device *dev)
>  			local->fif_other_bss++;
> 
>  		ieee80211_configure_filter(local);
> +
> +		netif_carrier_on(dev);
>  		break;
>  	default:
>  		res = drv_add_interface(local, &sdata->vif);



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

end of thread, other threads:[~2010-07-19 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 18:44 [PATCH] mac80211: set carrier on for monitor interfaces on ieee80211_open David Gnedt
2010-07-19 20:26 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).