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/rt73usb.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/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index d0e97e1dfaf6..ddb59c037750 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -378,10 +378,8 @@ static void rt73usb_config_intf(struct rt2x00_dev *rt2x00dev, | |||
378 | } | 378 | } |
379 | } | 379 | } |
380 | 380 | ||
381 | static int rt73usb_config_preamble(struct rt2x00_dev *rt2x00dev, | 381 | static int rt73usb_config_erp(struct rt2x00_dev *rt2x00dev, |
382 | const int short_preamble, | 382 | struct rt2x00lib_erp *erp) |
383 | const int ack_timeout, | ||
384 | const int ack_consume_time) | ||
385 | { | 383 | { |
386 | u32 reg; | 384 | u32 reg; |
387 | 385 | ||
@@ -393,12 +391,12 @@ static int rt73usb_config_preamble(struct rt2x00_dev *rt2x00dev, | |||
393 | return -EAGAIN; | 391 | return -EAGAIN; |
394 | 392 | ||
395 | rt73usb_register_read(rt2x00dev, TXRX_CSR0, ®); | 393 | rt73usb_register_read(rt2x00dev, TXRX_CSR0, ®); |
396 | rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, ack_timeout); | 394 | rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, erp->ack_timeout); |
397 | rt73usb_register_write(rt2x00dev, TXRX_CSR0, reg); | 395 | rt73usb_register_write(rt2x00dev, TXRX_CSR0, reg); |
398 | 396 | ||
399 | rt73usb_register_read(rt2x00dev, TXRX_CSR4, ®); | 397 | rt73usb_register_read(rt2x00dev, TXRX_CSR4, ®); |
400 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE, | 398 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE, |
401 | !!short_preamble); | 399 | !!erp->short_preamble); |
402 | rt73usb_register_write(rt2x00dev, TXRX_CSR4, reg); | 400 | rt73usb_register_write(rt2x00dev, TXRX_CSR4, reg); |
403 | 401 | ||
404 | return 0; | 402 | return 0; |
@@ -2090,7 +2088,7 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = { | |||
2090 | .kick_tx_queue = rt73usb_kick_tx_queue, | 2088 | .kick_tx_queue = rt73usb_kick_tx_queue, |
2091 | .fill_rxdone = rt73usb_fill_rxdone, | 2089 | .fill_rxdone = rt73usb_fill_rxdone, |
2092 | .config_intf = rt73usb_config_intf, | 2090 | .config_intf = rt73usb_config_intf, |
2093 | .config_preamble = rt73usb_config_preamble, | 2091 | .config_erp = rt73usb_config_erp, |
2094 | .config = rt73usb_config, | 2092 | .config = rt73usb_config, |
2095 | }; | 2093 | }; |
2096 | 2094 | ||