Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278162
b: refs/heads/master
c: 3b98c7f
h: refs/heads/master
v: v3
  • Loading branch information
Stanislaw Gruszka committed Nov 15, 2011
1 parent 786e640 commit 9a2e408
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 100 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c2c885200057c44ac5660d123e199192689ca5d
refs/heads/master: 3b98c7f49b675eb13e723967cf1264e3d562c480
32 changes: 16 additions & 16 deletions trunk/drivers/net/wireless/iwlegacy/iwl-3945-fh.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,25 @@
#define FH39_MEM_LOWER_BOUND (0x0800)
#define FH39_MEM_UPPER_BOUND (0x1000)

#define FH39_CBCC_TABLE (FH39_MEM_LOWER_BOUND + 0x140)
#define FH39_TFDB_TABLE (FH39_MEM_LOWER_BOUND + 0x180)
#define FH39_RCSR_TABLE (FH39_MEM_LOWER_BOUND + 0x400)
#define FH39_RSSR_TABLE (FH39_MEM_LOWER_BOUND + 0x4c0)
#define FH39_TCSR_TABLE (FH39_MEM_LOWER_BOUND + 0x500)
#define FH39_TSSR_TABLE (FH39_MEM_LOWER_BOUND + 0x680)
#define FH39_CBCC_TBL (FH39_MEM_LOWER_BOUND + 0x140)
#define FH39_TFDB_TBL (FH39_MEM_LOWER_BOUND + 0x180)
#define FH39_RCSR_TBL (FH39_MEM_LOWER_BOUND + 0x400)
#define FH39_RSSR_TBL (FH39_MEM_LOWER_BOUND + 0x4c0)
#define FH39_TCSR_TBL (FH39_MEM_LOWER_BOUND + 0x500)
#define FH39_TSSR_TBL (FH39_MEM_LOWER_BOUND + 0x680)

/* TFDB (Transmit Frame Buffer Descriptor) */
#define FH39_TFDB(_ch, buf) (FH39_TFDB_TABLE + \
#define FH39_TFDB(_ch, buf) (FH39_TFDB_TBL + \
((_ch) * 2 + (buf)) * 0x28)
#define FH39_TFDB_CHNL_BUF_CTRL_REG(_ch) (FH39_TFDB_TABLE + 0x50 * (_ch))
#define FH39_TFDB_CHNL_BUF_CTRL_REG(_ch) (FH39_TFDB_TBL + 0x50 * (_ch))

/* CBCC channel is [0,2] */
#define FH39_CBCC(_ch) (FH39_CBCC_TABLE + (_ch) * 0x8)
#define FH39_CBCC(_ch) (FH39_CBCC_TBL + (_ch) * 0x8)
#define FH39_CBCC_CTRL(_ch) (FH39_CBCC(_ch) + 0x00)
#define FH39_CBCC_BASE(_ch) (FH39_CBCC(_ch) + 0x04)

/* RCSR channel is [0,2] */
#define FH39_RCSR(_ch) (FH39_RCSR_TABLE + (_ch) * 0x40)
#define FH39_RCSR(_ch) (FH39_RCSR_TBL + (_ch) * 0x40)
#define FH39_RCSR_CONFIG(_ch) (FH39_RCSR(_ch) + 0x00)
#define FH39_RCSR_RBD_BASE(_ch) (FH39_RCSR(_ch) + 0x04)
#define FH39_RCSR_WPTR(_ch) (FH39_RCSR(_ch) + 0x20)
Expand All @@ -101,19 +101,19 @@
#define FH39_RSCSR_CHNL0_WPTR (FH39_RCSR_WPTR(0))

/* RSSR */
#define FH39_RSSR_CTRL (FH39_RSSR_TABLE + 0x000)
#define FH39_RSSR_STATUS (FH39_RSSR_TABLE + 0x004)
#define FH39_RSSR_CTRL (FH39_RSSR_TBL + 0x000)
#define FH39_RSSR_STATUS (FH39_RSSR_TBL + 0x004)

/* TCSR */
#define FH39_TCSR(_ch) (FH39_TCSR_TABLE + (_ch) * 0x20)
#define FH39_TCSR(_ch) (FH39_TCSR_TBL + (_ch) * 0x20)
#define FH39_TCSR_CONFIG(_ch) (FH39_TCSR(_ch) + 0x00)
#define FH39_TCSR_CREDIT(_ch) (FH39_TCSR(_ch) + 0x04)
#define FH39_TCSR_BUFF_STTS(_ch) (FH39_TCSR(_ch) + 0x08)

