diff options
| author | Ivo van Doorn <ivdoorn@gmail.com> | 2009-08-17 12:53:24 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:36:00 -0400 |
| commit | 73077c85458739169cdaf893a375b8bb3939d35a (patch) | |
| tree | 9d6154c259f17ce249784b4e4563976191ca01a9 /drivers/net/wireless/rt2x00 | |
| parent | 5f1c07d924d3e670044911487aca057bb39b4e7e (diff) | |
rt2x00: Fix RFKILL polling
The rfkill_poll callback function in the drivers check a bit
to see if the RFKILL key has been pressed. However when the
bit is set it means the radio is active and the device can be
used.
The wiphy_rfkill_set_hw_state() function expects the inversed,
so '1' must be send when the radio must be disabled.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 602f12699718..3011aea4fead 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
| @@ -704,8 +704,8 @@ EXPORT_SYMBOL_GPL(rt2x00mac_conf_tx); | |||
| 704 | void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw) | 704 | void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw) |
| 705 | { | 705 | { |
| 706 | struct rt2x00_dev *rt2x00dev = hw->priv; | 706 | struct rt2x00_dev *rt2x00dev = hw->priv; |
| 707 | bool blocked = !!rt2x00dev->ops->lib->rfkill_poll(rt2x00dev); | 707 | bool active = !!rt2x00dev->ops->lib->rfkill_poll(rt2x00dev); |
| 708 | 708 | ||
| 709 | wiphy_rfkill_set_hw_state(hw->wiphy, blocked); | 709 | wiphy_rfkill_set_hw_state(hw->wiphy, !active); |
| 710 | } | 710 | } |
| 711 | EXPORT_SYMBOL_GPL(rt2x00mac_rfkill_poll); | 711 | EXPORT_SYMBOL_GPL(rt2x00mac_rfkill_poll); |
