From patchwork Tue Jun 1 18:28:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 103589 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o51ISYiF022439 for ; Tue, 1 Jun 2010 18:28:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754698Ab0FAS2d (ORCPT ); Tue, 1 Jun 2010 14:28:33 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:34269 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754441Ab0FAS2c (ORCPT ); Tue, 1 Jun 2010 14:28:32 -0400 Received: by fxm8 with SMTP id 8so1236339fxm.19 for ; Tue, 01 Jun 2010 11:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=EbOe0kwViZIH0o5FpZVN0IUAWXrO6sDxfQXhfaqN+lI=; b=k2Hn4BC344wHlBTSyGMGYpg/S7RwqF+U2sjxBKNFsZF2vWX/2JqUa9BjTpVRuDzTH9 JqNC5tQR5NmhPthYBYO0HXLLv8eqp+As25aE2gQR6YoeH+zBw0m6SdgSkQOLxyKIW00+ s1HA/X1IH/DMNt7NxoD2mFXVC4lPp6PoG26dU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=BSlBFtsSt7ivfaGjiRisAiNQRSENlkZxNMTJgWxruC8co5VOWXNfocdilRZW8HbSDD k9nmWWVOhJwLQLtk81mixDQLIfaVHVuiGQxeliPdINkGu+VS7hln8oglZA+mIDPq4RvX nKRxplpE9xMqKlfr+tXGtNl4YJcFY3q8Ap5tI= Received: by 10.223.98.5 with SMTP id o5mr7415256fan.64.1275416910543; Tue, 01 Jun 2010 11:28:30 -0700 (PDT) Received: from [192.168.2.101] ([77.127.199.160]) by mx.google.com with ESMTPS id 13sm48235482fad.19.2010.06.01.11.28.28 (version=SSLv3 cipher=RC4-MD5); Tue, 01 Jun 2010 11:28:29 -0700 (PDT) Subject: Re: Path for fixed channel issue in aircrack-ng suite [V2] From: Maxim Levitsky To: Richard Farina Cc: Johannes Berg , =?ISO-8859-1?Q?G=E1bor?= Stefanik , Joker Joker , linux-wireless@vger.kernel.org In-Reply-To: <4C000B68.9000305@gmail.com> References: <1274775071.3635.4.camel@jlt3.sipsolutions.net> <1274860275.3658.0.camel@jlt3.sipsolutions.net> <4C000B68.9000305@gmail.com> Date: Tue, 01 Jun 2010 21:28:27 +0300 Message-ID: <1275416907.3778.11.camel@maxim-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 01 Jun 2010 18:28:34 +0000 (UTC) diff --git a/net/wireless/chan.c b/net/wireless/chan.c index b01a6f6..09d979b 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -49,9 +49,12 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev, { struct ieee80211_channel *chan; int result; + struct wireless_dev *mon_dev = NULL; - if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) + if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) { + mon_dev = wdev; wdev = NULL; + } if (wdev) { ASSERT_WDEV_LOCK(wdev); @@ -76,5 +79,8 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev, if (wdev) wdev->channel = chan; + if (mon_dev) + mon_dev->channel = chan; + return 0; }