aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt61pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-03-09 17:46:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-13 16:02:36 -0400
commit728103794316f7ff8d98bc2ce044aff7a260ee21 (patch)
tree2addb2b483f2a74e30314c486abeb7ab86521ecb /drivers/net/wireless/rt2x00/rt61pci.c
parente4030a2f40a9575bccc71c3e156ca78c7d6fded6 (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/rt61pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index f912a8515b5c..99f18d4ae855 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -366,20 +366,18 @@ static void rt61pci_config_intf(struct rt2x00_dev *rt2x00dev,
366 } 366 }
367} 367}
368 368
369static int rt61pci_config_preamble(struct rt2x00_dev *rt2x00dev, 369static int rt61pci_config_erp(struct rt2x00_dev *rt2x00dev,
370 const int short_preamble, 370 struct rt2x00lib_erp *erp)
371 const int ack_timeout,
372 const int ack_consume_time)
373{ 371{
374 u32 reg; 372 u32 reg;
375 373
376 rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, &reg); 374 rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, &reg);
377 rt2x00_set_field32(&reg, TXRX_CSR0_RX_ACK_TIMEOUT, ack_timeout); 375 rt2x00_set_field32(&reg, TXRX_CSR0_RX_ACK_TIMEOUT, erp->ack_timeout);
378 rt2x00pci_register_write(rt2x00dev, TXRX_CSR0, reg); 376 rt2x00pci_register_write(rt2x00dev, TXRX_CSR0, reg);
379 377
380 rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, &reg); 378 rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, &reg);
381 rt2x00_set_field32(&reg, TXRX_CSR4_AUTORESPOND_PREAMBLE, 379 rt2x00_set_field32(&reg, TXRX_CSR4_AUTORESPOND_PREAMBLE,
382 !!short_preamble); 380 !!erp->short_preamble);
383 rt2x00pci_register_write(rt2x00dev, TXRX_CSR4, reg); 381 rt2x00pci_register_write(rt2x00dev, TXRX_CSR4, reg);
384 382
385 return 0; 383 return 0;
@@ -2481,7 +2479,7 @@ static const struct rt2x00lib_ops rt61pci_rt2x00_ops = {
2481 .kick_tx_queue = rt61pci_kick_tx_queue, 2479 .kick_tx_queue = rt61pci_kick_tx_queue,
2482 .fill_rxdone = rt61pci_fill_rxdone, 2480 .fill_rxdone = rt61pci_fill_rxdone,
2483 .config_intf = rt61pci_config_intf, 2481 .config_intf = rt61pci_config_intf,
2484 .config_preamble = rt61pci_config_preamble, 2482 .config_erp = rt61pci_config_erp,
2485 .config = rt61pci_config, 2483 .config = rt61pci_config,
2486}; 2484};
2487 2485