aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 38c968ee50f1..df176cd2ef42 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -358,18 +358,9 @@ static int rt2500usb_config_preamble(struct rt2x00_dev *rt2x00dev,
358} 358}
359 359
360static void rt2500usb_config_phymode(struct rt2x00_dev *rt2x00dev, 360static void rt2500usb_config_phymode(struct rt2x00_dev *rt2x00dev,
361 const int phymode,
362 const int basic_rate_mask) 361 const int basic_rate_mask)
363{ 362{
364 rt2500usb_register_write(rt2x00dev, TXRX_CSR11, basic_rate_mask); 363 rt2500usb_register_write(rt2x00dev, TXRX_CSR11, basic_rate_mask);
365
366 if (phymode == HWMODE_B) {
367 rt2500usb_register_write(rt2x00dev, MAC_CSR11, 0x000b);
368 rt2500usb_register_write(rt2x00dev, MAC_CSR12, 0x0040);
369 } else {
370 rt2500usb_register_write(rt2x00dev, MAC_CSR11, 0x0005);
371 rt2500usb_register_write(rt2x00dev, MAC_CSR12, 0x016c);
372 }
373} 364}
374 365
375static void rt2500usb_config_channel(struct rt2x00_dev *rt2x00dev, 366static void rt2500usb_config_channel(struct rt2x00_dev *rt2x00dev,
@@ -507,6 +498,8 @@ static void rt2500usb_config_duration(struct rt2x00_dev *rt2x00dev,
507 u16 reg; 498 u16 reg;
508 499
509 rt2500usb_register_write(rt2x00dev, MAC_CSR10, libconf->slot_time); 500 rt2500usb_register_write(rt2x00dev, MAC_CSR10, libconf->slot_time);
501 rt2500usb_register_write(rt2x00dev, MAC_CSR11, libconf->sifs);
502 rt2500usb_register_write(rt2x00dev, MAC_CSR12, libconf->eifs);
510 503
511 rt2500usb_register_read(rt2x00dev, TXRX_CSR18, &reg); 504 rt2500usb_register_read(rt2x00dev, TXRX_CSR18, &reg);
512 rt2x00_set_field16(&reg, TXRX_CSR18_INTERVAL, 505 rt2x00_set_field16(&reg, TXRX_CSR18_INTERVAL,
@@ -519,8 +512,7 @@ static void rt2500usb_config(struct rt2x00_dev *rt2x00dev,
519 const unsigned int flags) 512 const unsigned int flags)
520{ 513{
521 if (flags & CONFIG_UPDATE_PHYMODE) 514 if (flags & CONFIG_UPDATE_PHYMODE)
522 rt2500usb_config_phymode(rt2x00dev, libconf->phymode, 515 rt2500usb_config_phymode(rt2x00dev, libconf->basic_rates);
523 libconf->basic_rates);
524 if (flags & CONFIG_UPDATE_CHANNEL) 516 if (flags & CONFIG_UPDATE_CHANNEL)
525 rt2500usb_config_channel(rt2x00dev, &libconf->rf, 517 rt2500usb_config_channel(rt2x00dev, &libconf->rf,
526 libconf->conf->power_level); 518 libconf->conf->power_level);