aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-07-08 09:11:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-07-15 15:51:37 -0400
commit12db5481ba0ed561c9105b7e28528aa2a551e38b (patch)
treeebca1a2e9e71ec70d5d57828781d0e42d4feeed2 /drivers/net/wireless/b43
parent0933ecf9ab1f0ff7ae1ff4309aee0b909fc785d9 (diff)
b43: N-PHY: add TX gain tables for devices with specific EPA
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r--drivers/net/wireless/b43/tables_nphy.c74
1 files changed, 72 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
index b28dce950e1f..3a5cd902ff1f 100644
--- a/drivers/net/wireless/b43/tables_nphy.c
+++ b/drivers/net/wireless/b43/tables_nphy.c
@@ -2408,6 +2408,41 @@ static const u32 b43_ntab_tx_gain_epa_rev3_2g[] = {
2408 0x1041003c, 0x1041003b, 0x10410039, 0x10410037, 2408 0x1041003c, 0x1041003b, 0x10410039, 0x10410037,
2409}; 2409};
2410 2410
2411static const u32 b43_ntab_tx_gain_epa_rev3_hi_pwr_2g[] = {
2412 0x0f410044, 0x0f410042, 0x0f410040, 0x0f41003e,
2413 0x0f41003c, 0x0f41003b, 0x0f410039, 0x0f410037,
2414 0x0e410044, 0x0e410042, 0x0e410040, 0x0e41003e,
2415 0x0e41003c, 0x0e41003b, 0x0e410039, 0x0e410037,
2416 0x0d410044, 0x0d410042, 0x0d410040, 0x0d41003e,
2417 0x0d41003c, 0x0d41003b, 0x0d410039, 0x0d410037,
2418 0x0c410044, 0x0c410042, 0x0c410040, 0x0c41003e,
2419 0x0c41003c, 0x0c41003b, 0x0c410039, 0x0c410037,
2420 0x0b410044, 0x0b410042, 0x0b410040, 0x0b41003e,
2421 0x0b41003c, 0x0b41003b, 0x0b410039, 0x0b410037,
2422 0x0a410044, 0x0a410042, 0x0a410040, 0x0a41003e,
2423 0x0a41003c, 0x0a41003b, 0x0a410039, 0x0a410037,
2424 0x09410044, 0x09410042, 0x09410040, 0x0941003e,
2425 0x0941003c, 0x0941003b, 0x09410039, 0x09410037,
2426 0x08410044, 0x08410042, 0x08410040, 0x0841003e,
2427 0x0841003c, 0x0841003b, 0x08410039, 0x08410037,
2428 0x07410044, 0x07410042, 0x07410040, 0x0741003e,
2429 0x0741003c, 0x0741003b, 0x07410039, 0x07410037,
2430 0x06410044, 0x06410042, 0x06410040, 0x0641003e,
2431 0x0641003c, 0x0641003b, 0x06410039, 0x06410037,
2432 0x05410044, 0x05410042, 0x05410040, 0x0541003e,
2433 0x0541003c, 0x0541003b, 0x05410039, 0x05410037,
2434 0x04410044, 0x04410042, 0x04410040, 0x0441003e,
2435 0x0441003c, 0x0441003b, 0x04410039, 0x04410037,
2436 0x03410044, 0x03410042, 0x03410040, 0x0341003e,
2437 0x0341003c, 0x0341003b, 0x03410039, 0x03410037,
2438 0x02410044, 0x02410042, 0x02410040, 0x0241003e,
2439 0x0241003c, 0x0241003b, 0x02410039, 0x02410037,
2440 0x01410044, 0x01410042, 0x01410040, 0x0141003e,
2441 0x0141003c, 0x0141003b, 0x01410039, 0x01410037,
2442 0x00410044, 0x00410042, 0x00410040, 0x0041003e,
2443 0x0041003c, 0x0041003b, 0x00410039, 0x00410037
2444};
2445
2411/* EPA 5 GHz */ 2446/* EPA 5 GHz */
2412 2447
2413static const u32 b43_ntab_tx_gain_epa_rev3_5g[] = { 2448static const u32 b43_ntab_tx_gain_epa_rev3_5g[] = {
@@ -2480,6 +2515,41 @@ static const u32 b43_ntab_tx_gain_epa_rev4_5g[] = {
2480 0x20d2003a, 0x20d20038, 0x20d20036, 0x20d20034, 2515 0x20d2003a, 0x20d20038, 0x20d20036, 0x20d20034,
2481}; 2516};
2482 2517
2518static const u32 b43_ntab_tx_gain_epa_rev4_hi_pwr_5g[] = {
2519 0x2ff10044, 0x2ff10042, 0x2ff10040, 0x2ff1003e,
2520 0x2ff1003c, 0x2ff1003b, 0x2ff10039, 0x2ff10037,
2521 0x2ef10044, 0x2ef10042, 0x2ef10040, 0x2ef1003e,
2522 0x2ef1003c, 0x2ef1003b, 0x2ef10039, 0x2ef10037,
2523 0x2df10044, 0x2df10042, 0x2df10040, 0x2df1003e,
2524 0x2df1003c, 0x2df1003b, 0x2df10039, 0x2df10037,
2525 0x2cf10044, 0x2cf10042, 0x2cf10040, 0x2cf1003e,
2526 0x2cf1003c, 0x2cf1003b, 0x2cf10039, 0x2cf10037,
2527 0x2bf10044, 0x2bf10042, 0x2bf10040, 0x2bf1003e,
2528 0x2bf1003c, 0x2bf1003b, 0x2bf10039, 0x2bf10037,
2529 0x2af10044, 0x2af10042, 0x2af10040, 0x2af1003e,
2530 0x2af1003c, 0x2af1003b, 0x2af10039, 0x2af10037,
2531 0x29f10044, 0x29f10042, 0x29f10040, 0x29f1003e,
2532 0x29f1003c, 0x29f1003b, 0x29f10039, 0x29f10037,
2533 0x28f10044, 0x28f10042, 0x28f10040, 0x28f1003e,
2534 0x28f1003c, 0x28f1003b, 0x28f10039, 0x28f10037,
2535 0x27f10044, 0x27f10042, 0x27f10040, 0x27f1003e,
2536 0x27f1003c, 0x27f1003b, 0x27f10039, 0x27f10037,
2537 0x26f10044, 0x26f10042, 0x26f10040, 0x26f1003e,
2538 0x26f1003c, 0x26f1003b, 0x26f10039, 0x26f10037,
2539 0x25f10044, 0x25f10042, 0x25f10040, 0x25f1003e,
2540 0x25f1003c, 0x25f1003b, 0x25f10039, 0x25f10037,
2541 0x24f10044, 0x24f10042, 0x24f10040, 0x24f1003e,
2542 0x24f1003c, 0x24f1003b, 0x24f10039, 0x24f10038,
2543 0x23f10041, 0x23f10040, 0x23f1003f, 0x23f1003e,
2544 0x23f1003c, 0x23f1003b, 0x23f10039, 0x23f10037,
2545 0x22f10044, 0x22f10042, 0x22f10040, 0x22f1003e,
2546 0x22f1003c, 0x22f1003b, 0x22f10039, 0x22f10037,
2547 0x21f10044, 0x21f10042, 0x21f10040, 0x21f1003e,
2548 0x21f1003c, 0x21f1003b, 0x21f10039, 0x21f10037,
2549 0x20d10043, 0x20d10041, 0x20d1003e, 0x20d1003c,
2550 0x20d1003a, 0x20d10038, 0x20d10036, 0x20d10034
2551};
2552
2483static const u32 b43_ntab_tx_gain_epa_rev5_5g[] = { 2553static const u32 b43_ntab_tx_gain_epa_rev5_5g[] = {
2484 0x0f62004a, 0x0f620048, 0x0f620046, 0x0f620044, 2554 0x0f62004a, 0x0f620048, 0x0f620046, 0x0f620044,
2485 0x0f620042, 0x0f620040, 0x0f62003e, 0x0f62003c, 2555 0x0f620042, 0x0f620040, 0x0f62003e, 0x0f62003c,
@@ -3530,7 +3600,7 @@ const u32 *b43_nphy_get_tx_gain_table(struct b43_wldev *dev)
3530 case 4: 3600 case 4:
3531 return sprom->fem.ghz5.extpa_gain == 3 ? 3601 return sprom->fem.ghz5.extpa_gain == 3 ?
3532 b43_ntab_tx_gain_epa_rev4_5g : 3602 b43_ntab_tx_gain_epa_rev4_5g :
3533 b43_ntab_tx_gain_epa_rev4_5g; /* FIXME */ 3603 b43_ntab_tx_gain_epa_rev4_hi_pwr_5g;
3534 case 3: 3604 case 3:
3535 return b43_ntab_tx_gain_epa_rev3_5g; 3605 return b43_ntab_tx_gain_epa_rev3_5g;
3536 default: 3606 default:
@@ -3543,7 +3613,7 @@ const u32 *b43_nphy_get_tx_gain_table(struct b43_wldev *dev)
3543 case 6: 3613 case 6:
3544 case 5: 3614 case 5:
3545 if (sprom->fem.ghz5.extpa_gain == 3) 3615 if (sprom->fem.ghz5.extpa_gain == 3)
3546 return b43_ntab_tx_gain_epa_rev3_2g; /* FIXME */ 3616 return b43_ntab_tx_gain_epa_rev3_hi_pwr_2g;
3547 /* fall through */ 3617 /* fall through */
3548 case 4: 3618 case 4:
3549 case 3: 3619 case 3: