| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | |
|---|
| 2 | 3 | /* Radio tuning for RTL8225 on RTL8187SE |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 10 | 11 | * Also based on the rtl8187 driver, which is: |
|---|
| 11 | 12 | * Copyright 2007 Michael Wu <flamingice@sourmilk.net> |
|---|
| 12 | 13 | * Copyright 2007 Andrea Merello <andrea.merello@gmail.com> |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 15 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 16 | | - * published by the Free Software Foundation. |
|---|
| 17 | 14 | */ |
|---|
| 18 | 15 | |
|---|
| 19 | 16 | #include <net/mac80211.h> |
|---|
| .. | .. |
|---|
| 40 | 37 | 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, |
|---|
| 41 | 38 | }; |
|---|
| 42 | 39 | |
|---|
| 43 | | -static const u8 rtl8225se_tx_gain_cck_ofdm[] = { |
|---|
| 44 | | - 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0x7e |
|---|
| 45 | | -}; |
|---|
| 46 | | - |
|---|
| 47 | | -static const u8 rtl8225se_tx_power_cck[] = { |
|---|
| 48 | | - 0x18, 0x17, 0x15, 0x11, 0x0c, 0x08, 0x04, 0x02, |
|---|
| 49 | | - 0x1b, 0x1a, 0x17, 0x13, 0x0e, 0x09, 0x04, 0x02, |
|---|
| 50 | | - 0x1f, 0x1e, 0x1a, 0x15, 0x10, 0x0a, 0x05, 0x02, |
|---|
| 51 | | - 0x22, 0x21, 0x1d, 0x18, 0x11, 0x0b, 0x06, 0x02, |
|---|
| 52 | | - 0x26, 0x25, 0x21, 0x1b, 0x14, 0x0d, 0x06, 0x03, |
|---|
| 53 | | - 0x2b, 0x2a, 0x25, 0x1e, 0x16, 0x0e, 0x07, 0x03 |
|---|
| 54 | | -}; |
|---|
| 55 | | - |
|---|
| 56 | | -static const u8 rtl8225se_tx_power_cck_ch14[] = { |
|---|
| 57 | | - 0x18, 0x17, 0x15, 0x0c, 0x00, 0x00, 0x00, 0x00, |
|---|
| 58 | | - 0x1b, 0x1a, 0x17, 0x0e, 0x00, 0x00, 0x00, 0x00, |
|---|
| 59 | | - 0x1f, 0x1e, 0x1a, 0x0f, 0x00, 0x00, 0x00, 0x00, |
|---|
| 60 | | - 0x22, 0x21, 0x1d, 0x11, 0x00, 0x00, 0x00, 0x00, |
|---|
| 61 | | - 0x26, 0x25, 0x21, 0x13, 0x00, 0x00, 0x00, 0x00, |
|---|
| 62 | | - 0x2b, 0x2a, 0x25, 0x15, 0x00, 0x00, 0x00, 0x00 |
|---|
| 63 | | -}; |
|---|
| 64 | | - |
|---|
| 65 | | -static const u8 rtl8225se_tx_power_ofdm[] = { |
|---|
| 66 | | - 0x80, 0x90, 0xa2, 0xb5, 0xcb, 0xe4 |
|---|
| 67 | | -}; |
|---|
| 68 | | - |
|---|
| 69 | 40 | static const u32 rtl8225se_chan[] = { |
|---|
| 70 | 41 | 0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380, |
|---|
| 71 | 42 | 0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x074A, |
|---|
| 72 | | -}; |
|---|
| 73 | | - |
|---|
| 74 | | -static const u8 rtl8225sez2_tx_power_cck_ch14[] = { |
|---|
| 75 | | - 0x36, 0x35, 0x2e, 0x1b, 0x00, 0x00, 0x00, 0x00 |
|---|
| 76 | | -}; |
|---|
| 77 | | - |
|---|
| 78 | | -static const u8 rtl8225sez2_tx_power_cck_B[] = { |
|---|
| 79 | | - 0x30, 0x2f, 0x29, 0x21, 0x19, 0x10, 0x08, 0x04 |
|---|
| 80 | | -}; |
|---|
| 81 | | - |
|---|
| 82 | | -static const u8 rtl8225sez2_tx_power_cck_A[] = { |
|---|
| 83 | | - 0x33, 0x32, 0x2b, 0x23, 0x1a, 0x11, 0x08, 0x04 |
|---|
| 84 | | -}; |
|---|
| 85 | | - |
|---|
| 86 | | -static const u8 rtl8225sez2_tx_power_cck[] = { |
|---|
| 87 | | - 0x36, 0x35, 0x2e, 0x25, 0x1c, 0x12, 0x09, 0x04 |
|---|
| 88 | 43 | }; |
|---|
| 89 | 44 | |
|---|
| 90 | 45 | static const u8 ZEBRA_AGC[] = { |
|---|