diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2009-07-01 09:17:35 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:02:27 -0400 |
commit | e47a5cddf893815e7da16e3226b959af785d8aaf (patch) | |
tree | 15766b50789f0a9ebffabd8ba0c57f47eff99130 /drivers/net/wireless/rt2x00/rt2x00lib.h | |
parent | b623a9f7c488e51dbe4320d8b5cdd0ba242d0067 (diff) |
rt2x00: use wiphy rfkill interface
Remove the input_polldev from rt2x00 and replace it with
the rfkill interface offered by the wiphy structure. This
simplifies the entire rfkill handling in rt2x00 and allows
us to remove the CONFIG_RT2X00_LIB_RFKILL option and always
enables rfkill capabilities.
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/rt2x00lib.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 0bf2715fa93a..512fa2bc3a10 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -30,10 +30,8 @@ | |||
30 | 30 | ||
31 | /* | 31 | /* |
32 | * Interval defines | 32 | * Interval defines |
33 | * Both the link tuner as the rfkill will be called once per second. | ||
34 | */ | 33 | */ |
35 | #define LINK_TUNE_INTERVAL round_jiffies_relative(HZ) | 34 | #define LINK_TUNE_INTERVAL round_jiffies_relative(HZ) |
36 | #define RFKILL_POLL_INTERVAL 1000 | ||
37 | 35 | ||
38 | /* | 36 | /* |
39 | * rt2x00_rate: Per rate device information | 37 | * rt2x00_rate: Per rate device information |
@@ -386,29 +384,18 @@ static inline void rt2x00ht_create_tx_descriptor(struct queue_entry *entry, | |||
386 | /* | 384 | /* |
387 | * RFkill handlers. | 385 | * RFkill handlers. |
388 | */ | 386 | */ |
389 | #ifdef CONFIG_RT2X00_LIB_RFKILL | ||
390 | void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev); | ||
391 | void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev); | ||
392 | void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev); | ||
393 | void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev); | ||
394 | #else | ||
395 | static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) | 387 | static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) |
396 | { | 388 | { |
389 | if (test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) | ||
390 | wiphy_rfkill_start_polling(rt2x00dev->hw->wiphy); | ||
397 | } | 391 | } |
398 | 392 | ||
399 | static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) | 393 | static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) |
400 | { | 394 | { |
395 | if (test_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags)) | ||
396 | wiphy_rfkill_stop_polling(rt2x00dev->hw->wiphy); | ||
401 | } | 397 | } |
402 | 398 | ||
403 | static inline void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) | ||
404 | { | ||
405 | } | ||
406 | |||
407 | static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) | ||
408 | { | ||
409 | } | ||
410 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ | ||
411 | |||
412 | /* | 399 | /* |
413 | * LED handlers | 400 | * LED handlers |
414 | */ | 401 | */ |