diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 18 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00config.c | 43 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 12 |
10 files changed, 76 insertions, 80 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 0ac0c6e08732..70f711e86362 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 | ||
307 | static int rt2400pci_config_preamble(struct rt2x00_dev *rt2x00dev, | 307 | static 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, ®); | 318 | rt2x00pci_register_read(rt2x00dev, TXCSR1, ®); |
321 | rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, ack_timeout); | 319 | rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, |
322 | rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME, ack_consume_time); | 320 | erp->ack_timeout); |
321 | rt2x00_set_field32(®, 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, ®); | 325 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); |
@@ -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 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index d85e1a44d5cd..a46206c69760 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -307,10 +307,8 @@ static void rt2500pci_config_intf(struct rt2x00_dev *rt2x00dev, | |||
307 | conf->bssid, sizeof(conf->bssid)); | 307 | conf->bssid, sizeof(conf->bssid)); |
308 | } | 308 | } |
309 | 309 | ||
310 | static int rt2500pci_config_preamble(struct rt2x00_dev *rt2x00dev, | 310 | static int rt2500pci_config_erp(struct rt2x00_dev *rt2x00dev, |
311 | const int short_preamble, | 311 | struct rt2x00lib_erp *erp) |
312 | const int ack_timeout, | ||
313 | const int ack_consume_time) | ||
314 | { | 312 | { |
315 | int preamble_mask; | 313 | int preamble_mask; |
316 | u32 reg; | 314 | u32 reg; |
@@ -318,11 +316,13 @@ static int rt2500pci_config_preamble(struct rt2x00_dev *rt2x00dev, | |||
318 | /* | 316 | /* |
319 | * When short preamble is enabled, we should set bit 0x08 | 317 | * When short preamble is enabled, we should set bit 0x08 |
320 | */ | 318 | */ |
321 | preamble_mask = short_preamble << 3; | 319 | preamble_mask = erp->short_preamble << 3; |
322 | 320 | ||
323 | rt2x00pci_register_read(rt2x00dev, TXCSR1, ®); | 321 | rt2x00pci_register_read(rt2x00dev, TXCSR1, ®); |
324 | rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, ack_timeout); | 322 | rt2x00_set_field32(®, TXCSR1_ACK_TIMEOUT, |
325 | rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME, ack_consume_time); | 323 | erp->ack_timeout); |
324 | rt2x00_set_field32(®, TXCSR1_ACK_CONSUME_TIME, | ||
325 | erp->ack_consume_time); | ||
326 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); | 326 | rt2x00pci_register_write(rt2x00dev, TXCSR1, reg); |
327 | 327 | ||
328 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); | 328 | rt2x00pci_register_read(rt2x00dev, ARCSR2, ®); |
@@ -1911,7 +1911,7 @@ static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = { | |||
1911 | .kick_tx_queue = rt2500pci_kick_tx_queue, | 1911 | .kick_tx_queue = rt2500pci_kick_tx_queue, |
1912 | .fill_rxdone = rt2500pci_fill_rxdone, | 1912 | .fill_rxdone = rt2500pci_fill_rxdone, |
1913 | .config_intf = rt2500pci_config_intf, | 1913 | .config_intf = rt2500pci_config_intf, |
1914 | .config_preamble = rt2500pci_config_preamble, | 1914 | .config_erp = rt2500pci_config_erp, |
1915 | .config = rt2500pci_config, | 1915 | .config = rt2500pci_config, |
1916 | }; | 1916 | }; |
1917 | 1917 | ||
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 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 8718ad3dcc00..a324ff3ed7e7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -384,7 +384,7 @@ struct rt2x00_intf { | |||
384 | */ | 384 | */ |
385 | unsigned int delayed_flags; | 385 | unsigned int delayed_flags; |
386 | #define DELAYED_UPDATE_BEACON 0x00000001 | 386 | #define DELAYED_UPDATE_BEACON 0x00000001 |
387 | #define DELAYED_CONFIG_PREAMBLE 0x00000002 | 387 | #define DELAYED_CONFIG_ERP 0x00000002 |
388 | }; | 388 | }; |
389 | 389 | ||
390 | static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) | 390 | static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) |
@@ -451,6 +451,16 @@ struct rt2x00lib_conf { | |||
451 | }; | 451 | }; |
452 | 452 | ||
453 | /* | 453 | /* |
454 | * Configuration structure for erp settings. | ||
455 | */ | ||
456 | struct rt2x00lib_erp { | ||
457 | int short_preamble; | ||
458 | |||
459 | int ack_timeout; | ||
460 | int ack_consume_time; | ||
461 | }; | ||
462 | |||
463 | /* | ||
454 | * Configuration structure wrapper around the | 464 | * Configuration structure wrapper around the |
455 | * rt2x00 interface configuration handler. | 465 | * rt2x00 interface configuration handler. |
456 | */ | 466 | */ |
@@ -558,10 +568,8 @@ struct rt2x00lib_ops { | |||
558 | #define CONFIG_UPDATE_MAC ( 1 << 2 ) | 568 | #define CONFIG_UPDATE_MAC ( 1 << 2 ) |
559 | #define CONFIG_UPDATE_BSSID ( 1 << 3 ) | 569 | #define CONFIG_UPDATE_BSSID ( 1 << 3 ) |
560 | 570 | ||
561 | int (*config_preamble) (struct rt2x00_dev *rt2x00dev, | 571 | int (*config_erp) (struct rt2x00_dev *rt2x00dev, |
562 | const int short_preamble, | 572 | struct rt2x00lib_erp *erp); |
563 | const int ack_timeout, | ||
564 | const int ack_consume_time); | ||
565 | void (*config) (struct rt2x00_dev *rt2x00dev, | 573 | void (*config) (struct rt2x00_dev *rt2x00dev, |
566 | struct rt2x00lib_conf *libconf, | 574 | struct rt2x00lib_conf *libconf, |
567 | const unsigned int flags); | 575 | const unsigned int flags); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index 69959124d25d..72111694154e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -75,43 +75,40 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | |||
75 | rt2x00dev->ops->lib->config_intf(rt2x00dev, intf, &conf, flags); | 75 | rt2x00dev->ops->lib->config_intf(rt2x00dev, intf, &conf, flags); |
76 | } | 76 | } |
77 | 77 | ||
78 | void rt2x00lib_config_preamble(struct rt2x00_dev *rt2x00dev, | 78 | void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev, |
79 | struct rt2x00_intf *intf, | 79 | struct rt2x00_intf *intf, |
80 | const unsigned int short_preamble) | 80 | struct ieee80211_bss_conf *bss_conf) |
81 | { | 81 | { |
82 | struct rt2x00lib_erp erp; | ||
82 | int retval; | 83 | int retval; |
83 | int ack_timeout; | ||
84 | int ack_consume_time; | ||
85 | 84 | ||
86 | ack_timeout = PLCP + get_duration(ACK_SIZE, 10); | 85 | memset(&erp, 0, sizeof(erp)); |
87 | ack_consume_time = SIFS + PLCP + get_duration(ACK_SIZE, 10); | 86 | |
87 | erp.short_preamble = bss_conf->use_short_preamble; | ||
88 | erp.ack_timeout = PLCP + get_duration(ACK_SIZE, 10); | ||
89 | erp.ack_consume_time = SIFS + PLCP + get_duration(ACK_SIZE, 10); | ||
88 | 90 | ||
89 | if (rt2x00dev->hw->conf.flags & IEEE80211_CONF_SHORT_SLOT_TIME) | 91 | if (rt2x00dev->hw->conf.flags & IEEE80211_CONF_SHORT_SLOT_TIME) |
90 | ack_timeout += SHORT_DIFS; | 92 | erp.ack_timeout += SHORT_DIFS; |
91 | else | 93 | else |
92 | ack_timeout += DIFS; | 94 | erp.ack_timeout += DIFS; |
93 | 95 | ||
94 | if (short_preamble) { | 96 | if (bss_conf->use_short_preamble) { |
95 | ack_timeout += SHORT_PREAMBLE; | 97 | erp.ack_timeout += SHORT_PREAMBLE; |
96 | ack_consume_time += SHORT_PREAMBLE; | 98 | erp.ack_consume_time += SHORT_PREAMBLE; |
97 | } else { | 99 | } else { |
98 | ack_timeout += PREAMBLE; | 100 | erp.ack_timeout += PREAMBLE; |
99 | ack_consume_time += PREAMBLE; | 101 | erp.ack_consume_time += PREAMBLE; |
100 | } | 102 | } |
101 | 103 | ||
102 | retval = rt2x00dev->ops->lib->config_preamble(rt2x00dev, | 104 | retval = rt2x00dev->ops->lib->config_erp(rt2x00dev, &erp); |
103 | short_preamble, | ||
104 | ack_timeout, | ||
105 | ack_consume_time); | ||
106 | |||
107 | spin_lock(&intf->lock); | ||
108 | 105 | ||
109 | if (retval) { | 106 | if (retval) { |
110 | intf->delayed_flags |= DELAYED_CONFIG_PREAMBLE; | 107 | spin_lock(&intf->lock); |
108 | intf->delayed_flags |= DELAYED_CONFIG_ERP; | ||
111 | queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); | 109 | queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); |
110 | spin_unlock(&intf->lock); | ||
112 | } | 111 | } |
113 | |||
114 | spin_unlock(&intf->lock); | ||
115 | } | 112 | } |
116 | 113 | ||
117 | void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, | 114 | void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 455d0763503e..d6b12789ba77 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -447,9 +447,8 @@ static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac, | |||
447 | } | 447 | } |
448 | } | 448 | } |
449 | 449 | ||
450 | if (delayed_flags & DELAYED_CONFIG_PREAMBLE) | 450 | if (delayed_flags & DELAYED_CONFIG_ERP) |
451 | rt2x00lib_config_preamble(rt2x00dev, intf, | 451 | rt2x00lib_config_erp(rt2x00dev, intf, &intf->conf); |
452 | intf->conf.use_short_preamble); | ||
453 | } | 452 | } |
454 | 453 | ||
455 | static void rt2x00lib_intf_scheduled(struct work_struct *work) | 454 | static void rt2x00lib_intf_scheduled(struct work_struct *work) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 34ccb3de687e..6bd5a01ddfce 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -100,9 +100,9 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | |||
100 | struct rt2x00_intf *intf, | 100 | struct rt2x00_intf *intf, |
101 | enum ieee80211_if_types type, | 101 | enum ieee80211_if_types type, |
102 | u8 *mac, u8 *bssid); | 102 | u8 *mac, u8 *bssid); |
103 | void rt2x00lib_config_preamble(struct rt2x00_dev *rt2x00dev, | 103 | void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev, |
104 | struct rt2x00_intf *intf, | 104 | struct rt2x00_intf *intf, |
105 | const unsigned int short_preamble); | 105 | struct ieee80211_bss_conf *conf); |
106 | void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, | 106 | void rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev, |
107 | enum antenna rx, enum antenna tx); | 107 | enum antenna rx, enum antenna tx); |
108 | void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, | 108 | void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 76a2a7c118b2..0a11c27d603b 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -436,17 +436,15 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
436 | } | 436 | } |
437 | 437 | ||
438 | /* | 438 | /* |
439 | * When the preamble mode has changed, we should perform additional | 439 | * When the erp information has changed, we should perform |
440 | * configuration steps. For all other changes we are already done. | 440 | * additional configuration steps. For all other changes we are done. |
441 | */ | 441 | */ |
442 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { | 442 | if (changes & BSS_CHANGED_ERP_PREAMBLE) |
443 | rt2x00lib_config_preamble(rt2x00dev, intf, | 443 | rt2x00lib_config_erp(rt2x00dev, intf, bss_conf); |
444 | bss_conf->use_short_preamble); | ||
445 | 444 | ||
446 | spin_lock(&intf->lock); | 445 | spin_lock(&intf->lock); |
447 | memcpy(&intf->conf, bss_conf, sizeof(*bss_conf)); | 446 | memcpy(&intf->conf, bss_conf, sizeof(*bss_conf)); |
448 | spin_unlock(&intf->lock); | 447 | spin_unlock(&intf->lock); |
449 | } | ||
450 | } | 448 | } |
451 | EXPORT_SYMBOL_GPL(rt2x00mac_bss_info_changed); | 449 | EXPORT_SYMBOL_GPL(rt2x00mac_bss_info_changed); |
452 | 450 | ||
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 | ||
369 | static int rt61pci_config_preamble(struct rt2x00_dev *rt2x00dev, | 369 | static 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, ®); | 374 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR0, ®); |
377 | rt2x00_set_field32(®, TXRX_CSR0_RX_ACK_TIMEOUT, ack_timeout); | 375 | rt2x00_set_field32(®, 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, ®); | 378 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR4, ®); |
381 | rt2x00_set_field32(®, TXRX_CSR4_AUTORESPOND_PREAMBLE, | 379 | rt2x00_set_field32(®, 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 | ||
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 | ||