2007-10-04 15:56:39

by Stephen Hemminger

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Fix TX after monitor interface is converted to managed

On Thu, 4 Oct 2007 12:33:43 +0100 (BST)
Daniel Drake <[email protected]> wrote:

> This sequence of events causes loss of connectivity:
>
> <plug in>
> <associate as normal in managed mode>
> ifconfig eth7 down
> iwconfig eth7 mode monitor
> ifconfig eth7 up
> ifconfig eth7 down
> iwconfig eth7 mode managed
> <associate as normal>
>
> At this point you are associated but TX does not work. This is because
> the eth7 hard_start_xmit is still ieee80211_monitor_start_xmit.
>
> Fix this by unsetting the hard_start_xmit handler in ieee80211_if_reinit. It
> will then be reinitialised to the default (ieee80211_subif_start_xmit) in
> ieee80211_if_set_type.
>
> Signed-off-by: Daniel Drake <[email protected]>

Playing with the function pointer is a awkward way to do this. Shouldn't
the state management flags be used instead (dormant, running, stop/wake)...
I am concerned about races and dereferencing the NULL ptr.

--
Stephen Hemminger <[email protected]>


2007-10-04 16:58:15

by Michael Wu

[permalink] [raw]
Subject: Re: [PATCH] mac80211: Fix TX after monitor interface is converted to managed

On Thursday 04 October 2007 11:54, Stephen Hemminger wrote:
> Playing with the function pointer is a awkward way to do this. Shouldn't
> the state management flags be used instead (dormant, running, stop/wake)...
> I am concerned about races and dereferencing the NULL ptr.
This is all under RTNL and the pointer is only modified while the interface is
down.

-Michael Wu


Attachments:
(No filename) (374.00 B)
(No filename) (189.00 B)
Download all attachments