aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2009-07-01 09:17:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 15:02:27 -0400
commite47a5cddf893815e7da16e3226b959af785d8aaf (patch)
tree15766b50789f0a9ebffabd8ba0c57f47eff99130 /drivers/net/wireless/rt2x00/rt2800usb.c
parentb623a9f7c488e51dbe4320d8b5cdd0ba242d0067 (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/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 37561667925b..a204e66753c2 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -264,7 +264,6 @@ static const struct rt2x00debug rt2800usb_rt2x00debug = {
264}; 264};
265#endif /* CONFIG_RT2X00_LIB_DEBUGFS */ 265#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
266 266
267#ifdef CONFIG_RT2X00_LIB_RFKILL
268static int rt2800usb_rfkill_poll(struct rt2x00_dev *rt2x00dev) 267static int rt2800usb_rfkill_poll(struct rt2x00_dev *rt2x00dev)
269{ 268{
270 u32 reg; 269 u32 reg;
@@ -272,9 +271,6 @@ static int rt2800usb_rfkill_poll(struct rt2x00_dev *rt2x00dev)
272 rt2x00usb_register_read(rt2x00dev, GPIO_CTRL_CFG, &reg); 271 rt2x00usb_register_read(rt2x00dev, GPIO_CTRL_CFG, &reg);
273 return rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2); 272 return rt2x00_get_field32(reg, GPIO_CTRL_CFG_BIT2);
274} 273}
275#else
276#define rt2800usb_rfkill_poll NULL
277#endif /* CONFIG_RT2X00_LIB_RFKILL */
278 274
279#ifdef CONFIG_RT2X00_LIB_LEDS 275#ifdef CONFIG_RT2X00_LIB_LEDS
280static void rt2800usb_brightness_set(struct led_classdev *led_cdev, 276static void rt2800usb_brightness_set(struct led_classdev *led_cdev,
@@ -2385,10 +2381,8 @@ static int rt2800usb_init_eeprom(struct rt2x00_dev *rt2x00dev)
2385 /* 2381 /*
2386 * Detect if this device has an hardware controlled radio. 2382 * Detect if this device has an hardware controlled radio.
2387 */ 2383 */
2388#ifdef CONFIG_RT2X00_LIB_RFKILL
2389 if (rt2x00_get_field16(eeprom, EEPROM_NIC_HW_RADIO)) 2384 if (rt2x00_get_field16(eeprom, EEPROM_NIC_HW_RADIO))
2390 __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags); 2385 __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags);
2391#endif /* CONFIG_RT2X00_LIB_RFKILL */
2392 2386
2393 /* 2387 /*
2394 * Store led settings, for correct led behaviour. 2388 * Store led settings, for correct led behaviour.
@@ -2800,6 +2794,7 @@ static const struct ieee80211_ops rt2800usb_mac80211_ops = {
2800 .conf_tx = rt2800usb_conf_tx, 2794 .conf_tx = rt2800usb_conf_tx,
2801 .get_tx_stats = rt2x00mac_get_tx_stats, 2795 .get_tx_stats = rt2x00mac_get_tx_stats,
2802 .get_tsf = rt2800usb_get_tsf, 2796 .get_tsf = rt2800usb_get_tsf,
2797 .rfkill_poll = rt2x00mac_rfkill_poll,
2803}; 2798};
2804 2799
2805static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { 2800static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {