From: Nick Kossifidis <mickflemm@gmail.com>
To: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com, me@bobcopeland.com, mcgrof@gmail.com,
jirislaby@gmail.com, nbd@openwrt.org
Subject: [RFT][PATCH] ath5k: Add rfkill_disable module parameter
Date: Mon, 19 Sep 2011 19:01:24 +0300 [thread overview]
Message-ID: <20110919160124.GA3218@makis.lan> (raw)
Add a module parameter to disable hw rf kill (GPIO interrupt) because in some cases when the card doesn't come with the laptop, EEPROM configuration
doesn't match laptop's configuration and rf kill interrupt always fires up and disables hw. I thought of moving this to debugfs and make it per-card
but this way it's easier for users and distros to handle.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index e9ea38d..000a65d 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -80,6 +80,10 @@ 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.");
+static int ath5k_modparam_rfkill_disable;
+module_param_named(rfkill_disable, ath5k_modparam_rfkill_disable, bool, S_IRUGO);
+MODULE_PARM_DESC(rfkill_disable, "Disable hw rfkill support (GPIO interrupt).");
+
/* Module info */
MODULE_AUTHOR("Jiri Slaby");
@@ -2558,7 +2562,8 @@ int ath5k_start(struct ieee80211_hw *hw)
if (ret)
goto done;
- ath5k_rfkill_hw_start(ah);
+ if (!ath5k_modparam_rfkill_disable)
+ ath5k_rfkill_hw_start(ah);
/*
* Reset the key cache since some parts do not reset the
@@ -2643,7 +2648,8 @@ void ath5k_stop(struct ieee80211_hw *hw)
cancel_delayed_work_sync(&ah->tx_complete_work);
- ath5k_rfkill_hw_stop(ah);
+ if (!ath5k_modparam_rfkill_disable)
+ ath5k_rfkill_hw_stop(ah);
}
/*
next reply other threads:[~2011-09-19 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-19 16:01 Nick Kossifidis [this message]
2011-09-20 10:06 ` [RFT][PATCH] ath5k: Add rfkill_disable module parameter Mohammed Shafi
2011-09-20 11:12 ` Nick Kossifidis
2011-09-20 11:30 ` Adrian Chadd
2011-09-20 13:28 ` Mohammed Shafi
2011-09-28 22:07 ` Pavel Roskin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110919160124.GA3218@makis.lan \
--to=mickflemm@gmail.com \
--cc=ath5k-devel@lists.ath5k.org \
--cc=jirislaby@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@gmail.com \
--cc=me@bobcopeland.com \
--cc=nbd@openwrt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).