rt2x00: misc fixes
Subsystems (3)
PATCH 32/32 rt2x00: misc fixes
From: Ivo van Doorn <[email protected]>
Misc. small fixes. Add small comments,
remove unwanted whitespaces etc.
Signed-off-by Ivo van Doorn <[email protected]>
drivers/net/wireless/d80211/rt2x00/rt2400pci.c +6 -3
@@ -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_dert2400pci_config_bssid (rt2x00pci, conf->bssid);return 0 ; - } +} static void rt2400pci_set_multicast_list(struct net_device *net_dev,
drivers/net/wireless/d80211/rt2x00/rt2500pci.c +7 -7
@@ -487,7 +487,7 @@ rt2500pci_config_channel(struct rt2x00_pif (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 rt2x00for (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 rt2x00for (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 rt2x00rt2x00_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.
drivers/net/wireless/d80211/rt2x00/rt2500usb.c +6 -7
@@ -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_dereturn 0 ;rt2500usb_config_bssid (rt2x00usb, conf->bssid); - +return 0 ; }
@@ -2071,12 +2071,12 @@ rt2500usb_init_hw_channels(struct rt2x00for (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 rt2x00rt2x00_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.
drivers/net/wireless/d80211/rt2x00/rt2x00.h +3 -0
@@ -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)