diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 37561667925b..9efb41710508 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 | ||
268 | static int rt2800usb_rfkill_poll(struct rt2x00_dev *rt2x00dev) | 267 | static 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, ®); | 271 | rt2x00usb_register_read(rt2x00dev, GPIO_CTRL_CFG, ®); |
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 |
280 | static void rt2800usb_brightness_set(struct led_classdev *led_cdev, | 276 | static void rt2800usb_brightness_set(struct led_classdev *led_cdev, |
@@ -1914,7 +1910,7 @@ static int rt2800usb_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1914 | /* | 1910 | /* |
1915 | * Before the radio can be enabled, the device first has | 1911 | * Before the radio can be enabled, the device first has |
1916 | * to be woken up. After that it needs a bit of time | 1912 | * to be woken up. After that it needs a bit of time |
1917 | * to be fully awake and the radio can be enabled. | 1913 | * to be fully awake and then the radio can be enabled. |
1918 | */ | 1914 | */ |
1919 | rt2800usb_set_state(rt2x00dev, STATE_AWAKE); | 1915 | rt2800usb_set_state(rt2x00dev, STATE_AWAKE); |
1920 | msleep(1); | 1916 | msleep(1); |
@@ -1922,7 +1918,7 @@ static int rt2800usb_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1922 | break; | 1918 | break; |
1923 | case STATE_RADIO_OFF: | 1919 | case STATE_RADIO_OFF: |
1924 | /* | 1920 | /* |
1925 | * After the radio has been disablee, the device should | 1921 | * After the radio has been disabled, the device should |
1926 | * be put to sleep for powersaving. | 1922 | * be put to sleep for powersaving. |
1927 | */ | 1923 | */ |
1928 | rt2800usb_disable_radio(rt2x00dev); | 1924 | rt2800usb_disable_radio(rt2x00dev); |
@@ -2224,10 +2220,8 @@ static int rt2800usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2224 | */ | 2220 | */ |
2225 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); | 2221 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); |
2226 | if (!is_valid_ether_addr(mac)) { | 2222 | if (!is_valid_ether_addr(mac)) { |
2227 | DECLARE_MAC_BUF(macbuf); | ||
2228 | |||
2229 | random_ether_addr(mac); | 2223 | random_ether_addr(mac); |
2230 | EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac)); | 2224 | EEPROM(rt2x00dev, "MAC: %pM\n", mac); |
2231 | } | 2225 | } |
2232 | 2226 | ||
2233 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 2227 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
@@ -2385,10 +2379,8 @@ static int rt2800usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2385 | /* | 2379 | /* |
2386 | * Detect if this device has an hardware controlled radio. | 2380 | * Detect if this device has an hardware controlled radio. |
2387 | */ | 2381 | */ |
2388 | #ifdef CONFIG_RT2X00_LIB_RFKILL | ||
2389 | if (rt2x00_get_field16(eeprom, EEPROM_NIC_HW_RADIO)) | 2382 | if (rt2x00_get_field16(eeprom, EEPROM_NIC_HW_RADIO)) |
2390 | __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags); | 2383 | __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags); |
2391 | #endif /* CONFIG_RT2X00_LIB_RFKILL */ | ||
2392 | 2384 | ||
2393 | /* | 2385 | /* |
2394 | * Store led settings, for correct led behaviour. | 2386 | * Store led settings, for correct led behaviour. |
@@ -2792,6 +2784,7 @@ static const struct ieee80211_ops rt2800usb_mac80211_ops = { | |||
2792 | .remove_interface = rt2x00mac_remove_interface, | 2784 | .remove_interface = rt2x00mac_remove_interface, |
2793 | .config = rt2x00mac_config, | 2785 | .config = rt2x00mac_config, |
2794 | .configure_filter = rt2x00mac_configure_filter, | 2786 | .configure_filter = rt2x00mac_configure_filter, |
2787 | .set_tim = rt2x00mac_set_tim, | ||
2795 | .set_key = rt2x00mac_set_key, | 2788 | .set_key = rt2x00mac_set_key, |
2796 | .get_stats = rt2x00mac_get_stats, | 2789 | .get_stats = rt2x00mac_get_stats, |
2797 | .get_tkip_seq = rt2800usb_get_tkip_seq, | 2790 | .get_tkip_seq = rt2800usb_get_tkip_seq, |
@@ -2800,6 +2793,7 @@ static const struct ieee80211_ops rt2800usb_mac80211_ops = { | |||
2800 | .conf_tx = rt2800usb_conf_tx, | 2793 | .conf_tx = rt2800usb_conf_tx, |
2801 | .get_tx_stats = rt2x00mac_get_tx_stats, | 2794 | .get_tx_stats = rt2x00mac_get_tx_stats, |
2802 | .get_tsf = rt2800usb_get_tsf, | 2795 | .get_tsf = rt2800usb_get_tsf, |
2796 | .rfkill_poll = rt2x00mac_rfkill_poll, | ||
2803 | }; | 2797 | }; |
2804 | 2798 | ||
2805 | static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { | 2799 | static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { |