aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.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/rt2400pci.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/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 0ac0c6e0873..70f711e8636 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -304,10 +304,8 @@ static void rt2400pci_config_intf(struct rt2x00_dev *rt2x00dev,
304 conf->bssid, sizeof(conf->bssid)); 304 conf->bssid, sizeof(conf->bssid));
305} 305}
306 306
307static int rt2400pci_config_preamble(struct rt2x00_dev *rt2x00dev, 307static int rt2400pci_config_erp(struct rt2x00_dev *rt2x00dev,
308 const int short_preamble, 308 struct rt2x00lib_erp *erp)
309 const int ack_timeout,
310 const int ack_consume_time)
311{ 309{
312 int preamble_mask; 310 int preamble_mask;
313 u32 reg; 311 u32 reg;
@@ -315,11 +313,13 @@ static int rt2400pci_config_preamble(struct rt2x00_dev *rt2x00dev,
315 /* 313 /*
316 * When short preamble is enabled, we should set bit 0x08 314 * When short preamble is enabled, we should set bit 0x08
317 */ 315 */
318 preamble_mask = short_preamble << 3; 316 preamble_mask = erp->short_preamble << 3;
319 317
320 rt2x00pci_register_read(rt2x00dev, TXCSR1, &reg); 318 rt2x00pci_register_read(rt2x00dev, TXCSR1, &reg);
321 rt2x00_set_field32(&reg, TXCSR1_ACK_TIMEOUT, ack_timeout); 319 rt2x00_set_field32(&reg, TXCSR1_ACK_TIMEOUT,
322 rt2x00_set_field32(&reg, TXCSR1_ACK_CONSUME_TIME, ack_consume_time); 320 erp->ack_timeout);
321 rt2x00_set_field32(&reg, TXCSR1_ACK_CONSUME_TIME,
322 erp->ack_consume_time);
323 rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); 323 rt2x00pci_register_write(rt2x00dev, TXCSR1, reg);
324 324
325 rt2x00pci_register_read(rt2x00dev, ARCSR2, &reg); 325 rt2x00pci_register_read(rt2x00dev, ARCSR2, &reg);
@@ -1601,7 +1601,7 @@ static const struct rt2x00lib_ops rt2400pci_rt2x00_ops = {
1601 .kick_tx_queue = rt2400pci_kick_tx_queue, 1601 .kick_tx_queue = rt2400pci_kick_tx_queue,
1602 .fill_rxdone = rt2400pci_fill_rxdone, 1602 .fill_rxdone = rt2400pci_fill_rxdone,
1603 .config_intf = rt2400pci_config_intf, 1603 .config_intf = rt2400pci_config_intf,
1604 .config_preamble = rt2400pci_config_preamble, 1604 .config_erp = rt2400pci_config_erp,
1605 .config = rt2400pci_config, 1605 .config = rt2400pci_config,
1606}; 1606};
1607 1607