aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2007-03-28 12:07:49 -0400
committerJeff Garzik <jeff@garzik.org>2007-04-28 11:01:03 -0400
commit3a5c393e6f3e9f537e790016f3214447f2b50e51 (patch)
tree7cfb6a6f0e2b62c220842280fd1fd07185fa9417 /drivers/net
parentb1fc1fa9b36512e928df95aead1a85381380ad1f (diff)
[PATCH] bcm43xx: Change initialization for 2050 radios
This patch implements the changes in the specifications for 2050radio_init that were recently posted. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_phy.c15
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_phy.h4
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_radio.c196
3 files changed, 184 insertions, 31 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
index c47e19a9521a..b37f1e348700 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
@@ -300,16 +300,20 @@ static void bcm43xx_phy_agcsetup(struct bcm43xx_private *bcm)
300 300
301 if (phy->rev > 2) { 301 if (phy->rev > 2) {
302 bcm43xx_phy_write(bcm, 0x0422, 0x287A); 302 bcm43xx_phy_write(bcm, 0x0422, 0x287A);
303 bcm43xx_phy_write(bcm, 0x0420, (bcm43xx_phy_read(bcm, 0x0420) & 0x0FFF) | 0x3000); 303 bcm43xx_phy_write(bcm, 0x0420, (bcm43xx_phy_read(bcm, 0x0420)
304 & 0x0FFF) | 0x3000);
304 } 305 }
305 306
306 bcm43xx_phy_write(bcm, 0x04A8, (bcm43xx_phy_read(bcm, 0x04A8) & 0x8080) | 0x7874); 307 bcm43xx_phy_write(bcm, 0x04A8, (bcm43xx_phy_read(bcm, 0x04A8) & 0x8080)
308 | 0x7874);
307 bcm43xx_phy_write(bcm, 0x048E, 0x1C00); 309 bcm43xx_phy_write(bcm, 0x048E, 0x1C00);
308 310
309 if (phy->rev == 1) { 311 if (phy->rev == 1) {
310 bcm43xx_phy_write(bcm, 0x04AB, (bcm43xx_phy_read(bcm, 0x04AB) & 0xF0FF) | 0x0600); 312 bcm43xx_phy_write(bcm, 0x04AB, (bcm43xx_phy_read(bcm, 0x04AB)
313 & 0xF0FF) | 0x0600);
311 bcm43xx_phy_write(bcm, 0x048B, 0x005E); 314 bcm43xx_phy_write(bcm, 0x048B, 0x005E);
312 bcm43xx_phy_write(bcm, 0x048C, (bcm43xx_phy_read(bcm, 0x048C) & 0xFF00) | 0x001E); 315 bcm43xx_phy_write(bcm, 0x048C, (bcm43xx_phy_read(bcm, 0x048C)
316 & 0xFF00) | 0x001E);
313 bcm43xx_phy_write(bcm, 0x048D, 0x0002); 317 bcm43xx_phy_write(bcm, 0x048D, 0x0002);
314 } 318 }
315 319
@@ -335,7 +339,8 @@ static void bcm43xx_phy_setupg(struct bcm43xx_private *bcm)
335 if (phy->rev == 1) { 339 if (phy->rev == 1) {
336 bcm43xx_phy_write(bcm, 0x0406, 0x4F19); 340 bcm43xx_phy_write(bcm, 0x0406, 0x4F19);
337 bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS, 341 bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS,
338 (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS) & 0xFC3F) | 0x0340); 342 (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS)
343 & 0xFC3F) | 0x0340);
339 bcm43xx_phy_write(bcm, 0x042C, 0x005A); 344 bcm43xx_phy_write(bcm, 0x042C, 0x005A);
340 bcm43xx_phy_write(bcm, 0x0427, 0x001A); 345 bcm43xx_phy_write(bcm, 0x0427, 0x001A);
341 346
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_phy.h b/drivers/net/wireless/bcm43xx/bcm43xx_phy.h
index 1f321ef42be8..73118364b552 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_phy.h
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_phy.h
@@ -48,6 +48,10 @@ void bcm43xx_raw_phy_unlock(struct bcm43xx_private *bcm);
48 local_irq_restore(flags); \ 48 local_irq_restore(flags); \
49 } while (0) 49 } while (0)
50 50
51/* Card uses the loopback gain stuff */
52#define has_loopback_gain(phy) \
53 (((phy)->rev > 1) || ((phy)->connected))
54
51u16 bcm43xx_phy_read(struct bcm43xx_private *bcm, u16 offset); 55u16 bcm43xx_phy_read(struct bcm43xx_private *bcm, u16 offset);
52void bcm43xx_phy_write(struct bcm43xx_private *bcm, u16 offset, u16 val); 56void bcm43xx_phy_write(struct bcm43xx_private *bcm, u16 offset, u16 val);
53 57
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
index 4025dd0089d2..6a109f4a1b71 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_radio.c
@@ -1343,11 +1343,110 @@ u16 bcm43xx_radio_calibrationvalue(struct bcm43xx_private *bcm)
1343 return ret; 1343 return ret;
1344} 1344}
1345 1345
1346#define LPD(L, P, D) (((L) << 2) | ((P) << 1) | ((D) << 0))
1347static u16 bcm43xx_get_812_value(struct bcm43xx_private *bcm, u8 lpd)
1348{
1349 struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm);
1350 struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm);
1351 u16 loop_or = 0;
1352 u16 adj_loopback_gain = phy->loopback_gain[0];
1353 u8 loop;
1354 u16 extern_lna_control;
1355
1356 if (!phy->connected)
1357 return 0;
1358 if (!has_loopback_gain(phy)) {
1359 if (phy->rev < 7 || !(bcm->sprom.boardflags
1360 & BCM43xx_BFL_EXTLNA)) {
1361 switch (lpd) {
1362 case LPD(0, 1, 1):
1363 return 0x0FB2;
1364 case LPD(0, 0, 1):
1365 return 0x00B2;
1366 case LPD(1, 0, 1):
1367 return 0x30B2;
1368 case LPD(1, 0, 0):
1369 return 0x30B3;
1370 default:
1371 assert(0);
1372 }
1373 } else {
1374 switch (lpd) {
1375 case LPD(0, 1, 1):
1376 return 0x8FB2;
1377 case LPD(0, 0, 1):
1378 return 0x80B2;
1379 case LPD(1, 0, 1):
1380 return 0x20B2;
1381 case LPD(1, 0, 0):
1382 return 0x20B3;
1383 default:
1384 assert(0);
1385 }
1386 }
1387 } else {
1388 if (radio->revision == 8)
1389 adj_loopback_gain += 0x003E;
1390 else
1391 adj_loopback_gain += 0x0026;
1392 if (adj_loopback_gain >= 0x46) {
1393 adj_loopback_gain -= 0x46;
1394 extern_lna_control = 0x3000;
1395 } else if (adj_loopback_gain >= 0x3A) {
1396 adj_loopback_gain -= 0x3A;
1397 extern_lna_control = 0x2000;
1398 } else if (adj_loopback_gain >= 0x2E) {
1399 adj_loopback_gain -= 0x2E;
1400 extern_lna_control = 0x1000;
1401 } else {
1402 adj_loopback_gain -= 0x10;
1403 extern_lna_control = 0x0000;
1404 }
1405 for (loop = 0; loop < 16; loop++) {
1406 u16 tmp = adj_loopback_gain - 6 * loop;
1407 if (tmp < 6)
1408 break;
1409 }
1410
1411 loop_or = (loop << 8) | extern_lna_control;
1412 if (phy->rev >= 7 && bcm->sprom.boardflags
1413 & BCM43xx_BFL_EXTLNA) {
1414 if (extern_lna_control)
1415 loop_or |= 0x8000;
1416 switch (lpd) {
1417 case LPD(0, 1, 1):
1418 return 0x8F92;
1419 case LPD(0, 0, 1):
1420 return (0x8092 | loop_or);
1421 case LPD(1, 0, 1):
1422 return (0x2092 | loop_or);
1423 case LPD(1, 0, 0):
1424 return (0x2093 | loop_or);
1425 default:
1426 assert(0);
1427 }
1428 } else {
1429 switch (lpd) {
1430 case LPD(0, 1, 1):
1431 return 0x0F92;
1432 case LPD(0, 0, 1):
1433 case LPD(1, 0, 1):
1434 return (0x0092 | loop_or);
1435 case LPD(1, 0, 0):
1436 return (0x0093 | loop_or);
1437 default:
1438 assert(0);
1439 }
1440 }
1441 }
1442 return 0;
1443}
1444
1346u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm) 1445u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm)
1347{ 1446{
1348 struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm); 1447 struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm);
1349 struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm); 1448 struct bcm43xx_radioinfo *radio = bcm43xx_current_radio(bcm);
1350 u16 backup[19] = { 0 }; 1449 u16 backup[21] = { 0 };
1351 u16 ret; 1450 u16 ret;
1352 u16 i, j; 1451 u16 i, j;
1353 u32 tmp1 = 0, tmp2 = 0; 1452 u32 tmp1 = 0, tmp2 = 0;
@@ -1373,19 +1472,36 @@ u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm)
1373 backup[8] = bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS); 1472 backup[8] = bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS);
1374 backup[9] = bcm43xx_phy_read(bcm, 0x0802); 1473 backup[9] = bcm43xx_phy_read(bcm, 0x0802);
1375 bcm43xx_phy_write(bcm, 0x0814, 1474 bcm43xx_phy_write(bcm, 0x0814,
1376 (bcm43xx_phy_read(bcm, 0x0814) | 0x0003)); 1475 (bcm43xx_phy_read(bcm, 0x0814)
1476 | 0x0003));
1377 bcm43xx_phy_write(bcm, 0x0815, 1477 bcm43xx_phy_write(bcm, 0x0815,
1378 (bcm43xx_phy_read(bcm, 0x0815) & 0xFFFC)); 1478 (bcm43xx_phy_read(bcm, 0x0815)
1479 & 0xFFFC));
1379 bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS, 1480 bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS,
1380 (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS) & 0x7FFF)); 1481 (bcm43xx_phy_read(bcm, BCM43xx_PHY_G_CRS)
1482 & 0x7FFF));
1381 bcm43xx_phy_write(bcm, 0x0802, 1483 bcm43xx_phy_write(bcm, 0x0802,
1382 (bcm43xx_phy_read(bcm, 0x0802) & 0xFFFC)); 1484 (bcm43xx_phy_read(bcm, 0x0802) & 0xFFFC));
1383 bcm43xx_phy_write(bcm, 0x0811, 0x01B3); 1485 if (phy->rev > 1) { /* loopback gain enabled */
1384 bcm43xx_phy_write(bcm, 0x0812, 0x0FB2); 1486 backup[19] = bcm43xx_phy_read(bcm, 0x080F);
1487 backup[20] = bcm43xx_phy_read(bcm, 0x0810);
1488 if (phy->rev >= 3)
1489 bcm43xx_phy_write(bcm, 0x080F, 0xC020);
1490 else
1491 bcm43xx_phy_write(bcm, 0x080F, 0x8020);
1492 bcm43xx_phy_write(bcm, 0x0810, 0x0000);
1493 }
1494 bcm43xx_phy_write(bcm, 0x0812,
1495 bcm43xx_get_812_value(bcm, LPD(0, 1, 1)));
1496 if (phy->rev < 7 || !(bcm->sprom.boardflags
1497 & BCM43xx_BFL_EXTLNA))
1498 bcm43xx_phy_write(bcm, 0x0811, 0x01B3);
1499 else
1500 bcm43xx_phy_write(bcm, 0x0811, 0x09B3);
1385 } 1501 }
1386 bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_RADIO,
1387 (bcm43xx_read16(bcm, BCM43xx_MMIO_PHY_RADIO) | 0x8000));
1388 } 1502 }
1503 bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_RADIO,
1504 (bcm43xx_read16(bcm, BCM43xx_MMIO_PHY_RADIO) | 0x8000));
1389 backup[10] = bcm43xx_phy_read(bcm, 0x0035); 1505 backup[10] = bcm43xx_phy_read(bcm, 0x0035);
1390 bcm43xx_phy_write(bcm, 0x0035, 1506 bcm43xx_phy_write(bcm, 0x0035,
1391 (bcm43xx_phy_read(bcm, 0x0035) & 0xFF7F)); 1507 (bcm43xx_phy_read(bcm, 0x0035) & 0xFF7F));
@@ -1397,10 +1513,12 @@ u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm)
1397 bcm43xx_write16(bcm, 0x03E6, 0x0122); 1513 bcm43xx_write16(bcm, 0x03E6, 0x0122);
1398 } else { 1514 } else {
1399 if (phy->analog >= 2) 1515 if (phy->analog >= 2)
1400 bcm43xx_phy_write(bcm, 0x0003, (bcm43xx_phy_read(bcm, 0x0003) 1516 bcm43xx_phy_write(bcm, 0x0003,
1401 & 0xFFBF) | 0x0040); 1517 (bcm43xx_phy_read(bcm, 0x0003)
1518 & 0xFFBF) | 0x0040);
1402 bcm43xx_write16(bcm, BCM43xx_MMIO_CHANNEL_EXT, 1519 bcm43xx_write16(bcm, BCM43xx_MMIO_CHANNEL_EXT,
1403 (bcm43xx_read16(bcm, BCM43xx_MMIO_CHANNEL_EXT) | 0x2000)); 1520 (bcm43xx_read16(bcm, BCM43xx_MMIO_CHANNEL_EXT)
1521 | 0x2000));
1404 } 1522 }
1405 1523
1406 ret = bcm43xx_radio_calibrationvalue(bcm); 1524 ret = bcm43xx_radio_calibrationvalue(bcm);
@@ -1408,16 +1526,25 @@ u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm)
1408 if (phy->type == BCM43xx_PHYTYPE_B) 1526 if (phy->type == BCM43xx_PHYTYPE_B)
1409 bcm43xx_radio_write16(bcm, 0x0078, 0x0026); 1527 bcm43xx_radio_write16(bcm, 0x0078, 0x0026);
1410 1528
1529 if (phy->connected)
1530 bcm43xx_phy_write(bcm, 0x0812,
1531 bcm43xx_get_812_value(bcm, LPD(0, 1, 1)));
1411 bcm43xx_phy_write(bcm, 0x0015, 0xBFAF); 1532 bcm43xx_phy_write(bcm, 0x0015, 0xBFAF);
1412 bcm43xx_phy_write(bcm, 0x002B, 0x1403); 1533 bcm43xx_phy_write(bcm, 0x002B, 0x1403);
1413 if (phy->connected) 1534 if (phy->connected)
1414 bcm43xx_phy_write(bcm, 0x0812, 0x00B2); 1535 bcm43xx_phy_write(bcm, 0x0812,
1536 bcm43xx_get_812_value(bcm, LPD(0, 0, 1)));
1415 bcm43xx_phy_write(bcm, 0x0015, 0xBFA0); 1537 bcm43xx_phy_write(bcm, 0x0015, 0xBFA0);
1416 bcm43xx_radio_write16(bcm, 0x0051, 1538 bcm43xx_radio_write16(bcm, 0x0051,
1417 (bcm43xx_radio_read16(bcm, 0x0051) | 0x0004)); 1539 (bcm43xx_radio_read16(bcm, 0x0051) | 0x0004));
1418 bcm43xx_radio_write16(bcm, 0x0052, 0x0000); 1540 if (radio->revision == 8)
1419 bcm43xx_radio_write16(bcm, 0x0043, 1541 bcm43xx_radio_write16(bcm, 0x0043, 0x001F);
1420 (bcm43xx_radio_read16(bcm, 0x0043) & 0xFFF0) | 0x0009); 1542 else {
1543 bcm43xx_radio_write16(bcm, 0x0052, 0x0000);
1544 bcm43xx_radio_write16(bcm, 0x0043,
1545 (bcm43xx_radio_read16(bcm, 0x0043) & 0xFFF0)
1546 | 0x0009);
1547 }
1421 bcm43xx_phy_write(bcm, 0x0058, 0x0000); 1548 bcm43xx_phy_write(bcm, 0x0058, 0x0000);
1422 1549
1423 for (i = 0; i < 16; i++) { 1550 for (i = 0; i < 16; i++) {
@@ -1425,21 +1552,25 @@ u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm)
1425 bcm43xx_phy_write(bcm, 0x0059, 0xC810); 1552 bcm43xx_phy_write(bcm, 0x0059, 0xC810);
1426 bcm43xx_phy_write(bcm, 0x0058, 0x000D); 1553 bcm43xx_phy_write(bcm, 0x0058, 0x000D);
1427 if (phy->connected) 1554 if (phy->connected)
1428 bcm43xx_phy_write(bcm, 0x0812, 0x30B2); 1555 bcm43xx_phy_write(bcm, 0x0812,
1556 bcm43xx_get_812_value(bcm, LPD(1, 0, 1)));
1429 bcm43xx_phy_write(bcm, 0x0015, 0xAFB0); 1557 bcm43xx_phy_write(bcm, 0x0015, 0xAFB0);
1430 udelay(10); 1558 udelay(10);
1431 if (phy->connected) 1559 if (phy->connected)
1432 bcm43xx_phy_write(bcm, 0x0812, 0x30B2); 1560 bcm43xx_phy_write(bcm, 0x0812,
1561 bcm43xx_get_812_value(bcm, LPD(1, 0, 1)));
1433 bcm43xx_phy_write(bcm, 0x0015, 0xEFB0); 1562 bcm43xx_phy_write(bcm, 0x0015, 0xEFB0);
1434 udelay(10); 1563 udelay(10);
1435 if (phy->connected) 1564 if (phy->connected)
1436 bcm43xx_phy_write(bcm, 0x0812, 0x30B2); 1565 bcm43xx_phy_write(bcm, 0x0812,
1566 bcm43xx_get_812_value(bcm, LPD(1, 0, 0)));
1437 bcm43xx_phy_write(bcm, 0x0015, 0xFFF0); 1567 bcm43xx_phy_write(bcm, 0x0015, 0xFFF0);
1438 udelay(10); 1568 udelay(20);
1439 tmp1 += bcm43xx_phy_read(bcm, 0x002D); 1569 tmp1 += bcm43xx_phy_read(bcm, 0x002D);
1440 bcm43xx_phy_write(bcm, 0x0058, 0x0000); 1570 bcm43xx_phy_write(bcm, 0x0058, 0x0000);
1441 if (phy->connected) 1571 if (phy->connected)
1442 bcm43xx_phy_write(bcm, 0x0812, 0x30B2); 1572 bcm43xx_phy_write(bcm, 0x0812,
1573 bcm43xx_get_812_value(bcm, LPD(1, 0, 1)));
1443 bcm43xx_phy_write(bcm, 0x0015, 0xAFB0); 1574 bcm43xx_phy_write(bcm, 0x0015, 0xAFB0);
1444 } 1575 }
1445 1576
@@ -1457,21 +1588,29 @@ u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm)
1457 bcm43xx_phy_write(bcm, 0x0059, 0xC810); 1588 bcm43xx_phy_write(bcm, 0x0059, 0xC810);
1458 bcm43xx_phy_write(bcm, 0x0058, 0x000D); 1589 bcm43xx_phy_write(bcm, 0x0058, 0x000D);
1459 if (phy->connected) 1590 if (phy->connected)
1460 bcm43xx_phy_write(bcm, 0x0812, 0x30B2); 1591 bcm43xx_phy_write(bcm, 0x0812,
1592 bcm43xx_get_812_value(bcm,
1593 LPD(1, 0, 1)));
1461 bcm43xx_phy_write(bcm, 0x0015, 0xAFB0); 1594 bcm43xx_phy_write(bcm, 0x0015, 0xAFB0);
1462 udelay(10); 1595 udelay(10);
1463 if (phy->connected) 1596 if (phy->connected)
1464 bcm43xx_phy_write(bcm, 0x0812, 0x30B2); 1597 bcm43xx_phy_write(bcm, 0x0812,
1598 bcm43xx_get_812_value(bcm,
1599 LPD(1, 0, 1)));
1465 bcm43xx_phy_write(bcm, 0x0015, 0xEFB0); 1600 bcm43xx_phy_write(bcm, 0x0015, 0xEFB0);
1466 udelay(10); 1601 udelay(10);
1467 if (phy->connected) 1602 if (phy->connected)
1468 bcm43xx_phy_write(bcm, 0x0812, 0x30B3); /* 0x30B3 is not a typo */ 1603 bcm43xx_phy_write(bcm, 0x0812,
1604 bcm43xx_get_812_value(bcm,
1605 LPD(1, 0, 0)));
1469 bcm43xx_phy_write(bcm, 0x0015, 0xFFF0); 1606 bcm43xx_phy_write(bcm, 0x0015, 0xFFF0);
1470 udelay(10); 1607 udelay(10);
1471 tmp2 += bcm43xx_phy_read(bcm, 0x002D); 1608 tmp2 += bcm43xx_phy_read(bcm, 0x002D);
1472 bcm43xx_phy_write(bcm, 0x0058, 0x0000); 1609 bcm43xx_phy_write(bcm, 0x0058, 0x0000);
1473 if (phy->connected) 1610 if (phy->connected)
1474 bcm43xx_phy_write(bcm, 0x0812, 0x30B2); 1611 bcm43xx_phy_write(bcm, 0x0812,
1612 bcm43xx_get_812_value(bcm,
1613 LPD(1, 0, 1)));
1475 bcm43xx_phy_write(bcm, 0x0015, 0xAFB0); 1614 bcm43xx_phy_write(bcm, 0x0015, 0xAFB0);
1476 } 1615 }
1477 tmp2++; 1616 tmp2++;
@@ -1497,15 +1636,20 @@ u16 bcm43xx_radio_init2050(struct bcm43xx_private *bcm)
1497 bcm43xx_phy_write(bcm, 0x0030, backup[2]); 1636 bcm43xx_phy_write(bcm, 0x0030, backup[2]);
1498 bcm43xx_write16(bcm, 0x03EC, backup[3]); 1637 bcm43xx_write16(bcm, 0x03EC, backup[3]);
1499 } else { 1638 } else {
1500 bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_RADIO,
1501 (bcm43xx_read16(bcm, BCM43xx_MMIO_PHY_RADIO) & 0x7FFF));
1502 if (phy->connected) { 1639 if (phy->connected) {
1640 bcm43xx_write16(bcm, BCM43xx_MMIO_PHY_RADIO,
1641 (bcm43xx_read16(bcm,
1642 BCM43xx_MMIO_PHY_RADIO) & 0x7FFF));
1503 bcm43xx_phy_write(bcm, 0x0811, backup[4]); 1643 bcm43xx_phy_write(bcm, 0x0811, backup[4]);
1504 bcm43xx_phy_write(bcm, 0x0812, backup[5]); 1644 bcm43xx_phy_write(bcm, 0x0812, backup[5]);
1505 bcm43xx_phy_write(bcm, 0x0814, backup[6]); 1645 bcm43xx_phy_write(bcm, 0x0814, backup[6]);
1506 bcm43xx_phy_write(bcm, 0x0815, backup[7]); 1646 bcm43xx_phy_write(bcm, 0x0815, backup[7]);
1507 bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS, backup[8]); 1647 bcm43xx_phy_write(bcm, BCM43xx_PHY_G_CRS, backup[8]);
1508 bcm43xx_phy_write(bcm, 0x0802, backup[9]); 1648 bcm43xx_phy_write(bcm, 0x0802, backup[9]);
1649 if (phy->rev > 1) {
1650 bcm43xx_phy_write(bcm, 0x080F, backup[19]);
1651 bcm43xx_phy_write(bcm, 0x0810, backup[20]);
1652 }
1509 } 1653 }
1510 } 1654 }
1511 if (i >= 15) 1655 if (i >= 15)