From patchwork Thu May 6 14:52:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yegor Yefremov X-Patchwork-Id: 97357 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 o46EpaqU023027 for ; Thu, 6 May 2010 14:52:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753505Ab0EFOwW (ORCPT ); Thu, 6 May 2010 10:52:22 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:40279 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753031Ab0EFOwV (ORCPT ); Thu, 6 May 2010 10:52:21 -0400 Received: by gyg13 with SMTP id 13so25995gyg.19 for ; Thu, 06 May 2010 07:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=nBrsOPI7TRIJg6vCMWDHQbFEqbC8nuT5jIv4eHtc1eE=; b=G77eGZOoq6QJfq3kpDzdZHXWHJv/FUGfoxUZs4KEI/Ob/V3mqCdQKAIBPearqU1q6m uDBRI+i7v/5bKRlCcmHcp3ZRLkp838qwfO51WWXaa6CJd2dzOWx7f/hLg7G6b3kKVra0 0vZN8kxNstbSlb/2GodmJIAycpJ3F5O5tL+0E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=KxUW+ff38SngQEXQziHTiAdq5R9Hqp0RQpDpnIMYnk6XHc+BU1+H4rvepWuPookCng 8ZArOPAYu+jZlmkF4zu+DlfRaXuWbNqgG8vpcVkGy7ScWzvX4WfM48sRrmKsJHw2RsR4 dCRt4FiefecEo+Yb/ZXsHqSV4rq9RcfXLJ7NA= MIME-Version: 1.0 Received: by 10.91.58.11 with SMTP id l11mr1735agk.0.1273157538920; Thu, 06 May 2010 07:52:18 -0700 (PDT) Received: by 10.90.74.8 with HTTP; Thu, 6 May 2010 07:52:18 -0700 (PDT) In-Reply-To: References: Date: Thu, 6 May 2010 16:52:18 +0200 Message-ID: Subject: Re: 2.6.33.2: Turn tx power off/on for Atheros card From: Yegor Yefremov To: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org 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]); Thu, 06 May 2010 14:52:53 +0000 (UTC) Index: b/net/wireless/wext-compat.c =================================================================== --- a/net/wireless/wext-compat.c 2010-04-30 05:02:05.000000000 +0200 +++ b/net/wireless/wext-compat.c 2010-05-06 16:31:20.000000000 +0200 @@ -15,6 +15,7 @@ #include #include #include +#include "../mac80211/ieee80211_i.h" #include "wext-compat.h" #include "core.h" @@ -824,6 +825,7 @@ { struct wireless_dev *wdev = dev->ieee80211_ptr; struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy); + struct ieee80211_local *local = wiphy_priv(wdev->wiphy); enum tx_power_setting type; int dbm = 0; @@ -861,6 +863,8 @@ type = TX_POWER_LIMITED; } } + if(!local->open_count) + dev_open(wdev->netdev); } else { rfkill_set_sw_state(rdev->rfkill, true); schedule_work(&rdev->rfkill_sync);