/* TSSR */
#define FH39_TSSR_CBB_BASE (FH39_TSSR_TABLE + 0x000)
#define FH39_TSSR_MSG_CONFIG (FH39_TSSR_TABLE + 0x008)
#define FH39_TSSR_TX_STATUS (FH39_TSSR_TABLE + 0x010)
#define FH39_TSSR_CBB_BASE (FH39_TSSR_TBL + 0x000)
#define FH39_TSSR_MSG_CONFIG (FH39_TSSR_TBL + 0x008)
#define FH39_TSSR_TX_STATUS (FH39_TSSR_TBL + 0x010)


/* DBM */
Expand Down
52 changes: 26 additions & 26 deletions trunk/drivers/net/wireless/iwlegacy/iwl-3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
RATE_##rn##M_IDX, \
RATE_##pp##M_IDX, \
RATE_##np##M_IDX, \
RATE_##r##M_IDX_TABLE, \
RATE_##ip##M_IDX_TABLE }
RATE_##r##M_IDX_TBL, \
RATE_##ip##M_IDX_TBL }

/*
* Parameter order:
Expand Down Expand Up @@ -1330,7 +1330,7 @@ static void il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_idx,
/* use this channel group's 6Mbit clipping/saturation pwr,
* but cap at regulatory scan power restriction (set during init
* based on eeprom channel data) for this channel. */
power = min(ch_info->scan_power, clip_pwrs[RATE_6M_IDX_TABLE]);
power = min(ch_info->scan_power, clip_pwrs[RATE_6M_IDX_TBL]);

power = min(power, il->tx_power_user_lmt);
scan_power_info->requested_power = power;
Expand All @@ -1342,7 +1342,7 @@ static void il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_idx,
* *idx*. */
power_idx = ch_info->power_info[rate_idx].power_table_idx
- (power - ch_info->power_info
[RATE_6M_IDX_TABLE].requested_power) * 2;
[RATE_6M_IDX_TBL].requested_power) * 2;

