rt2x00: Move channel time detection to rt2x00lib
PATCH 20/28 rt2x00: Move channel time detection to rt2x00lib
Use the rt2x00lib provided function for detecting channel time.
Signed-off-by Ivo van Doorn <[email protected]>
---
drivers/net/wireless/mac80211/rt2x00/rt2400pci.c +1 -41
@@ -1184,46 +1184,6 @@ continue_csr_init:return 0 ; } -static int rt2400pci_init_channel_time (struct rt2x00_dev *rt2x00dev) -{ -unsigned long jiffies_start; -unsigned long jiffies_end; - -/* -* Only initialize the channel_change_time -* if it has not been set previously. -*/ -if (rt2x00dev->hw->channel_change_time) -return 0 ; - -/* -* Invalidate the rx_status.channel value to make sure -* the config channel will be correctly executed. -*/ - rt2x00dev->rx_status.channel =0 ; - -/* -* Determine channel_change_time -* by measuring the time it takes -* to switch the channel. -*/ - jiffies_start = jiffies; -rt2400pci_config_channel (rt2x00dev, - rt2x00dev->hwmodes[0 ].channels[0 ].val, - rt2x00dev->hwmodes[0 ].channels[0 ].chan, - rt2x00dev->hwmodes[0 ].channels[0 ].freq, -0 ); - jiffies_end = jiffies; - - rt2x00dev->hw->channel_change_time = -jiffies_to_usecs ((long )jiffies_end - (long )jiffies_start); - -NOTICE ("Channel change time has been set to %d.\n" , - rt2x00dev->hw->channel_change_time); - -return 0 ; -} -/* * Device initialization functions. */
@@ -1333,7 +1293,7 @@ static int rt2400pci_enable_radio(struct rt2x00_dev *rt2x00dev)/* * Determine channel change time. */ -if (rt2400pci_init_channel_time (rt2x00dev)) +if (rt2x00lib_detect_channel_time (rt2x00dev)) goto exit_fail;/*
drivers/net/wireless/mac80211/rt2x00/rt2500pci.c +1 -41
54 lines not on this page · raw message
drivers/net/wireless/mac80211/rt2x00/rt2500usb.c +1 -41
54 lines not on this page · raw message
drivers/net/wireless/mac80211/rt2x00/rt61pci.c +1 -41
54 lines not on this page · raw message
drivers/net/wireless/mac80211/rt2x00/rt73usb.c +1 -41
54 lines not on this page · raw message