| .. | .. |
|---|
| 18 | 18 | #include "hw-ops.h" |
|---|
| 19 | 19 | #include "../regd.h" |
|---|
| 20 | 20 | #include "ar9002_phy.h" |
|---|
| 21 | | -#include "ar5008_initvals.h" |
|---|
| 22 | 21 | |
|---|
| 23 | 22 | /* All code below is for AR5008, AR9001, AR9002 */ |
|---|
| 24 | 23 | |
|---|
| .. | .. |
|---|
| 37 | 36 | #define AR5008_11NG_HT_SS_SHIFT 12 |
|---|
| 38 | 37 | #define AR5008_11NG_HT_DS_SHIFT 20 |
|---|
| 39 | 38 | |
|---|
| 40 | | -static const int firstep_table[] = |
|---|
| 41 | | -/* level: 0 1 2 3 4 5 6 7 8 */ |
|---|
| 42 | | - { -4, -2, 0, 2, 4, 6, 8, 10, 12 }; /* lvl 0-8, default 2 */ |
|---|
| 43 | | - |
|---|
| 44 | 39 | /* |
|---|
| 45 | 40 | * register values to turn OFDM weak signal detection OFF |
|---|
| 46 | 41 | */ |
|---|
| .. | .. |
|---|
| 54 | 49 | static const int m2ThreshLowExt_off = 127; |
|---|
| 55 | 50 | static const int m1ThreshExt_off = 127; |
|---|
| 56 | 51 | static const int m2ThreshExt_off = 127; |
|---|
| 52 | + |
|---|
| 53 | +static const u32 ar5416Bank0[][2] = { |
|---|
| 54 | + /* Addr allmodes */ |
|---|
| 55 | + {0x000098b0, 0x1e5795e5}, |
|---|
| 56 | + {0x000098e0, 0x02008020}, |
|---|
| 57 | +}; |
|---|
| 58 | + |
|---|
| 59 | +static const u32 ar5416Bank1[][2] = { |
|---|
| 60 | + /* Addr allmodes */ |
|---|
| 61 | + {0x000098b0, 0x02108421}, |
|---|
| 62 | + {0x000098ec, 0x00000008}, |
|---|
| 63 | +}; |
|---|
| 64 | + |
|---|
| 65 | +static const u32 ar5416Bank2[][2] = { |
|---|
| 66 | + /* Addr allmodes */ |
|---|
| 67 | + {0x000098b0, 0x0e73ff17}, |
|---|
| 68 | + {0x000098e0, 0x00000420}, |
|---|
| 69 | +}; |
|---|
| 70 | + |
|---|
| 71 | +static const u32 ar5416Bank3[][3] = { |
|---|
| 72 | + /* Addr 5G 2G */ |
|---|
| 73 | + {0x000098f0, 0x01400018, 0x01c00018}, |
|---|
| 74 | +}; |
|---|
| 75 | + |
|---|
| 76 | +static const u32 ar5416Bank7[][2] = { |
|---|
| 77 | + /* Addr allmodes */ |
|---|
| 78 | + {0x0000989c, 0x00000500}, |
|---|
| 79 | + {0x0000989c, 0x00000800}, |
|---|
| 80 | + {0x000098cc, 0x0000000e}, |
|---|
| 81 | +}; |
|---|
| 57 | 82 | |
|---|
| 58 | 83 | static const struct ar5416IniArray bank0 = STATIC_INI_ARRAY(ar5416Bank0); |
|---|
| 59 | 84 | static const struct ar5416IniArray bank1 = STATIC_INI_ARRAY(ar5416Bank1); |
|---|
| .. | .. |
|---|
| 583 | 608 | case 0x5: |
|---|
| 584 | 609 | REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP, |
|---|
| 585 | 610 | AR_PHY_SWAP_ALT_CHAIN); |
|---|
| 586 | | - /* fall through */ |
|---|
| 611 | + fallthrough; |
|---|
| 587 | 612 | case 0x3: |
|---|
| 588 | 613 | if (ah->hw_version.macVersion == AR_SREV_REVISION_5416_10) { |
|---|
| 589 | 614 | REG_WRITE(ah, AR_PHY_RX_CHAINMASK, 0x7); |
|---|
| 590 | 615 | REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, 0x7); |
|---|
| 591 | 616 | break; |
|---|
| 592 | 617 | } |
|---|
| 593 | | - /* else: fall through */ |
|---|
| 618 | + fallthrough; |
|---|
| 594 | 619 | case 0x1: |
|---|
| 595 | 620 | case 0x2: |
|---|
| 596 | 621 | case 0x7: |
|---|