Search Linux Wireless

Re: [PATCH 1/2] mac80211: add explicit monitor interface if needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 3, 2012 at 11:29 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> The queue mapping redesign that I'm planning to do
> will break pure injection unless we handle monitor
> interfaces explicitly. One possible option would
> be to have the driver tell mac80211 about monitor
> mode queues etc., but that would duplicate the API
> since we already need to have queue assignments
> handled per virtual interface.
>
> So in order to solve this, have a virtual monitor
> interface that is added whenever all active vifs
> are monitors. We could also use the state of one
> of the monitor interfaces, but managing that would
> be complicated, so allocate separate state.
>
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> ---
[...]

> @@ -266,6 +319,12 @@ static int ieee80211_do_open(struct net_
>                        break;
>                }
>
> +               if (local->monitors == 0 && local->open_count == 0) {
> +                       res = ieee80211_add_virtual_monitor(local);
> +                       if (res)
> +                               return res;

you probably have to goto instead (to clean up properly - drv_stop etc.).

Eliad.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux