From patchwork Thu Jun 2 00:09:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Kossifidis X-Patchwork-Id: 842082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p5209v1K015410 for ; Thu, 2 Jun 2011 00:09:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755576Ab1FBAJz (ORCPT ); Wed, 1 Jun 2011 20:09:55 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:37914 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754862Ab1FBAJy (ORCPT ); Wed, 1 Jun 2011 20:09:54 -0400 Received: by bwz15 with SMTP id 15so496274bwz.19 for ; Wed, 01 Jun 2011 17:09:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id :mail-followup-to:mime-version:content-type:content-disposition :user-agent; bh=gxKGRKWtocM8lGb1H0JsENybdBza0SqNv6ySdE12fZo=; b=CHHZD9cJaFOzUw7D17Mg7jCwnrnLOqfZZlAtiHVgEyl9pSKuBbaCC+B6bF08QzNG2v BScEhajoHT399L90co6lgfC61Q75OPdgKeRhIyDogpYexvtWf1IV+bjXCu9fBfb6rBfe LtKtuv2FTIr1xdmXzxtGn3kVEHTWOrMU9RbKM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; b=rtRaAQWVnhB9t0o8U9MW1m0NZ5np7o3wXHS4cAoASXUWdHtWK1itFw94EUp7hxv5YT 1Ar9HtCHSm1SBUXIyeZ5hu+PI7HBgduvMCJ13ea5jCejueWwaHhXmxMULUT32wyKF+bh CEfQD4NX5JJ3RAD92C0H1czmf4r68EmmFmq2E= Received: by 10.204.141.15 with SMTP id k15mr98178bku.50.1306973393243; Wed, 01 Jun 2011 17:09:53 -0700 (PDT) Received: from localhost ([139.91.73.37]) by mx.google.com with ESMTPS id x6sm55663bkv.0.2011.06.01.17.09.48 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 17:09:51 -0700 (PDT) Date: Thu, 2 Jun 2011 03:09:48 +0300 From: Nick Kossifidis To: ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org Cc: linville@tuxdriver.com, me@bobcopeland.com, mcgrof@gmail.com, jirislaby@gmail.com, nbd@openwrt.org, br1@einfach.org Subject: [PATCH] ath5k: Disable fast channel switching by default Message-ID: <20110602000946.GA5951@makis> Mail-Followup-To: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org, linville@tuxdriver.com, me@bobcopeland.com, mcgrof@gmail.com, jirislaby@gmail.com, nbd@openwrt.org, br1@einfach.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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.6 (demeter2.kernel.org [140.211.167.43]); Thu, 02 Jun 2011 00:09:57 +0000 (UTC) Disable fast channel change by default on AR2413/AR5413 due to some bug reports (it still works for me but it's better to be safe). Add a module parameter "fastchanswitch" in case anyone wants to enable it and play with it. Signed-off-by: Nick Kossifidis --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 2204762..b6c5d37 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -72,6 +72,11 @@ static int modparam_all_channels; module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO); MODULE_PARM_DESC(all_channels, "Expose all channels the device can use."); +static int modparam_fastchanswitch; +module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO); +MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios."); + + /* Module info */ MODULE_AUTHOR("Jiri Slaby"); MODULE_AUTHOR("Nick Kossifidis"); @@ -2686,6 +2691,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, struct ath5k_hw *ah = sc->ah; struct ath_common *common = ath5k_hw_common(ah); int ret, ani_mode; + bool fast; ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n"); @@ -2705,7 +2711,10 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, ath5k_drain_tx_buffs(sc); if (chan) sc->curchan = chan; - ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL, + + fast = ((chan != NULL) && modparam_fastchanswitch) ? 1 : 0; + + ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, fast, skip_pcu); if (ret) { ATH5K_ERR(sc, "can't reset hardware (%d)\n", ret); diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c index 3510de2..126a4ea 100644 --- a/drivers/net/wireless/ath/ath5k/reset.c +++ b/drivers/net/wireless/ath/ath5k/reset.c @@ -1124,8 +1124,11 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, /* Non fatal, can happen eg. * on mode change */ ret = 0; - } else + } else { + ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_RESET, + "fast chan change successful\n"); return 0; + } } /*