/* store reference idx that we use when adjusting *all* scan
* powers. So we can accommodate user (all channel) or spectrum
Expand Down Expand Up @@ -1394,7 +1394,7 @@ static int il3945_send_tx_power(struct il_priv *il)
}

if (!il_is_channel_valid(ch_info)) {
D_POWER("Not calling TX_PWR_TABLE_CMD on "
D_POWER("Not calling TX_PWR_TBL_CMD on "
"non-Tx channel.\n");
return 0;
}
Expand Down Expand Up @@ -1428,7 +1428,7 @@ static int il3945_send_tx_power(struct il_priv *il)
txpower.power[i].rate);
}

return il_send_cmd_pdu(il, REPLY_TX_PWR_TABLE_CMD,
return il_send_cmd_pdu(il, REPLY_TX_PWR_TBL_CMD,
sizeof(struct il3945_txpowertable_cmd),
&txpower);

Expand Down Expand Up @@ -1466,7 +1466,7 @@ static int il3945_hw_reg_set_new_power(struct il_priv *il,
power_info = ch_info->power_info;

/* update OFDM Txpower settings */
for (i = RATE_6M_IDX_TABLE; i <= RATE_54M_IDX_TABLE;
for (i = RATE_6M_IDX_TBL; i <= RATE_54M_IDX_TBL;
i++, ++power_info) {
int delta_idx;

Expand All @@ -1490,14 +1490,14 @@ static int il3945_hw_reg_set_new_power(struct il_priv *il,
* ... all CCK power settings for a given channel are the *same*. */
if (power_changed) {
power =
ch_info->power_info[RATE_12M_IDX_TABLE].
ch_info->power_info[RATE_12M_IDX_TBL].
requested_power + IL_CCK_FROM_OFDM_POWER_DIFF;

/* do all CCK rates' il3945_channel_power_info structures */
for (i = RATE_1M_IDX_TABLE; i <= RATE_11M_IDX_TABLE; i++) {
for (i = RATE_1M_IDX_TBL; i <= RATE_11M_IDX_TBL; i++) {
power_info->requested_power = power;
power_info->base_power_idx =
ch_info->power_info[RATE_12M_IDX_TABLE].
ch_info->power_info[RATE_12M_IDX_TBL].
base_power_idx + IL_CCK_FROM_OFDM_IDX_DIFF;
++power_info;
}
Expand Down Expand Up @@ -1597,7 +1597,7 @@ static int il3945_hw_reg_comp_txpower_temp(struct il_priv *il)
for (scan_tbl_idx = 0;
scan_tbl_idx < IL_NUM_SCAN_RATES; scan_tbl_idx++) {
s32 actual_idx = (scan_tbl_idx == 0) ?
RATE_1M_IDX_TABLE : RATE_6M_IDX_TABLE;
RATE_1M_IDX_TBL : RATE_6M_IDX_TBL;
il3945_hw_reg_set_scan_power(il, scan_tbl_idx,
actual_idx, clip_pwrs,
ch_info, a_band);
Expand Down Expand Up @@ -2012,19 +2012,19 @@ static void il3945_hw_reg_init_channel_groups(struct il_priv *il)
for (rate_idx = 0;
rate_idx < RATE_COUNT_3945; rate_idx++, clip_pwrs++) {
switch (rate_idx) {
case RATE_36M_IDX_TABLE:
case RATE_36M_IDX_TBL:
if (i == 0) /* B/G */
*clip_pwrs = satur_pwr;
else /* A */
*clip_pwrs = satur_pwr - 5;
break;
case RATE_48M_IDX_TABLE:
case RATE_48M_IDX_TBL:
if (i == 0)
*clip_pwrs = satur_pwr - 7;
else
*clip_pwrs = satur_pwr - 10;
break;
case RATE_54M_IDX_TABLE:
case RATE_54M_IDX_TBL:
if (i == 0)
*clip_pwrs = satur_pwr - 9;
else
Expand Down Expand Up @@ -2139,7 +2139,7 @@ int il3945_txpower_set_from_eeprom(struct il_priv *il)
}

/* set tx power for CCK rates, based on OFDM 12 Mbit settings*/
pwr_info = &ch_info->power_info[RATE_12M_IDX_TABLE];
pwr_info = &ch_info->power_info[RATE_12M_IDX_TBL];
power = pwr_info->requested_power +
IL_CCK_FROM_OFDM_POWER_DIFF;
pwr_idx = pwr_info->power_table_idx +
Expand Down Expand Up @@ -2169,7 +2169,7 @@ int il3945_txpower_set_from_eeprom(struct il_priv *il)
for (scan_tbl_idx = 0;
scan_tbl_idx < IL_NUM_SCAN_RATES; scan_tbl_idx++) {
s32 actual_idx = (scan_tbl_idx == 0) ?
RATE_1M_IDX_TABLE : RATE_6M_IDX_TABLE;
RATE_1M_IDX_TBL : RATE_6M_IDX_TBL;
il3945_hw_reg_set_scan_power(il, scan_tbl_idx,
actual_idx, clip_pwrs, ch_info, a_band);
}
Expand Down Expand Up @@ -2223,7 +2223,7 @@ static u16 il3945_get_hcmd_size(u8 cmd_id, u16 len)
switch (cmd_id) {
case REPLY_RXON:
return sizeof(struct il3945_rxon_cmd);
case POWER_TABLE_CMD:
case POWER_TBL_CMD:
return sizeof(struct il3945_powertable_cmd);
default:
return len;
Expand Down Expand Up @@ -2326,17 +2326,17 @@ int il3945_init_hw_rate_table(struct il_priv *il)
D_RATE("Select A mode rate scale\n");
/* If one of the following CCK rates is used,
* have it fall back to the 6M OFDM rate */
for (i = RATE_1M_IDX_TABLE;
i <= RATE_11M_IDX_TABLE; i++)
for (i = RATE_1M_IDX_TBL;
i <= RATE_11M_IDX_TBL; i++)
table[i].next_rate_idx =
il3945_rates[IL_FIRST_OFDM_RATE].table_rs_idx;

/* Don't fall back to CCK rates */
table[RATE_12M_IDX_TABLE].next_rate_idx =
RATE_9M_IDX_TABLE;
table[RATE_12M_IDX_TBL].next_rate_idx =
RATE_9M_IDX_TBL;

/* Don't drop out of OFDM rates */
table[RATE_6M_IDX_TABLE].next_rate_idx =
table[RATE_6M_IDX_TBL].next_rate_idx =
il3945_rates[IL_FIRST_OFDM_RATE].table_rs_idx;
break;

Expand All @@ -2349,14 +2349,14 @@ int il3945_init_hw_rate_table(struct il_priv *il)
il_is_associated(il)) {

idx = IL_FIRST_CCK_RATE;
for (i = RATE_6M_IDX_TABLE;
i <= RATE_54M_IDX_TABLE; i++)
for (i = RATE_6M_IDX_TBL;
i <= RATE_54M_IDX_TBL; i++)
table[i].next_rate_idx =
il3945_rates[idx].table_rs_idx;

idx = RATE_11M_IDX_TABLE;
idx = RATE_11M_IDX_TBL;
/* CCK shouldn't fall back to OFDM... */
table[idx].next_rate_idx = RATE_5M_IDX_TABLE;
table[idx].next_rate_idx = RATE_5M_IDX_TBL;
}
break;

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/iwlegacy/iwl-4965-calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,18 +429,18 @@ static int il4965_sensitivity_write(struct il_priv *il)
il4965_prepare_legacy_sensitivity_tbl(il, data, &cmd.table[0]);

/* Update uCode's "work" table, and copy it to DSP */
cmd.control = SENSITIVITY_CMD_CONTROL_WORK_TABLE;
cmd.control = SENSITIVITY_CMD_CONTROL_WORK_TBL;

/* Don't send command to uCode if nothing has changed */
if (!memcmp(&cmd.table[0], &(il->sensitivity_tbl[0]),
sizeof(u16)*HD_TABLE_SIZE)) {
sizeof(u16)*HD_TBL_SIZE)) {
D_CALIB("No change in SENSITIVITY_CMD\n");
return 0;
}

/* Copy table for comparison next time */
memcpy(&(il->sensitivity_tbl[0]), &(cmd.table[0]),
sizeof(u16)*HD_TABLE_SIZE);
sizeof(u16)*HD_TBL_SIZE);

return il_send_cmd(il, &cmd_out);
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/iwlegacy/iwl-4965-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,11 +1001,11 @@ static void il4965_rs_set_stay_in_table(struct il_priv *il, u8 is_legacy,
D_RATE("we are staying in the same table\n");
lq_sta->stay_in_tbl = 1; /* only place this gets set */
if (is_legacy) {
lq_sta->table_count_limit = IL_LEGACY_TABLE_COUNT;
lq_sta->table_count_limit = IL_LEGACY_TBL_COUNT;
lq_sta->max_failure_limit = IL_LEGACY_FAILURE_LIMIT;
lq_sta->max_success_limit = IL_LEGACY_SUCCESS_LIMIT;
} else {
lq_sta->table_count_limit = IL_NONE_LEGACY_TABLE_COUNT;
lq_sta->table_count_limit = IL_NONE_LEGACY_TBL_COUNT;
lq_sta->max_failure_limit = IL_NONE_LEGACY_FAILURE_LIMIT;
lq_sta->max_success_limit = IL_NONE_LEGACY_SUCCESS_LIMIT;
}
Expand Down Expand Up @@ -1916,7 +1916,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il,
* continuing to use the setup that we've been trying. */
if (win->average_tpt > lq_sta->last_tpt) {

D_RATE("LQ: SWITCHING TO NEW TABLE "
D_RATE("LQ: SWITCHING TO NEW TBL "
"suc=%d cur-tpt=%d old-tpt=%d\n",
win->success_ratio,
win->average_tpt,
Expand All @@ -1932,7 +1932,7 @@ static void il4965_rs_rate_scale_perform(struct il_priv *il,
/* Else poor success; go back to mode in "active" table */
} else {

D_RATE("LQ: GOING BACK TO THE OLD TABLE "
D_RATE("LQ: GOING BACK TO THE OLD TBL "
"suc=%d cur-tpt=%d old-tpt=%d\n",
win->success_ratio,
win->average_tpt,
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/iwlegacy/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel,
}

/* for each of 33 bit-rates (including 1 for CCK) */
for (i = 0; i < POWER_TABLE_NUM_ENTRIES; i++) {
for (i = 0; i < POWER_TBL_NUM_ENTRIES; i++) {
u8 is_mimo_rate;
union il4965_tx_power_dual_stream tx_power;

Expand Down Expand Up @@ -1072,7 +1072,7 @@ static int il4965_fill_txpower_tbl(struct il_priv *il, u8 band, u16 channel,
power_idx += 9;

/* CCK, rate 32, reduce txpower for CCK */
if (i == POWER_TABLE_CCK_ENTRY)
if (i == POWER_TBL_CCK_ENTRY)
power_idx +=
IL_TX_POWER_CCK_COMPENSATION_C_STEP;

Expand Down Expand Up @@ -1144,7 +1144,7 @@ static int il4965_send_tx_power(struct il_priv *il)
goto out;

ret = il_send_cmd_pdu(il,
REPLY_TX_PWR_TABLE_CMD, sizeof(cmd), &cmd);
REPLY_TX_PWR_TBL_CMD, sizeof(cmd), &cmd);

out:
return ret;
Expand Down
Loading

0 comments on commit 9a2e408

Please sign in to comment.