Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171426
b: refs/heads/master
c: 4f2c532
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and John W. Linville committed Nov 6, 2009
1 parent 5a1eef0 commit 8c19ff4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ada0394cede08702b604a4c8ee13409a4109e773
refs/heads/master: 4f2c53268ad1bdc7d6d12ca8bd110bb288a14300
27 changes: 17 additions & 10 deletions trunk/drivers/net/wireless/rt2x00/rt2800usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,13 @@ static void rt2800usb_mcu_request(struct rt2x00_dev *rt2x00dev,
mutex_unlock(&rt2x00dev->csr_mutex);
}

static inline void rt2800_mcu_request(struct rt2x00_dev *rt2x00dev,
const u8 command, const u8 token,
const u8 arg0, const u8 arg1)
{
rt2800usb_mcu_request(rt2x00dev, command, token, arg0, arg1);
}

#ifdef CONFIG_RT2X00_LIB_DEBUGFS
static const struct rt2x00debug rt2800usb_rt2x00debug = {
.owner = THIS_MODULE,
Expand Down Expand Up @@ -319,10 +326,10 @@ static void rt2800usb_brightness_set(struct led_classdev *led_cdev,
EEPROM_FREQ_LED_MODE);

if (led->type == LED_TYPE_RADIO) {
rt2800usb_mcu_request(led->rt2x00dev, MCU_LED, 0xff, ledmode,
rt2800_mcu_request(led->rt2x00dev, MCU_LED, 0xff, ledmode,
enabled ? 0x20 : 0);
} else if (led->type == LED_TYPE_ASSOC) {
rt2800usb_mcu_request(led->rt2x00dev, MCU_LED, 0xff, ledmode,
rt2800_mcu_request(led->rt2x00dev, MCU_LED, 0xff, ledmode,
enabled ? (bg_mode ? 0x60 : 0xa0) : 0x20);
} else if (led->type == LED_TYPE_QUALITY) {
/*
Expand All @@ -333,7 +340,7 @@ static void rt2800usb_brightness_set(struct led_classdev *led_cdev,
* work with bitshifting:
* (1 << level) - 1
*/
rt2800usb_mcu_request(led->rt2x00dev, MCU_LED_STRENGTH, 0xff,
rt2800_mcu_request(led->rt2x00dev, MCU_LED_STRENGTH, 0xff,
(1 << brightness / (LED_FULL / 6)) - 1,
polarity);
}
Expand Down Expand Up @@ -1233,13 +1240,13 @@ static int rt2800usb_load_firmware(struct rt2x00_dev *rt2x00dev,
/*
* Send signal to firmware during boot time.
*/
rt2800usb_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0);
rt2800_mcu_request(rt2x00dev, MCU_BOOT_SIGNAL, 0xff, 0, 0);

if ((chipset == 0x3070) ||
(chipset == 0x3071) ||
(chipset == 0x3572)) {
udelay(200);
rt2800usb_mcu_request(rt2x00dev, MCU_CURRENT, 0, 0, 0);
rt2800_mcu_request(rt2x00dev, MCU_CURRENT, 0, 0, 0);
udelay(10);
}

Expand Down Expand Up @@ -1875,15 +1882,15 @@ static int rt2800usb_enable_radio(struct rt2x00_dev *rt2x00dev)
* Initialize LED control
*/
rt2x00_eeprom_read(rt2x00dev, EEPROM_LED1, &word);
rt2800usb_mcu_request(rt2x00dev, MCU_LED_1, 0xff,
rt2800_mcu_request(rt2x00dev, MCU_LED_1, 0xff,
word & 0xff, (word >> 8) & 0xff);

rt2x00_eeprom_read(rt2x00dev, EEPROM_LED2, &word);
rt2800usb_mcu_request(rt2x00dev, MCU_LED_2, 0xff,
rt2800_mcu_request(rt2x00dev, MCU_LED_2, 0xff,
word & 0xff, (word >> 8) & 0xff);

rt2x00_eeprom_read(rt2x00dev, EEPROM_LED3, &word);
rt2800usb_mcu_request(rt2x00dev, MCU_LED_3, 0xff,
rt2800_mcu_request(rt2x00dev, MCU_LED_3, 0xff,
word & 0xff, (word >> 8) & 0xff);

return 0;
Expand Down Expand Up @@ -1912,9 +1919,9 @@ static int rt2800usb_set_state(struct rt2x00_dev *rt2x00dev,
enum dev_state state)
{
if (state == STATE_AWAKE)
rt2800usb_mcu_request(rt2x00dev, MCU_WAKEUP, 0xff, 0, 0);
rt2800_mcu_request(rt2x00dev, MCU_WAKEUP, 0xff, 0, 0);
else
rt2800usb_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0, 2);
rt2800_mcu_request(rt2x00dev, MCU_SLEEP, 0xff, 0, 2);

return 0;
}
Expand Down

0 comments on commit 8c19ff4

Please sign in to comment.