aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-10-13 10:26:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:02:54 -0500
commitddc827f93a2f2a7dcfda5b691d046af4dfe76427 (patch)
treedfa0c0d573e18fcc95d15984d43dcff4a7d71564 /drivers/net/wireless/rt2x00/rt2500pci.c
parent69f81a2cac860cf183eb9ef7787525c3552d4612 (diff)
[PATCH] rt2x00: Cleanup if-statements
Cleanup if-statements for simple 1/0 register field values. This also fixes a endian bug in rt2500usb when working with the PHY_CSR2 initialization. As well as a bug in the enabling of the LED in rt73usb. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 958b148d8f50..869b1a7cec73 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -563,18 +563,10 @@ static void rt2500pci_enable_led(struct rt2x00_dev *rt2x00dev)
563 563
564 rt2x00_set_field32(&reg, LEDCSR_ON_PERIOD, 70); 564 rt2x00_set_field32(&reg, LEDCSR_ON_PERIOD, 70);
565 rt2x00_set_field32(&reg, LEDCSR_OFF_PERIOD, 30); 565 rt2x00_set_field32(&reg, LEDCSR_OFF_PERIOD, 30);
566 566 rt2x00_set_field32(&reg, LEDCSR_LINK,
567 if (rt2x00dev->led_mode == LED_MODE_TXRX_ACTIVITY) { 567 (rt2x00dev->led_mode != LED_MODE_ASUS));
568 rt2x00_set_field32(&reg, LEDCSR_LINK, 1); 568 rt2x00_set_field32(&reg, LEDCSR_ACTIVITY,
569 rt2x00_set_field32(&reg, LEDCSR_ACTIVITY, 0); 569 (rt2x00dev->led_mode != LED_MODE_TXRX_ACTIVITY));
570 } else if (rt2x00dev->led_mode == LED_MODE_ASUS) {
571 rt2x00_set_field32(&reg, LEDCSR_LINK, 0);
572 rt2x00_set_field32(&reg, LEDCSR_ACTIVITY, 1);
573 } else {
574 rt2x00_set_field32(&reg, LEDCSR_LINK, 1);
575 rt2x00_set_field32(&reg, LEDCSR_ACTIVITY, 1);
576 }
577
578 rt2x00pci_register_write(rt2x00dev, LEDCSR, reg); 570 rt2x00pci_register_write(rt2x00dev, LEDCSR, reg);
579} 571}
580 572
@@ -1244,12 +1236,12 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1244 } 1236 }
1245 1237
1246 rt2x00pci_register_read(rt2x00dev, TXCSR0, &reg); 1238 rt2x00pci_register_read(rt2x00dev, TXCSR0, &reg);
1247 if (queue == IEEE80211_TX_QUEUE_DATA0) 1239 rt2x00_set_field32(&reg, TXCSR0_KICK_PRIO,
1248 rt2x00_set_field32(&reg, TXCSR0_KICK_PRIO, 1); 1240 (queue == IEEE80211_TX_QUEUE_DATA0));
1249 else if (queue == IEEE80211_TX_QUEUE_DATA1) 1241 rt2x00_set_field32(&reg, TXCSR0_KICK_TX,
1250 rt2x00_set_field32(&reg, TXCSR0_KICK_TX, 1); 1242 (queue == IEEE80211_TX_QUEUE_DATA1));
1251 else if (queue == IEEE80211_TX_QUEUE_AFTER_BEACON) 1243 rt2x00_set_field32(&reg, TXCSR0_KICK_ATIM,
1252 rt2x00_set_field32(&reg, TXCSR0_KICK_ATIM, 1); 1244 (queue == IEEE80211_TX_QUEUE_AFTER_BEACON));
1253 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg); 1245 rt2x00pci_register_write(rt2x00dev, TXCSR0, reg);
1254} 1246}
1255 1247