diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-03-09 17:46:18 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-13 16:02:36 -0400 |
commit | 728103794316f7ff8d98bc2ce044aff7a260ee21 (patch) | |
tree | 2addb2b483f2a74e30314c486abeb7ab86521ecb /drivers/net/wireless/rt2x00/rt2500usb.c | |
parent | e4030a2f40a9575bccc71c3e156ca78c7d6fded6 (diff) |
rt2x00: Rename config_preamble() to config_erp()
Rename config_preamble() to config_erp() and cleanup argument
list by putting it all into a single structure.
This will make the function more meaningful and easier to
expand later. This second option is mostly intended to make
the patch "mac80211: proper short-slot handling" from Johannes Berg
easier to apply for rt2x00.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 7ea4247442b3..43da93a22e77 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -356,10 +356,8 @@ static void rt2500usb_config_intf(struct rt2x00_dev *rt2x00dev, | |||
356 | (3 * sizeof(__le16))); | 356 | (3 * sizeof(__le16))); |
357 | } | 357 | } |
358 | 358 | ||
359 | static int rt2500usb_config_preamble(struct rt2x00_dev *rt2x00dev, | 359 | static int rt2500usb_config_erp(struct rt2x00_dev *rt2x00dev, |
360 | const int short_preamble, | 360 | struct rt2x00lib_erp *erp) |
361 | const int ack_timeout, | ||
362 | const int ack_consume_time) | ||
363 | { | 361 | { |
364 | u16 reg; | 362 | u16 reg; |
365 | 363 | ||
@@ -371,12 +369,12 @@ static int rt2500usb_config_preamble(struct rt2x00_dev *rt2x00dev, | |||
371 | return -EAGAIN; | 369 | return -EAGAIN; |
372 | 370 | ||
373 | rt2500usb_register_read(rt2x00dev, TXRX_CSR1, ®); | 371 | rt2500usb_register_read(rt2x00dev, TXRX_CSR1, ®); |
374 | rt2x00_set_field16(®, TXRX_CSR1_ACK_TIMEOUT, ack_timeout); | 372 | rt2x00_set_field16(®, TXRX_CSR1_ACK_TIMEOUT, erp->ack_timeout); |
375 | rt2500usb_register_write(rt2x00dev, TXRX_CSR1, reg); | 373 | rt2500usb_register_write(rt2x00dev, TXRX_CSR1, reg); |
376 | 374 | ||
377 | rt2500usb_register_read(rt2x00dev, TXRX_CSR10, ®); | 375 | rt2500usb_register_read(rt2x00dev, TXRX_CSR10, ®); |
378 | rt2x00_set_field16(®, TXRX_CSR10_AUTORESPOND_PREAMBLE, | 376 | rt2x00_set_field16(®, TXRX_CSR10_AUTORESPOND_PREAMBLE, |
379 | !!short_preamble); | 377 | !!erp->short_preamble); |
380 | rt2500usb_register_write(rt2x00dev, TXRX_CSR10, reg); | 378 | rt2500usb_register_write(rt2x00dev, TXRX_CSR10, reg); |
381 | 379 | ||
382 | return 0; | 380 | return 0; |
@@ -1842,7 +1840,7 @@ static const struct rt2x00lib_ops rt2500usb_rt2x00_ops = { | |||
1842 | .kick_tx_queue = rt2500usb_kick_tx_queue, | 1840 | .kick_tx_queue = rt2500usb_kick_tx_queue, |
1843 | .fill_rxdone = rt2500usb_fill_rxdone, | 1841 | .fill_rxdone = rt2500usb_fill_rxdone, |
1844 | .config_intf = rt2500usb_config_intf, | 1842 | .config_intf = rt2500usb_config_intf, |
1845 | .config_preamble = rt2500usb_config_preamble, | 1843 | .config_erp = rt2500usb_config_erp, |
1846 | .config = rt2500usb_config, | 1844 | .config = rt2500usb_config, |
1847 | }; | 1845 | }; |
1848 | 1846 | ||