HowTo_read_external_TX_power_related_file(1).pdf

(203 KB) Pobierz
How to read external
TX_power_related_table
2014/11/12
Introduction
Realtek WiFi driver has TX_power_by_rate_table and TX_power_limit_table which
use to adjust output power and limit maximum output power in each channel with
different transmit rate. Maximum transmit power depends on Government regulations
which are FCC, ETSI and MKK. Realtek dongle has a factory default TX
power_limit_table burned in efuse in production.
Customize TX power table provides a possibility for WiFi module maker to modify
TX_power_by_rate_table (PHY_REG_PG.txt) and TX_power_limit_table
(TXPWR_LMT.txt) after production for some reason.
Note!
External TX power table will be generated by agent who sells wifi chip to
customer.
Store TX_power_by_rate_table and TX_power_limit_table in a read only
partition is a good idea to avoid damage.
TX_power_by_rate_table and TX_power_limit_table cannot be removed by
upgrade image and reset default.
Configure steps
1. Load parameter from file – by modify Makefile.
A. Modify the CONFIG_LOAD_PHY_PARA_FROM_FILE to y .
Ex:
CONFIG_LOAD_PHY_PARA_FROM_FILE = y
2. Copy file to specified folder:
A. Make new folder according to your chip name under the path which have
read permissions.
Ex: /lib/firmware/rtl8812a
B. Move PHY_REG_PG.txt and TXPWR_LMT.txt to above folder.
3. 3 ways to decide if driver refer to external TX power table
1
A.
By change configuration
Step-1. Modify Makefile
Ex:
CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY =
y
Driver will refer to PHY_REG_PG.txt and TXPWR_LMT.txt
Ex:
CONFIG_CALIBRATE_TX_POWER_TO_MAX =
y
Driver will refer to PHY_REG_PG.txt
Step-2.Modify file path in Makefile
Un-mark
#EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"/lib/firmware/\"
Ex:
EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"/lib/firmware/\"
and mark
EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"\"
Ex:
#
EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"\"
Or
B.
By change configuration
Step-1. Modify Makefile
Ex:
CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY =
y
Driver will refer to PHY_REG_PG.txt and TXPWR_LMT.txt
Ex:
CONFIG_CALIBRATE_TX_POWER_TO_MAX =
y
Driver will refer to PHY_REG_PG.txt
Step-2.Modify file path in os_intfs.c
Ex:
char *rtw_phy_file_path = "/lib/firmware/";
Or
C.
By change load-time module parameter
$>insmod
8812au.ko rtw_tx_pwr_lmt_enable=1 rtw_tx_pwr_by_rate=1
rtw_phy_file_path=”/lib/firmware/” rtw_decrypt_phy_file=0
4. Parameter Notes:
A. rtw_tx_pwr_lmt_enable:
i.
rtw_tx_pwr_lmt_enable = 0; // 0: Disable
ii.
rtw_tx_pwr_lmt_enable = 1; // 1: Enable
iii.
rtw_tx_pwr_lmt_enable = 2; // 2: Depends on efuse
B. rtw_tx_pwr_by_rate:
i.
ii.
iii.
rtw_tx_pwr_lmt_enable = 0; // 0: Disable
rtw_tx_pwr_lmt_enable = 1; // 1: Enable
rtw_tx_pwr_lmt_enable = 2; // 2: Depends on efuse
2
C.
rtw_phy_file_path:
i.
rtw_phy_file_path=”/lib/firmware/”, path /lib/firmware/ is the location
of tx power related file.
D. rtw_decrypt_phy_file:
i.
rtw_decrypt_phy_file
= 0; //File is not encrypted
ii.
rtw_decrypt_phy_file
= 1; //File is encrypted
5. Folder name for each supported chip.
A. rtl8188e
B.
C.
D.
E.
rtl8812a
rtl8821a
rtl8723b
rtl8192e
How could you check power tables have been loaded?
1. Input command to open kernel log
#tail -f /var/log/kern.log
2. After insert module, the log will show as below.
”RTL871X:
retriveFromFile openFile path:/lib/firmware/rtl8812a/TXPWR_LMT.txt
fp = ffff8800a62ebc00“
Realtek default regulation of power limit table
(FCC/ETSI/MKK) corresponding eFuse (0xB8h)
channel plan divide into 3 group, if your product
must support other regulation, please contact
Realtek.
1. ETSI for Europe.
2. MKK for Japan and Korea.
3. FCC for excluding Europe and Japan/Korea.
3
Zgłoś jeśli naruszono regulamin