diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2009-12-06 02:25:22 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-07 22:55:00 +0100 |
commit | 70d57139f932b9ca21026253d02af71cf53d764a (patch) | |
tree | 3aa334d51a8105a80e97e3775b99e15db990acfd /drivers/net/wireless/rtl818x/rtl8187_rfkill.c | |
parent | ath9k: fix tx status reporting (diff) | |
download | linux-70d57139f932b9ca21026253d02af71cf53d764a.tar.xz linux-70d57139f932b9ca21026253d02af71cf53d764a.zip |
rtl8187: Fix wrong rfkill switch mask for some models
There are different bits used to convey the setting of the rfkill
switch to the driver. The current driver only supports one of these
possibilities. These changes were derived from the latest version
of the vendor driver.
This patch fixes the regression noted in kernel Bugzilla #14743.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-and-tested-by: Antti Kaijanmäki <antti@kaijanmaki.net>
Tested-by: Hin-Tak Leung <hintak.leung@gmail.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl818x/rtl8187_rfkill.c')
-rw-r--r-- | drivers/net/wireless/rtl818x/rtl8187_rfkill.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c b/drivers/net/wireless/rtl818x/rtl8187_rfkill.c index cad8037ab2af..03555e1e0cab 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rfkill.c +++ b/drivers/net/wireless/rtl818x/rtl8187_rfkill.c @@ -25,10 +25,10 @@ static bool rtl8187_is_radio_enabled(struct rtl8187_priv *priv) u8 gpio; gpio = rtl818x_ioread8(priv, &priv->map->GPIO0); - rtl818x_iowrite8(priv, &priv->map->GPIO0, gpio & ~0x02); + rtl818x_iowrite8(priv, &priv->map->GPIO0, gpio & ~priv->rfkill_mask); gpio = rtl818x_ioread8(priv, &priv->map->GPIO1); - return gpio & 0x02; + return gpio & priv->rfkill_mask; } void rtl8187_rfkill_init(struct ieee80211_hw *hw) |