From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from he.sipsolutions.net ([78.46.109.217]:51917 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750838Ab2DCMeo (ORCPT ); Tue, 3 Apr 2012 08:34:44 -0400 Message-ID: <1333456480.3574.16.camel@jlt3.sipsolutions.net> (sfid-20120403_143448_051237_7869D770) Subject: Re: [PATCH 1/2] mac80211: add explicit monitor interface if needed From: Johannes Berg To: Eliad Peller Cc: John Linville , linux-wireless@vger.kernel.org Date: Tue, 03 Apr 2012 14:34:40 +0200 In-Reply-To: (sfid-20120403_142254_537328_9F55F074) References: <20120403082416.559209159@sipsolutions.net> <1333441758.3574.3.camel@jlt3.sipsolutions.net> (sfid-20120403_142254_537328_9F55F074) Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Tue, 2012-04-03 at 15:22 +0300, Eliad Peller wrote: > > @@ -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.). Hm, good catch, this is a bit confusing. I'll do that, and then post another patch to clean up the error paths a bit. johannes