* [PATCH 32/32] rt2x00: misc fixes
@ 2006-04-27 22:03 Ivo van Doorn
0 siblings, 0 replies; only message in thread
From: Ivo van Doorn @ 2006-04-27 22:03 UTC (permalink / raw)
To: netdev; +Cc: rt2x00-devel
[-- Attachment #1: Type: text/plain, Size: 6511 bytes --]
From: Ivo van Doorn <IvDoorn@gmail.com>
Misc. small fixes. Add small comments,
remove unwanted whitespaces etc.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
diff -uprN wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2400pci.c wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2400pci.c
--- wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2400pci.c 2006-04-27 22:05:52.000000000 +0200
+++ wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2400pci.c 2006-04-27 22:06:22.000000000 +0200
@@ -1003,7 +1003,7 @@ rt2400pci_txdone(void *data)
int tx_status;
int ack;
- while (!rt2x00_ring_empty(ring)) {
+ while (!rt2x00_ring_empty(ring)) {
entry = rt2x00_get_data_entry_done(ring);
txd = entry->desc_addr;
@@ -1212,7 +1212,7 @@ rt2400pci_free_ring(struct rt2x00_pci *r
ring->data_addr, ring->data_dma);
ring->data_addr = NULL;
- kfree(ring->entry);
+ kfree(ring->entry);
ring->entry = NULL;
}
@@ -1318,6 +1318,9 @@ rt2400pci_init_rings(struct rt2x00_pci *
{
u32 reg;
+ /*
+ * Initialize rings.
+ */
rt2400pci_init_rxdesc(rt2x00pci, &rt2x00pci->ring[RING_RX]);
rt2400pci_init_txdesc(rt2x00pci, &rt2x00pci->ring[RING_TX]);
rt2400pci_init_txdesc(rt2x00pci, &rt2x00pci->ring[RING_ATIM]);
@@ -1847,7 +1850,7 @@ rt2400pci_config_interface(struct net_de
rt2400pci_config_bssid(rt2x00pci, conf->bssid);
return 0;
- }
+}
static void
rt2400pci_set_multicast_list(struct net_device *net_dev,
diff -uprN wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2500pci.c wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2500pci.c
--- wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2500pci.c 2006-04-27 22:05:52.000000000 +0200
+++ wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2500pci.c 2006-04-27 22:06:22.000000000 +0200
@@ -487,7 +487,7 @@ rt2500pci_config_channel(struct rt2x00_p
if (rt2x00_rf(&rt2x00pci->chip, RF5222)) {
if (channel < 14) {
- rf1 = cpu_to_le32(0x00022020);
+ rf1 = cpu_to_le32(0x00022020);
rf4 = cpu_to_le32(0x00000a0b);
} else if (channel == 14) {
rf1 = cpu_to_le32(0x00022010);
@@ -501,7 +501,7 @@ rt2500pci_config_channel(struct rt2x00_p
} else if (channel < 161) {
rf1 = cpu_to_le32(0x00022020);
rf4 = cpu_to_le32(0x00000a07);
- }
+ }
}
INFO("Switching channel. RF1: 0x%08x, RF2: 0x%08x, RF3: 0x%08x, "
@@ -1091,7 +1091,7 @@ rt2500pci_txdone(void *data)
int tx_status;
int ack;
- while (!rt2x00_ring_empty(ring)) {
+ while (!rt2x00_ring_empty(ring)) {
entry = rt2x00_get_data_entry_done(ring);
txd = entry->desc_addr;
@@ -1301,7 +1301,7 @@ rt2500pci_free_ring(struct rt2x00_pci *r
ring->data_addr, ring->data_dma);
ring->data_addr = NULL;
- kfree(ring->entry);
+ kfree(ring->entry);
ring->entry = NULL;
}
@@ -2438,7 +2438,7 @@ rt2500pci_init_hw_channels(struct rt2x00
for (counter = 0; counter < ARRAY_SIZE(vals); counter++)
channels[counter].val =
cpu_to_le32(vals[counter] | rf2_base);
- }
+ }
if (rt2x00_rf(&rt2x00pci->chip, RF5222)) {
static u32 vals[] = {
0x00018896, 0x0001889a, 0x0001889e, 0x000188a2,
@@ -2453,7 +2453,7 @@ rt2500pci_init_hw_channels(struct rt2x00
for (counter = 0; counter < ARRAY_SIZE(vals); counter++)
(chan++)->val = cpu_to_le32(vals[counter]);
- }
+ }
/*
* Set TX power, each EEPROM TXpower entry
@@ -2472,7 +2472,7 @@ rt2500pci_init_hw_channels(struct rt2x00
rt2x00_get_field16(eeprom, EEPROM_TXPOWER_2);
if (channels[(counter * 2) + 1].power_level > 0x20)
channels[(counter * 2) + 1].power_level = 0x18;
- }
+ }
/*
* Set device specific, but channel independent RF values.
diff -uprN wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2500usb.c wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2500usb.c
--- wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2500usb.c 2006-04-27 22:05:52.000000000 +0200
+++ wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2500usb.c 2006-04-27 22:08:38.000000000 +0200
@@ -335,7 +335,7 @@ rt2500usb_config_channel(struct rt2x00_u
|| rt2x00_rf(&rt2x00usb->chip, RF2524)
|| rt2x00_rf(&rt2x00usb->chip, RF2525))
&& channel == 14)
- rf4 &= ~0x00000018;
+ rf4 &= ~0x00000018;
if (rt2x00_rf(&rt2x00usb->chip, RF2525E)) {
if (channel & 0x01)
@@ -951,7 +951,7 @@ rt2500usb_txdone(void *data)
* Check if we have received an
* ACK response when ACK was requested and status
* was succesfull.
- */
+ */
entry->tx_status.ack = 0;
if (ack && (entry->urb->status == TX_SUCCESS))
entry->tx_status.ack = 1;
@@ -1636,7 +1636,7 @@ rt2500usb_config_interface(struct net_de
return 0;
rt2500usb_config_bssid(rt2x00usb, conf->bssid);
-
+
return 0;
}
@@ -2071,12 +2071,12 @@ rt2500usb_init_hw_channels(struct rt2x00
for (counter = 0; counter < ARRAY_SIZE(vals); counter++)
channels[counter].val = vals[counter];
- }
+ }
/*
* Set TX power, each EEPROM TXpower entry
* contains the TXpower value for 2 channels.
- */
+ */
for (counter = 0; counter < EEPROM_TXPOWER_SIZE; counter++) {
rt2x00_eeprom_read(rt2x00usb,
EEPROM_TXPOWER_START + counter, &eeprom);
@@ -2090,7 +2090,7 @@ rt2500usb_init_hw_channels(struct rt2x00
rt2x00_get_field16(eeprom, EEPROM_TXPOWER_2);
if (channels[(counter * 2) + 1].power_level > 0x20)
channels[(counter * 2) + 1].power_level = 0x18;
- }
+ }
/*
* Set device specific, but channel independent RF values.
@@ -2302,7 +2302,6 @@ rt2500usb_init_hw(struct rt2x00_usb *rt2
hw->modes[0].num_channels = 14;
hw->modes[0].num_rates = 12;
-
/*
* Intitialize 802.11b
* Rates: CCK.
diff -uprN wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2x00.h wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2x00.h
--- wireless-dev-rt2x00/drivers/net/wireless/d80211/rt2x00/rt2x00.h 2006-04-27 21:57:18.000000000 +0200
+++ wireless-dev-rt2x00-patch/drivers/net/wireless/d80211/rt2x00/rt2x00.h 2006-04-27 22:07:42.000000000 +0200
@@ -44,6 +44,9 @@
* and should be switched on using the module parameter.
*/
#ifdef CONFIG_RT2X00_DEBUG
+/*
+ * Module parameter.
+ */
static int rt2x00_debug_level = 0;
#define DEBUG_PRINTK(__message...) \
do { if (rt2x00_debug_level) printk(__message); } while (0)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-27 22:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-27 22:03 [PATCH 32/32] rt2x00: misc fixes Ivo van Doorn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.