diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index e99bcacfc191..c2658108d9c3 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -186,6 +186,18 @@ static const struct rt2x00debug rt73usb_rt2x00debug = { | |||
186 | }; | 186 | }; |
187 | #endif /* CONFIG_RT2X00_LIB_DEBUGFS */ | 187 | #endif /* CONFIG_RT2X00_LIB_DEBUGFS */ |
188 | 188 | ||
189 | #ifdef CONFIG_RT2X00_LIB_RFKILL | ||
190 | static int rt73usb_rfkill_poll(struct rt2x00_dev *rt2x00dev) | ||
191 | { | ||
192 | u32 reg; | ||
193 | |||
194 | rt2x00usb_register_read(rt2x00dev, MAC_CSR13, ®); | ||
195 | return rt2x00_get_field32(reg, MAC_CSR13_BIT7); | ||
196 | } | ||
197 | #else | ||
198 | #define rt73usb_rfkill_poll NULL | ||
199 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ | ||
200 | |||
189 | #ifdef CONFIG_RT2X00_LIB_LEDS | 201 | #ifdef CONFIG_RT2X00_LIB_LEDS |
190 | static void rt73usb_brightness_set(struct led_classdev *led_cdev, | 202 | static void rt73usb_brightness_set(struct led_classdev *led_cdev, |
191 | enum led_brightness brightness) | 203 | enum led_brightness brightness) |
@@ -1853,6 +1865,14 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1853 | __set_bit(CONFIG_FRAME_TYPE, &rt2x00dev->flags); | 1865 | __set_bit(CONFIG_FRAME_TYPE, &rt2x00dev->flags); |
1854 | 1866 | ||
1855 | /* | 1867 | /* |
1868 | * Detect if this device has an hardware controlled radio. | ||
1869 | */ | ||
1870 | #ifdef CONFIG_RT2X00_LIB_RFKILL | ||
1871 | if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_HARDWARE_RADIO)) | ||
1872 | __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags); | ||
1873 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ | ||
1874 | |||
1875 | /* | ||
1856 | * Read frequency offset. | 1876 | * Read frequency offset. |
1857 | */ | 1877 | */ |
1858 | rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &eeprom); | 1878 | rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &eeprom); |
@@ -2257,6 +2277,7 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = { | |||
2257 | .uninitialize = rt2x00usb_uninitialize, | 2277 | .uninitialize = rt2x00usb_uninitialize, |
2258 | .clear_entry = rt2x00usb_clear_entry, | 2278 | .clear_entry = rt2x00usb_clear_entry, |
2259 | .set_device_state = rt73usb_set_device_state, | 2279 | .set_device_state = rt73usb_set_device_state, |
2280 | .rfkill_poll = rt73usb_rfkill_poll, | ||
2260 | .link_stats = rt73usb_link_stats, | 2281 | .link_stats = rt73usb_link_stats, |
2261 | .reset_tuner = rt73usb_reset_tuner, | 2282 | .reset_tuner = rt73usb_reset_tuner, |
2262 | .link_tuner = rt73usb_link_tuner, | 2283 | .link_tuner = rt73usb_link_tuner, |