Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108652361
D8571.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D8571.diff
View Options
Index: head/sys/dev/rtwn/rtl8812a/r12a_rom.c
===================================================================
--- head/sys/dev/rtwn/rtl8812a/r12a_rom.c
+++ head/sys/dev/rtwn/rtl8812a/r12a_rom.c
@@ -65,7 +65,7 @@
{
struct r12a_softc *rs = sc->sc_priv;
struct r12a_rom *rom = (struct r12a_rom *)buf;
- int i, j;
+ int i, j, k;
sc->thermal_meter = rom->thermal_meter;
rs->crystalcap = RTWN_GET_ROM_VAR(rom->crystalcap,
@@ -99,15 +99,15 @@
MS(pwr_diff_2g->ht20_ofdm, HIGH_PART));
rs->bw40_tx_pwr_diff_2g[i][0] = 0;
- for (j = 1; j < nitems(pwr_diff_2g->diff123); j++) {
+ for (j = 1, k = 0; k < nitems(pwr_diff_2g->diff123); j++, k++) {
rs->cck_tx_pwr_diff_2g[i][j] = RTWN_SIGN4TO8(
- MS(pwr_diff_2g->diff123[j].ofdm_cck, LOW_PART));
+ MS(pwr_diff_2g->diff123[k].ofdm_cck, LOW_PART));
rs->ofdm_tx_pwr_diff_2g[i][j] = RTWN_SIGN4TO8(
- MS(pwr_diff_2g->diff123[j].ofdm_cck, HIGH_PART));
+ MS(pwr_diff_2g->diff123[k].ofdm_cck, HIGH_PART));
rs->bw20_tx_pwr_diff_2g[i][j] = RTWN_SIGN4TO8(
- MS(pwr_diff_2g->diff123[j].ht40_ht20, LOW_PART));
+ MS(pwr_diff_2g->diff123[k].ht40_ht20, LOW_PART));
rs->bw40_tx_pwr_diff_2g[i][j] = RTWN_SIGN4TO8(
- MS(pwr_diff_2g->diff123[j].ht40_ht20, HIGH_PART));
+ MS(pwr_diff_2g->diff123[k].ht40_ht20, HIGH_PART));
}
for (j = 0; j < R12A_GROUP_5G; j++) {
@@ -128,11 +128,12 @@
rs->bw20_tx_pwr_diff_5g[i][0] = RTWN_SIGN4TO8(
MS(pwr_diff_5g->ht20_ofdm, HIGH_PART));
rs->bw40_tx_pwr_diff_5g[i][0] = 0;
- for (j = 1; j < nitems(pwr_diff_5g->ht40_ht20); j++) {
+ for (j = 1, k = 0; k < nitems(pwr_diff_5g->ht40_ht20);
+ j++, k++) {
rs->bw20_tx_pwr_diff_5g[i][j] = RTWN_SIGN4TO8(
- MS(pwr_diff_5g->ht40_ht20[j], LOW_PART));
+ MS(pwr_diff_5g->ht40_ht20[k], LOW_PART));
rs->bw40_tx_pwr_diff_5g[i][j] = RTWN_SIGN4TO8(
- MS(pwr_diff_5g->ht40_ht20[j], HIGH_PART));
+ MS(pwr_diff_5g->ht40_ht20[k], HIGH_PART));
}
for (j = 0; j < nitems(pwr_diff_5g->ht80_ht160); j++) {
Index: head/sys/dev/rtwn/rtl8812a/r12a_var.h
===================================================================
--- head/sys/dev/rtwn/rtl8812a/r12a_var.h
+++ head/sys/dev/rtwn/rtl8812a/r12a_var.h
@@ -64,16 +64,16 @@
uint8_t ht40_tx_pwr_2g[R12A_MAX_RF_PATH][R12A_GROUP_2G];
uint8_t ht40_tx_pwr_5g[R12A_MAX_RF_PATH][R12A_GROUP_5G];
- uint8_t cck_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
- uint8_t ofdm_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
- uint8_t bw20_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
- uint8_t bw40_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
-
- uint8_t ofdm_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
- uint8_t bw20_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
- uint8_t bw40_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
- uint8_t bw80_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
- uint8_t bw160_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+ int8_t cck_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+ int8_t ofdm_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+ int8_t bw20_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+ int8_t bw40_tx_pwr_diff_2g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+
+ int8_t ofdm_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+ int8_t bw20_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+ int8_t bw40_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+ int8_t bw80_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
+ int8_t bw160_tx_pwr_diff_5g[R12A_MAX_RF_PATH][R12A_MAX_TX_COUNT];
int sc_ant;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 28, 2:27 AM (7 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16239495
Default Alt Text
D8571.diff (3 KB)
Attached To
Mode
D8571: Fix tx power (diff) calculation for rtl8812au/rtl8821au
Attached
Detach File
Event Timeline
Log In to Comment