提交 73077c85 编写于 作者: I Ivo van Doorn 提交者: John W. Linville

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: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 5f1c07d9
......@@ -704,8 +704,8 @@ EXPORT_SYMBOL_GPL(rt2x00mac_conf_tx);
void rt2x00mac_rfkill_poll(struct ieee80211_hw *hw)
{
struct rt2x00_dev *rt2x00dev = hw->priv;
bool blocked = !!rt2x00dev->ops->lib->rfkill_poll(rt2x00dev);
bool active = !!rt2x00dev->ops->lib->rfkill_poll(rt2x00dev);
wiphy_rfkill_set_hw_state(hw->wiphy, blocked);
wiphy_rfkill_set_hw_state(hw->wiphy, !active);
}
EXPORT_SYMBOL_GPL(rt2x00mac_rfkill_poll);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册